From 1bedd3ad8ac634a55a0b76a31c18e8d194474e06 Mon Sep 17 00:00:00 2001 From: ljl Date: Fri, 10 Nov 2023 16:11:23 +0800 Subject: [PATCH] yh --- .../com/ms/biz/spi/callback/BatchCreateService.java | 10 ++++++---- .../java/com/ms/biz/spi/callback/BatchPayService.java | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ms-biz/src/main/java/com/ms/biz/spi/callback/BatchCreateService.java b/ms-biz/src/main/java/com/ms/biz/spi/callback/BatchCreateService.java index 5833b4d..8bfb663 100644 --- a/ms-biz/src/main/java/com/ms/biz/spi/callback/BatchCreateService.java +++ b/ms-biz/src/main/java/com/ms/biz/spi/callback/BatchCreateService.java @@ -1,5 +1,7 @@ package com.ms.biz.spi.callback; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.jinritemai.cloud.base.api.BaseRequest; import com.jinritemai.cloud.base.api.BaseResponse; import com.jinritemai.cloud.base.api.ExtensionService; @@ -16,18 +18,18 @@ import lombok.extern.slf4j.Slf4j; @ExtensionService("batchCreate") @Slf4j @AllArgsConstructor -public class BatchCreateService extends SPIBaseService implements ExtensionServiceHandler { +public class BatchCreateService extends SPIBaseService implements ExtensionServiceHandler { private DistributionOrderService distributionOrderService; @Override - public BaseResponse handle(BaseRequest req) { + public BaseResponse handle(BaseRequest req) { try { BatchCreateParam param = req.getData(); BatchCreateData data = new BatchCreateData(); distributionOrderService.batchCreate(param, data); - return BaseResponse.builder().success(true).message("success").code("0").data(data).build(); + return BaseResponse.builder().success(true).message("success").code("0").data(JSON.parseObject(JSON.toJSONString(data))).build(); } catch (Exception e) { - return BaseResponse.builder().success(true).message(e.getMessage()).code("100003").build(); + return BaseResponse.builder().success(true).message(e.getMessage()).code("100003").build(); } } } \ No newline at end of file diff --git a/ms-biz/src/main/java/com/ms/biz/spi/callback/BatchPayService.java b/ms-biz/src/main/java/com/ms/biz/spi/callback/BatchPayService.java index 09fe2b6..f274d41 100644 --- a/ms-biz/src/main/java/com/ms/biz/spi/callback/BatchPayService.java +++ b/ms-biz/src/main/java/com/ms/biz/spi/callback/BatchPayService.java @@ -1,5 +1,7 @@ package com.ms.biz.spi.callback; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.jinritemai.cloud.base.api.BaseRequest; import com.jinritemai.cloud.base.api.BaseResponse; import com.jinritemai.cloud.base.api.ExtensionService; @@ -16,18 +18,18 @@ import lombok.extern.slf4j.Slf4j; @ExtensionService("batchPay") @Slf4j @AllArgsConstructor -public class BatchPayService extends SPIBaseService implements ExtensionServiceHandler { +public class BatchPayService extends SPIBaseService implements ExtensionServiceHandler { private DistributionOrderService distributionOrderService; @Override - public BaseResponse handle(BaseRequest req) { + public BaseResponse handle(BaseRequest req) { try { BatchPayParam param = req.getData(); BatchPayData data = new BatchPayData(); distributionOrderService.batchPay(param, data); - return BaseResponse.builder().success(true).message("success").code("0").data(data).build(); + return BaseResponse.builder().success(true).message("success").code("0").data(JSON.parseObject(JSON.toJSONString(data))).build(); } catch (Exception e) { - return BaseResponse.builder().success(true).message(e.getMessage()).code("100003").build(); + return BaseResponse.builder().success(true).message(e.getMessage()).code("100003").build(); } } } \ No newline at end of file