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.dto.openspi.request.BatchPayParam;
import com.ms.biz.dto.openspi.response.BatchPayData;
import com.ms.biz.dto.openspi.response.QuerySupplyPlatformAuthData;
import com.ms.biz.service.DistributionOrderService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -20,9 +21,13 @@ public class BatchPayService extends SPIBaseService implements ExtensionServiceH
@Override
public BaseResponse<BatchPayData> handle(BaseRequest<BatchPayParam> req) {
try {
BatchPayParam param = req.getData();
BatchPayData data = new BatchPayData();
distributionOrderService.batchPay(param, data);
return R.ok(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.ExtensionService;
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.SPIBaseService;
import com.ms.biz.service.DoudianMsgService;
@ -22,15 +23,15 @@ public class DoudianMsgReceiveService extends SPIBaseService implements Extensio
@Override
public BaseResponse<Void> handle(BaseRequest<List<String>> req) {
// initHandle(req);
// ----参数校验----
List<String> msgList = req.getData();
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
public BaseResponse<QuerySupplyPlatformAuthData> handle(BaseRequest<QuerySupplyPlatformAuthParam> req) {
try {
QuerySupplyPlatformAuthParam param = req.getData();
QuerySupplyPlatformAuthData data = new QuerySupplyPlatformAuthData();
shopService.querySupplyPlatformAuth(param, data);
return R.ok(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