Commit 2f5c9fa1baedf046fbaece14dd901d8e09065c10
Committed by
GitHub
Merge pull request #1286 from dadiyang/fix/trade-brokerage-withdraw-status-init
[BUG] 佣金提现:用户申请提现后单据状态为空,管理端没有"通过/驳回"按钮,这张单永久卡死
Showing
1 changed file
with
3 additions
and
2 deletions
yudao-module-mall/yudao-module-trade/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageWithdrawServiceImpl.java
| @@ -190,9 +190,10 @@ public class BrokerageWithdrawServiceImpl implements BrokerageWithdrawService { | @@ -190,9 +190,10 @@ public class BrokerageWithdrawServiceImpl implements BrokerageWithdrawService { | ||
| 190 | 190 | ||
| 191 | // 2.1 计算手续费 | 191 | // 2.1 计算手续费 |
| 192 | Integer feePrice = calculateFeePrice(createReqVO.getPrice(), tradeConfig.getBrokerageWithdrawFeePercent()); | 192 | Integer feePrice = calculateFeePrice(createReqVO.getPrice(), tradeConfig.getBrokerageWithdrawFeePercent()); |
| 193 | - // 2.2 创建佣金提现记录 | 193 | + // 2.2 创建佣金提现记录(初始状态显式置为「审核中」,不依赖 DDL 列默认值——否则列 DEFAULT NULL 时建单 status 为空,审核恒拒) |
| 194 | BrokerageWithdrawDO withdraw = BeanUtils.toBean(createReqVO, BrokerageWithdrawDO.class) | 194 | BrokerageWithdrawDO withdraw = BeanUtils.toBean(createReqVO, BrokerageWithdrawDO.class) |
| 195 | - .setUserId(userId).setFeePrice(feePrice); | 195 | + .setUserId(userId).setFeePrice(feePrice) |
| 196 | + .setStatus(BrokerageWithdrawStatusEnum.AUDITING.getStatus()); | ||
| 196 | brokerageWithdrawMapper.insert(withdraw); | 197 | brokerageWithdrawMapper.insert(withdraw); |
| 197 | 198 | ||
| 198 | // 3. 创建用户佣金记录 | 199 | // 3. 创建用户佣金记录 |