rwadurian/frontend/mobile-app/lib
hailin 27cd72fe01 feat(pre-planting): 预种可结算收益结算 + 前端可结算金额修正
背景:
  预种奖励通过 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>
2026-03-01 07:33:53 -08:00
..
core feat(pre-planting): 预种可结算收益结算 + 前端可结算金额修正 2026-03-01 07:33:53 -08:00
features feat(pre-planting): 预种可结算收益结算 + 前端可结算金额修正 2026-03-01 07:33:53 -08:00
routes feat(pre-planting): 合并合同走完整签署流程(PDF展示+手写签名) 2026-02-28 10:35:22 -08:00
app.dart fix(mobile-app): 增加切换账号全局防护,彻底解决切换期间自动退出登录 2026-02-26 12:41:45 -08:00
bootstrap.dart fix(sentry): 修复 Flutter 代码分析错误 2025-12-15 11:04:28 -08:00
main.dart refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00