hailin
2ce0177b59
fix(blockchain-service): 过滤热钱包发出的转账避免内部转账重复入账
...
内部转账时,wallet-service 已经处理了接收方入账,
需要过滤掉 blockchain-service 扫描到的热钱包转出交易,
避免将其当作充值重复处理导致双倍入账
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:56:53 -08:00
hailin
f91aeb7d92
fix(mobile-app): 调整账本明细流水类型筛选顺序和标签
...
- REWARD_SETTLED 标签从"提取"改为"结算"
- 调整筛选选项顺序:转入/转出放到全部后面,充值绿积分放到最后
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:39:45 -08:00
hailin
02361c4dcd
fix(identity-service): 内部接口 by-wallet-address 添加 @Public 装饰器
...
修复服务间调用查询钱包地址时返回 401 的问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:21:11 -08:00
hailin
428ac91737
feat(authorization): 优化市/省团队自助申请逻辑
...
- 团队链区域唯一性:同一直推链上只阻止申请已被占用的城市/省份,非全部阻止
- 市/省团队互斥:同一用户只能拥有市团队或省团队之一
- 前端优化:显示已占用区域数量提示,选择时验证区域可用性
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 22:52:39 -08:00
hailin
30f3487bd3
fix(mobile-app): 点击"全部"时扣除手续费计算最大可转金额
...
- FeeConfig 新增 calculateMaxAmount 方法计算扣除手续费后的最大金额
- 修改提取页面 _setMaxAmount,点击"全部"时显示扣费后金额
- 固定费率:maxAmount = balance - fixedFee
- 百分比费率:maxAmount = balance / (1 + rate)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 22:36:20 -08:00
hailin
f9222fed50
feat: 实现ID-to-ID内部转账功能
...
- 添加内部转账标识字段:is_internal_transfer, to_account_sequence, to_user_id
- 提现时自动检测目标地址是否为内部用户
- 内部转账确认后创建双向流水:发送方TRANSFER_OUT,接收方TRANSFER_IN
- 新增identity-service钱包地址查询API支持内部用户识别
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 22:22:47 -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
hailin
723d70e4b8
fix(mobile-app): 修复账本明细筛选栏滚动重置问题
...
使用 ScrollController 保持筛选栏滚动位置
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 20:21:31 -08:00
hailin
c91bfa4952
fix(mobile-app): 修正认种价格为15831 USDT/棵
...
与后台 planting-service 保持一致
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 20:15:49 -08:00
hailin
87b23ee2de
fix(mobile-app): 修复提款页面 _feeRate 未定义错误
...
将 _feeRate 改为 _feeConfig?.feeValue ?? 0.02,
使用 FeeConfig 对象中的 feeValue 字段。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 19:19:05 -08:00
hailin
726b317c23
fix(admin-service): 修复用户事件消费时 payload 嵌套层级错误
...
identity-service 发布的消息结构为 { eventId, eventType, payload: {...} },
但 admin-service 消费时直接使用 eventData 而不是 eventData.payload,
导致 payload.userId 为 undefined,BigInt(undefined) 抛出异常被静默吞掉,
用户数据无法同步到 UserQueryView。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 19:06:23 -08:00
hailin
cb0f10af34
feat: 多项业务功能增强
...
- 动态提取手续费配置:支持固定/百分比两种费率类型,默认2绿积分/笔
- 找回密码功能:新增手机号+短信验证码重置密码流程
- 授权申请优化:自助申请时验证团队链授权状态
- UI文案调整:登录账号、监控页待开启等
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 19:00:02 -08:00
hailin
06df38b918
fix(mobile-app): 隐藏提取页面的网络选择功能
...
- 提取绿积分页面隐藏"选择网络"组件
- 确认提取页面隐藏"提取网络"显示行
- 保留原有网络功能逻辑不变
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 17:32:58 -08:00
hailin
7a264a0158
feat(authorization): 实现省区域/市区域自动升级机制
...
- 添加 createAutoUpgradedProvinceCompany/CityCompany 工厂方法
- 在 handleTreePlanted 中检查自动升级条件
- 省区域:团队累计5万棵时自动升级
- 市区域:团队累计1万棵时自动升级
- 扩展 ITeamStatisticsRepository 接口添加 getReferralChain 方法
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 17:24:44 -08:00
hailin
0506a3547c
fix(authorization): 自助申请授权状态设为AUTHORIZED而非PENDING
...
问题:自助申请的社区/市团队/省团队授权创建时状态为PENDING,
导致在推荐关系查询中无法找到这些授权(查询只匹配AUTHORIZED状态)
解决方案:
- 新增 createSelfAppliedCommunity 工厂方法,状态直接设为 AUTHORIZED
- 新增 createSelfAppliedAuthCityCompany 工厂方法
- 新增 createSelfAppliedAuthProvinceCompany 工厂方法
- 更新事件类型允许 authorizedBy 为 null(表示自助申请)
- 自助申请处理方法改用新的工厂方法
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 16:59:20 -08:00
hailin
857beeb196
fix(mobile-app): 修复 CityPickers locationCode 类型错误
...
添加空字符串默认值,确保 locationCode 参数类型为 String
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 06:58:00 -08:00
hailin
da69ecec44
fix(mobile-app): 移除自助申请页面中的'后台手动授权'说明
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 06:42:34 -08:00
hailin
ddeb3f227a
fix(mobile-app): 社区权益考核仅在有社区授权时显示
...
用户需要先通过自助申请获得社区授权,才会在'我的'页面显示社区权益考核
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 06:38:21 -08:00
hailin
3f34b11181
feat(mobile-app): 授权申请弹窗支持省市选择器
...
- 市团队和省团队申请弹窗使用 city_pickers 选择省市
- 默认选中本地存储的省市(来自认种时的选择)
- 允许用户重新选择省市
- 社区申请保持只输入社区名称(无省市选择)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 06:34:44 -08:00
hailin
4daee6a650
feat(mobile-app): 自助申请授权添加确认弹窗和省市参数传递
...
- 从本地存储加载认种时保存的省市信息
- 市团队申请时显示城市确认弹窗
- 省团队申请时显示省份确认弹窗
- 社区申请时显示社区名称输入弹窗
- 提交时传递对应的省市/社区参数
- 更新申请说明文字为'立即生效'
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 06:29:01 -08:00
hailin
21519c1a97
fix(authorization): 使用 benefitActive 属性替代不存在的 isBenefitActivated 方法
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 06:17:34 -08:00
hailin
05c8e1d6aa
refactor(authorization): 简化自助申请授权逻辑,移除待审核状态
...
自助申请授权直接生效,无需审核流程:
- 移除 pendingApplications 字段(不再需要待审核列表)
- 简化响应 DTO:applicationId -> authorizationId, 移除 status/reviewedAt/reviewNote
- 新增 benefitsActivated 字段表示是否已激活权益
- 更新前端 SelfApplyAuthorizationResponse 和 UserAuthorizationStatusResponse
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 06:13:14 -08:00
hailin
13df91a55e
fix(wallet-service): 修复 resolve-address API 路径
...
identity-service 的 resolve-address 接口在 UserAccountController 下,
需要添加 /user 前缀:/users/resolve-address -> /user/users/resolve-address
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 04:17:11 -08:00
hailin
0374e2a55c
fix(wallet-service): 修复 identity-client 响应数据解析
...
identity-service 使用响应拦截器将所有响应包装在 { success, data } 结构中。
修复所有方法的响应解析,从 response.data?.valid 改为 response.data?.data?.valid。
影响方法:
- verifyTotp
- isTotpEnabled
- verifyWithdrawSmsCode
- verifyPassword
- resolveAccountSequenceToAddress
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 04:12:48 -08:00
hailin
9ae1c1cbdb
fix(wallet-service): 添加验证码验证调试日志并修复布尔值比较
...
- 添加完整响应数据日志以便调试
- 使用严格比较 === true 代替 ?? false
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 04:06:40 -08:00
hailin
ac4bd46c13
fix(wallet-service): 添加 /api/v1 前缀到 identity-client 的 baseURL
...
identity-service 有全局前缀 api/v1,所以调用路径应该是:
- /api/v1/user/sms/send-withdraw-code
- /api/v1/user/sms/verify-withdraw-code
- /api/v1/user/verify-password
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 03:51:49 -08:00
hailin
9b9427d6a8
fix(identity-service): 修复 seed 脚本会清除所有用户数据的严重 bug
...
问题:每次部署 identity-service 时,seed 脚本会执行 deleteMany() 删除所有用户数据
修复:
- 检查现有用户数量,如果 > 5 则跳过 seed(保护生产数据)
- 移除所有 deleteMany() 调用
- 使用 upsert 确保系统账户存在而不是先删后建
- 管理员账户只在不存在时创建
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 03:28:59 -08:00
hailin
9bc7bb1200
fix(withdraw): 修复提取功能短信验证和手续费计算
...
- 修复 wallet-service 调用 identity-service 的 API 路径(添加 /user 前缀)
- 修复 identity-client 默认端口从 3001 改为 3000
- 添加 docker-compose 中 IDENTITY_SERVICE_URL 环境变量配置
- 手续费改为按 0.1% 费率动态计算(前后端统一)
- 最小提取金额从 10 改为 100
- 文案修改:Kava EVM 网络 → Kava安全网络,接收地址 → 接收账号
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 03:14:22 -08:00
hailin
be09a8beac
fix(mobile-app): 添加缺失的 authProvider 导入
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 02:17:01 -08:00
hailin
bd320f1fbf
fix(mobile-app): 显示'创建账号审核中...'而不是'钱包生成中...'
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 02:10:41 -08:00
hailin
7e1f9e952b
fix(mobile-app): 正确的钱包状态检查逻辑
...
逻辑:
1. 先检查本地标志 isWalletReady
2. 如果已 ready,直接显示序列号
3. 如果不 ready,调用 API 检查钱包状态
4. API 返回 ready 后,设置本地标志并刷新 UI
5. API 返回未 ready,启动轮询直到成功
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 02:08:15 -08:00
hailin
fefaeb29d6
fix(mobile-app): 不依赖本地状态,直接显示序列号
...
问题:用户有序列号但 isAccountCreated 为 false 时显示"审核中"
修复:
1. _buildSerialNumberOrStatus(): 只要有有效序列号就直接显示
2. _checkAndStartWalletPolling(): 只要有序列号就调用 API 检查钱包状态
3. 不再依赖本地的 isAccountCreated/isWalletReady 状态
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 02:05:27 -08:00
hailin
8fa975a19e
fix(mobile-app): 自动修复 isAccountCreated 状态
...
问题:已注册用户重新安装 App 后,isAccountCreated 可能为 false,
导致"我的"页面显示"创建账号审核中..."
修复:
1. checkAuthStatus() 中检测到有 token 和 userSerialNum 但
isAccountCreated 为 false 时,自动修复为 true
2. 添加 loadAuthState() 方法(checkAuthStatus 的别名)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 02:03:34 -08:00
hailin
836bfe7f36
fix(mobile-app): 修复注册后"审核中"状态不更新的问题
...
问题:用户手机号注册成功后,"我的"页面仍显示"创建账号审核中..."
原因:
- set_password_page 注册成功后直接跳转,没有刷新 AuthProvider 状态
- ProfilePage.dispose() 中使用 ref.read() 导致 widget disposed 后报错
修复:
1. set_password_page: 跳转前调用 loadAuthState() 刷新状态
2. profile_page: dispose() 中用 try-catch 包裹 ref.read()
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 01:59:58 -08:00
hailin
21692bb1f2
fix(admin-web): update package-lock.json for Next.js 15.1.11
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 00:58:59 -08:00
hailin
000e337dc3
fix(admin-web): lock Next.js to exact version 15.1.11 for CVE-2025-55182 fix
...
Remove ^ to prevent npm from installing vulnerable 15.5.x versions
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 00:55:03 -08:00
hailin
6a2e0bf4f1
fix: 添加钱包状态检查日志用于调试
...
在 _checkAndStartWalletPolling() 中添加详细日志:
- 打印 isWalletReady, isAccountCreated, _serialNumber 的值
- 打印条件不满足时的原因
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 00:48:36 -08:00
hailin
74c78440f7
fix: 推荐码必填 + referral-service种子用户userId修复
...
1. register-by-phone.dto.ts: inviterReferralCode 改为必填
2. user-application.service.ts: 添加日志和推荐码验证
3. referral-service/seed.ts: userId改为25129999999(与accountSequence一致)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 00:37:08 -08:00
hailin
4e52b53657
fix(admin-web): upgrade Next.js to 15.1.11 for CVE-2025-55182 security patch
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 00:31:59 -08:00
hailin
0220650cd9
fix(identity-service): 种子用户序列号改为 D25129999999
...
避免与真实用户序列号冲突
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:36:54 -08:00
hailin
1f15c494c1
fix(identity-service): 添加注册流程详细日志和保存验证
...
问题:用户注册后 referral-service 有数据但 identity-service 没有
原因:save() 方法和 registerByPhone 方法缺少日志,无法追踪问题
修复:
- save() 方法添加完整日志和 try-catch
- registerByPhone 方法添加每个步骤的日志
- 添加关键验证:保存后检查 userId 是否为 0
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:19:24 -08:00
hailin
45fcae5ef5
revert: 撤销 admin-service seed 脚本
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-21 22:41:24 -08:00
hailin
a1a9a087c5
fix(admin-service): 修复 Kafka topic 订阅不匹配问题
...
问题:admin-web 用户管理页面无数据
原因:admin-service 订阅的是 'identity.events',
但 identity-service 发送到的是具体的 topic 如 'identity.UserAccountCreated'
修复:将订阅的 topics 改为与 identity-service 的 IDENTITY_TOPICS 一致:
- identity.UserAccountCreated
- identity.UserAccountAutoCreated
- identity.PhoneBound
- identity.KYCSubmitted
- identity.KYCVerified
- identity.KYCRejected
- identity.UserAccountFrozen
- identity.UserAccountDeactivated
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-21 22:40:31 -08:00
hailin
8579529571
feat(admin-service): 添加 seed 脚本同步系统账户到 user_query_view
...
问题:admin-web 用户管理页面无数据,因为 user_query_view 表是空的
原因:identity-service 的 seed 创建的系统账户不会触发 Kafka 事件
解决方案:
- 创建 admin-service 的 seed.ts,直接同步系统账户到 user_query_view
- 配置 package.json 的 prisma.seed
运行方式:
cd backend/services/admin-service && npx prisma db seed
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-21 22:35:32 -08:00
hailin
be505d1070
fix: change USDT to CNY in authorization apply page
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:09:39 -08:00
hailin
ecf3755227
feat: integrate real API for authorization apply page
...
Changes:
- Add generic image upload API endpoint (POST /user/upload-image)
- Add uploadImage method in StorageService for backend
- Add uploadImage method in AccountService for frontend
- Add selfApplyStatus and selfApplyAuthorization methods in AuthorizationService
- Replace mock data with real API calls in authorization apply page
- Add API endpoints for self-apply status and self-apply authorization
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 22:01:28 -08:00
hailin
5904f2f84d
fix: improve logging for wallet retry task and idempotent status updates
...
- Change misleading "unexpected" log to correctly indicate idempotent behavior
- Add debug log for completed records being skipped in retry task
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:40:04 -08:00
hailin
93b623398e
fix: add missing StorageKeys import in profile_page.dart
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:38:29 -08:00
hailin
c0657f88b9
fix: 我的页面进入时直接检查钱包状态并更新UI
...
- 页面初始化时调用API检查钱包状态,不再只依赖60秒轮询
- 钱包就绪后刷新authProvider和触发UI重建
- 确保与监控页面状态同步
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:31:02 -08:00
hailin
0047767c47
fix: 路由配置遗漏 phoneNumber 和 smsCode 参数
...
SetPasswordPage 需要这两个参数才能使用新的 register-by-phone 流程
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 21:16:45 -08:00