From c3a87aa35e2064b2cc4780a47afd171935b2863b Mon Sep 17 00:00:00 2001 From: huangqizhen <15552608129@163.com> Date: Wed, 18 Mar 2026 13:55:22 +0800 Subject: [PATCH] =?UTF-8?q?3.17=20=E4=BF=AE=E6=94=B9=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E5=85=85=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java | 6 +++--- src/main/resources/mapper/WalletMapper.xml | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java b/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java index 3315d64..e6e97f6 100644 --- a/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java +++ b/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java @@ -507,12 +507,12 @@ public class CashRefundServiceImpl implements RefundService { // 钱包更新 - 按原始充值流水 wallet_id 优先级顺序原路退回(1-10,越小优先级越高) String orderCodeA = "XJ" + orderCode.substring(4); -// 1. 查询原始充值流水(type=3 充值,status=0 正常) +// 1. 查询原始充值流水(type=0 充值,status=0 正常) List originalRecords = walletService.selectUserWalletRecord(userGoldRecord.getJwcode(), orderCodeA); if (!CollectionUtils.isEmpty(originalRecords)) { // 过滤充值记录并按 wallet_id 升序排序 originalRecords = originalRecords.stream() - .filter(r -> r.getType() == 3 && r.getStatus() == 0) + .filter(r -> r.getType() == 0 && r.getStatus() == 0) .sorted(Comparator.comparing(UserWalletRecord::getWalletId)) .collect(Collectors.toList()); @@ -554,7 +554,7 @@ public class CashRefundServiceImpl implements RefundService { // 5. 插入退款流水(amount 存负数,表示扣减) UserWalletRecord refundRecord = new UserWalletRecord(); - refundRecord.setType(4); // 充值退款类型 + refundRecord.setType(2); // 充值退款类型 refundRecord.setJwcode(userGoldRecord.getJwcode()); refundRecord.setWalletId(walletId); refundRecord.setAmount(refundAmount.negate().intValue()); // 🔥 负数扣款 diff --git a/src/main/resources/mapper/WalletMapper.xml b/src/main/resources/mapper/WalletMapper.xml index 7a6d01d..cd25c87 100644 --- a/src/main/resources/mapper/WalletMapper.xml +++ b/src/main/resources/mapper/WalletMapper.xml @@ -88,6 +88,5 @@ #{item} - /> \ No newline at end of file