Commit Graph

1025 Commits

Author SHA1 Message Date
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 e2872b13fb revert(mobile): 回滚火柴人组件到稳定版本
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 03:00:52 -08:00
hailin 27bee6d7f1 fix(mobile): 修复火柴人组件布局错误,避免嵌套Stack
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 02:53:21 -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 7d1a392d9e fix(mobile): 调整火柴人终点位置,停在红旗左边
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 02:14:27 -08:00
hailin a823490c96 fix(mobile): 修正火柴人终点位置计算
- 起点: 70 (昵称区域右边)
- 终点: containerWidth - 92 (红旗左边 - 火柴人宽度)
- 100%时火柴人右边对齐红旗左边

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 02:12:36 -08:00
hailin 3e59d56f92 fix(mobile): 简化火柴人位置计算逻辑
使用简单直接的比例计算:
- 起点 = 昵称区域右边 (70px)
- 终点 = 红旗左边 (containerWidth - 62px)
- 火柴人位置 = 起点 + (终点 - 起点) * 进度

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 01:48:08 -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 906279ee8a fix(mobile): 修复用户详情页头像和用户ID显示问题
- 修复avatarUrl为SVG数据时的渲染问题,添加SVG检测逻辑
- 修复后端getUserInfoBySequence响应解析,处理包装格式
- 将用户详情弹窗改为全屏页面,提供更好的用户体验
- 新增统计数据卡片展示直推人数、伞下用户、认种数量
- 改进卡片样式,添加图标和阴影效果

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 01:28:28 -08:00
hailin 3ed17bb4eb fix(notification): 修复通知中心API路径
问题: 前端调用 /admin-service/mobile/notifications 路径不存在于Kong网关

修复:
1. Kong网关添加 /api/v1/mobile/notifications 路由到 admin-service
2. 前端 NotificationService 修正 API 路径:
   - /admin-service/mobile/notifications -> /mobile/notifications
   - /admin-service/mobile/notifications/unread-count -> /mobile/notifications/unread-count
   - /admin-service/mobile/notifications/mark-read -> /mobile/notifications/mark-read

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 01:20:43 -08:00
hailin 12c0c796f4 fix(mobile): 修正火柴人100%进度时到达红旗位置的计算
- 精确计算终点位置:火柴人列右边缘对齐红旗左边缘
- 起点从昵称标签右边4px间距开始

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 01:18:27 -08:00
hailin c1c4a52ad3 fix(mobile): 优化火柴人动画布局避免标签重叠
- 昵称和数量标签顶部对齐在同一水平高度
- 添加4px最小间距防止起步阶段标签重叠
- 火柴人从昵称右边开始移动到红旗位置

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 01:09:27 -08:00
hailin 6745721399 fix: 修复火柴人排名点击查看用户详情功能
- 后端DTO添加accountSequence字段
- 后端服务返回accountSequence
- 前端映射accountSequence到StickmanRankingData
- 优化错误提示样式与页面风格一致

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 01:05:18 -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 e9a64a8163 fix(identity): 使用Prisma直接查询用户详情
getUserDetailBySequence 方法改用 Prisma 直接查询数据库,
以获取 email 和 realName 等领域模型中未暴露的字段。

之前的实现通过领域模型 UserAccount 访问这些字段会导致编译错误,
因为领域模型没有直接暴露这些属性。

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:46:45 -08:00
hailin 93f6a53bdb feat(mobile): 优化火柴人赛跑组件布局
- 将昵称移到左侧固定位置,与右边红旗相呼应
- 保持数量标签在火柴人上方,间距2像素

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:37:42 -08:00
hailin 5ed1a0b143 feat(mobile): 优化火柴人赛跑组件布局
- 将昵称移到左侧固定位置,与右边红旗相呼应
- 缩小数量标签与动画之间的间距

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:28:01 -08:00
hailin bf64391c0c feat(identity): 改用创意组合名字替代序号命名
将用户名格式从"榴莲皇后x号"改为"榴莲皇后xxx",
其中xxx是2-4字的创意组合,包含前缀、核心词和后缀。

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:25:03 -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 ed1f863919 fix(authorization): 修复团队升级竞态条件,改用事件链模式
问题:authorization-service 和 referral-service 并行消费 TreePlanted 事件,
导致升级检查时统计数据尚未更新完成。

