rwadurian/frontend/mobile-app/lib/features
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
..
account/presentation/pages fix(mobile-app): 增加切换账号全局防护,彻底解决切换期间自动退出登录 2026-02-26 12:41:45 -08:00
auth/presentation feat(app-assets): 应用图片管理 — 开屏图/引导图可从 admin-web 配置 2026-02-04 11:20:26 -08:00
authorization/presentation fix(mobile-app): 修复多账号切换数据串号问题,完善存储隔离与状态重置 2026-02-25 06:13:05 -08:00
contract_signing/presentation feat(pre-planting): 合并合同走完整签署流程(PDF展示+手写签名) 2026-02-28 10:35:22 -08:00
deposit/presentation/pages fix(mobile-app): fetch wallet address from server API instead of local storage 2026-01-04 10:00:33 -08:00
home/presentation feat(notification): 新增强制阅读弹窗功能(管理员可配置 requiresForceRead) 2026-02-27 19:33:51 -08:00
kyc feat(mobile-app): KYC成功后自动跳转合同签署页面 2025-12-25 07:07:43 -08:00
mining/presentation/pages feat(mobile-app): 为3个主导航页面添加下拉刷新功能 2026-02-05 21:50:43 -08:00
notification/presentation feat(notification): 新增强制阅读弹窗功能(管理员可配置 requiresForceRead) 2026-02-27 19:33:51 -08:00
pending_actions/presentation/pages fix(mobile-app): 修复认种订单解析和状态检查问题 2026-01-09 02:49:31 -08:00
planting/presentation fix(planting): 修复认种页面动态定价不生效 + 添加涨价倒计时 2026-02-26 10:22:27 -08:00
pre_planting/presentation/pages fix(pre-planting): 签署合同前检查实名认证 + 修正合同金额 2026-02-28 10:59:26 -08:00
profile/presentation feat(pre-planting): 预种可结算收益结算 + 前端可结算金额修正 2026-03-01 07:33:53 -08:00
ranking/presentation/pages feat(mobile-app): 为3个主导航页面添加下拉刷新功能 2026-02-05 21:50:43 -08:00
security/presentation/pages feat(email): 实现邮箱绑定/解绑功能 2025-12-23 20:53:20 -08:00
share/presentation/pages feat(frontend): 多项功能改进 2025-12-15 04:04:21 -08:00
trading/presentation/pages feat(pre-planting): 预种可结算收益结算 + 前端可结算金额修正 2026-03-01 07:33:53 -08:00
transfer/presentation/pages style(transfer): 树转让 3 页面从暗夜主题改为 App 标准浅色棕金主题 2026-02-23 20:25:25 -08:00
withdraw/presentation/pages feat(fiat-withdrawal): add complete fiat withdrawal system 2026-01-03 06:39:11 -08:00