Commit Graph

620 Commits

Author SHA1 Message Date
hailin 390bb1c22b fix(android): 降级 Kotlin 版本至 1.9.22 修复构建错误
sentry_flutter 插件不兼容 Kotlin 2.2.20,降级到稳定版本

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 19:53:01 -08:00
hailin bbd6f2ee38 feat(mobile-app): 优化创建钱包页面UI
- 添加背景图片 onboarding_bg.jpg
- 移除重复的logo和标题(背景图已包含)
- 添加白色半透明卡片背景提高文字可读性
- 调整颜色主题为绿色系匹配背景
- 修改认种确认弹窗标题为"一旦确认,无法更改"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 19:33:04 -08:00
hailin ebb0b85ab5 fix(sentry): 修复 Flutter 代码分析错误
- 修复 bootstrap.dart 中 deviceModel 属性访问错误 (使用 brand + model)
- 移除 sentry_navigation_observer.dart 中未使用的 _previousRouteName 字段
- 更新 sentry_service.dart 使用新版 Sentry API (captureFeedback)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 11:04:28 -08:00
hailin 80b74e9877 feat(sentry): 集成 Sentry 自建崩溃收集与错误追踪系统
Backend (infrastructure/sentry):
- 添加 Sentry 自建部署 Docker Compose 配置
- 包含 PostgreSQL, Redis, Kafka, ClickHouse, Snuba 等组件
- 添加 Relay (事件网关) 和 Symbolicator (符号化服务) 配置
- 添加部署脚本 deploy.sh 和配置文件
- 更新 infrastructure README 文档

Frontend (mobile-app):
- 添加 sentry_flutter SDK 依赖
- 创建 SentryService 封装类,统一管理崩溃收集
- 创建 SentryConfig 配置类,支持开发/生产环境配置
- 创建 SentryNavigationObserver 自动追踪页面导航
- 创建 SentryDioInterceptor 自动追踪 HTTP 请求
- 在 bootstrap.dart 中集成 Sentry 初始化
- 支持 Flutter 错误和异步错误捕获
- 自动过滤敏感信息 (密码、助记词、私钥等)
- 在登录/登出/切换账号时同步 Sentry 用户信息

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 07:15:13 -08:00
hailin cc06638e0e feat(telemetry): 将userId改为userSerialNum字符串格式并完善遥测追踪
Backend (presence-service):
- 将EventLog.userId从BigInt改为String类型,存储userSerialNum(如D25121400005)
- 更新Prisma schema,userId字段改为VarChar(20)并添加索引
- 更新心跳相关命令和事件,统一使用userSerialNum字符串
- 添加数据库迁移文件
- 更新相关单元测试和集成测试

Frontend (mobile-app):
- TelemetryEvent新增toServerJson()方法,格式化为后端API期望的格式
- AccountService登录/恢复时设置TelemetryService的userId
- MultiAccountService切换账号时同步更新TelemetryService的userId
- 退出登录时清除TelemetryService的userId
- AuthProvider初始化时设置userId

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 06:55:25 -08:00
hailin 3942cb405a fix(frontend): 添加新账号时显示加载状态提示
- 添加 _isAddingAccount 状态变量
- 点击"添加新账号"时显示"正在准备..."加载提示
- 添加 try-catch 错误处理,失败时显示错误提示
- 防止重复点击

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 06:14:49 -08:00
hailin 2a4efe0828 fix(frontend): 修复添加新账号时旧状态未清除的问题
问题: logoutCurrentAccount() 方法只清除了 5 个状态,导致添加新账号时
旧账号的钱包地址、助记词备份状态等仍然存在,影响新账号创建/导入流程。

修复: 现在清除全部 16 个账号相关状态:
- Token: accessToken, refreshToken
- 账号信息: userSerialNum, username, avatarSvg, avatarUrl,
  referralCode, inviterSequence, isAccountCreated