解决方案:
- referral-service: 批量更新团队统计后发布 TeamStatisticsUpdatedEvent
- authorization-service: 监听该事件触发升级检查,替代原有的即时检查
- TeamStatistics 聚合添加 accountSequence 字段用于事件发布

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:13:39 -08:00
hailin ca95c1decf fix(admin-web): 修复通知表单类型错误
为 priority 和 targetType 添加正确的类型断言

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:57:38 -08:00
hailin 4b92173e9e fix(admin-web): 修复通知页面 SCSS 变量名
使用正确的变量名:
- $bg-card -> $card-background
- $shadow-card -> $shadow-base
- $text-tertiary -> $text-disabled

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:53:15 -08:00
hailin 5d0264db92 feat(admin-web): 添加通知管理功能
- 创建通知管理 API 服务 (notificationService.ts)
- 添加通知列表页面,支持创建/编辑/删除/启用禁用
- 添加侧边栏"通知管理"菜单入口
- 支持按类型筛选通知
- 表单支持设置发布时间和过期时间

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:46:33 -08:00
hailin 647f86ec89 fix(authorization): 暂时禁止所有用户查看私密资料
由于系统尚未实现权限管理功能,暂时将 checkPrivateProfileAccess
始终返回 false,禁止所有用户查看其他用户的手机号、邮箱等隐私信息。

后续实现权限系统后可恢复原有逻辑。

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:46:15 -08:00
hailin 27a4bbfbef feat(authorization): 实现火柴人排名用户详情查看功能
后端:
- identity-service: 新增内部API获取用户详情(手机号、邮箱、KYC等)
- referral-service: 新增内部API获取用户团队统计(直推人数、伞下用户数、认种数量)
- authorization-service:
  - 新增用户公开资料和私密资料API
  - 聚合identity-service和referral-service数据
  - 省团队以上权限可查看私密信息(脱敏处理)

前端:
- 新增UserProfileDialog弹窗组件,支持查看用户详情
- stickman_race_widget: 排名列表项可点击查看用户详情
- authorization_service: 新增getUserProfile/getUserPrivateProfile方法

用户详情包括:
- 基本信息: 用户ID、昵称、头像、注册时间、所在地区
- 团队数据: 推荐人、直推人数、伞下用户数、个人/团队认种数
- 授权信息: 授权类型、权益激活状态
- 联系信息(特权用户可见): 手机号、邮箱、真实姓名(脱敏)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:42:19 -08:00
hailin 53ef1ade42 fix(sms): 增强短信发送重试机制
- 最大重试次数从 2 次增加到 4 次
- 基础延迟从 3 秒增加到 6 秒
- 最大延迟从 10 秒增加到 30 秒

这些调整提高了短信发送在网络不稳定情况下的成功率

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:14:32 -08:00
hailin ab23270863 chore(identity): add migration for email field and email_codes table
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:23:36 -08:00
hailin f8dbac449a fix(identity): add EmailService to InfrastructureModule in app.module.ts
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:12:22 -08:00
hailin 93b0f1ff96 chore(identity): add nodemailer dependency for email service
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:05:26 -08:00
hailin 7c7141cda9 fix(mobile-app): 添加缺失的 secureStorageProvider 导入
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:05:22 -08:00
hailin 4e670ad774 fix(wallet): 隐藏临时流水记录并统一充值名称显示
- 在流水明细查询中排除冻结/解冻等临时记录
- 将"充值 (KAVA)"统一改为"充值"

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:00:31 -08:00
hailin a38aac5581 feat(email): 实现邮箱绑定/解绑功能
后端:
- 新增 EmailService 邮件发送服务,支持 Gmail SMTP
- 新增 EmailCode 数据模型用于存储邮箱验证码
- UserAccount 添加 email 字段
- 新增 API 接口:
  - GET /user/email-status 获取邮箱绑定状态
  - POST /user/send-email-code 发送邮箱验证码
  - POST /user/bind-email 绑定邮箱
  - POST /user/unbind-email 解绑邮箱
- 新增 DTOs: SendEmailCodeDto, BindEmailDto, UnbindEmailDto
- 新增 Commands: SendEmailCodeCommand, BindEmailCommand, UnbindEmailCommand

前端:
- account_service 新增邮箱相关方法和 EmailStatus 类
- bind_email_page 更新为使用真实 API:
  - 绑定/更换邮箱功能
  - 独立的解绑验证码输入和倒计时
  - 解绑确认对话框

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 20:53:20 -08:00
hailin 336306d6c0 fix(wallet-service): 修复账本统计双重计算问题
排除临时性流水类型(冻结/解冻)的收支统计:
- PLANT_FREEZE(认种冻结)
- PLANT_UNFREEZE(认种解冻)
- FREEZE(通用冻结)
- UNFREEZE(通用解冻)

