From e6ad8baeeb8c75db16d75de2191be96913823e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Mon, 27 Oct 2025 16:33:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E8=B0=83=E5=88=86=E9=94=80=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/czg/controller/DistributionPayController.java | 3 +-- .../service/order/service/impl/DistributionPayServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cash-api/order-server/src/main/java/com/czg/controller/DistributionPayController.java b/cash-api/order-server/src/main/java/com/czg/controller/DistributionPayController.java index 1afaa9c5..c4f2e5a3 100644 --- a/cash-api/order-server/src/main/java/com/czg/controller/DistributionPayController.java +++ b/cash-api/order-server/src/main/java/com/czg/controller/DistributionPayController.java @@ -58,8 +58,7 @@ public class DistributionPayController { */ @PostMapping("/mchRecharge") @Debounce(value = "#payParam.userId") - public CzgResult> mchRecharge(@RequestHeader Long shopId, HttpServletRequest request, @Validated @RequestBody MkDistributionPayDTO payParam) { - payParam.setShopId(shopId); + public CzgResult> mchRecharge(HttpServletRequest request, @Validated @RequestBody MkDistributionPayDTO payParam) { AssertUtil.isBlank(payParam.getCode(), "微信code不为空"); return CzgResult.success(payService.mchRecharge(ServletUtil.getClientIP(request), payParam)); } diff --git a/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/DistributionPayServiceImpl.java b/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/DistributionPayServiceImpl.java index 0f1c3b73..c9fce3b8 100644 --- a/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/DistributionPayServiceImpl.java +++ b/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/DistributionPayServiceImpl.java @@ -69,7 +69,7 @@ public class DistributionPayServiceImpl implements DistributionPayService { throw new CzgException("当前未开启购买分销配置"); } - OrderPayment orderPayment = new OrderPayment().setShopId(payParam.getShopId()).setSourceId(userId) + OrderPayment orderPayment = new OrderPayment().setShopId(payParam.getShopId()).setSourceId(isRecharge ? payParam.getShopId() : userId) .setPayType(isRecharge ? "distributionRecharge" : "distribution").setOrderNo(payParam.getPlatformType() + IdUtil.getSnowflakeNextId()).setAmount(detail.getPayAmount()); orderPaymentService.save(orderPayment);