20240115-ljl-multiPay
ljl 1 year ago
parent a0390e8569
commit 4b0dc1181c

@ -8,6 +8,7 @@ import com.ms.biz.common.R;
import com.ms.biz.common.SPIBaseService; import com.ms.biz.common.SPIBaseService;
import com.ms.biz.dto.openspi.request.BatchPayParam; import com.ms.biz.dto.openspi.request.BatchPayParam;
import com.ms.biz.dto.openspi.response.BatchPayData; import com.ms.biz.dto.openspi.response.BatchPayData;
import com.ms.biz.dto.openspi.response.QuerySupplyPlatformAuthData;
import com.ms.biz.service.DistributionOrderService; import com.ms.biz.service.DistributionOrderService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -20,9 +21,13 @@ public class BatchPayService extends SPIBaseService implements ExtensionServiceH
@Override @Override
public BaseResponse<BatchPayData> handle(BaseRequest<BatchPayParam> req) { public BaseResponse<BatchPayData> handle(BaseRequest<BatchPayParam> req) {
BatchPayParam param = req.getData(); try {
BatchPayData data = new BatchPayData(); BatchPayParam param = req.getData();
distributionOrderService.batchPay(param, data); BatchPayData data = new BatchPayData();
return R.ok(data); distributionOrderService.batchPay(param, data);
return BaseResponse.<BatchPayData>builder().success(true).message("success").code("0").data(data).build();
} catch (Exception e) {
return BaseResponse.<BatchPayData>builder().success(true).message(e.getMessage()).code("100003").build();
}
} }
} }

@ -5,6 +5,7 @@ import com.jinritemai.cloud.base.api.BaseRequest;
import com.jinritemai.cloud.base.api.BaseResponse; import com.jinritemai.cloud.base.api.BaseResponse;
import com.jinritemai.cloud.base.api.ExtensionService; import com.jinritemai.cloud.base.api.ExtensionService;
import com.jinritemai.cloud.base.api.ExtensionServiceHandler; import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
import com.ms.api.dto.common.DoudianMessage;
import com.ms.biz.common.R; import com.ms.biz.common.R;
import com.ms.biz.common.SPIBaseService; import com.ms.biz.common.SPIBaseService;
import com.ms.biz.service.DoudianMsgService; import com.ms.biz.service.DoudianMsgService;
@ -22,15 +23,15 @@ public class DoudianMsgReceiveService extends SPIBaseService implements Extensio
@Override @Override
public BaseResponse<Void> handle(BaseRequest<List<String>> req) { public BaseResponse<Void> handle(BaseRequest<List<String>> req) {
// initHandle(req);
// ----参数校验----
List<String> msgList = req.getData(); List<String> msgList = req.getData();
if (msgList == null || msgList.isEmpty()) { if (msgList == null || msgList.isEmpty()) {
R.ok(); return R.ok();
}
for (String msgStr: msgList) {
DoudianMessage msg = JSON.parseObject(msgStr, DoudianMessage.class);
} }
String msgBody = JSON.toJSONString(msgList);
log.info("CloudOpenMsgConsumer request: " + msgBody);
// ----逻辑校验---- // ----逻辑校验----
// ----业务处理---- // ----业务处理----

@ -20,9 +20,13 @@ public class QuerySupplyPlatformAuthService extends SPIBaseService implements Ex
@Override @Override
public BaseResponse<QuerySupplyPlatformAuthData> handle(BaseRequest<QuerySupplyPlatformAuthParam> req) { public BaseResponse<QuerySupplyPlatformAuthData> handle(BaseRequest<QuerySupplyPlatformAuthParam> req) {
QuerySupplyPlatformAuthParam param = req.getData(); try {
QuerySupplyPlatformAuthData data = new QuerySupplyPlatformAuthData(); QuerySupplyPlatformAuthParam param = req.getData();
shopService.querySupplyPlatformAuth(param, data); QuerySupplyPlatformAuthData data = new QuerySupplyPlatformAuthData();
return R.ok(data); shopService.querySupplyPlatformAuth(param, data);
return BaseResponse.<QuerySupplyPlatformAuthData>builder().success(true).message("success").code("0").data(data).build();
} catch (Exception e) {
return BaseResponse.<QuerySupplyPlatformAuthData>builder().success(true).message(e.getMessage()).code("100003").build();
}
} }
} }
Loading…
Cancel
Save