From fdb00148b57eb58ae7c6f4f3a60708f22cb61931 Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Thu, 6 Mar 2025 13:58:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E9=80=80=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/czg/service/order/dto/VipRefundDTO.java | 4 ++-- .../com/czg/service/order/service/impl/PayServiceImpl.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cash-service/order-service/src/main/java/com/czg/service/order/dto/VipRefundDTO.java b/cash-service/order-service/src/main/java/com/czg/service/order/dto/VipRefundDTO.java index b9e609dbf..1a11942b3 100644 --- a/cash-service/order-service/src/main/java/com/czg/service/order/dto/VipRefundDTO.java +++ b/cash-service/order-service/src/main/java/com/czg/service/order/dto/VipRefundDTO.java @@ -19,8 +19,8 @@ public class VipRefundDTO { /** * 店铺用户id */ - @NotNull(message = "店铺用户不能为空") - private Long shopUserId; + @NotNull(message = "用户不能为空") + private Long userId; /** * 退款id 会员流水id tb_shop_user_flow.id */ diff --git a/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/PayServiceImpl.java b/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/PayServiceImpl.java index a950e4b21..93d796b44 100644 --- a/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/PayServiceImpl.java +++ b/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/PayServiceImpl.java @@ -403,7 +403,7 @@ public class PayServiceImpl implements PayService { @Override public CzgResult> refundVipBefore(VipRefundDTO payParam) { Map resultMap = new HashMap<>(5); - ShopUser shopUser = shopUserService.getById(payParam.getShopUserId()); + ShopUser shopUser = shopUserService.getShopUserInfo(payParam.getShopId(), payParam.getUserId()); AssertUtil.isNull(shopUser, "该店铺用户不存在"); ShopUserFlow inFlow = userFlowService.queryChain().select(ShopUserFlow::getAmount) .eq(ShopUserFlow::getId, payParam.getFlowId()).one(); @@ -422,7 +422,7 @@ public class PayServiceImpl implements PayService { @Override public CzgResult refundVip(VipRefundDTO refPayParam) { - ShopUser shopUser = shopUserService.getById(refPayParam.getShopUserId()); + ShopUser shopUser = shopUserService.getShopUserInfo(refPayParam.getShopId(), refPayParam.getUserId()); ShopUserFlow inFlow = userFlowService.queryChain().select(ShopUserFlow::getAmount) .eq(ShopUserFlow::getId, refPayParam.getFlowId()).one(); AssertUtil.isNull(inFlow, "充值记录不存在"); @@ -453,7 +453,7 @@ public class PayServiceImpl implements PayService { return CzgResult.failure("退款失败,该充值记录不存在"); } String refPayOrderNo = "REFVIP" + IdUtil.getSnowflakeNextId(); - refPaymentId = initOrderPayment(new OrderPayment(refPayParam.getShopId(), refPayParam.getShopUserId(), + refPaymentId = initOrderPayment(new OrderPayment(refPayParam.getShopId(), shopUser.getId(), "memberRefund", refPayOrderNo, null, refPayParam.getRefAmount())); CzgResult res = refund(refPayParam.getShopId(), new CzgRefundReq(refPayOrderNo, refPayParam.getRemark(), refPayParam.getRefAmount().multiply(MONEY_RATE).longValue(), payment.getOrderNo(), ""));