From 7e92d9c7f76777c48f76376c99ffaae2e16fe7ed Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期二, 01 七月 2025 14:37:08 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/WxChatPayCallBack.java | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/WxChatPayCallBack.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/WxChatPayCallBack.java index 5fc6d37..80955f9 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/WxChatPayCallBack.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/WxChatPayCallBack.java @@ -12,15 +12,9 @@ import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.core.vo.UserDto; import com.ruoyi.common.security.annotation.RequiresPermissions; -import com.ruoyi.order.entity.ChangeDispatch; -import com.ruoyi.order.entity.Order; -import com.ruoyi.order.entity.Withdraw; -import com.ruoyi.order.entity.WithdrawDetail; +import com.ruoyi.order.entity.*; import com.ruoyi.order.request.ChangeDispatchRequest; -import com.ruoyi.order.service.ChangeDispatchService; -import com.ruoyi.order.service.OrderService; -import com.ruoyi.order.service.WithdrawDetailService; -import com.ruoyi.order.service.WithdrawService; +import com.ruoyi.order.service.*; import com.ruoyi.order.vx.HttpUtil; import com.ruoyi.system.api.RemoteUserService; import com.ruoyi.user.api.feignClient.UserClient; @@ -63,6 +57,8 @@ @Autowired private WithdrawDetailService withdrawDetailService; + @Autowired + private WithdrawRecordService withdrawRecordService; @Resource private OrderService orderService; @Autowired @@ -111,6 +107,16 @@ withdrawDetail.setStatus("SUCCESS"); withdrawDetailService.updateById(withdrawDetail); orderService.updateById(order); + WithdrawRecord withdrawRecord = new WithdrawRecord(); + withdrawRecord.setWithdrawId(withdraw.getId()); + withdrawRecord.setOrderId(withdraw.getOrderId()); + withdrawRecord.setUserId(withdraw.getUserId()); + withdrawRecord.setWithdrawType(4); + withdrawRecord.setCreateTime(new Date()); + withdrawRecord.setAuditStatus(1); + withdrawRecordService.save(withdrawRecord); + + }else if ("CANCELLED".equals(state)||"CANCELING".equals(state)||"FAIL".equals(state)){ // 校验提现 // List<Withdraw> list = withdrawService.lambdaQuery().eq(Withdraw::getUserId, order.getUserId()) @@ -170,7 +176,10 @@ com.alibaba.fastjson2.JSONObject.toJSONString(postMap), "7EEA04429B006E12AAA421C002EC48BBEED5BE94", "1665330417", - "/usr/local/vx/apiclient_key.pem", WechatConstants.WE_CHAT_URL_SUF); +// "/usr/local/vx/apiclient_key.pem", + "D:\\apiclient_key.pem", + + WechatConstants.WE_CHAT_URL_SUF); com.alibaba.fastjson2.JSONObject jsonObject = com.alibaba.fastjson2.JSONObject.parseObject(result); // WithdrawDetail withdrawDetail = new WithdrawDetail(); // withdrawDetail.setWithdrawId(withdrawId); -- Gitblit v1.7.1