回填退款前置

This commit is contained in:
2025-03-06 14:28:38 +08:00
parent fe9a40493e
commit 99326b4988

View File

@@ -405,10 +405,10 @@ public class PayServiceImpl implements PayService {
Map<String, BigDecimal> resultMap = new HashMap<>(5); Map<String, BigDecimal> resultMap = new HashMap<>(5);
ShopUser shopUser = shopUserService.getShopUserInfo(payParam.getShopId(), payParam.getUserId()); ShopUser shopUser = shopUserService.getShopUserInfo(payParam.getShopId(), payParam.getUserId());
AssertUtil.isNull(shopUser, "该店铺用户不存在"); AssertUtil.isNull(shopUser, "该店铺用户不存在");
ShopUserFlow inFlow = userFlowService.queryChain().select(ShopUserFlow::getAmount, ShopUserFlow::getRefundAmount) ShopUserFlow inFlow = userFlowService.queryChain().select()
.eq(ShopUserFlow::getId, payParam.getFlowId()).one(); .eq(ShopUserFlow::getId, payParam.getFlowId()).one();
AssertUtil.isNull(inFlow, "充值记录不存在"); AssertUtil.isNull(inFlow, "充值记录不存在");
ShopUserFlow giftFlow = userFlowService.queryChain().select(ShopUserFlow::getAmount, ShopUserFlow::getRefundAmount) ShopUserFlow giftFlow = userFlowService.queryChain().select()
.eq(ShopUserFlow::getRelationId, payParam.getFlowId()) .eq(ShopUserFlow::getRelationId, payParam.getFlowId())
.eq(ShopUserFlow::getBizCode, ShopUserFlowBizEnum.AWARD_IN.getCode()) .eq(ShopUserFlow::getBizCode, ShopUserFlowBizEnum.AWARD_IN.getCode())
.one(); .one();
@@ -423,10 +423,10 @@ public class PayServiceImpl implements PayService {
@Override @Override
public CzgResult<Object> refundVip(VipRefundDTO refPayParam) { public CzgResult<Object> refundVip(VipRefundDTO refPayParam) {
ShopUser shopUser = shopUserService.getShopUserInfo(refPayParam.getShopId(), refPayParam.getUserId()); ShopUser shopUser = shopUserService.getShopUserInfo(refPayParam.getShopId(), refPayParam.getUserId());
ShopUserFlow inFlow = userFlowService.queryChain().select(ShopUserFlow::getAmount) ShopUserFlow inFlow = userFlowService.queryChain().select()
.eq(ShopUserFlow::getId, refPayParam.getFlowId()).one(); .eq(ShopUserFlow::getId, refPayParam.getFlowId()).one();
AssertUtil.isNull(inFlow, "充值记录不存在"); AssertUtil.isNull(inFlow, "充值记录不存在");
ShopUserFlow giftFlow = userFlowService.queryChain().select(ShopUserFlow::getAmount) ShopUserFlow giftFlow = userFlowService.queryChain().select()
.eq(ShopUserFlow::getRelationId, refPayParam.getFlowId()) .eq(ShopUserFlow::getRelationId, refPayParam.getFlowId())
.eq(ShopUserFlow::getBizCode, ShopUserFlowBizEnum.AWARD_IN.getCode()) .eq(ShopUserFlow::getBizCode, ShopUserFlowBizEnum.AWARD_IN.getCode())
.one(); .one();