问题原因:认种流程产生两笔流水(冻结+支付),导致一笔支出被统计两次
修复后:只统计最终的实际支付,冻结/解冻作为中间状态不计入收支

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 20:38:27 -08:00
hailin 69fa43ebee feat(auth): 实现修改密码API和Token过期自动跳转登录
后端:
- 新增 ChangePasswordCommand 和 ChangePasswordDto
- 新增 POST /user/change-password 接口
- 实现 changePassword() 方法,验证旧密码后更新新密码

前端:
- 新增 AuthEventService 认证事件服务,处理 token 过期事件
- api_client 在 token 刷新失败时发送过期事件
- App 监听认证事件,token 过期时清除账号状态并跳转登录页
- splash_page 优化路由逻辑:退出登录后跳转手机登录页而非向导页
- change_password_page 调用真实 API 修改密码
- account_service 新增 changePassword() 方法
- multi_account_service 退出登录时清除 phoneNumber 和 isPasswordSet

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 20:25:56 -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 7ae6af7841 fix(docker): 添加 Kafka/Zookeeper JVM 时区配置
- 添加 KAFKA_OPTS="-Duser.timezone=Asia/Shanghai" 设置 JVM 时区
- 挂载 /usr/share/zoneinfo 确保容器内有完整的时区数据

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 19:14:46 -08:00
hailin bb16844220 fix(docker): 为 zookeeper 和 kafka 挂载时区文件
confluentinc 镜像不支持 TZ 环境变量,需要挂载宿主机时区文件:
- /etc/localtime
- /etc/timezone

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 19:06:28 -08:00
hailin 75606687eb chore(docker): 为前端服务添加时区配置
统一 Asia/Shanghai 时区:
- admin-web
- mobile-upgrade

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 18:35:45 -08:00
hailin df0a041faa chore(docker): 为 mpc-system、api-gateway、infrastructure 添加时区配置
统一所有 Docker 服务时区为 Asia/Shanghai:

mpc-system:
- docker-compose.yml: postgres, session-coordinator, message-router, server-party-1/2/3, server-party-api, account-service
- docker-compose.prod.yml: postgres, message-router, session-coordinator, account-service, server-party-api
- docker-compose.party.yml: postgres, server-party

api-gateway:
- kong-db, kong-migrations, kong

infrastructure:
- consul, jaeger, grafana, minio

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 18:35:09 -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 65e9422fe5 chore(docker): 统一所有服务时区配置为 Asia/Shanghai
为所有 Docker 服务添加 TZ=Asia/Shanghai 环境变量,确保日志时间和定时任务使用中国时区:
- 基础设施: postgres, redis, zookeeper, kafka
- 应用服务: identity, wallet, backup, planting, referral, reward, mpc, leaderboard, reporting, authorization, admin, blockchain

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 18:29:20 -08:00
hailin 050cfacec3 fix(authorization): 增大 monthly_assessments.local_percentage 字段精度
将 local_percentage 字段从 DECIMAL(5,2) 改为 DECIMAL(10,2)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 08:02:21 -08:00
hailin 68621d3826 fix(authorization): 增大 progress_percentage 字段精度避免溢出
将 stickman_rankings 表的 progress_percentage 字段从 DECIMAL(5,2)
改为 DECIMAL(10,2),以支持超过 999.99% 的进度百分比。

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 07:42:07 -08:00
hailin 454b466993 fix(authorization): 修复自动升级检查被提前返回跳过的问题
当认种用户没有授权时,不再提前返回,确保 checkAllTeamAutoUpgrade()
始终被调用,以正确检查所有市/省团队的自动升级条件。

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 07:23:46 -08:00
hailin 8367530ebe refactor(authorization): 移除祖先链升级逻辑,只保留团队本人升级
业务规则简化:
- 市/省团队本人伞下认种数达到阈值时,团队本人获得区域授权
- 移除了"伞下成员达到阈值时该成员获得授权"的逻辑
- 两种逻辑是互斥的,只保留团队本人升级的方式

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 07:14:08 -08:00
hailin 7c2d0b8b7f fix(authorization): 修正自动升级逻辑,totalTeamPlantingCount已是伞下认种数
referral-service 返回的 totalTeamPlantingCount 已经是不含自己的伞下认种数,
无需再减去 selfPlantingCount。更新注释说明。

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 07:09:31 -08:00