新增消息推送几个接口
parent
724cb4d39a
commit
bee6fca347
@ -0,0 +1,36 @@
|
||||
package com.ms.api.spi.callback;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.jinritemai.cloud.base.api.BaseRequest;
|
||||
import com.jinritemai.cloud.base.api.BaseResponse;
|
||||
import com.jinritemai.cloud.base.api.ExtensionService;
|
||||
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
|
||||
import com.ms.api.common.R;
|
||||
import com.ms.api.common.SPIBaseService;
|
||||
import com.ms.api.dto.auth.PlatformAuthCallBackRequestDTO;
|
||||
import com.ms.api.tool.CommonTool;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 1688分销采购单消息
|
||||
*/
|
||||
@ExtensionService("dsMessageCallback")
|
||||
@Slf4j
|
||||
public class DsMessageCallbackService extends SPIBaseService implements ExtensionServiceHandler<PlatformAuthCallBackRequestDTO, Map<String, String>> {
|
||||
|
||||
@Override
|
||||
public BaseResponse<Map<String, String>> handle(BaseRequest<PlatformAuthCallBackRequestDTO> req) {
|
||||
// ----参数校验----
|
||||
PlatformAuthCallBackRequestDTO fields = req.getData();
|
||||
log.info("receive callback: " + JSON.toJSONString(fields));
|
||||
|
||||
// ----逻辑校验----
|
||||
|
||||
// ----业务处理----
|
||||
|
||||
// ----结果返回----
|
||||
return R.ok(CommonTool.successResult());
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.ms.api.spi.callback;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.jinritemai.cloud.base.api.BaseRequest;
|
||||
import com.jinritemai.cloud.base.api.BaseResponse;
|
||||
import com.jinritemai.cloud.base.api.ExtensionService;
|
||||
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
|
||||
import com.ms.api.common.R;
|
||||
import com.ms.api.common.SPIBaseService;
|
||||
import com.ms.api.dto.auth.PlatformAuthCallBackRequestDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 抖店消息推送,固定的key:CloudOpenMsgConsumer
|
||||
*/
|
||||
@ExtensionService("CloudOpenMsgConsumer")
|
||||
@Slf4j
|
||||
public class OpenMsgConsumerService extends SPIBaseService implements ExtensionServiceHandler<List<String>, Void> {
|
||||
|
||||
@Override
|
||||
public BaseResponse<Void> handle(BaseRequest<List<String>> req) {
|
||||
// ----参数校验----
|
||||
|
||||
// ----逻辑校验----
|
||||
|
||||
// ----业务处理----
|
||||
return R.ok();
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.ms.api.spi.callback;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.jinritemai.cloud.base.api.BaseRequest;
|
||||
import com.jinritemai.cloud.base.api.BaseResponse;
|
||||
import com.jinritemai.cloud.base.api.ExtensionService;
|
||||
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
|
||||
import com.ms.api.common.R;
|
||||
import com.ms.api.common.SPIBaseService;
|
||||
import com.ms.api.dto.auth.PlatformAuthCallBackRequestDTO;
|
||||
import com.ms.api.tool.CommonTool;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 抖店授权回调地址
|
||||
*/
|
||||
@ExtensionService("shopAuthCallback")
|
||||
@Slf4j
|
||||
public class ShopAuthCallbackService extends SPIBaseService implements ExtensionServiceHandler<PlatformAuthCallBackRequestDTO, Map<String, String>> {
|
||||
|
||||
@Override
|
||||
public BaseResponse<Map<String, String>> handle(BaseRequest<PlatformAuthCallBackRequestDTO> req) {
|
||||
// ----参数校验----
|
||||
PlatformAuthCallBackRequestDTO fields = req.getData();
|
||||
log.info("receive callback: " + JSON.toJSONString(fields));
|
||||
|
||||
// ----逻辑校验----
|
||||
|
||||
// ----业务处理----
|
||||
|
||||
// ----结果返回----
|
||||
return R.ok(CommonTool.successResult());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue