From 11e778f72b830a4050c293d78694417d32055727 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 20 十月 2023 20:39:55 +0800 Subject: [PATCH] 对接第三方分账接口 --- ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/NotifyController.java | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/NotifyController.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/NotifyController.java index 6e3df59..58c3808 100644 --- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/NotifyController.java +++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/NotifyController.java @@ -14,6 +14,8 @@ import com.google.gson.GsonBuilder; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.order.domain.dto.WechatPaymentRefundDto; +import com.ruoyi.order.domain.dto.WeixinPaymentNotifyDto; import com.ruoyi.order.domain.pojo.account.OrderRefund; import com.ruoyi.order.domain.vo.ProfitSharingNotifyNewResult; import com.ruoyi.order.domain.vo.WeixinPaymentNotifyVo; @@ -229,8 +231,8 @@ @RequestMapping(value = "/wechatPaymentCallback", method = RequestMethod.POST) @ApiOperation(value = "微信支付通知(汇付天下)") - public void wechatPaymentCallback(@RequestBody JSONObject jsonObject, HttpServletResponse response){ - R<WeixinPaymentNotifyVo> r = HuiFuTianXiaUtil.weixinPaymentNotify(jsonObject); + public void wechatPaymentCallback(WeixinPaymentNotifyDto dto, HttpServletResponse response){ + R<WeixinPaymentNotifyVo> r = HuiFuTianXiaUtil.weixinPaymentNotify(dto); if(r.getCode() == 200){ WeixinPaymentNotifyVo data = r.getData(); String transStat = data.getTransStat(); @@ -260,8 +262,8 @@ @RequestMapping(value = "/wechatPaymentRefundCallback", method = RequestMethod.POST) @ApiOperation(value = "微信支付退款通知(汇付天下)") - public void wechatPaymentRefundCallback(@RequestBody JSONObject jsonObject, HttpServletResponse response){ - R<WeixinPaymentRefundVo> r = HuiFuTianXiaUtil.weixinPaymentRefundNotify(jsonObject); + public void wechatPaymentRefundCallback(WechatPaymentRefundDto dto, HttpServletResponse response){ + R<WeixinPaymentRefundVo> r = HuiFuTianXiaUtil.weixinPaymentRefundNotify(dto); if(r.getCode() == 200){ WeixinPaymentRefundVo data = r.getData(); String transStat = data.getTransStat(); @@ -269,7 +271,7 @@ //开始处理业务数据 String reqSeqId = data.getReqSeqId(); OrderRefund orderRefund = orderRefundService.getById(reqSeqId); - if(null != orderRefund){ + if(null != orderRefund && orderRefund.getRefundStatus() != 2){ orderRefund.setWxRefundId(data.getPartyOrderId()); orderRefund.setBackTime(data.getTransDate() + data.getTransTime()); orderRefund.setRefundStatus(2); -- Gitblit v1.7.1