会员充值 退款

This commit is contained in:
2025-03-07 11:24:38 +08:00
parent be47876412
commit 562fbf1695
3 changed files with 15 additions and 9 deletions

View File

@@ -471,16 +471,9 @@ public class PayServiceImpl implements PayService {
.build();
//更新会员余额 并生成流水
shopUserService.updateMoney(shopUser.getShopId(), shopUserMoneyEditDTO);
UpdateChain.of(ShopUserFlow.class)
.setRaw(ShopUserFlow::getRefundAmount, "refund_amount" + refPayParam.getRefAmount())
.eq(ShopUserFlow::getId, inFlow.getId())
.update();
userFlowService.updateRefund(inFlow.getId(), refPayParam.getRefAmount());
if (giftFlow != null) {
UpdateChain.of(ShopUserFlow.class)
.setRaw(ShopUserFlow::getRefundAmount, "refund_amount" + giftFlow.getAmount())
.eq(ShopUserFlow::getId, giftFlow.getId())
.update();
userFlowService.updateRefund( giftFlow.getId(), giftFlow.getAmount());
}
//移除优惠券
inRecordService.remove(QueryWrapper.create()