Commit 37adcd32b1e0fd4e3f855e1c0c3a474e8c0eb184
1 parent
50adebd1
fix(trade):佣金提现建单显式置 status=AUDITING——createBrokerageWithdraw 不依赖 DDL 列默认值,防列默认缺…
…失/变更致建单状态为空、审核恒拒卡死(A37)
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. 创建用户佣金记录 |