- 钱包信息: walletAddressBsc, walletAddressKava, walletAddressDst,
  mnemonic, isWalletReady, isMnemonicBackedUp

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 06:07:23 -08:00
hailin b01277ab7d feat(withdraw): 实现完整的提取功能 - TOTP验证和KAVA转账
功能实现:
- identity-service: 添加TOTP二次验证功能
  - 新增 UserTotp 数据模型
  - 实现 TotpService (生成/验证/启用/禁用)
  - 添加 /totp/* API端点

- wallet-service: 提取API添加TOTP验证
  - withdrawal.dto 添加可选 totpCode 字段
  - 添加 IdentityClientService 调用identity-service验证TOTP
  - 添加 WithdrawalStatusHandler 处理区块链确认/失败事件

- blockchain-service: 实现真实KAVA ERC20转账
  - 新增 Erc20TransferService (热钱包USDT转账)
  - 更新 withdrawal-requested.handler 执行真实转账
  - 发布确认/失败事件回wallet-service

- 前端: 对接真实提取API
  - withdraw_confirm_page 调用 walletService.withdrawUsdt

环境变量配置:
- TOTP_ENCRYPTION_KEY (identity-service)
- IDENTITY_SERVICE_URL (wallet-service)
- HOT_WALLET_PRIVATE_KEY (blockchain-service)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 05:16:42 -08:00
hailin 2dba7633d8 fix(withdraw): 将确认页面中的提款改为提取
- 页面标题"确认提款" → "确认提取"
- "提款详情" → "提取详情"
- "提款网络" → "提取网络"
- "提款地址" → "接收地址"
- "提款金额" → "提取数量"
- "提款申请已提交" → "提取申请已提交"
- 按钮文字"确认提款" → "确认提取"
- 错误提示"提款失败" → "提取失败"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:54:28 -08:00
hailin 9cc66d8c61 fix(trading): 将提取/转动按钮下的人民币改为积分
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:49:44 -08:00
hailin 53cc4623ff chore(trading): 暂时屏蔽BNB、OG、DST结算币种,只保留人民币
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:39:34 -08:00
hailin a81aaa6acd fix(withdraw): 修改提款页面文字并暂时屏蔽BSC网络
- 屏蔽 BSC (BNB Chain) 网络选项
- "提款地址" → "接收地址"
- "请输入 KAVA 或 EVM 地址" → "请输入接收积分的地址"
- "提款金额" → "积分提取数量"
- "请输入提款金额" → "请输入积分数量"
- "最小提款金额" → "最小提取数量"
- 注意事项中的"提款"改为"提取"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:38:34 -08:00
hailin a7417be0e1 chore(trading): 暂时屏蔽卖出DST功能和DST余额显示
待功能开放后取消注释即可恢复

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:31:40 -08:00
hailin 83f10df29e fix(trading): 将结算币种中的积分更换为人民币
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:30:50 -08:00
hailin 7db38114d9 fix(profile): 修复伞下树图居中问题;更名提款/转账为提取/转动
- 使用 LayoutBuilder 获取实际容器宽度计算节点显示
- 修改兑换页面按钮文字从"提款/转账"改为"提取/转动"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:28:58 -08:00
hailin 4d6ce3ce08 fix(profile): 修复伞下树图未居中问题
使用 LayoutBuilder 获取实际容器宽度而不是屏幕宽度

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:25:19 -08:00
hailin 6dd7e64a95 feat(frontend): 多项功能改进
- 将所有 USDT 文本替换为 积分
- 监控页面:将"挖矿待开启"改为"开启监控",开启时显示关闭按钮
- 我的伞下:树图默认居中显示
- 树图节点:长按查看详情(序列号、认种数、直推人数)
- 分享页面:显示推荐码并支持复制

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 04:04:21 -08:00
hailin 8d68b292c8 fix(deps): 降级 share_plus 版本修复 Android 构建错误
将 share_plus 从 ^10.0.0 降级到 ^7.2.2,解决 Android SDK 35 构建时的 Kotlin 编译错误

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 03:38:24 -08:00
hailin 306f003679 refactor(splash): 简化开屏动画为纯帧播放,恢复监控Tab
- 重构 splash_page.dart: 移除 video_player 依赖,改用纯帧动画播放
- 帧数从53张调整为36张,添加预加载优化
- 移除 pubspec.yaml 中的 video_player 依赖
- 恢复底部导航栏"监控"Tab(原"矿机")
- 调整路由索引:0-龙虎榜, 1-监控, 2-兑换, 3-我
- 移除"我的"页面的"领取全部"按钮

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 03:28:53 -08:00
hailin f3a475a6f4 feat(account): 实现多账号管理功能
- 新增 MultiAccountService 处理多账号存储和切换
- 新增 AccountSwitchPage 账号切换页面
- 修改 storage_keys.dart 添加多账号相关键和前缀方法
- 修改 ProfilePage 切换账号按钮跳转到账号切换页面
- 修改退出登录逻辑,保留账号数据只清除会话状态
- 新账号创建时自动添加到账号列表
- 支持旧单账号数据自动迁移到多账号架构
- 支持删除账号(带确认对话框)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 02:57:13 -08:00
hailin 04644ea3f8 feat(profile): 添加退出登录和切换账号功能
- 在版本信息栏添加构建模式显示(Debug/Release/Profile)
- 在版本信息栏下方添加切换账号按钮(暂显示即将上线提示)
- 在版本信息栏下方添加退出登录按钮(带确认对话框)
- 退出登录后清除本地数据并跳转到向导页

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 02:16:36 -08:00
hailin 09e66cef10 refactor: 多项UI优化和品牌更名
- 品牌更名: 将"榴莲女皇"全部替换为"榴莲皇后"(前端+后端共15处)
- 导航优化: 将"交易"Tab改名为"兑换"
- 创建钱包页: 添加返回按钮,可返回向导页第5页(仅账号未创建时显示)
- 兑换页面: 禁用"一键结算"和"卖出DST"按钮,提款按钮在余额为0时禁用

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 01:43:47 -08:00
hailin 5219a5a39f chore(nav): 暂时隐藏矿机Tab
- 底部导航从4个减少到3个: 龙虎榜、交易、我
- 保留矿机相关代码注释,方便后续恢复
- 调整索引映射以匹配新的Tab顺序

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 01:05:28 -08:00
hailin db37fbf860 feat(notification): 添加通知中心功能
后端 (admin-service):
- 新增 Notification 和 NotificationRead 数据模型
- 支持通知类型: 系统/活动/收益/升级/公告
- 实现管理端 API: 创建/更新/删除/列表
- 实现移动端 API: 获取通知列表/未读数量/标记已读

前端 (mobile-app):
- 新增 NotificationService 和 Provider
- 新增通知中心页面 (NotificationInboxPage)
- 在"我的"页面右上角添加通知图标(带未读角标)
- 支持查看通知详情、标记已读、全部已读

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 20:45:03 -08:00
hailin 11d9b57bda feat(splash): 将 fallback 动画改为帧动画以提升兼容性
- 将 Tween 动画替换为 53 帧 PNG 序列动画
- 添加 splash_frames 资源目录(15fps,约3.5秒)
- 使用 gaplessPlayback 防止帧切换闪烁
- 保留帧加载失败时的静态 fallback

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 20:18:12 -08:00
hailin ada8a44076 feat(splash): 添加视频播放失败时的 fallback 动画
当设备硬件解码器无法播放视频时(如部分华为老机型),
显示 Logo 缩放 + 文字淡入的 Flutter 动画作为替代方案。

- 添加 fallback 动画控制器和动画序列
- Logo 从小到大弹性缩放 + 透明度渐显
- 文字延迟淡入显示
- 动画时长 3 秒,支持跳过按钮
- 保持与视频相同的用户体验流程

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 20:00:20 -08:00
hailin 7bfd6822a7 fix(splash): 修复华为设备启动动画兼容性问题
- 添加 core-splashscreen 依赖支持 Android 12+ SplashScreen API
- 配置原生 Splash 主题消除冷启动白屏
- 添加 values-v31 和 values-night-v31 适配 Android 12+
- 更新 launch_background.xml 显示品牌 Logo
- MainActivity 添加 installSplashScreen() 处理
- 视频转码为 H.264 格式解决华为 HEVC 解码器兼容问题
- 添加视频初始化调试日志

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 19:54:40 -08:00
hailin 2e44263834 feat(profile): 添加我的伞下功能 - 展示下级用户树形结构
- 后端新增 GET /referral/user/:accountSequence/direct-referrals API
- 前端新增伞下树组件,支持懒加载、缓存、展开/收起
- 使用 CustomPaint 绘制父子节点连接线
- 超出屏幕宽度时显示省略号,点击弹出底部列表

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 10:34:56 -08:00
hailin 2eda3be275 fix(frontend): 修正权益金额显示与后端实际配置一致
- 省团队权益: 10 → 20 USDT
- 市区域权益: 20 → 35 USDT
- 省区域权益: 10 → 15 USDT

权益金额配置参考 reward-service/prisma/seed.ts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 09:46:30 -08:00
hailin c4be2f59f7 fix(frontend): 修正市团队权益描述金额 30 → 40 USDT
市团队权益每棵树实际是 40 USDT,前端显示文案错误写成 30 USDT

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 09:45:05 -08:00
hailin 0860ff23b8 fix(guide): 修复向导页5导入助记词按钮导航问题
将 Navigator.of(context).pushNamed() 改为 context.push(),
使用 go_router 进行页面导航,与 onboarding_page 保持一致。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 09:19:25 -08:00
hailin 13d1bedb73 feat(profile): 添加市团队/省团队/市区域/省区域权益考核显示
在"我的"页面社区权益考核下方,根据用户拥有的角色显示对应的权益考核组件:
- 市团队:每新增认种1棵可获得30 USDT
- 省团队:每新增认种1棵可获得10 USDT
- 市区域:每新增认种1棵可获得20 USDT
- 省区域:每新增认种1棵可获得10 USDT

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 08:40:34 -08:00
hailin 6ef8824ef0 fix(referral): 修复 getMyReferralInfo 使用 userId 而不是 accountSequence 的问题
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 05:05:03 -08:00
hailin 6eea4463f8 feat(profile): 支持显示多笔待领取奖励明细
- 新增 PendingRewardItem 数据模型,对接 GET /rewards/pending 接口
- 修改 ProfilePage 并行加载汇总数据和待领取列表
- 重构收益区域 UI,展示每笔奖励的权益类型、金额和独立倒计时

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 01:33:13 -08:00
hailin 552b15e26b fix(mobile): 修复序列号类型转换错误
accountSequence 格式已从数字改为字符串 (D + YYMMDD + 5位序号)
- profile_page.dart: `as int?` → `as String?`
- mining_page.dart: `as int?` → `as String?`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 14:22:59 -08:00
hailin 4be9c1fb82 refactor!: 重构账户序列号格式 (BREAKING CHANGE)
将 accountSequence 从数字类型改为字符串类型,新格式为:
- 普通用户: D + YYMMDD + 5位序号 (例: D2512120001)
- 系统账户: S + 10位序号 (例: S0000000001)

主要变更:
- identity-service: AccountSequence 值对象改为字符串类型
- identity-service: 序列号生成器改为按日期重置计数
- 所有服务: Prisma schema 字段类型从 BigInt/Int 改为 String
- 所有服务: DTO、Command、Event 中的类型定义更新
- Flutter 前端: 相关数据模型类型更新

涉及服务:
- identity-service (核心变更)
- referral-service
- authorization-service
- wallet-service
- reward-service
- blockchain-service
- backup-service
- planting-service
- mpc-service
- admin-service
- mobile-app (Flutter)

注意: 此为破坏性变更,需要清空数据库并重新运行 migration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 09:11:18 -08:00
hailin 3eeef11197 fix(mobile): filter out revoked authorizations in profile display
Previously, revoked authorizations were still shown in the profile page
because UserAuthorizationSummary.fromList() did not filter by status.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 04:35:30 -08:00
hailin 26427443fe feat(mobile): add auth-province and auth-city company display in profile page
- Add authProvinceCompany and authCityCompany to RoleType enum
- Update UserAuthorizationSummary to support all role types
- Update profile page to display all authorization types

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 22:20:25 -08:00
hailin 033268deb9 feat(mobile): improve UX with QR scanning and Huawei compatibility fixes
- Disable Impeller rendering engine to fix video playback on Huawei devices
- Update splash screen text from "榴莲女皇" to "榴莲皇后" and use app logo
- Make referral code input scan-only (disable manual input) on guide page 5
- Add "import mnemonic" entry on guide page 5 for account recovery
- Replace paste button with QR scanner in USDT withdraw address input
- Add camera and gallery QR scanning support for wallet addresses

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 05:39:58 -08:00
hailin 62b6714760 chore(mobile): add splash video asset
Add splash.mp4 video file for the splash screen

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 04:27:51 -08:00
hailin 7bf88cd6a8 feat(mobile): replace splash screen with video player
- Add video_player dependency for video playback
- Create assets/videos directory for splash video
- Implement video splash screen with:
  - Full-screen video playback (splash.mp4)
  - Skip button appears after 1 second
  - Fallback to logo view if video fails to load
  - Auto-navigate when video completes
- Video file should be placed at: assets/videos/splash.mp4

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 04:23:04 -08:00
hailin 3644c04521 fix(mobile): auto-show confirm dialog when planting location is saved
When user has previously saved province/city selection:
- Automatically show confirm dialog on page load
- Skip the 5-second countdown timer
- Hide countdown text in dialog when skipCountdown is true
- User can directly confirm and proceed with planting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 04:08:57 -08:00
hailin ca5e903724 feat(mobile): add USDT withdraw feature with Google Authenticator verification
1. Trading page:
   - Add withdraw/transfer button below DST balance section
   - Display USDT balance from wallet-service
   - Navigate to withdraw page on button tap

2. Withdraw USDT page (new):
   - Network selection (KAVA / BSC)
   - Wallet address input with paste support
   - Amount input with max button
   - Fee calculation (0.1%) and actual amount preview
   - Input validation and notice section

3. Withdraw confirm page (new):
   - Transaction details summary
   - Google Authenticator 6-digit code verification
   - Success dialog with navigation back to trading

4. Routes:
   - Add /withdraw/usdt and /withdraw/confirm routes
   - Configure route parameters for WithdrawUsdtParams

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 03:47:22 -08:00
hailin 7320900289 fix(mobile): sync trading page settleable data with profile page
Trading page now fetches settleableUsdt from reward-service instead
of wallet-service to ensure data consistency with profile page.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 03:28:02 -08:00
hailin d1a7c44f23 fix(referral): correct response parsing for authorization-service API
The authorization-service uses TransformInterceptor which wraps all API
responses in a standard format: { success, data, timestamp }

Before this fix, the AuthorizationServiceClient was reading:
  response.data.accountSequence (undefined)

After this fix, it correctly reads:
  response.data.data.accountSequence

This ensures that nearestCommunity, nearestProvinceAuth, and nearestCityAuth
are properly extracted from the wrapped response, allowing community benefits
to be correctly allocated to authorized users instead of falling back to
SYSTEM_HEADQUARTERS_COMMUNITY.

Changes:
- Added AuthorizationServiceResponse<T> interface to model wrapped response
- Updated findNearestCommunity() to use wrapped response type
- Updated findNearestProvince() to use wrapped response type
- Updated findNearestCity() to use wrapped response type
- Updated catchError handlers to return properly structured fallback data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 03:08:50 -08:00
hailin 7d9837fc22 refactor(reward): 前端直接从 reward-service 查询奖励数据
移除 reward-service 和 wallet-service 之间的 Kafka 同步机制:
- 屏蔽 reward-service 的 outbox 发布逻辑
- 屏蔽 wallet-service 的 RewardEventConsumerController 订阅

Flutter 前端改为直接调用 reward-service API:
- 新增 RewardService 调用 /rewards/summary
- profile_page 改用 rewardService.getMyRewardSummary()

这样简化了架构,数据从源头获取,避免同步问题。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 00:36:53 -08:00
hailin 05040b3495 feat(mobile): integrate community hierarchy API in profile page
- Call getMyCommunityHierarchy() to get parent/child community info
- Display parent community name (defaults to 总部社区 if none)
- Display child communities count and first name

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 20:13:52 -08:00
hailin 9cf8b5305b feat(authorization): add community hierarchy API
- Add internal referral-chain API in referral-service for getting ancestor path and team members
- Extend ReferralServiceClient to call referral-chain API
- Add findActiveCommunityByAccountSequences repository method
- Add getCommunityHierarchy application service method
- Add GET /authorizations/my/community-hierarchy endpoint
- Update frontend with CommunityHierarchy model and getMyCommunityHierarchy method

API returns:
- myCommunity: user's own community authorization (if any)
- parentCommunity: nearest parent community (defaults to 总部社区 if none)
- childCommunities: nearest child communities in user's team

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 18:18:49 -08:00
hailin c1d30b0a65 fix(mobile): correct community benefit description
Changed from "有资格获得 3% 的社区福利" to "每新增认种 1 棵可获得 80 USDT"
which accurately reflects the actual community benefit rule.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 17:49:19 -08:00
hailin eae6293b4a fix(mobile): fix authorization API response parsing
The API returns {"success": true, "data": [...]} format but the code
was checking if response.data is List directly. Now properly extracts
the data field before parsing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 17:40:04 -08:00
hailin 034fb53674 refactor: use accountSequence as unified user identifier across all services
- planting-service: extract accountSequence from JWT, pass to referral-service
- referral-service: query by accountSequence instead of userId
- reward-service: add accountSequence field to schema and all layers
- wallet-service: prioritize accountSequence lookup over userId
- authorization-service: change userId from String to BigInt, add accountSequence

This change ensures consistent cross-service user identification using
accountSequence (8-digit unique business ID) instead of internal database IDs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 13:55:03 -08:00
hailin 176a4b1493 fix(guide): change referral code input text color to black for visibility
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 10:44:39 -08:00
hailin 1b2211d641 feat(mobile): add personal planting count to profile page
Added "个人种植数" stat between direct referral count and team planting
count in the profile page team stats section.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 09:13:20 -08:00
hailin 317ea1234d fix(mobile): use wallet-service for balance queries
- Planting page: fetch USDT balance from wallet-service instead of blockchain-service
- Deposit page: fetch USDT balance from wallet-service instead of blockchain-service

This ensures balance reflects internal wallet state, not on-chain balance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 09:07:15 -08:00
hailin d84fc9409b fix(mobile): add 5s delay before confirm-province-city API call
Backend requires 5 seconds wait time after selectProvinceCity before
confirmProvinceCity can be called. Added delay to comply with this rule.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 08:30:52 -08:00
hailin c887cf7ec6 fix(mobile): send all 4 fields for province/city selection API
API requires provinceCode, provinceName, cityCode, cityName (all strings).
Previous fix only sent 2 fields, now sending all 4 required fields.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 08:27:15 -08:00
hailin a44f6c7c35 fix(mobile): send provinceName/cityName instead of codes to API
API expects provinceName and cityName (strings) but frontend was
sending provinceCode and cityCode (numbers), causing 400 error.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 08:23:03 -08:00
hailin 4074281088 feat(mobile): allow manual input for planting quantity
- Replace static text with editable TextField for quantity
- Add warning when input exceeds max quantity based on balance
- Sync +/- buttons with input field value

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 08:16:23 -08:00
hailin 3dcf685715 feat(mobile): add close button to planting confirm dialog
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 08:07:27 -08:00
hailin 0b3ddd51bd feat(mobile): connect trading and mining pages to real APIs
- Trading page: fetch settleableUsdt and dstBalance from wallet-service
- Trading page: implement real settlement API call
- Mining page: fetch community/province/city from authorization-service
- Add loading states and error handling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 08:02:43 -08:00
hailin 76377c3bb6 fix(mobile): fix wallet API response parsing
The wallet API returns wrapped format { success, data, timestamp }
but the parser was reading from the root object directly.
Now correctly unpacks the inner 'data' field before parsing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 06:55:30 -08:00
hailin 22c32031af feat(authorization): add community assessment progress to profile page
Backend:
- Add initialTargetTreeCount, currentTreeCount, monthlyTargetTreeCount
  fields to AuthorizationDTO and AuthorizationResponse
- Query TeamStatistics to populate current tree count in getUserAuthorizations

Frontend:
- Update AuthorizationResponse to parse new progress fields
- Replace hardcoded community assessment values with real API data
- Show authorization status: red (unauthorized), orange (pending), green (active)
- Display progress bar and target requirements based on benefit status

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 06:44:13 -08:00
hailin 68182fd0a3 feat(referral): add personal/team planting counts to direct referral list
- Backend: batch query TeamStatistics to get each direct referral's
  personalPlantingCount and teamPlantingCount
- Updated DTO and query interfaces with new fields
- Frontend: parse and display "个人/团队" counts in profile page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 05:57:46 -08:00
hailin e1017fff46 fix(mobile): reduce direct referral list item spacing
- Row gap: 8px → 4px
- Vertical padding: 12px → 8px

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 05:18:23 -08:00
hailin 13f670e9dd fix(referral): fix direct referral list display and count issues
1. Return accountSequence instead of userId for direct referral list display
2. Create missing team statistics record when referrer doesn't have one

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 04:58:16 -08:00
hailin b508d9b201 fix(mobile): change update check interval to 90-300s random
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 04:17:06 -08:00
hailin d6eda59d63 fix(mobile): change update check interval from 24h to 30-90s random
Allows faster detection of urgent updates while preventing excessive
API calls with random cooldown period.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 04:16:03 -08:00
hailin 88c59e92fd fix(mobile): use external storage for APK download and close app on install
- Change download path from getApplicationDocumentsDirectory to
  getExternalStorageDirectory for proper FileProvider support
- Add finishAffinity() after starting APK install intent

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 04:03:01 -08:00
hailin fea90b7616 fix(android): add app_flutter path for FileProvider
APK downloaded to getApplicationDocumentsDirectory() which maps to
files/app_flutter/ on Android. FileProvider needs this path configured
to grant URI permission for APK installation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 03:28:13 -08:00
hailin 908f50ab11 fix(mobile): move update check to HomeShellPage with valid context
- Move checkForAppUpdate from SplashPage to HomeShellPage
- Use WidgetsBindingObserver to check on app resume
- Add 24-hour interval check to avoid frequent API calls
- Fix: context.go() invalidates context, so check was never executed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 03:05:19 -08:00
hailin ba3103a7be fix(mobile): add missing orderNo parameter in router
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 22:34:28 -08:00
hailin dfa21c0280 feat(mobile): integrate PlantingService with real API
- Add PlantingService for planting order management
  - createOrder: Create new planting order
  - selectProvinceCity: Select province and city
  - confirmProvinceCity: Confirm province/city selection
  - payOrder: Pay for order
  - getOrder/getMyOrders: Query orders
  - cancelOrder: Cancel unpaid orders
- Register PlantingService in DI container
- Update planting_quantity_page to create order before navigation
- Update planting_location_page to call real API endpoints
- Fix referral-service event-ack.publisher to use KafkaService

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 22:28:36 -08:00
hailin 8335187436 feat(mobile): integrate wallet-service API for profile page rewards
- Add WalletService to fetch wallet/rewards data from backend
- Replace hardcoded earnings data with real API calls
- Add loading/error states for earnings section
- Implement claim rewards functionality with API
- Add comprehensive debug logging for troubleshooting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 20:05:14 -08:00
hailin 62270ed202 update: guide page images for better display on various screen ratios 2025-12-09 19:32:46 -08:00
hailin 526f90d33e fix(mining): handle avatar URL vs SVG in mining page 2025-12-09 18:56:58 -08:00
hailin 91e54946ba fix(mobile): avatar URL handling + API paths + guide page layout
1. Avatar display:
   - Detect if _avatarSvg is URL or SVG string
   - Use Image.network for URLs, SvgPicture.string for SVG

2. API endpoints:
   - Remove /api/v1 prefix from endpoints (already in baseUrl)
   - Fixes duplicate /api/v1/api/v1 in requests

3. Guide page:
   - Restore BoxFit.cover for fullscreen images
   - Fix page indicator positioning with SafeArea

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 18:50:34 -08:00
hailin 243105f97f fix(guide): use fitWidth to prevent image stretching + add debug logs
- Change BoxFit.cover to BoxFit.fitWidth for guide page images
- Add screen info logging (resolution, pixel ratio, aspect ratio)
- Add detailed avatar loading logs in frontend and backend
- Log avatarUrl from DB and API response during recovery

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 18:36:43 -08:00
hailin a3c0d3948d debug: add detailed logging for avatar loading
Added debug logs in:
- ProfilePage._loadUserData() - local storage data
- ProfilePage._loadMeData() - API response and sync conditions
- ProfilePage._buildAvatarContent() - avatar rendering decision
- UserApplicationService.getMe() - backend avatarUrl value

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 18:24:13 -08:00
hailin 8d94d9e4bb fix(mobile): sync avatar from API when local storage is empty
When recovering an account via mnemonic, the avatar SVG might not be
saved to local storage. Now the profile page checks if avatarUrl is
returned from the /me API and updates both the display and local storage.

- Add updateLocalAvatarSvg() method to AccountService
- Update _loadMeData() to sync avatar from API response

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 18:19:13 -08:00
hailin 9dd4bb3ac5 fix(mobile): update guide_5 to jpg and add AnimatedSize for smooth transition
- 将 guide_5.png 改为 guide_5.jpg
- 使用 AnimatedSize 包裹推荐码输入框,切换选项时平滑过渡,消除跳跃闪烁

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 17:49:07 -08:00
hailin 07448b381b feat(mobile): redesign guide pages with fullscreen background images
向导页重新设计:

1. 页面1-4 改为全屏背景图片布局
   - 移除 SafeArea,图片延伸到状态栏
   - 移除文字标题和副标题(文字设计在图片中)
   - 仅保留底部页面指示器(白色圆点)

2. 页面5(欢迎加入页)也改为全屏背景图片
   - 添加渐变遮罩(30%~60%黑色)提高可读性
   - 表单区域改为透明背景
   - 所有文字、输入框、单选按钮改为白色系
   - 退出按钮文字从"退出 Exit"改为"退出"

3. 添加5张向导页背景图片
   - guide_1.jpg ~ guide_4.jpg: 介绍页背景
   - guide_5.png: 欢迎加入页背景

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 17:44:38 -08:00
hailin 53320df220 fix(mobile): always check for updates and add debug logs
- Remove condition that only checked updates when wallet was created
- Add debug logging to version checker and self hosted updater
- Updates should now prompt on every app launch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 07:52:00 -08:00
hailin 58a359d9b3 fix: changelog default value and referrals map syntax
- admin-service: provide default empty string for optional changelog
- profile page: fix map literal syntax for referrals list

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 07:00:02 -08:00
hailin 586dfda8f7 fix(admin): support 4-segment version in domain layer & make changelog optional
- VersionName value object now accepts x.y.z.w format
- changelog field is now optional in upload version DTO
- profile page: ensure expired section has full width

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 06:54:55 -08:00
hailin 001b6501a0 feat(deposit): add deposit balance API and Kafka consumer for deposit events
Blockchain Service:
- Add /api/v1/deposit/balances endpoint to query on-chain USDT balances
- Add JWT authentication (passport, passport-jwt)
- Add JwtStrategy, JwtAuthGuard, Public decorator

Wallet Service:
- Add Kafka consumer for blockchain.deposits topic
- Add DepositConfirmedHandler to process deposit events and update wallet balance

Infrastructure:
- Add JWT_SECRET env var to blockchain-service in docker-compose.yml
- Add blockchain-service routes to Kong API Gateway

Frontend:
- Fix deposit_service.dart API path (remove duplicate /api prefix)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 02:29:31 -08:00
hailin 26ecb39476 fix(mobile-app): pass referral code to backend during account creation
- Add inviterReferralCode storage key for temporary referral code storage
- Save referral code in guide page before navigating to onboarding
- Read and pass referral code to createAccount API in onboarding page
- Clear temp storage after successful account creation
- Improve QR code extraction to prioritize query params (?ref=, ?code=)

This fixes a critical bug where referral relationships were never
being established because the frontend wasn't passing the referral
code to the backend.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 02:10:57 -08:00
hailin d0487c4a7e feat(profile): integrate referral and authorization APIs for profile page
- Add Kong routes for identity-service /me, referral-service, and authorization-service
- Create AuthorizationService in Flutter for fetching user authorizations
- Extend ReferralService with getMyReferralInfo() and getDirectReferrals() methods
- Update profile_page.dart to display real team stats from APIs
- Fix authorization-service JWT strategy to accept identity-service token format
- Add decimal.js dependency to authorization-service
- Add prisma migration file for authorization-service

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 01:57:39 -08:00
hailin 15f617c9a9 fix(mobile-app): resolve Kotlin build errors in build.gradle.kts
- Rename getAutoVersionCode() to calculateNextVersionCode() to avoid
  JVM signature clash with auto-generated property getter
- Remove unnecessary Elvis operator for non-nullable flutter.versionName
- Migrate deprecated kotlinOptions.jvmTarget to kotlin.jvmToolchain DSL

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 01:07:58 -08:00
hailin a86131471c feat(mobile-app): auto-increment version code on each build
- Add version.properties file to track build number locally
- Auto-increment versionCode on every debug/release build
- Version name format: major.minor.patch.buildNumber (e.g., 1.0.0.123)
- Add version.properties to .gitignore (each developer has own build number)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 00:59:20 -08:00
hailin 18ac1f5c43 feat(mobile-app): add gallery image selection for QR code scanning
- Add image_picker import for gallery access
- Implement _pickImageAndScan() method to select and analyze images
- Add "从相册选择" button in QR scanner UI with loading state
- Show SnackBar feedback when QR code not found in image

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 00:44:13 -08:00
hailin 681f77fbf7 fix(mobile-app): display actual values in profile referral info card
- Show referrer serial number, community names, and company info
- Add _buildInfoItem helper for consistent label+value layout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 00:10:11 -08:00
hailin 20e0f6c953 fix(mobile-app): use SharePageParams instead of Map for share navigation
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 23:56:32 -08:00
hailin dbe0cc2870 feat(mobile-app): change profile share button to navigate to share page
- Replace copy link action with navigation to share page
- Pass referralCode to share page for QR code generation
- Rename button text from '复制分享链接' to '分享邀请'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 23:50:22 -08:00
hailin cb9e520fb4 feat(mobile-app): change share QR code to APK download link with referral code
QR code now contains: https://s3.szaiai.com/rwadurian/app-release.apk?ref={referralCode}
- User scans QR to download APK directly
- Guide page 5 already supports parsing ref parameter from URL

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 23:38:32 -08:00
hailin 116a304431 feat(mobile-app): add app version info section to profile page
Display detailed application and device information at the bottom
of the profile page, below the "绑定邮箱" (Bind Email) menu item.

Information displayed:
- App version (e.g., v1.0.0)
- Build number
- Package name
- Device model (brand + model for Android, model for iOS)
- OS version (Android version with SDK / iOS version)
- Platform (Android/iOS)
- Copyright notice

Uses package_info_plus and device_info_plus packages
which are already dependencies in the project.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 22:45:34 -08:00
hailin 5d671bf5ec feat(referral): integrate referral system with identity-service and mobile-app
## Backend Changes

### referral-service
- Add accountSequence field to ReferralRelationship aggregate for cross-service user identification
- Add findByAccountSequence() method to repository interface and implementation
- Update CreateReferralRelationshipCommand to accept accountSequence and inviterAccountSequence
- Modify ReferralService to support looking up inviter by accountSequence
- Update event handler to listen to identity.UserAccountAutoCreated and identity.UserAccountCreated topics
- Add initial database migration with all tables including accountSequence field
- Update DTO and controller to support new parameters

### identity-service
- Add inviterSequence field to MeResult interface
- Update getMe() method to return inviterSequence from user account
- Update MeResponseDto to include inviterSequence field

## Frontend Changes (mobile-app)

### API & Storage
- Add /me endpoint constant in api_endpoints.dart
- Add inviterSequence key in storage_keys.dart
- Add MeResponse and WalletAddressInfo classes in account_service.dart
- Add getMe() method to fetch complete user info including inviter
- Add getInviterSequence() method to retrieve from local storage

### Profile Page
- Update profile_page.dart to load referrer info from API
- Add _loadMeData() method to call getMe() API
- Display inviterSequence (referrer serial number) dynamically

## Flow Summary
1. User creates account with optional inviterReferralCode
2. identity-service validates and saves inviterSequence
3. identity-service publishes UserAccountAutoCreated/UserAccountCreated event
4. referral-service listens and creates referral relationship using inviterAccountSequence
5. Mobile app calls GET /me to display inviter info in profile page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 22:37:06 -08:00
hailin e8be584336 feat(mobile-app): add DST network support to deposit page
- Add DST to NetworkType enum
- Add dstAddress field to DepositAddressResponse
- Update deposit_service to fetch and cache DST address
- Add DST network button in deposit page UI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 19:25:29 -08:00
hailin c6c4a75984 fix(mobile-app): remove cacheWidth/cacheHeight to fix avatar blur on high-DPI screens
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 19:11:00 -08:00
hailin 8eefd807c3 perf(mobile-app): optimize avatar loading with parallel fetch and file caching
- Use Future.wait for parallel data loading (faster initial load)
- Add file.existsSync() check before using Image.file
- Add cacheWidth/cacheHeight and gaplessPlayback for smoother display
- Add _checkLocalAvatarSync for early avatar path detection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 19:04:13 -08:00
hailin 3e01f69044 fix(mobile-app): cache avatar locally instead of always loading from network
- Add local avatar caching in AccountService:
  - getLocalAvatarPath(): get cached avatar file path
  - _saveAvatarToLocal(): save avatar to local after upload
  - downloadAndCacheAvatar(): download and cache remote avatar
- Update profile_page and mining_page to use local avatar:
  - Priority: local file > network URL > SVG > default icon
  - Background download and cache if remote URL exists but no local cache
- Clean up local avatar file on logout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 12:23:50 -08:00
hailin e8e0c6db86 fix(mobile-app): fix avatar and wallet address issues after mnemonic recovery
- Mining page: use accountService to load avatar (consistent with profile page)
- Account recovery: fetch and save wallet addresses after successful recovery
- Account recovery: set isWalletReady=true to skip backup mnemonic page
- Deposit service: read wallet addresses from local storage or fetch from /user/wallet API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 12:13:39 -08:00
hailin d391896c9d chore(mobile-app): update Container.svg asset
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 23:33:55 -08:00
hailin dd26b9f48f fix(mobile-app): refresh avatar on profile page after upload
Add _hasChanges flag to track changes and pass result when navigating back

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 23:32:42 -08:00
hailin 0622dd14d9 fix(mobile-app): fix avatar upload response parsing
Parse avatarUrl from nested data object in API response

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 23:28:04 -08:00
hailin e825d6938d fix(mobile-app): don't clear auth data on token refresh failure
Avoid clearing user's auth data when token refresh fails due to
network errors or other transient issues. Only clear on explicit
refresh token expiration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:49:19 -08:00
hailin c27f8e801e fix(mobile-app): accept 201 status code for token refresh
auto-login API returns 201 (Created) not 200, causing token refresh
to fail even though the response was successful

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:46:49 -08:00
hailin c771a81e05 fix(mobile-app): fix 401 token refresh not working
1. Add /user/auto-login to publicPaths so it doesn't inject old token
2. Skip 401 handling for auto-login itself to avoid recursion
3. Add debug logs for token refresh flow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:43:30 -08:00
hailin 0cf9f023f9 fix(mobile-app): fix token refresh parsing from auto-login response
API returns { success, data: { accessToken, refreshToken } } but code
was reading accessToken directly from response.data instead of
response.data.data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:34:24 -08:00
hailin 39db791a30 feat(mobile-app): implement avatar upload with image picker
- Add image picker for camera and gallery selection
- Add uploadAvatar method in AccountService
- Support SVG and image URL display in ProfilePage and EditProfilePage
- Add avatarUrl storage key for uploaded avatars
- Show upload progress indicator during avatar upload

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 22:10:31 -08:00
hailin b36987fee1 feat(mobile-app): implement profile editing with backend API
- Add updateProfile() and getMyProfile() methods to AccountService
- Load real user data (nickname, avatar) in EditProfilePage
- Call PUT /user/update-profile API to save nickname changes
- Display SVG avatar from backend
- Add loading state while fetching user data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 20:51:59 -08:00
hailin 1f852d1fca feat(mobile-app): use real user data in profile page
- Load username, serial number, and avatar from account service
- Display SVG avatar from backend instead of static image
- Show loading state while fetching user data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 20:47:42 -08:00
hailin d05ff9ee17 style(mobile-app): add gradient background and card background to ranking page
- Change page background from white to gradient (light beige to light orange)
- Change card background to light white (#FFFDF8) for better contrast

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 20:44:53 -08:00
hailin 9ae8516179 style(mobile-app): reduce ranking list item spacing from 12px to 4px
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 20:41:33 -08:00
hailin 93fc648268 fix(mobile-app): align back button to left in import mnemonic page
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 20:26:24 -08:00
hailin 747c81164e style(mobile-app): make serial number TextField fully transparent
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 20:23:50 -08:00
hailin 81bfead8f1 style(mobile-app): make mnemonic input TextField fully transparent
- Add all border states as InputBorder.none
- Set filled: false to remove background
- Add cursorColor matching theme

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 20:21:45 -08:00
hailin cfd5bd9bde feat(mobile-app): add import mnemonic page and fix share URL
- Add import mnemonic page for account recovery
- Add serial number input field for recovery
- Add RecoverAccountResponse class for API response parsing
- Fix share page URL path (remove duplicate /api)
- Fix bottom nav bar height for better adaptability
- Update routes for import mnemonic page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 13:35:40 -08:00
hailin c1670d2439 feat(mnemonic): add recovery mnemonic generation and backup confirmation
Backend (blockchain-service):
- Add RecoveryMnemonicAdapter to generate 12-word BIP39 mnemonic
- Generate mnemonic when wallet addresses are derived (linked to public key)
- Include mnemonic in WalletAddressCreated event

Backend (identity-service):
- Add RecoveryMnemonic table with revocation/replacement support
- Save encrypted mnemonic to database on WalletAddressCreated event
- Add PUT /user/mnemonic/backup API to mark mnemonic as backed up
- Clear plaintext mnemonic from Redis after backup confirmation

Frontend (mobile-app):
- Update markMnemonicBackedUp() to call backend API
- Fix verify_mnemonic_page validation logic:
  - Checkbox checked → pass directly
  - Not checked → must select correct word

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 12:32:10 -08:00
hailin f1390a85c8 fix(mobile-app): skip backup mnemonic page for MPC wallet mode
- Fix mnemonic parsing: empty string "" now correctly becomes empty list
- MPC mode (no mnemonic) skips backup page and navigates directly to home
- Apply fix to both initial load and polling logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 12:00:38 -08:00
hailin 72c49ffe7a fix(mobile-app): fix API response parsing for auto-create and wallet
- Extract 'data' field from API response before parsing
- Fix createAccount() to parse responseData['data']
- Fix getWalletInfo() to parse responseData['data']
- Resolves: type 'Null' is not a subtype of type 'int' in type cast

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 11:55:41 -08:00
hailin 7a0e83dac5 Revert "fix(mobile-app): 修复deviceName只发送后端接受的字段"
This reverts commit 1b4901ea68.
2025-12-07 10:58:24 -08:00
hailin 1b4901ea68 fix(mobile-app): 修复deviceName只发送后端接受的字段
后端DeviceNameDto只接受model/platform/osVersion三个字段
移除brand/manufacturer/device/product/hardware/sdkInt/isPhysicalDevice

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 10:57:38 -08:00
hailin 657b66c9e5 fix: 修复钱包API路径和avatarUrl字段长度问题
- identity-service: avatarUrl字段从VarChar(2000)改为Text类型
- mobile-app: 修复getWalletInfo API路径从/user/$id/wallet改为/user/wallet
- mobile-app: 添加userWallet端点常量

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 10:53:40 -08:00
hailin 0c00382a98 fix: convert deploy.sh CRLF to LF and add executable permission
- Convert Windows CRLF line endings to Unix LF for all deploy.sh files
- Add executable permission to all deploy.sh scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 07:01:13 -08:00
hailin e76adcbe8d . 2025-12-07 14:56:13 +00:00
hailin 39804aa981 fix(mobile-app): update share link domain to rwaapi.szaiai.com
Changed invite share URLs from rwa-durian.app to rwaapi.szaiai.com

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 21:15:55 -08:00
hailin 6ff1868944 fix(mobile-app): improve app restart flow for incomplete wallet creation
When user closes app during wallet generation (before backup completion),
app now correctly navigates directly to backup mnemonic page on restart
instead of requiring extra button click on onboarding page.

Changes:
- AuthProvider: Add isAccountCreated, isWalletReady, userSerialNum, referralCode states
- AuthProvider: Enhanced checkAuthStatus() to detect partial account creation
- SplashPage: Add navigation priority for account-created-but-wallet-incomplete state
- SplashPage: Navigate directly to BackupMnemonicPage when account exists but wallet not ready

Navigation priority:
1. Wallet created + backed up → Main page (ranking)
2. Account created but wallet incomplete → Backup mnemonic page
3. First launch or unseen guide → Guide page
4. Otherwise → Onboarding page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 20:41:36 -08:00
hailin 823fc5056e feat(mobile-app): redesign wallet generation UI with overlay mask and countdown
- Replace full-page loading with overlay mask design
- Add 100-second countdown timer with circular progress indicator
- Show placeholder data (******) in mnemonic and address cards during loading
- Display "正在进行钱包的安全计算" message with security icon
- Implement error overlay with retry button
- Disable copy buttons and action buttons during loading state
- Maintain consistent UI layout between loading and ready states

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 20:30:52 -08:00
hailin 37aab77e7a feat(mobile-app): add detailed debug logging for account creation flow
Add comprehensive debugPrint logging with [Tag] prefixes:
- [AccountService]: API calls, storage operations, responses
- [OnboardingPage]: account status check, creation flow
- [BackupMnemonicPage]: wallet info loading, polling state

Logging includes:
- Request/response details with masked sensitive data
- Stack traces for error handling
- Polling count and timing for wallet generation
- User interaction tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 20:03:36 -08:00
hailin 20d82906f6 refactor(mobile-app): 重构账号创建流程,分离钱包获取逻辑
API 变更:
- POST /user/auto-create 快速返回 userSerialNum, username, avatarSvg
- GET /user/{userSerialNum}/wallet 异步获取钱包和助记词

AccountService:
- 移除 MPC share 本地加密逻辑
- 新增 getWalletInfo() 方法支持轮询获取钱包状态
- CreateAccountResponse 移除 userId,使用 userSerialNum

页面修改:
- onboarding_page: 适配新的创建账号响应
- backup_mnemonic_page: 进入时调用 API 获取钱包,支持 loading/error 状态
- verify_mnemonic_page: 字段从 serialNumber 改为 userSerialNum
- wallet_created_page: 同上

清理:
- 删除 mpc_share_service.dart
- 删除相关测试文件

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 19:34:45 -08:00
hailin 17fd663fe3 refactor: improve auto-create API semantics and use real device ID
Frontend (account_service.dart):
- Use Android ID instead of random UUID for deviceId
- Add DeviceHardwareInfo class with full hardware details
- Remove provinceCode/cityCode from CreateAccountRequest
- Simplify to: deviceId (required), deviceName (optional JSON), inviterReferralCode (optional)

Backend (identity-service):
- Rename validateDeviceId() to checkDeviceNotRegistered() for clarity
- Rename generateNext() to generateNextUserSequence() for semantics
- Update error message: "该设备已创建过账户"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 18:05:11 -08:00
hailin 747e4ae8ef refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing
- Remove Address field from PartyEndpoint (parties connect to router themselves)
- Update K8s Discovery to only manage PartyID and Role labels
- Add Party registration and SessionEvent protobuf definitions
- Implement PartyRegistry and SessionEventBroadcaster domain logic
- Add RegisterParty and SubscribeSessionEvents gRPC handlers
- Prepare infrastructure for party-driven MPC coordination

This is the first phase of migrating from coordinator-driven to party-driven
architecture following international MPC system design patterns.
2025-12-05 08:11:28 -08:00
Developer db8350b2f5 fix(identity-service): 更换 npm 镜像为华为云解决超时问题
- npmmirror CDN 超时 (EIDLETIMEOUT)
- 改用 mirrors.huaweicloud.com/repository/npm/
- 添加 disturl 配置加速 node 二进制下载

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 18:45:18 -08:00
Developer f3d9b13dac fix(mobile-app): 修正 API 地址为正确的生产环境地址
将 API 基础地址从 api.rwadurian.com 改为 rwaapi.szaiai.com,
以确保应用更新检测功能正常工作

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 08:46:11 -08:00
Developer ad739a83f8 fix(mobile-app): 修复 API 请求路径缺少 /api/v1 前缀问题
问题原因:
- 原 ApiClient baseUrl 为 'https://rwaapi.szaiai.com'
- 请求路径为 '/user/auto-create'
- 实际请求: https://rwaapi.szaiai.com/user/auto-create (错误)
- 正确路径: https://rwaapi.szaiai.com/api/v1/user/auto-create

解决方案:
- 新增 AppConfig 配置管理类
- 支持多环境配置 (dev/staging/prod)
- apiBaseUrl 已包含 /api/v1 前缀
- 支持 --dart-define=ENV=dev 切换环境

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 08:41:37 -08:00
Developer 12ec5e6fc3 fix(mobile-upgrade): 添加解析失败时的友好提示
当 APK/IPA 解析失败时,显示黄色警告提示用户手动填写版本信息

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 08:17:02 -08:00
Developer 64332838de fix(mobile-upgrade): 修复 platform 参数大小写问题
后端期望大写的 ANDROID/IOS,前端现在在 parsePackage 和 upload 时转换为大写

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 07:43:03 -08:00
Developer f8607ce0b2 feat: 增强移动端版本管理功能
## admin-service
- 添加 APK/IPA 预解析 API (/api/v1/versions/parse)
- 添加断点续传下载控制器 (/api/v1/downloads/:filename)
- 配置 uploads volume 持久化存储
- 下载 URL 从 /uploads 改为 /downloads (支持 Range 请求)

## mobile-upgrade (前端)
- 上传文件后自动解析并填充版本信息
- 添加 ParsedPackageInfo 类型和 parsePackage API

## mobile-app (Flutter)
- DownloadManager 支持断点续传 (HTTP Range)
- 添加临时文件管理和清理功能
- 添加构建脚本自动增加版本号 (scripts/build.sh)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 06:57:26 -08:00
Developer 197fc02694 feat(mobile-upgrade): 添加自定义 favicon
- 新增蓝色背景白色 M 字母的 SVG favicon
- 更新 layout.tsx 引用新 favicon

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 02:42:11 -08:00
Developer 4e0033474f fix(mobile-upgrade): 修正 API URL 为正确域名
将 API URL 从 api.rwadurian.com 改为 rwaapi.szaiai.com

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 00:22:29 -08:00
Developer 8cd21c2fd7 fix(mobile-upgrade): 修复 API URL 路径重复问题
移除 NEXT_PUBLIC_API_URL 末尾的 /api,避免请求路径变成 /api/api/v1/...

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 00:19:03 -08:00
Developer 1d602b819a feat(mobile-upgrade): 添加 Docker 和 Nginx 自动化部署配置
- 添加 Dockerfile 多阶段构建配置
- 添加 docker-compose.yml 容器编排
- 添加 nginx 配置(域名: update.szaiai.com)
- 添加 scripts 运维脚本(deploy/build/start/stop/restart/logs/status/clean/health)
- 添加健康检查 API 端点 /api/health
- 添加 .env.production 生产环境配置

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 23:33:11 -08:00
Developer 08485d361f docs(mobile-upgrade): 添加完整技术文档
新增以下文档:
- ARCHITECTURE.md: Clean Architecture 分层架构详解
- API.md: API 端点和数据类型定义
- DEVELOPMENT.md: 开发环境配置和规范指南
- TESTING.md: 单元测试、集成测试、E2E测试方案
- DEPLOYMENT.md: Docker、PM2、Nginx 部署配置

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 22:46:42 -08:00
Developer 6db948099c feat(mobile-upgrade): 添加移动应用升级管理Web前端
使用Clean Architecture架构实现移动应用版本管理Web前端:
- Domain层: 版本实体、Repository接口定义
- Infrastructure层: API客户端、Repository实现
- Application层: Zustand状态管理、React Hooks
- Presentation层: 版本列表、上传、编辑组件

技术栈: Next.js 14 + React + TypeScript + Zustand + Tailwind CSS

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 22:28:56 -08:00
Developer 17ff0d951e fix: 修复 docker-compose.yml 中所有服务的健康检查
问题:
- docker-compose.yml 的 healthcheck 覆盖了 Dockerfile 的 HEALTHCHECK
- 使用 wget 而不是 curl
- 健康检查 URL 不正确,导致所有服务显示 unhealthy

修复:
1. 统一使用 curl -f 代替 wget
2. 修正所有服务的健康检查 URL:
   - identity-service: /health → /api/v1/health
   - wallet-service: /health → /api/v1/health
   - backup-service: /health ✓ (保持不变)
   - planting-service: /health → /api/v1/health
   - referral-service: /health ✓ (保持不变)
   - reward-service: /health ✓ (保持不变)
   - mpc-service: /api/v1/health ✓ (已正确,改用 curl)
   - leaderboard-service: /health → /api/health
   - reporting-service: /health → /api/v1/health
   - authorization-service: /health ✓ (保持不变,改用 curl)
3. 统一 timeout 为 3s (原来是 10s)
4. admin-web: 优化 timeout 为 3s

Docker HEALTHCHECK 机制:
- 在容器内部执行 curl localhost:PORT/path
- 不经过 Nginx 或外部网络
- 需要与服务实际端点匹配

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 09:36:38 -08:00
Developer 51d49a5fa9 fix(admin-web): 改用 curl 进行健康检查
- 将 wget 改为 curl (更通用)
- 简化健康检查命令: curl -f

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 09:07:22 -08:00
Developer 82aaa80906 fix(admin-web): 修复 Docker 健康检查失败问题
- 在 Dockerfile runner 阶段安装 wget
- Alpine 镜像默认不包含 wget,导致健康检查失败

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 09:06:30 -08:00
Developer 5a6d4f98c1 docs(admin-web): 添加项目 README 文档
- 完整的本地开发指南
- Docker 部署使用说明
- Git 工作流部署流程
- Nginx 配置引导
- 项目结构说明
- 常见问题解答

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 09:01:03 -08:00
Developer e2047cc2c3 docs(admin-web): 添加 Nginx 完整安装脚本和文档
- install.sh: 从零开始的一键安装脚本 (系统更新、Nginx、Certbot、SSL)
- README.md: 详细的手动安装步骤和常用命令

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 08:33:03 -08:00
Developer 7fcedf7e08 feat(admin-web): 添加 Docker 管理脚本
- build.sh: 构建 Docker 镜像
- start.sh: 启动服务
- stop.sh: 停止服务
- restart.sh: 重启服务
- logs.sh: 查看实时日志
- status.sh: 查看服务状态
- health.sh: 健康检查
- clean.sh: 清理容器和镜像
- deploy.sh: 一键部署 (构建+启动)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 08:24:20 -08:00
Developer 40e0caaad5 feat(admin-web): 添加 Docker 一键部署方案
- 添加多阶段构建 Dockerfile,优化镜像大小
- 添加 docker-compose.yml 编排文件
- 添加 .dockerignore 优化构建上下文
- 添加 deploy.sh 一键部署脚本
- 添加健康检查 API (/api/health)
- 添加 Nginx 反向代理配置 (rwaadmin.szaiai.com)
- 添加 Let's Encrypt SSL 证书配置脚本
- 更新 next.config.ts 启用 standalone 输出模式

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 08:21:41 -08:00
Developer 3f612448ff . 2025-12-01 20:48:31 -08:00
Developer 2d50ad32a9 docs: 添加系统部署指南和更新 API 配置
添加 DEPLOYMENT_GUIDE.md:
- 完整的 Nginx 反向代理配置 (rwaapi.szaiai.com)
- Docker Compose 生产环境部署配置
- 后端服务端口规划和 API 路由映射
- 前端 API 调用对照表
- SSL/HTTPS 配置说明
- 部署步骤和常见问题

更新前端 API 配置:
- api_endpoints.dart: 更新 baseUrl 为 https://rwaapi.szaiai.com
- api_endpoints.dart: 添加 /api/v1 前缀到所有端点
- api_endpoints.dart: 添加 telemetry 遥测端点
- api_client.dart: 更新默认 baseUrl 为生产环境地址

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 20:39:11 -08:00
Developer 769a33b9b0 . 2025-12-01 19:37:08 -08:00
Developer 00c47f22e0 . 2025-12-01 19:33:05 -08:00
Developer 9944f86174 . 2025-12-01 19:24:46 -08:00
Developer 6f2ff2d9b3 . 2025-12-01 19:19:00 -08:00
Developer 097396bb93 build: 配置 Android Release 签名和构建优化
- 添加 Release 签名配置 (build.gradle.kts)
- 配置 ProGuard 混淆规则 (proguard-rules.pro)
- 优化 Gradle 内存配置 (gradle.properties)
- 更新 .gitignore 排除签名密钥文件

签名密钥存放于 publish/ 目录 (已排除版本控制)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 18:37:27 -08:00
Developer a966d71fa0 . 2025-11-30 06:44:57 -08:00
Developer 083db83c96 . 2025-11-29 19:22:42 -08:00
hailin 178a316957 > 2025-11-27 02:45:35 -08:00
hailin be4ef7d1aa feat: 添加APK在线升级和遥测统计模块
APK升级模块 (lib/core/updater/):
- 支持自建服务器和Google Play双渠道更新
- 版本检测、APK下载、SHA-256校验、安装
- 应用市场来源检测
- 强制更新和普通更新对话框

遥测模块 (lib/core/telemetry/):
- 设备信息采集 (品牌、型号、系统版本、屏幕等)
- 会话管理 (DAU日活统计)
- 心跳服务 (实时在线人数统计)
- 事件队列和批量上传
- 远程配置热更新

Android原生配置:
- MainActivity.kt Platform Channel实现
- FileProvider配置 (APK安装)
- 权限配置 (INTERNET, REQUEST_INSTALL_PACKAGES)

文档:
- docs/backend_api_guide.md 后端API开发指南
- docs/testing_guide.md 测试指南

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 02:44:01 -08:00
hailin 429173464c feat: 添加5页向导页和首次打开检测功能
- 新增向导页组件(guide_page.dart),支持左右滑动浏览
- 实现首次打开检测逻辑,控制向导页显示
- 更新app图标为自定义logo
- 更新app名称为"榴莲皇后"
- 添加响应式尺寸扩展(.w/.h/.sp/.r)
- 优化底部导航栏响应式适配

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 00:39:29 -08:00
hailin 1296bd607c fix: 修复登录表单验证错误显示重叠问题
- 重构登录表单结构,使用 fieldWrapper 包裹输入框和错误信息
- 修复验证错误消息与输入框重叠的布局问题
- 更新依赖版本

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 02:19:58 -08:00
hailin ef5e9aec3f . 2025-11-26 02:09:53 -08:00
hailin f6ede89b18 PC Web App draft 0.1 Okay. 2025-11-26 01:58:34 -08:00
hailin 2915c4ccc5 Flutter v0.1 draft ok 2025-11-25 20:09:50 -08:00
hailin 79f8f4f4ee . 2025-11-24 21:59:41 -08:00
hailin ee55dc0def . 2025-11-25 10:29:24 +08:00
hailin 0ec0159029 . 2025-11-25 10:17:37 +08:00