hailin
0e34896d0b
refactor(mobile-app): 树转让入口从"我"页面迁移至"实名认证"页面
...
将"发起转让"和"转让记录"按钮从 ProfilePage 顶部移除,
归类为"树服务"放入 KycEntryPage(实名认证入口页),
位于"其他操作 > 验证/更换手机号"的下方。
变更详情:
- profile_page.dart:
· 移除 _buildTransferButtons() 方法及其调用
· 移除 _goToTransferInitiate() / _goToTransferList() 导航方法
- kyc_entry_page.dart:
· 在"验证/更换手机号"下方新增"树服务"分类标题
· 新增"发起转让"操作卡片 → /transfer/initiate
· 新增"转让记录"操作卡片 → /transfer/list
· 复用页面已有的 _buildActionCard 样式,保持 UI 一致
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 19:47:39 -08:00
hailin
b3984c861c
feat(pre-planting): 预种方案调整 — 18870 USDT/棵,10份合1树
...
=== 方案变更 ===
- 全树基础价: 17830 → 18870 USDT
- 每份价格: 3566 → 1887 USDT
- 合并阈值: 5 份 → 10 份
=== 后端改动 (planting-service) ===
1. pre-planting-right-amounts.ts:
- PRE_PLANTING_PRICE_PER_PORTION: 3566 → 1887
- PRE_PLANTING_PORTIONS_PER_TREE: 5 → 10
- 10类权益金额按 floor(整棵树/10) 重算,余数归 HQ_BASE_FEE(319)
2. pre-planting-merge.aggregate.ts:
- 合并校验从硬编码 5 改为引用 PRE_PLANTING_PORTIONS_PER_TREE 常量
3. purchase-pre-planting.dto.ts:
- portionCount @Max(5) → @Max(10)
4. pre-planting-application.service.ts:
- 加价补贴计算 /5 → /PRE_PLANTING_PORTIONS_PER_TREE
- 错误文案引用常量,消除硬编码
=== 前端改动 (mobile-app) ===
1. pre_planting_purchase_page.dart: 默认价格、份数、协议文本(1/10、4%)
2. pre_planting_position_page.dart: _portionsPerTree 5→10
3. pre_planting_merge_detail_page.dart: 总价值计算和单份显示金额
4. tree_pricing_service.dart: fallback 默认值
5. pre_planting_service.dart: JSON 解析 fallback 默认值
6. 各文件注释同步更新
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 18:32:32 -08:00
hailin
31e6f9e15a
fix(mobile): 预种可结算列表以wallet实际金额为准,避免已结算条目残留
...
planting-service 的分配记录不跟踪 wallet 端的结算状态,
原来的反向排除法(排除PENDING+EXPIRED)无法处理:
1. 已结算到余额(SETTLED→余额)的条目
2. hasPlanted=true 后直接进可结算、不经 pending_rewards 的条目
改为以 walletInfo.rewards.settleableUsdt 为权威来源:
- settleableUsdt=0 时直接跳过(已全部结算到余额)
- settleableUsdt>0 时按金额截断,确保展示总额不超过实际可结算
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:19:31 -08:00
hailin
8e52535dd9
feat(mobile): 预种明细显示来源用户ID + 修复空待领取倒计时
...
1. 预种待领取/可结算明细的 memo 中追加来源用户(如"来自D26022600016的预种")
2. 修复 pendingUsdt=0 时倒计时仍然显示的问题(pending_expire_at 未清除时兜底)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 09:48:34 -08:00
hailin
e9b9896317
fix(mobile): 修复预种可结算列表与金额不一致
...
问题:pre-planting/my-rewards 返回所有分配记录不区分状态,
导致 PENDING 状态的预种奖励也被错误地显示在可结算列表中,
而可结算金额(从 wallet-service 取值)正确为 0,造成列表和金额不一致。
修复:在合并预种可结算列表时,排除正在 PENDING 和 EXPIRED 状态的条目。
通过 wallet/pending-rewards 和 wallet/expired-rewards 获取实际状态,
用 sourceOrderId 交叉比对,只保留真正可结算的预种条目。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 08:24:03 -08:00
hailin
4996c1d110
feat(mobile): profile页待领取/可结算/已过期列表统一显示预种数据
...
变更概要:
- wallet_service.dart: 新增 WalletPendingRewardItem 模型和 getWalletPendingRewards() 方法
调用 GET /wallet/pending-rewards 获取 wallet-service 的待领取奖励列表
- profile_page.dart: 合并预种待领取奖励到列表中
从 wallet-service 待领取列表中筛选 PPL 前缀的预种条目,转换为 PendingRewardItem
与 reward-service 的正常认种待领取统一展示
- profile_page.dart: 已过期列表标记预种条目
wallet-service GET /wallet/expired-rewards 已包含预种过期记录,
渲染时通过 sourceOrderId.startsWith('PPL') 动态添加 [预种] 前缀
- profile_page.dart: 所有汇总金额统一从 wallet-service 取值
_pendingUsdt / _expiredUsdt / _remainingSeconds 改为从 walletInfo.rewards 读取,
wallet_accounts 包含正常认种 + 预种,是唯一的 source of truth
技术说明:
- 后端零改动,仅前端变更(零风险)
- 预种条目通过订单号 PPL 前缀与正常认种区分,避免重复显示
- 所有预种条目在卡片上显示 [预种] 前缀,方便用户区分来源
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 07:52:02 -08:00
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
hailin
05e590ef04
fix(pre-planting): 修复可结算收益重复计算
...
pre-planting getMyRewards API 错误地将所有分配记录金额算作
settleableUsdt(包括 PENDING 状态的待领取奖励)。
预种奖励的 PENDING/SETTLEABLE 状态由 wallet-service 管理,
reward-service 的 getMyRewardSummary 已包含预种可结算部分,
不应重复累加。
修复:
- 后端 getMyRewards 返回 settleableUsdt: 0
- 前端"我"页面和"兑换"页面不再额外加预种 settleableUsdt
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 03:34:22 -08:00
hailin
3be7b47678
feat(pre-planting+mobile): 预种奖励在"我"页面展示
...
## 问题
预种奖励直接走 planting-service → wallet-service,绕过 reward-service,
导致前端"我"页面读 reward-service 的 summary/settleable 数据时看不到预种奖励。
## 方案
前端同时读 reward-service(正常认种)和 planting-service(预种),合并展示。
## 后端(planting-service)
- PrePlantingRewardEntryRepository: 新增 findByRecipientAccountSequence() 方法,
按收款方账户查询预种奖励记录(注入 PrismaService 替代事务 client)
- PrePlantingController: 新增 GET /pre-planting/my-rewards 端点,
返回当前用户作为收款方收到的预种奖励汇总+明细列表
格式与 reward-service 的 settleable 对齐(id, rightType, usdtAmount, sourceOrderNo 等)
## 前端(Flutter mobile-app)
- PrePlantingService: 新增 getMyRewards() 方法 + PrePlantingMyRewards/PrePlantingRewardItem 数据类
- profile_page.dart: 并行调用 prePlantingService.getMyRewards(),
将预种奖励转为 SettleableRewardItem 合并到可结算列表,
summary.settleableUsdt 也加上预种金额
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:03:53 -08:00
hailin
ef68b7b9c0
fix(pre-planting): 预种开关关闭时隐藏"我的"页面预种按钮
...
- profile_page: 加载预种配置,根据 isActive 控制预种按钮显隐
- 开关关闭时不显示「预种购买」「预种明细」按钮
- 默认不显示(_isPrePlantingActive = false),加载成功后更新
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 23:11:53 -08:00
hailin
c0ac63d40a
feat(pre-planting): 重命名预种持仓→预种明细 + 购买协议弹窗
...
- mobile-app: "预种持仓"按钮和页面标题改为"预种明细"
- admin-service: 新增预种协议文本 API (GET/PUT agreement),存储于 system_configs 表
- admin-service: 公开 config API 响应增加 agreementText 字段
- planting-service: 新建 PrePlantingPublicController (无需 JWT),暴露 GET /pre-planting/config
- admin-web: 预种管理页面新增协议文本编辑器(textarea + 保存按钮)
- mobile-app: 购买流程增加协议弹窗,用户需勾选同意后才能继续
- mobile-app: 协议文本优先使用后台配置,未配置时使用默认文本
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 21:14:24 -08:00
hailin
acf55b26a7
feat(pricing): 预种每份价格从 3171 调整为 3566 绿积分
...
分配规则:按 reward-service RIGHT_AMOUNTS(15831 整棵树)各项 /5 取整,
余额全归总部社区(HQ_BASE_FEE)。5 份合成一棵树 = 17830。
10 类分配金额变更:
- COST_FEE: 576 (不变, floor(2880/5))
- OPERATION_FEE: 420 (不变, floor(2100/5))
- HQ_BASE_FEE: 29.4 → 427 (3566 - 3139, 吸收全部余额)
- RWAD_POOL: 1152 (不变, floor(5760/5))
- SHARE_RIGHT: 720 (不变, floor(3600/5))
- PROVINCE_AREA: 21.6 → 21 (floor(108/5))
- PROVINCE_TEAM: 28.8 → 28 (floor(144/5))
- CITY_AREA: 50.4 → 50 (floor(252/5))
- CITY_TEAM: 57.6 → 57 (floor(288/5))
- COMMUNITY: 115.2 → 115 (floor(576/5))
- 合计: 3171 → 3566 ✓
涉及服务:planting-service, admin-service, contribution-service
涉及前端:admin-web, mobile-app (Flutter)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 08:02:17 -08:00
hailin
825c8a32e4
chore(mobile-app): 补全多账号切换流程的关键日志,便于验证与排查
...
切换流程中的每一步现在都有清晰的日志输出,方便通过 adb logcat
或 flutter logs 验证切换行为是否符合预期。
account_switch_page.dart - 三条路径全部覆盖:
_switchToAccount(切换账号):
[1/6] 保存当前账号数据
[2/6] 调用 switchToAccount()
[3/6] onBeforeRestore - 停止 walletStatus/pendingAction 轮询、暂停遥测
[4/6] invalidate authProvider / walletStatusProvider / notificationBadgeProvider
[5/6] 恢复遥测上传
[6/6] 导航到 ranking 页面
_addNewAccount(添加新账号):
[1/5] 保存当前账号数据
[2/5] 停止定时器
[3/5] 调用 logoutCurrentAccount()
[4/5] invalidate 三个 Provider
[5/5] 导航到 guide 页面
_deleteAccount(删除账号):
删除前打印目标账号,删除后打印剩余账号数
profile_page.dart - _performLogout(退出登录):
[1/4] 停止 walletStatus/pendingAction 轮询
[2/4] 调用 logoutCurrentAccount()
[3/4] invalidate 三个 Provider
[4/4] 导航到 guide 页面
每条关键操作完成后打印 ✓ 确认符号,便于逐步验证。
每条路径用 ========== 分隔符标识开始/完成,日志易于 grep 过滤。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 09:04:14 -08:00
hailin
8f8a9230d0
fix(mobile-app): 修复多账号切换数据串号问题,完善存储隔离与状态重置
...
问题:
多账号切换时,前一个账号的推荐码、种植省市、缓存数据等会串到下一个账号,
同时定时器(钱包轮询、通知刷新、遥测上传)未正确停止/重启,
导致旧账号的 API 请求混入新账号上下文。
修复内容:
1. StorageKeys 补充种植省市常量(storage_keys.dart)
- 新增 plantingProvinceName/Code、plantingCityName/Code 4个常量
- 将硬编码的 key 统一收口,确保隔离列表引用一致
2. MultiAccountService 补全隔离列表(multi_account_service.dart)
- _accountSecureKeys 新增 inviterReferralCode(修复邀请码串号)
- _accountLocalKeys 新增 4个种植省市key + cachedAppAssets +
cachedCustomerServiceContacts(修复种植/缓存数据串号)
- switchToAccount() 新增 onBeforeRestore 回调参数,用于在
storage清空后、恢复新数据前 停止定时器
3. AccountSwitchPage 三层状态重置(account_switch_page.dart)
- _switchToAccount: onBeforeRestore 内停止 walletStatus 轮询、
pendingAction 轮询、telemetry 上传;返回后 invalidate
authProvider/walletStatusProvider/notificationBadgeProvider,
最后 resumeAfterLogin 恢复遥测
- _addNewAccount: 退出前停止定时器,退出后 invalidate Provider
4. ProfilePage 退出登录补全清理(profile_page.dart)
- _performLogout: 退出前停止 walletStatus/pendingAction 轮询,
退出后 invalidate 三个 Provider
5. 页面 key 统一引用 StorageKeys 常量
- planting_location_page.dart 和 authorization_apply_page.dart
将硬编码 key 替换为 StorageKeys.plantingXxx 常量
关键时序(switchToAccount 内部):
save → clear → onBeforeRestore(停timer) → restore → 返回
→ invalidate Provider(此时storage已恢复新数据)→ resume telemetry → navigate
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 06:13:05 -08:00
hailin
b3a3652f21
feat(transfer): 树转让功能全量实现(纯新增,零侵入)
...
实现已认种果树所有权在用户间转让的完整功能。采用方案一:
独立 transfer-service 微服务 + Saga 编排器模式。
=== 架构设计 ===
- Saga 编排器 8 步正向流程:卖方确认 → 冻结资金 → 锁定树 →
变更所有权 → 调整算力 → 更新统计 → 结算资金 → 完成
- 补偿回滚:任一步骤失败自动反向补偿(解冻资金 → 解锁树)
- 13 种状态:PENDING → SELLER_CONFIRMED → PAYMENT_FROZEN →
TREES_LOCKED → OWNERSHIP_TRANSFERRED → CONTRIBUTION_ADJUSTED →
STATS_UPDATED → PAYMENT_SETTLED → COMPLETED / CANCELLED /
FAILED / ROLLING_BACK / ROLLED_BACK
=== Phase 1-2: transfer-service(独立微服务) ===
新建文件:
- Prisma Schema:transfer_orders + transfer_status_logs + outbox_events
- Domain:TransferOrder 聚合根 + TransferFeeService(5% 手续费)
- Application:TransferApplicationService + SagaOrchestratorService
- Infrastructure:Kafka 事件消费/生产 + Outbox Pattern
- API:TransferController(用户端)+ AdminTransferController(管理端)
- External Clients:wallet/planting/identity-service HTTP 客户端
- Docker + 环境配置
=== Phase 3: 现有微服务扩展(纯追加) ===
planting-service:
- Prisma schema 追加 transferLockId 可空字段
- InternalTransferController:锁定/解锁/执行 3 个新端点
- Kafka handlers:transfer-lock/execute/rollback 事件处理
- main.ts 追加 Kafka consumer group 配置
referral-service:
- PlantingTransferredHandler:处理转让后团队统计更新
- TeamStatisticsAggregate 追加 handleTransfer() 方法
- TeamStatisticsRepository 追加 adjustForTransfer() 方法
- ProvinceCityDistribution 追加 transferTrees() 方法
contribution-service:
- TransferOwnershipHandler:处理所有权变更事件
- TransferAdjustmentService:算力调整(879 行核心逻辑)
- Prisma schema 追加 transferOrderId 可空字段
- ContributionAccount 追加 applyTransferAdjustment() 方法
=== Phase 4A: wallet-service(3 个新内部端点) ===
新建文件:
- FreezeForTransferDto / UnfreezeForTransferDto / SettleTransferDto
- FreezeForTransferCommand / UnfreezeForTransferCommand / SettleTransferPaymentCommand
- InternalTransferWalletController(POST freeze/unfreeze/settle-transfer)
修改文件:
- wallet-application.service.ts 追加 3 组方法(+437 行):
freezeForTransfer / unfreezeForTransfer / settleTransferPayment
(乐观锁 + 3 次重试 + Prisma $transaction + 幂等检查)
- 结算操作:单事务内更新 3 个钱包(买方扣减 + 卖方入账 + 手续费归集)
=== Phase 4B: admin-web(转让管理页面) ===
新建文件:
- transferService.ts:API 调用服务 + 完整类型定义
- useTransfers.ts:React Query hooks(list/detail/stats/forceCancel)
- /transfers/page.tsx:列表页(统计卡片 + 搜索筛选 + 分页 + 13 种状态 badge)
- /transfers/[transferOrderNo]/page.tsx:详情页(Saga 时间线 + 状态日志 + 强制取消)
- transfers.module.scss:完整样式
修改文件:
- endpoints.ts 追加 TRANSFERS 端点配置
- Sidebar.tsx 追加「转让管理」菜单项
- hooks/index.ts 追加 useTransfers 导出
=== Phase 4C: mobile-app(转让 UI) ===
新建文件:
- transfer_service.dart:Flutter API 服务 + Model(TransferOrder/Detail/StatusLog)
- transfer_list_page.dart:转让记录列表(全部/转出/转入 Tab + 下拉刷新)
- transfer_detail_page.dart:转让详情(Saga 时间线 + 确认/取消操作)
- transfer_initiate_page.dart:发起转让表单(手续费自动计算)
修改文件:
- injection_container.dart 追加 transferServiceProvider
- route_paths.dart + route_names.dart 追加 3 个路由
- app_router.dart 追加 3 个 GoRoute
- profile_page.dart 追加「发起转让」+「转让记录」按钮行
=== 基础设施 ===
- docker-compose.yml 追加 transfer-service 容器配置
- deploy.sh 追加 transfer-service 部署
- init-databases.sh 追加 transfer_db 数据库初始化
=== 纯新增原则 ===
所有变更均为追加式修改,不修改任何现有业务逻辑:
- 新增 nullable 字段(不影响现有数据)
- 新增 enum 值(不影响现有枚举使用)
- 新增 providers/controllers(不影响现有依赖注入)
- 新增页面/路由(不影响现有页面行为)
回滚方式:删除 transfer-service 目录 + 移除各服务中带 [2026-02-19] 标记的代码
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 03:44:02 -08:00
hailin
03f5c4af28
feat(pre-planting): Profile 页面添加预种计划入口
...
[2026-02-17] 在 Profile 页面认种按钮下方新增预种计划入口
新增内容(纯新增,不改现有逻辑):
- _goToPrePlantingPurchase():跳转预种购买页
- _goToPrePlantingPosition():跳转预种持仓页
- _buildPrePlantingButtons():两个并排按钮
- 左侧「预种购买」:金色主题,跳转购买页
- 右侧「预种持仓」:棕色主题,跳转持仓页
布局位置:认种按钮正下方,主内容卡片上方
现有功能零影响,仅新增 3 个方法 + 1 处布局插入
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 05:44:48 -08:00
hailin
207b522754
feat(customer-service): 客服联系方式从硬编码改为后台可配置
...
将 mobile-app "联系客服" 弹窗的微信/QQ联系方式从硬编码改为
admin-web 后台动态配置,支持任意数量的联系方式管理。
## Backend (admin-service)
- 新增 Prisma 模型: ContactType 枚举(WECHAT/QQ) + CustomerServiceContact
- 新增迁移 SQL: 建表 + 2条索引 + 4条种子数据(保留现有硬编码联系方式)
- 新增双 Controller (参考 app-asset.controller.ts 模式):
- AdminCustomerServiceContactController (admin/customer-service-contacts)
GET 列表 / POST 新增 / PUT 更新 / DELETE 删除
- PublicCustomerServiceContactController (customer-service-contacts)
GET 仅返回 isEnabled=true,按 sortOrder 排序
- 注意: 公开 Controller 用 @Controller('customer-service-contacts')
避免与全局前缀 api/v1 双重叠加
## Kong 网关
- 新增路由 admin-customer-service-contacts-public
路径 /api/v1/customer-service-contacts → admin-service:3010
- Admin 端点由已有 admin-api 路由 (/api/v1/admin) 覆盖
## Admin-web
- endpoints.ts: 新增 CUSTOMER_SERVICE_CONTACTS 端点组
- customerServiceContactService.ts: CRUD 服务 (list/create/update/delete)
- settings/page.tsx: 新增"客服联系方式管理"区块
表格展示(排序/类型/标签/联系方式/启停/操作) + 内联新增/编辑表单
- settings.module.scss: contactTable / contactForm / contactFormFields 样式
## Flutter Mobile-app
- storage_keys.dart: 新增 cachedCustomerServiceContacts 缓存 key
- customer_service_contact_service.dart: API + 缓存服务
(内存5分钟TTL + SharedPreferences持久化 + 后台静默刷新)
- injection_container.dart: 注册 customerServiceContactServiceProvider
- profile_page.dart: _showCustomerServiceDialog() 从硬编码改为
动态 API 加载,contacts 为空时显示"暂无客服联系方式"占位符
## 文件清单 (4 新建 + 9 修改)
新建:
- backend/.../migrations/20260205100000_add_customer_service_contacts/migration.sql
- backend/.../controllers/customer-service-contact.controller.ts
- frontend/admin-web/src/services/customerServiceContactService.ts
- frontend/mobile-app/lib/core/services/customer_service_contact_service.dart
修改:
- backend/.../prisma/schema.prisma
- backend/.../src/app.module.ts
- backend/api-gateway/kong.yml
- frontend/admin-web/src/infrastructure/api/endpoints.ts
- frontend/admin-web/src/app/(dashboard)/settings/page.tsx
- frontend/admin-web/src/app/(dashboard)/settings/settings.module.scss
- frontend/mobile-app/lib/core/storage/storage_keys.dart
- frontend/mobile-app/lib/core/di/injection_container.dart
- frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 05:00:25 -08:00
hailin
dab4b0674d
fix(mobile-app): 修复引荐列表展开无法显示更多数据的问题
...
- 使用实际总数作为limit参数请求API
- 添加调试日志便于排查
- 优化:已加载全部数据时直接展开不重复请求
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 09:13:07 -08:00
hailin
8eb5b410cc
feat(mobile-app): 引荐列表支持展开/收拢功能
...
- 初始只显示前10条引荐记录
- 超过10人时显示"..."按钮可点击展开全部
- 展开后显示"收起"按钮可点击收拢
- 加载更多时显示loading指示器
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:59:03 -08:00
hailin
4f55d86050
feat(mobile-app): 更新客服联系方式
...
- 客服微信1: liulianhuanghou1
- 客服微信2: liulianhuanghou2
- 客服QQ1: 1502109619
- 客服QQ2: 2171447109
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 03:10:50 -08:00
hailin
1b237778ee
feat(mobile-app): 添加联系客服功能
...
在个人中心设置菜单中添加"联系客服"入口,点击后显示弹窗,
用户可以查看客服的QQ号和微信号,并支持一键复制到剪贴板。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 23:56:59 -08:00
hailin
5419b15bf1
fix(mobile-app): 已结算数据改为从流水统计API获取
...
- 从 wallet-service 的 getLedgerStatistics() 获取 REWARD_SETTLED 类型的总金额
- 与流水明细中的结算记录统计来自同一数据源,确保数据一致性
- 添加调试日志对比 summary 和流水统计的数据
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 19:38:37 -08:00
hailin
bdc6ba524f
fix(authorization): 火柴人排名改为按区域过滤
...
修改排名逻辑,只显示获得相同省/市公司授权的用户排名。
- 后端 getStickmanRanking 改用 findRankingsByMonthAndRegion
- 简化实时创建评估逻辑,只为当前区域创建
- 更新前端注释说明
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 05:56:30 -08:00
hailin
439dcb95ac
feat(mobile-app): rename "社区" to "部门" in profile page and add SPECIAL_DEDUCTION display name
...
- Change all "社区" labels to "部门" in profile page (所属部门, 上级部门, 下级部门, 部门权益考核, 部门贡献奖励)
- Add SPECIAL_DEDUCTION entry type display name as "面对面结算" in ledger
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:44:16 -08:00
hailin
8173e1f973
feat: "同僚"改为"同伴" + KYC从三要素改为二要素
...
mobile-app:
- profile_page.dart: 将所有"同僚"改为"同伴"
identity-service:
- 层级1实名认证从三要素(姓名+身份证+手机号)改为二要素(姓名+身份证号)
- 使用阿里云 Id2MetaStandardVerify API
- 二要素验证直接调用真实API,不使用mock
- 保留三要素验证方法(verifyIdCardThreeFactor)备用
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 04:20:42 -08:00
hailin
1908544698
fix(mobile-app): 修复 ProfilePage 在 initState 中修改 provider 导致的错误
...
将 _loadUnreadNotificationCount() 调用包装在 addPostFrameCallback 中,
延迟到 widget tree 构建完成后执行,避免 Riverpod 报错:
"Tried to modify a provider while the widget tree was building"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:57:37 -08:00
hailin
c328d8b59b
feat(mobile-app,admin): 添加系统维护功能和通知徽章功能
...
系统维护功能:
- 后端: 添加系统维护配置实体、仓库和控制器
- 后端: 添加维护模式拦截器,返回503状态码
- admin-web: 添加系统维护管理页面,支持创建/编辑/开关维护配置
- mobile-app: 添加维护状态检查服务和阻断弹窗
- mobile-app: 在启动页、向导页集成维护检查
- mobile-app: 支持App从后台恢复时自动检查维护状态
通知徽章功能:
- 添加通知徽章Provider,监听登录状态自动刷新
- 底部导航栏"我的"标签显示未读通知红点
- 进入通知页面自动刷新徽章状态
- 切换账号、退出登录自动清除徽章
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:26:01 -08:00
hailin
a54a01bba0
fix(mobile-app): 修改秘密点击解锁逻辑,点击19次后需等待2秒
...
- 连续点击19次后启动2秒定时器
- 2秒内再次点击会取消并重新计时
- 确保用户停止点击后才显示"我的同僚"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:26:22 -08:00
hailin
b20ec10c75
refactor(mobile-app): 修改"我的"页面文案
...
- "团队种植树" → "同僚种植树"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:23:45 -08:00
hailin
3d68d1f6f6
fix(mobile-app): 简化退出登录提示文案
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 10:35:50 -08:00
hailin
c84516b222
refactor(mobile-app): 修改"我的"页面文案
...
- "个人种植树" → "本人种植树"
- 引荐列表中 "个人/团队" → "本人/同僚"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:38:59 -08:00
hailin
f143be9925
refactor(mobile-app): 修改"我的团队"文案为"我的同僚"
...
- "我的团队" → "我的同僚"
- "暂无团队成员" → "暂无同僚"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:34:55 -08:00
hailin
2b5b80d299
refactor(mobile-app): 修改"我的"页面文案
...
- "直推人数" → "引荐"
- "个人种植数" → "个人种植树"
- "团队种植数" → "团队种植树"
- "直推列表" → "引荐列表"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:33:25 -08:00
hailin
b20be7213c
feat(mobile-app): 隐藏"我的团队"功能,需秘密点击解锁
...
- 默认隐藏"我的团队"树形组件
- 在"团队种植数"区域连续点击19次后显示
- 点击间隔超过1秒自动重置计数器
- 退出页面后状态自动重置
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:29:20 -08:00
hailin
78d7e0e637
feat(mobile-app): 流水明细支持显示权益类型和详情
...
- 后端 wallet-service: getMyLedger API 返回 allocationType 字段
- 前端流水明细: 显示权益类型名称(分享权益、省/市区域权益等)
- 新增权益详情弹窗,点击权益记录可查看详细信息
- 兑换页面: "RMB/CNY提现" 改为 "提现"
- 我的团队: "暂无下级成员" 改为 "暂无团队成员"
- 自助申请授权: 隐藏团队链占用区域提示
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 03:57:35 -08:00
hailin
a549768de4
feat(kyc): 实现实名认证和更换手机号功能
...
主要变更:
- 注册流程: 添加跳过短信验证选项(3分钟后显示)
- KYC功能: 手机号验证 + 身份证实名认证(阿里云二要素)
- 更换手机号: 四步验证流程(旧手机验证→输入新号→新手机验证→确认)
- 独立管控: phoneVerified, emailVerified, kycStatus 三个状态分别管理
后端:
- 新增 KYC 控制器和服务
- 新增更换手机号 API 端点
- Schema 添加 KYC 和验证状态字段
- 集成阿里云身份二要素验证
前端:
- 新增 KYC 入口页、手机验证页、身份证验证页
- 新增更换手机号页面
- Profile 页面添加实名认证入口
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 06:38:39 -08:00
hailin
ee4cac59c7
fix(profile): 修复嵌套 Row 无界约束导致的白屏问题
...
在 _buildSettlementSection 的"已结算"区域,内层 Row 中使用了 Flexible,
但内层 Row 没有宽度约束,导致 RenderFlex unbounded width constraints 错误。
通过在内层 Row 外添加 Expanded 包裹来提供宽度约束。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 03:41:23 -08:00
hailin
1cd4b352a4
debug(mobile): 添加火柴人组件调试日志
...
- 记录宽度计算的各个参数
- 添加clamp保护防止负值宽度
- 打印排名数据详情
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 03:32:22 -08:00
hailin
ba3e96c606
fix(mobile): 修复SVG头像渲染导致的布局问题
...
- 使用RepaintBoundary隔离SVG渲染
- 添加placeholderBuilder防止加载时闪烁
- 确保SizedBox固定尺寸约束
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 03:26:24 -08:00
hailin
a38727eb7f
Revert "revert(profile): 回滚profile_page.dart到稳定版本"
...
This reverts commit b06f186836 .
2025-12-24 03:16:39 -08:00
hailin
b06f186836
revert(profile): 回滚profile_page.dart到稳定版本
...
修复SVG头像渲染导致的白屏问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 03:11:24 -08:00
hailin
0623169d19
fix(mobile): 修正火柴人进度计算,使用固定目标值
...
- 省公司: 目标固定5万,达到或超过5万停在红旗
- 市公司: 目标固定1万,达到或超过1万停在红旗
- 进度 = completedCount / targetCount,clamp到0-1
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 02:16:54 -08:00
hailin
71304dbb69
fix(mobile): 改进用户详情页风格和火柴人进度计算
...
- 用户详情页使用与"我的"页面一致的浅黄色渐变背景
- 移除深金棕色AppBar,改用简洁的顶部导航栏
- 火柴人进度使用后端返回的progressPercentage而非前端计算
- 添加finalTarget和progressPercentage字段到排名响应
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 01:41:41 -08:00
hailin
f73e477041
fix(mobile-app): 待领取奖励卡片也去掉重复的权益类型前缀
...
与可结算卡片保持一致,只显示"来自用户xxx的认种"部分
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 01:02:38 -08:00
hailin
e8f65f3fcd
fix(mobile-app): 可结算奖励卡片去掉重复的权益类型前缀
...
memo 中已包含权益类型(如"分享权益:来自用户xxx的认种"),
卡片标题也显示了权益类型,所以只显示"来自用户xxx的认种"部分
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 01:01:19 -08:00
hailin
f0f4aa474a
feat(mobile-app): 可结算奖励卡片显示来源信息
...
在"我的"页面可结算板块中,每笔收益现在会显示来源信息(通过 memo 字段)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:21:58 -08:00
hailin
19bd804a21
feat(frontend): 前端时间显示统一转换为本地时间
...
- mobile-app: 新增 DateTimeUtils 工具类处理 UTC -> 本地时间转换
- mobile-app: 修改 ledger_detail_page 和 profile_page 使用本地时间
- admin-web: 添加 dayjs 自动转换注释说明
- mobile-upgrade: 优化 toLocaleString 格式化选项
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 19:45:51 -08:00
hailin
6f8eaa8e92
fix(mobile-app): 优化数字显示组件防止自动换行
...
使用 FittedBox(fit: BoxFit.scaleDown) 包装所有可变数字显示组件,
确保当数字位数多时自动缩小字号而不是换行,提升用户视觉体验。
优化的页面和组件:
- stickman_race_widget: 火柴人标签、排名列表数量、进度百分比
- team_tree_widget: 节点认种数、省略节点数量、详情弹窗
- ranking_page: 龙虎榜团队认种量
- trading_page: DST余额、绿积分余额
- profile_page: 各类收益金额、奖励项金额
- withdraw_usdt_page: 提款页余额
- deposit_usdt_page: 充值页余额
- ledger_detail_page: 净收益、收支概览、流水金额
- authorization_apply_page: 累计认种数
- planting_quantity_page: 可用余额
- mining_page: 用户序列号
- account_switch_page: 账号用户名、序列号
- wallet_created_page: 钱包地址信息
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 18:33:51 -08:00
hailin
2d3891740c
feat(authorization): 火柴人排名改为全系统排名,不按区域过滤
...
- 后端新增 findRankingsByMonthAndRoleType 方法查询全系统排名
- 修改 getStickmanRanking 不再按 regionCode 过滤
- 前端简化加载条件,只要有授权就加载排名
- 添加详细调试日志帮助排查问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:20:35 -08:00
hailin
3f5203c142
feat: 已认种用户分享权益直接进入可结算状态
...
- 新增 hasPlanted 字段标记用户是否已认种
- 已认种用户的分享权益直接进入可结算余额,无需待领取
- 修正前端权益考核数值(576/288/252/144/108 绿积分)
- 修复账本明细筛选栏选择后滚动位置重置问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 21:10:49 -08:00