背景:
预种奖励通过 planting-service → wallet-service allocateFunds 链路
直接写入 wallet_accounts.settleable_usdt,不经过 reward-service。
因此 reward-service 的一键结算(settleToBalance)无法覆盖预种部分,
且 reward-service 的 summary.settleableUsdt 不包含预种金额。
改动:
1. wallet-service 新增 POST /wallet/settle-pre-planting 端点
- 将 wallet 中剩余的 settleable_usdt 转入 available 余额
- settleable_usdt=0 时幂等跳过,不创建空流水
- 流水备注标注 [预种],payloadJson.source='pre-planting'
2. mobile-app 兑换页(trading_page):
- 可结算金额改为从 wallet-service 的 wallet.rewards.settleableUsdt 取值
(包含正常认种 + 预种的可结算部分,是唯一的 source of truth)
- 一键结算流程改为两步串行:
先调 reward-service settleToBalance(正常认种,不动现有逻辑),
再调 wallet-service settle-pre-planting(预种部分,纯增量)
3. mobile-app 我的页(profile_page):
- 并行加载新增 walletService.getMyWallet() 调用
- _settleableUsdt 改为从 wallet.rewards.settleableUsdt 取值
不涉及的系统:
- reward-service:零改动
- planting-service:零改动
- wallet-service 现有结算逻辑:零改动
- admin-web:零改动
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| .claude | ||
| admin-web | ||
| mining-admin-web | ||
| mining-app | ||
| mobile-app | ||
| mobile-upgrade | ||
| temp_backup | ||
| README.MD | ||