hailin
191b37a5de
fix(admin-web): add null checks to prevent crash in system account report tabs
...
面对面结算和过期收益Tab在数据为空时会崩溃,添加空值检查修复此问题。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 00:15:14 -08:00
hailin
0f3c26c6fa
fix(admin-web): update account names and change USDT to 绿积分
...
- Rename account labels:
- 成本账户 → 总部储备
- 运营账户 → 运营账户1
- 总部社区 → 运营账户2
- RWAD待发放池 → 积分股池
- Change all USDT displays to 绿积分 throughout the system account report
- Add getAssetTypeLabel function for asset type mapping in ledger details
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 23:58:16 -08:00
hailin
44a1023cdd
feat(admin-web): add ledger detail display for system accounts
...
- Add getAllLedger API method in systemAccountReportService
- Add LedgerEntryDTO, FixedAccountLedger, RegionAccountLedger types
- Add ALL_LEDGER endpoint
- Update SystemAccountsTab with ledger detail tab
- Add expandable card UI for viewing account ledger entries
- Add styles for ledger cards and tables
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 23:45:17 -08:00
hailin
6e395ce58c
feat(reporting): add system account report aggregation feature
...
## Changes
- Add system account report aggregation APIs in reporting-service
- Add internal statistics APIs in wallet-service, reward-service, authorization-service
- Add system accounts tab in admin-web statistics page
- Enhanced metadata in reward entries for traceability
## Backend Changes
- wallet-service: Add offline settlement summary and system accounts balances APIs
- reward-service: Add expired rewards summary API
- authorization-service: Add fixed accounts list, region accounts summary APIs
- reporting-service: Add HTTP clients and aggregation service for system account reports
## Frontend Changes
- admin-web: Add SystemAccountsTab component with fixed accounts, region summaries,
offline settlement stats, and expired rewards display
## Rollback Instructions
Each file includes rollback comments with [2026-01-04] tag marking new additions.
To rollback: delete files marked as new, remove code sections marked with date comments.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 22:06:58 -08:00
hailin
99b2b10ba0
fix(mobile-app): always fetch deposit address from server in deposit_service
...
Remove local storage cache priority to avoid returning wrong address
after account switching. Always fetch from server API to ensure the
address belongs to the currently logged-in user.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:17:41 -08:00
hailin
04545c86a5
fix(mobile-app): fetch wallet address from server API instead of local storage
...
The wallet address displayed in long-press mode was incorrectly showing
another user's address from local storage cache. Now fetches the correct
address from the /me API endpoint for the currently logged-in user.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:00:33 -08:00
hailin
cb35f21661
feat(mobile-app): improve empty state display for offline settlement deduction
...
When there are no settlement records to deduct, show a more informative message:
- If user has balance from deposits/transfers: explain it's not from earnings
- If user has no balance: explain there are no settlement records
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 08:18:27 -08:00
hailin
599e0ba281
refactor(admin-web): default to offline settlement mode for special deduction
...
Change default mode from "指定金额扣减" to "全额线下结算扣减"
to match batch create behavior where empty/0 amount means offline settlement.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 07:30:33 -08:00
hailin
f94083df36
feat(admin-web): support offline settlement in batch create
...
When batch creating special deductions:
- Amount empty or 0: auto-switch to offline settlement mode
- Amount > 0: normal deduction mode (requires reason)
- Add hint text in batch create modal for special deduction
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 07:27:36 -08:00
hailin
21c8f1906a
feat(admin-web): integrate planting-service stats API for dashboard
...
Use planting-service's reliable database aggregation for total planting count
instead of reporting-service's Kafka event-driven statistics.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 07:04:39 -08:00
hailin
251fee4f1e
feat(wallet-service): add offline settlement deduction feature
...
Add new functionality for admins to automatically deduct all settled
earnings when creating special deductions with amount=0, marking
each record to prevent duplicate deductions.
- Add OfflineSettlementDeduction model to track deducted records
- Add API endpoints for querying unprocessed settlements and executing batch deduction
- Add mode selection UI in admin-web pending-actions
- Add offline settlement card display in mobile-app special deduction page
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 06:56:39 -08:00
hailin
0d14cc2197
fix(mobile-app): correct leaderboard status API path
...
The API base URL already includes /api/v1, so the path should be
/leaderboard/status instead of /leaderboard-service/api/v1/leaderboard/status
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 03:45:55 -08:00
hailin
dacefa2b51
feat(leaderboard): add toggle control for mobile-app ranking page
...
- Add public /leaderboard/status endpoint (no auth required)
- Add LeaderboardService in mobile-app to fetch board status
- Update RankingPage to show "待开启" when board is disabled
- Connect admin-web leaderboard page to real API
- Board toggle now takes effect immediately
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 03:35:57 -08:00
hailin
0753f036bd
fix(admin-web): always fetch all authorization records including revoked
...
Changed to always include revoked records in API query, filtering is done
on frontend side. This ensures all historical records are visible.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 01:24:48 -08:00
hailin
258aff8bf7
fix(admin-web): update AuthorizationStatus type to use AUTHORIZED
...
Changed type definition from 'ACTIVE' to 'AUTHORIZED' to match backend API.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 01:21:03 -08:00
hailin
f77ecff659
fix(admin-web): use AUTHORIZED instead of ACTIVE for authorization status
...
The backend returns status as 'AUTHORIZED'/'REVOKED' but frontend was
checking for 'ACTIVE'. Fixed all status comparisons to use correct value.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 01:18:35 -08:00
hailin
190bf8257b
feat(mobile-app): hide transaction hash in ledger detail page
...
Hidden txHash display in both transfer details and withdrawal details
as it's not necessary for end users.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 00:51:10 -08:00
hailin
4ba86ea618
fix(admin-web): correct API response parsing in authorizationService
...
The apiClient interceptor already unwraps response.data, so we should
access .data instead of .data.data to get the actual business data.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 00:18:02 -08:00
hailin
f0f44aeb39
feat(mobile-app): show all nodes in team tree with horizontal scroll
...
Remove the ellipsis logic that hides nodes when there are too many.
Now all nodes are displayed and users can scroll horizontally to see them.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:52:44 -08:00
hailin
439dcb95ac
feat(mobile-app): rename "社区" to "部门" in profile page and add SPECIAL_DEDUCTION display name
...
- Change all "社区" labels to "部门" in profile page (所属部门, 上级部门, 下级部门, 部门权益考核, 部门贡献奖励)
- Add SPECIAL_DEDUCTION entry type display name as "面对面结算" in ledger
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:44:16 -08:00
hailin
5ad21ee097
fix(mobile-app): adjust signature image ratio to match PDF field
...
The signature image was 600x200 (3:1 ratio) but the PDF signature
field is 92x51 (1.8:1 ratio). This caused the signature to be scaled
down to only 60% of the field height, making it appear too small.
Changed signature image dimensions to 460x255 (~1.8:1) to better
match the PDF field proportions and maximize signature size.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:22:16 -08:00
hailin
1345b97303
feat(authorization): implement grant authorization functionality
...
在授权管理页面实现创建授权功能:
- 导入所有授权创建 hooks (社区/省公司/市公司/省团队/市团队)
- 添加 extractUserId 函数从 accountSequence 提取 userId (去掉首字母)
- 实现 handleCreate 函数根据授权类型调用对应 API
- 添加创建过程中的加载状态显示
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 21:21:39 -08:00
hailin
17b9c09381
feat(ledger): add detailed ledger entry views with source tracking
...
实现账本流水详情功能,支持点击查看各类型流水的详细信息。
## reward-service 后端
### 数据库
- 新增 `source_account_sequence` 字段到 `reward_ledger_entries` 表
- 添加索引 `idx_source_account_seq` 提升查询性能
- 字段可空,兼容历史数据
### 领域层
- `RewardSource` 值对象新增 `sourceAccountSequence` 属性
- `RewardCalculationService` 传递 `sourceAccountSequence`
### 应用层
- 新增 `getSettlementHistory` 方法查询结算历史
- 新增 `SettlementRecordRepository` 仓储实现
### API层
- 新增 `GET /settlements/history` 接口
- 新增 `SettlementHistoryQueryDTO` 和 `SettlementHistoryDTO`
## mobile-app 前端
### 服务层
- `RewardService` 新增结算历史相关模型和方法:
- `SettlementHistoryItem` 结算记录模型
- `SettlementRewardEntry` 关联奖励条目模型
- `getSettlementHistory()` 获取结算历史
- `WalletService` 新增:
- `LedgerEntry.payloadJson` 字段及辅助方法
- `counterpartyAccountSequence` 获取转账对手方ID
- `counterpartyUserId` 获取转账对手方用户ID
- `transferFee` 获取转账手续费
### 账本详情页
- 结算流水详情:显示结算金额、币种、涉及奖励明细(含来源用户)
- 提现流水详情:显示提现订单信息、状态、手续费等
- 转账流水详情:显示转入来源/转出目标用户信息
### 交互优化
- REWARD_SETTLED、WITHDRAWAL、TRANSFER_IN、TRANSFER_OUT 类型可点击
- 使用底部弹窗展示详情,支持滚动查看长列表
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 20:09:17 -08:00
hailin
35a812c058
feat(authorization): add admin authorization management API and real data integration
...
Backend (authorization-service):
- Add QueryAuthorizationsDto for query parameters (roleType, keyword, includeRevoked, page, limit)
- Add queryAuthorizations method to fetch all authorizations with user info
- Add GET /admin/authorizations endpoint for listing authorizations
- Add POST /admin/authorizations/:id/revoke endpoint for revoking authorization
Frontend (admin-web):
- Add authorization.types.ts with RoleType, Authorization, and request types
- Add authorizationService.ts for API calls (list, revoke, grant operations)
- Add useAuthorizations.ts React Query hooks
- Update authorization page to use real API data instead of mock data
- Add loading/error states, pagination, and revoke reason display
- Add new styles for loading, error, pagination, and date columns
The authorization management page now displays all authorized users
from the database with support for filtering by role type, status,
and keyword search.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 18:50:10 -08:00
hailin
e08959263a
fix(mobile-app): 修复待办操作完成后无法正确返回的问题
...
问题:
- 合同签署成功后使用 context.go('/profile') 直接跳转
- 导致从待办操作或待签合同列表 push 进来时收不到返回值
- 认种向导完成后同样使用 go 跳转,不会返回
修复:
1. contract_signing_page.dart
- 签署成功后检查 canPop() 判断是否可以返回
- 如果可以 pop(从待办操作/待签列表进入),返回 pop(true)
- 否则(从认种流程/KYC流程进入),跳转 go('/profile')
2. pending_actions_page.dart
- ADOPTION_WIZARD 添加后置检查(通过待签合同判断认种是否完成)
- 在 _checkIfAlreadyCompleted 中添加 ADOPTION_WIZARD 检查逻辑
兼容性:
- 不影响正常的认种流程(使用 go 进入合同签署)
- 不影响 KYC 流程(使用 go 进入合同签署)
- 待签合同列表页面正常工作
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 18:21:26 -08:00
hailin
d81e230639
refactor(admin-web): 简化授权管理页面,独立共管钱包功能
...
将授权管理页面的共管钱包功能独立成单独页面,并简化授权管理页面:
授权管理页面简化:
- 移除共管钱包部分(已独立)
- 移除后端不支持的复杂配置表单(考核规则、阶梯目标等)
- 保留核心功能:授权列表、筛选、创建授权、撤销授权
- 添加创建授权对话框(用户+类型+地区+跳过考核期)
- 添加撤销授权对话框(带原因输入)
- 支持5种授权类型:社区、省团队、正式省公司、市团队、正式市公司
共管钱包独立页面:
- 新建 /co-managed-wallet 页面
- 复用现有 CoManagedWalletSection 组件
- 侧边栏添加"共管钱包"菜单项
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 18:09:19 -08:00
hailin
dcd6f2ce18
fix: 修复特殊扣减API路径和批量创建用户ID解析问题
...
1. mobile-app: 修复特殊扣减API路径重复问题
- 将 /api/v1/wallets/special-deduction/execute 改为 /wallets/special-deduction/execute
- 因为 ApiClient baseURL 已包含 /api/v1 前缀
2. admin-web: 批量创建待办操作支持中文逗号分隔
- 正则表达式从 /[\n,]/ 改为 /[\n,,]/
- 同时支持换行、英文逗号、中文逗号作为分隔符
3. identity-service: 添加用户查找调试日志
- 在 findUserByIdOrSequence 方法中添加日志
- 便于排查用户ID查找失败的问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 17:54:27 -08:00
hailin
d5fee8d8c6
feat(trading): enable one-click settlement button
...
开放兑换页面的"一键结算"功能:
- 有可结算收益时:显示"一键结算",按钮可点击(金色)
- 无可结算收益时:显示"暂无可结算收益",按钮禁用(半透明)
- 结算中:显示加载动画,防止重复点击
- 使用 rewardService.settleToBalance() API 执行结算
- 结算成功后自动刷新页面数据
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 07:38:57 -08:00
hailin
dfdd8ed65a
feat(pending-actions): add special deduction feature for admin-created user actions
...
实现特殊扣减功能,允许管理员为用户创建扣减待办操作,由用户在移动端确认执行。
## 后端 (wallet-service)
### 领域层
- 新增 `SPECIAL_DEDUCTION` 到 LedgerEntryType 枚举
用于记录特殊扣减的账本流水类型
### 应用层
- 新增 `executeSpecialDeduction` 方法
- 验证用户钱包存在性
- 检查余额是否充足
- 乐观锁控制并发
- 扣减余额并记录账本流水
- 返回操作结果和新余额
### API层
- 新增内部API: POST /api/v1/wallets/special-deduction/execute
供移动端调用执行特殊扣减操作
## 前端 (admin-web)
### 类型定义
- 新增 `SPECIAL_DEDUCTION` 到 ACTION_CODES
- 新增 `SpecialDeductionParams` 接口定义扣减参数
- amount: 扣减金额
- reason: 扣减原因
### 页面
- 更新待办操作管理页面
- 当选择 SPECIAL_DEDUCTION 时显示扣减金额和原因输入框
- 验证扣减金额必须大于0
- 验证扣减原因不能为空
### 样式
- 新增特殊扣减表单区域样式
## 前端 (mobile-app)
### 服务层
- 新增 `executeSpecialDeduction` 方法到 WalletService
- 新增 `SpecialDeductionResult` 结果类
- 新增 `specialDeduction` 到 PendingActionCode 枚举
### 页面
- 新增 `SpecialDeductionPage` 特殊扣减确认页面
- 显示扣减金额和管理员备注
- 显示当前余额和扣减后余额
- 余额不足时禁用确认按钮
- 温馨提示说明操作性质
- 更新 `PendingActionsPage`
- 处理 SPECIAL_DEDUCTION 类型的待办操作
- 从 actionParams 解析 amount 和 reason
- 导航到特殊扣减确认页面
## 工作流程
1. 管理员在 admin-web 创建 SPECIAL_DEDUCTION 待办操作
- 选择目标用户
- 输入扣减金额
- 输入扣减原因
2. 用户在 mobile-app 待办操作列表看到该操作
3. 用户点击后进入特殊扣减确认页面
- 查看扣减详情
- 确认余额充足
- 点击确认执行扣减
4. 后端执行扣减并记录账本流水
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 07:04:46 -08:00
hailin
a609600cd8
feat(fiat-withdrawal): add complete fiat withdrawal system
...
实现完整的法币提现功能,支持银行卡、支付宝、微信三种收款方式。
此功能与现有的区块链划转功能完全独立,互不影响。
## 后端 (wallet-service)
### 数据库
- 新增 `fiat_withdrawal_orders` 表存储法币提现订单
- 与现有 `withdrawal_orders` 表(区块链划转)完全分离
- 添加完整索引支持高效查询
### 领域层
- 新增 `FiatWithdrawalStatus` 枚举(与 WithdrawalStatus 独立)
- 流程: PENDING -> FROZEN -> REVIEWING -> APPROVED -> PAYING -> COMPLETED
- 或 REJECTED / FAILED / CANCELLED
- 新增 `PaymentMethod` 枚举: BANK_CARD / ALIPAY / WECHAT
- 新增 `FiatWithdrawalOrder` 聚合根
- 新增 `IFiatWithdrawalOrderRepository` 仓储接口
- 新增 `FIAT_WITHDRAWAL` 账本流水类型
### 应用层
- 新增 `FiatWithdrawalApplicationService` 处理业务逻辑
- 发送短信验证码
- 申请法币提现(冻结余额)
- 提交审核
- 审核通过/驳回
- 开始打款
- 完成打款
### API层
- 新增 `FiatWithdrawalController` 提供用户端API
- POST /wallet/fiat-withdrawal/send-sms - 发送验证码
- POST /wallet/fiat-withdrawal - 申请提现
- GET /wallet/fiat-withdrawal - 获取提现记录
- 新增内部API供管理端调用
- GET /api/v1/wallets/fiat-withdrawals - 查询订单
- POST /api/v1/wallets/fiat-withdrawals/:orderNo/review - 审核
- POST /api/v1/wallets/fiat-withdrawals/:orderNo/start-payment - 开始打款
- POST /api/v1/wallets/fiat-withdrawals/:orderNo/complete-payment - 完成打款
## 前端 (admin-web)
- 新增法币提现审核管理页面 `/withdrawals`
- 支持按状态分 Tab 查看订单
- 支持审核通过/驳回
- 支持打款操作
- 支持查看订单详情
## 前端 (mobile-app)
- 新增 `WithdrawFiatPage` 法币提现页面
- 支持选择银行卡/支付宝/微信
- 输入收款账户信息
- 新增 `WithdrawFiatConfirmPage` 确认页面
- 短信验证码验证
- 密码验证
- 在 `WalletService` 中添加法币提现相关方法和模型
## 重要说明
此功能与现有的区块链划转功能 (withdraw_usdt_page.dart) 完全独立:
- 独立的数据库表
- 独立的聚合根
- 独立的状态枚举
- 独立的API端点
- 独立的前端页面
原有的区块链划转功能保持不变,不受任何影响。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 06:39:11 -08:00
hailin
d614d18e97
Revert "feat(withdrawal): implement fiat withdrawal with bank/alipay/wechat"
...
This reverts commit 288d894746 .
2026-01-03 05:44:43 -08:00
hailin
288d894746
feat(withdrawal): implement fiat withdrawal with bank/alipay/wechat
...
Add complete fiat withdrawal feature that allows users to withdraw
green credits (绿积分) to their bank card, Alipay, or WeChat account
with 1:1 CNY conversion. Key changes:
Backend (wallet-service):
- Update Prisma schema with fiat withdrawal fields (paymentMethod,
bankName, bankCardNo, cardHolderName, alipay*, wechat*, review fields)
- Rewrite withdrawal status enum for fiat flow: PENDING → FROZEN →
REVIEWING → APPROVED → PAYING → COMPLETED (or REJECTED/FAILED)
- Add PaymentMethod enum: BANK_CARD, ALIPAY, WECHAT
- Update WithdrawalOrderAggregate with new fiat withdrawal methods
- Add review/payment workflow methods in WalletApplicationService
- Add internal API endpoints for admin withdrawal management
- Remove blockchain withdrawal event handler (no longer needed)
Frontend (admin-web):
- Add withdrawal review management page at /withdrawals
- Add tabs for reviewing/approved/paying order states
- Add withdrawal service and React Query hooks
- Add types for withdrawal orders and payment methods
- Add sidebar menu item for withdrawal review
Frontend (mobile-app):
- Add withdrawFiat() method to WalletService
- Add PaymentMethod enum with BANK_CARD/ALIPAY/WECHAT
- Create new WithdrawFiatPage for fiat withdrawal input
- Create WithdrawFiatConfirmPage with SMS + password verification
- Add routes for /withdraw/fiat and /withdraw/fiat/confirm
- Keep existing withdraw/usdt (划转) pages unchanged
Note: The existing withdraw_usdt_page.dart is for point-to-point
transfer (划转), which is a different feature from fiat withdrawal.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 05:28:05 -08:00
hailin
036696878f
feat(settlement): implement settle-to-balance with detailed source tracking
...
Add complete settlement-to-balance feature that transfers settleable
earnings directly to wallet USDT balance (no currency swap). Key changes:
Backend (wallet-service):
- Add SettleToBalanceCommand for settlement operations
- Add settleToBalance method to WalletAccountAggregate
- Add settleToBalance application service with ledger recording
- Add internal API endpoint POST /api/v1/wallets/settle-to-balance
Backend (reward-service):
- Add settleToBalance client method for wallet-service communication
- Add settleRewardsToBalance application service method
- Add user-facing API endpoint POST /rewards/settle-to-balance
- Build detailed settlement memo with source user tracking per reward
Frontend (mobile-app):
- Add SettleToBalanceResult model class
- Add settleToBalance() method to RewardService
- Update pending_actions_page to handle SETTLE_REWARDS action
- Add completion detection via settleableUsdt balance check
Settlement memo now includes detailed breakdown by right type with
source user accountSequence for each reward entry, e.g.:
结算 1000.00 绿积分到钱包余额
涉及 5 笔奖励
- SHARE_RIGHT: 500.00 绿积分
来自 D2512120001: 288.00 绿积分
来自 D2512120002: 212.00 绿积分
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 04:29:38 -08:00
hailin
cbbef170e8
feat(pending-actions): display accountSequence alongside userId
...
- Add accountSequence field to PendingActionResponseDto
- Add helper methods to fetch accountSequence from UserAccount
- Update queryActions and getAction to include accountSequence
- Update admin-web table and detail view to show both fields
- accountSequence displayed prominently, userId shown as secondary info
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 21:33:03 -08:00
hailin
13dd42d2be
fix(mobile-app): fix pending action completion detection
...
- Change FORCE_KYC check from isCompleted to level1.verified
(FORCE_KYC only requires real-name verification, not all KYC levels)
- Add post-navigation re-check for FORCE_KYC and BIND_PHONE actions
(handles cases where user completes action but page doesn't return true)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 21:09:35 -08:00
hailin
c5c4e1667e
fix(mobile-app): fix layout constraint error in pending actions page
...
Wrap ElevatedButton in SizedBox(width: 72) to prevent
BoxConstraints infinite width error in Row layout.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 21:02:15 -08:00
hailin
f5f0ff2822
fix(mobile-app): correctly parse nested API response for pending actions
...
The API returns a nested structure {success, data: {code, data: [...]}}
but the service was only checking for {actions: [...]} format.
Now correctly extracts the actions list from data.data.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 20:57:17 -08:00
hailin
f7913cd04e
chore: temporarily disable KYC and contract check logs
...
Comment out debugPrint statements in pending actions and contract
check services to reduce log noise during development.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 20:51:13 -08:00
hailin
47a7e4a4da
feat(pending-actions): enhance multi-select creation and add pre-check
...
Admin Web:
- Redesign create modal to support multi-select action types
- Add drag-and-drop ordering for execution sequence
- Auto-calculate priority based on order (first = highest)
- Add @dnd-kit dependencies for sortable functionality
Flutter Mobile App:
- Add pre-check logic before executing pending actions
- Auto-complete FORCE_KYC if KYC already verified
- Auto-complete BIND_PHONE if phone already bound
- Skip unnecessary user interactions for completed tasks
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 20:23:15 -08:00
hailin
06d3489b49
fix(admin-web): fix nested data access in pendingActionService
...
API returns nested structure: { success, data: { code, message, data: {...} } }
After apiClient interceptor unwraps response.data, we still need to access
.data.data to get the actual business data.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 19:18:54 -08:00
hailin
ed463d67ab
fix(admin-web): fix API response data access in pendingActionService
...
The apiClient interceptor already unwraps response.data, so the service
was accessing .data on the already-unwrapped response. Fixed by properly
casting the response type to access the nested data field.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 19:08:57 -08:00
hailin
8c8a049f77
fix(admin-web): handle undefined data in dashboard hooks
...
Add null-safe access and fallback to empty arrays to prevent
"Cannot read properties of undefined" errors when API returns
unexpected data structure.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 19:05:54 -08:00
hailin
ff038f31f9
fix(pending-actions): fix API response handling and add Kong route
...
- Fix pending_action_service.dart to access response.data instead of response
- Add Kong route for /api/v1/admin/pending-actions to identity-service
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:33:58 -08:00
hailin
28e0396a65
feat(pending-actions): add user pending actions system
...
Add a fully optional pending actions system that allows admins to configure
specific tasks that users must complete after login.
Backend (identity-service):
- Add UserPendingAction model to Prisma schema
- Add migration for user_pending_actions table
- Add PendingActionService with full CRUD operations
- Add user-facing API (GET list, POST complete)
- Add admin API (CRUD, batch create)
Admin Web:
- Add pending actions management page
- Support single/batch create, edit, cancel, delete
- View action details including completion time
- Filter by userId, actionCode, status
Flutter Mobile App:
- Add PendingActionService and PendingActionCheckService
- Add PendingActionsPage for forced task execution
- Integrate into splash_page login flow
- Users must complete all pending tasks in priority order
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:22:51 -08:00
hailin
8173e1f973
feat: "同僚"改为"同伴" + KYC从三要素改为二要素
...
mobile-app:
- profile_page.dart: 将所有"同僚"改为"同伴"
identity-service:
- 层级1实名认证从三要素(姓名+身份证+手机号)改为二要素(姓名+身份证号)
- 使用阿里云 Id2MetaStandardVerify API
- 二要素验证直接调用真实API,不使用mock
- 保留三要素验证方法(verifyIdCardThreeFactor)备用
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 04:20:42 -08:00
hailin
b1234bc434
feat(admin-web): 添加 TSS WASM 集成,实现与 Service-Party-App 功能对等
...
## 功能概述
Admin-Web 现在可以作为独立的 TSS 参与方参与共管钱包创建,
与 Service-Party-App 桌面应用功能完全对等。
## 主要变更
### 1. TSS WASM 模块 (backend/mpc-system/services/tss-wasm/)
- main.go: Go WASM 模块,封装 bnb-chain/tss-lib
- 支持 keygen 和 signing 操作
- 通过 syscall/js 与 JavaScript 通信
### 2. Admin-Web TSS 库 (frontend/admin-web/src/lib/tss/)
- tss-wasm-loader.ts: WASM 加载器
- tss-client.ts: 高级 TSS 客户端 API
- grpc-web-client.ts: gRPC-Web 客户端连接 Message Router
### 3. 本地存储模块 (frontend/admin-web/src/lib/storage/)
- share-storage.ts: IndexedDB 加密存储
- 使用 AES-256-GCM 加密,PBKDF2 密钥派生
### 4. React Hooks
- useTSSClient.ts: TSS 客户端状态管理
- useShareStorage.ts: 存储操作封装
### 5. 组件更新
- CreateWalletModal.tsx: 集成 TSS 客户端
- 添加密码保护对话框
- 实现真实 keygen 流程
- 自动保存 share 到 IndexedDB
- CoManagedWalletSection.tsx: 使用真实 API
- coManagedWalletService.ts: API 服务层
### 6. WASM 文件
- frontend/admin-web/public/wasm/tss.wasm (~19MB)
- frontend/admin-web/public/wasm/wasm_exec.js (Go 运行时)
## 技术栈
- Go 1.21+ (WASM 编译)
- bnb-chain/tss-lib v2.0.2 (TSS 协议)
- Web Crypto API (AES-256-GCM)
- IndexedDB (本地存储)
- gRPC-Web (消息路由)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 01:39:43 -08:00
hailin
1908544698
fix(mobile-app): 修复 ProfilePage 在 initState 中修改 provider 导致的错误
...
将 _loadUnreadNotificationCount() 调用包装在 addPostFrameCallback 中,
延迟到 widget tree 构建完成后执行,避免 Riverpod 报错:
"Tried to modify a provider while the widget tree was building"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:57:37 -08:00
hailin
b3142387f7
chore(mobile-app): 减少频繁轮询产生的调试日志
...
- 移除合同检查服务的频繁日志输出
- 移除维护状态检查的正常状态日志
- 只在检测到异常状态(维护中、待签署合同)时输出日志
- 减少服务器日志压力
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:54:16 -08:00
hailin
8a839b5e14
chore(mobile-app): 减少频繁日志输出
...
移除以下频繁执行操作的日志,只保留错误和关键状态日志:
- MaintenanceProvider: 移除正常状态日志,只保留检测到维护的日志
- ContractCheckService: 移除常规检查日志,只保留检测到异常的日志
- ContractSigningService: 移除KYC检查、获取任务列表等常规日志
- HomeShellPage: 移除合同检查定时器日志和路由栈打印
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:31:45 -08:00
hailin
68237d9905
chore(mobile-app): 调整维护状态轮询间隔为30-60秒
...
减少服务器压力:
- 将轮询间隔从 3-6 秒调整为 30-60 秒
- 10,000 用户时每秒约 222 次请求(之前约 2,222 次)
- 用户最多 60 秒内发现维护状态变化
- 启动时和从后台恢复时仍立即检查
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:23:20 -08:00
hailin
7e8113805d
feat(mobile-app): 在主页添加随机3-6秒轮询检查维护状态
...
- 用户登录后在 HomeShellPage 每 3-6 秒(随机)检查一次维护状态
- 随机间隔可避免所有用户同时请求,减少服务器压力
- 后端发起维护后,用户最多 6 秒内会看到维护弹窗
- App 进入后台时暂停检查,恢复前台时立即检查并重启定时器
- 启动时、从后台恢复时也会立即检查一次
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:21:21 -08:00
hailin
912cc1eb8f
fix(admin-web): 修复切换维护状态HTTP方法不匹配问题 (PATCH→PUT)
2025-12-28 05:03:34 -08:00
hailin
ba3a21d049
fix(admin-web): 修复系统维护"立即激活"按钮不显示的问题
...
- 修复 getStatusTag 函数逻辑,未激活状态使用 'inactive' 样式而不是 'expired'
- 添加更细化的状态判断:维护中、已过期、已计划、未激活、待激活
- 添加 inactive 标签样式(橙色背景)
- 现在未激活的维护计划会正确显示"立即激活"按钮
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 04:59:06 -08:00
hailin
c328d8b59b
feat(mobile-app,admin): 添加系统维护功能和通知徽章功能
...
系统维护功能:
- 后端: 添加系统维护配置实体、仓库和控制器
- 后端: 添加维护模式拦截器,返回503状态码
- admin-web: 添加系统维护管理页面,支持创建/编辑/开关维护配置
- mobile-app: 添加维护状态检查服务和阻断弹窗
- mobile-app: 在启动页、向导页集成维护检查
- mobile-app: 支持App从后台恢复时自动检查维护状态
通知徽章功能:
- 添加通知徽章Provider,监听登录状态自动刷新
- 底部导航栏"我的"标签显示未读通知红点
- 进入通知页面自动刷新徽章状态
- 切换账号、退出登录自动清除徽章
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:26:01 -08:00
hailin
fea01642e7
feat(co-managed-wallet): 添加分布式多方共管钱包创建功能
...
## 功能概述
实现分布式多方共管钱包创建功能,包括 Admin-Web 扩展和 Service-Party 桌面应用。
## 主要变更
### 1. Admin-Web 扩展 (前端)
- 新增 CoManagedWalletSection 组件 (frontend/admin-web/src/components/features/co-managed-wallet/)
- 在授权管理页面添加共管钱包入口卡片
- 实现创建钱包向导: 配置 → 邀请 → 生成 → 完成
- 包含组件: ThresholdConfig, InviteQRCode, ParticipantList, SessionProgress, WalletResult
### 2. Admin-Service 后端 API
- 新增共管钱包领域实体和枚举 (domain/entities/co-managed-wallet.entity.ts)
- 新增 REST 控制器 (api/controllers/co-managed-wallet.controller.ts)
- 新增服务层 (application/services/co-managed-wallet.service.ts)
- 新增 Prisma 模型: CoManagedWalletSession, CoManagedWallet
- 更新 app.module.ts 注册新模块
### 3. Session Coordinator 扩展 (Go)
- 新增会话类型: SessionTypeCoManagedKeygen ("co_managed_keygen")
- 扩展 MPCSession 实体添加 WalletName 和 InviteCode 字段
- 更新 PostgreSQL 和 Redis 适配器支持新字段
- 新增数据库迁移: 008_add_co_managed_wallet_fields
### 4. Service-Party 桌面应用 (新项目)
- 位置: backend/mpc-system/services/service-party-app/
- 技术栈: Electron + React + TypeScript + Vite
- 包含模块:
- gRPC 客户端 (连接 Message Router)
- TSS 处理器 (子进程方式运行 Go TSS 协议)
- 本地加密存储 (AES-256-GCM)
- 页面: Home, Join, Create, Session, Settings
## 修改的现有文件 (便于回滚)
1. backend/mpc-system/services/session-coordinator/domain/entities/mpc_session.go
- 添加 SessionTypeCoManagedKeygen 常量
- 添加 IsKeygen() 方法
- 添加 WalletName, InviteCode 字段
- 更新 ReconstructSession, ToDTO, SessionDTO
2. backend/mpc-system/services/session-coordinator/adapters/output/postgres/session_postgres_repo.go
- 更新 SQL 查询包含 wallet_name, invite_code
- 更新 Save, FindByUUID, FindByStatus 等方法
- 更新 scanSessions, sessionRow
3. backend/mpc-system/services/session-coordinator/adapters/output/redis/session_cache_adapter.go
- 更新 sessionCacheEntry 结构
- 更新 sessionToCacheEntry, cacheEntryToSession
4. backend/services/admin-service/prisma/schema.prisma
- 新增 WalletSessionStatus 枚举
- 新增 CoManagedWalletSession, CoManagedWallet 模型
5. backend/services/admin-service/src/app.module.ts
- 导入并注册共管钱包相关组件
6. frontend/admin-web/src/app/(dashboard)/authorization/page.tsx
- 导入并添加 CoManagedWalletSection
7. frontend/admin-web/src/infrastructure/api/endpoints.ts
- 添加 CO_MANAGED_WALLETS API 端点
## 回滚说明
如需回滚此功能:
1. 回滚数据库迁移: 运行 008_add_co_managed_wallet_fields.down.sql
2. 删除新增文件夹:
- backend/mpc-system/services/service-party-app/
- frontend/admin-web/src/components/features/co-managed-wallet/
- backend/services/admin-service/src/**/co-managed-wallet*
3. 恢复修改的文件到前一个版本
4. 运行 prisma generate 重新生成 Prisma 客户端
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 21:39:07 -08:00
hailin
9c7dc6f511
feat(mobile-app): 非强制更新时下载完成后让用户选择是否安装
...
- 强制更新:下载完成后自动安装
- 非强制更新:下载完成后显示"稍后安装"和"立即安装"按钮
- 更新提示对话框中"稍后"改为"暂时不更新"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 20:20:47 -08:00
hailin
a54a01bba0
fix(mobile-app): 修改秘密点击解锁逻辑,点击19次后需等待2秒
...
- 连续点击19次后启动2秒定时器
- 2秒内再次点击会取消并重新计时
- 确保用户停止点击后才显示"我的同僚"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:26:22 -08:00
hailin
b20ec10c75
refactor(mobile-app): 修改"我的"页面文案
...
- "团队种植树" → "同僚种植树"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:23:45 -08:00
hailin
f20ed32f5f
refactor(mobile-app): 简化删除账号确认对话框文案
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:22:28 -08:00
hailin
1694f37e91
fix(mobile-app): 修复多账号切换后账号列表只显示一个的问题
...
- phone_login_page: 登录成功后添加账号到多账号列表
- import_mnemonic_page: 恢复账号后添加到多账号列表
- sms_verify_page: 短信验证登录后添加账号到多账号列表
问题原因:多个登录入口没有调用 addAccount() 将账号添加到列表
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:12:50 -08:00
hailin
a8261e110a
fix(mobile-app): 退出登录时停止遥测上传
...
- TelemetryService 添加 pauseForLogout() 方法
- 退出登录时先停止定期上传再清空队列
- 避免退出后继续上传导致等待
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 10:40:28 -08:00
hailin
3d68d1f6f6
fix(mobile-app): 简化退出登录提示文案
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 10:35:50 -08:00
hailin
4e4d9f43f6
fix(mobile-app): 修复退出登录报错问题
...
- TelemetryStorage.clearUserData() 添加初始化检查
- 移除 logoutCurrentAccount() 中多余的保存数据逻辑
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 10:34:50 -08:00
hailin
2a929fc082
fix(mobile-app): 修复头像更新未同步到账号列表的问题
...
- AccountService 添加 MultiAccountService 依赖
- updateLocalAvatarSvg() 更新后同步到账号列表
- updateProfile() 更新昵称/头像后同步到账号列表
- uploadAvatar() 上传头像后同步到账号列表
- 新增 _syncProfileToAccountList() 统一处理同步逻辑
- 调整 injection_container 依赖注入顺序
确保切换账号时显示正确的头像和昵称
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 10:25:19 -08:00
hailin
8eecc4c55f
fix(mobile-app): 修复账号切换的严重bug和数据隔离问题
...
问题修复:
1. 键列表不一致 - 统一定义 _accountSecureKeys 和 _accountLocalKeys
2. 缺少 phoneNumber/isPasswordSet/biometricEnabled - 补充到键列表
3. 切换前未清除旧数据 - 新增 _clearCurrentAccountData 方法
4. 缓存数据未按账号隔离 - LocalStorage 数据也按账号保存/恢复
5. 遥测队列未隔离 - 切换时清除遥测事件队列
新增功能:
- _validateAccountData: 切换前验证目标账号数据完整性
- _clearCurrentAccountData: 切换前清除当前存储空间
优化:
- switchToAccount: 完整的切换流程(验证→保存→清除→恢复)
- saveCurrentAccountData: 同时保存 SecureStorage 和 LocalStorage
- _restoreAccountData: 同时恢复 SecureStorage 和 LocalStorage
- deleteAccount: 同时删除 SecureStorage 和 LocalStorage 专用键
- logoutCurrentAccount: 使用统一键列表,确保一致性
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 10:01:11 -08:00
hailin
4de96dac9d
fix(mobile-app): 完善退出登录时的数据清理逻辑
...
遵循大厂最佳实践,确保退出登录后下次登录是干净的环境:
SecureStorage 新增清除项:
- inviterReferralCode (临时邀请码)
- biometricEnabled (生物识别设置)
LocalStorage 新增清除项:
- lastSyncTime (最后同步时间)
- cachedRankingData (排行榜缓存)
- cachedMiningStatus (矿机状态缓存)
遥测数据:
- 清除用户相关的事件队列
重构:
- MultiAccountService 增加 LocalStorage 和 TelemetryStorage 依赖
- 更新依赖注入容器
- TelemetryStorage 新增 clearUserData 方法
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:55:17 -08:00
hailin
c84516b222
refactor(mobile-app): 修改"我的"页面文案
...
- "个人种植树" → "本人种植树"
- 引荐列表中 "个人/团队" → "本人/同僚"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:38:59 -08:00
hailin
f143be9925
refactor(mobile-app): 修改"我的团队"文案为"我的同僚"
...
- "我的团队" → "我的同僚"
- "暂无团队成员" → "暂无同僚"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:34:55 -08:00
hailin
2b5b80d299
refactor(mobile-app): 修改"我的"页面文案
...
- "直推人数" → "引荐"
- "个人种植数" → "个人种植树"
- "团队种植数" → "团队种植树"
- "直推列表" → "引荐列表"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:33:25 -08:00
hailin
b20be7213c
feat(mobile-app): 隐藏"我的团队"功能,需秘密点击解锁
...
- 默认隐藏"我的团队"树形组件
- 在"团队种植数"区域连续点击19次后显示
- 点击间隔超过1秒自动重置计数器
- 退出页面后状态自动重置
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:29:20 -08:00
hailin
1cc53bd533
feat(mobile-app): 优化流水明细筛选选项
...
- 将"奖励转可结算"改为"分享收益",更准确描述分享权益
- 新增"权益收入"筛选项(SYSTEM_ALLOCATION),用于筛选:
- 社区权益
- 市/省团队权益
- 市/省区域权益
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 08:17:15 -08:00
hailin
7add51f5a3
fix(contract-signing): 添加 userRealName 字段到 Flutter ContractSigningTask
...
修复签名参照显示功能:将后端返回的 userRealName 字段添加到
Flutter 客户端的 ContractSigningTask 模型中,用于在签名
面板显示用户姓名供参照。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 06:47:08 -08:00
hailin
954f170bd4
feat(contract-signing): 增强签名功能
...
前端改进:
- 签名页面添加红色醒目提示"请使用正楷书写您的真实姓名"
- 签名前显示用户真实姓名供参照
- 实现全屏横向签名面板(自动切换横屏/竖屏)
- 记录签名轨迹数据(每个点的坐标和时间戳、笔画顺序)
后端改进:
- 扩展SignContractParams接口支持signatureTrace字段
- 控制器记录签名轨迹日志(笔画数、总时长)
- 签名轨迹数据以JSON格式存储,作为法律凭证
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 06:42:15 -08:00
hailin
3f3309e62f
debug: 添加流水明细 allocationType 调试日志
...
- 后端 wallet-service: getMyLedger 打印 payloadJson 和 allocationType
- 前端 wallet_service: 打印原始和解析后的流水数据
- 前端 ledger_detail_page: 打印加载的流水数据详情
用于排查权益类型(社区、省市团队/区域)不显示的问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 04:35:46 -08:00
hailin
21a523518e
feat(mobile-app): 最小提取金额从100改为5绿积分
2025-12-26 04:02:26 -08:00
hailin
78d7e0e637
feat(mobile-app): 流水明细支持显示权益类型和详情
...
- 后端 wallet-service: getMyLedger API 返回 allocationType 字段
- 前端流水明细: 显示权益类型名称(分享权益、省/市区域权益等)
- 新增权益详情弹窗,点击权益记录可查看详细信息
- 兑换页面: "RMB/CNY提现" 改为 "提现"
- 我的团队: "暂无下级成员" 改为 "暂无团队成员"
- 自助申请授权: 隐藏团队链占用区域提示
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 03:57:35 -08:00
hailin
aae4f1e360
fix(mobile-app): 遍历路由栈检测当前页面,修复push导航检测问题
...
之前只检查 currentConfiguration.uri.path,对于 push 导航的页面无法正确检测。
现在遍历整个 matches 路由栈,只要栈中有合同/KYC页面就跳过弹窗。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 00:14:24 -08:00
hailin
73f2b85ddf
fix(mobile-app): 首次检查也加入路由判断,避免在KYC页面弹窗
...
_checkContractsAndKyc() 方法之前没有调用 _shouldSkipContractCheck(),
导致用户在合同/KYC页面时首次检查仍会弹窗。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 00:09:39 -08:00
hailin
b40cd40eae
fix(mobile-app): 使用 appRouterProvider 获取全局路由状态
...
改用 ref.read(appRouterProvider) 替代 GoRouter.of(context),
确保能正确获取到当前的全局路由路径。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 00:06:17 -08:00
hailin
ce75e68d5e
fix(mobile-app): 修复合同签署页面定时检查仍弹窗的问题
...
使用 GoRouter.of(context).routerDelegate.currentConfiguration 获取全局路由状态,
而不是 GoRouterState.of(context),因为后者只能获取 ShellRoute 内部的路由状态,
当用户在顶级路由(如 /contract-signing/:orderNo)时无法正确检测。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 23:38:55 -08:00
hailin
148e197ea1
fix(mobile-app): 升级弹窗显示时跳过合同/KYC后台检查
...
- UpdateService 添加 isShowingUpdateDialog 状态
- home_shell_page 在升级、合同签署、KYC页面均跳过后台弹窗
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:12:12 -08:00
hailin
5ee12be00f
fix(mobile-app): 用户在合同/KYC页面时跳过后台弹窗检查
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:08:35 -08:00
hailin
838fbce914
chore(mobile-app): 缩短合同检查定时器间隔至5-20秒
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 21:59:30 -08:00
hailin
6237a49153
feat(mobile-app): 账本明细-认种支付交易支持查看和下载合同
...
- 认种支付流水项添加点击事件和右侧箭头指示器
- 新增交易详情底部弹窗,显示交易金额、时间、订单号等信息
- 添加"查看合同"按钮,使用 flutter_pdfview 展示 PDF
- 添加"下载合同"按钮,通过 share_plus 分享/保存文件
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 21:54:10 -08:00
hailin
b63aa0737c
feat(mobile-app): 添加后台定时检测未签署合同和KYC需求
...
- 添加 60-180 秒随机间隔的后台定时器
- 检测已KYC但未签署合同的用户,强制跳转签署页面
- 检测已付款但未完成KYC的用户,强制跳转实名认证页面
- 使用 PopScope 替代已弃用的 WillPopScope
- 防止重复弹窗的状态管理
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 21:23:22 -08:00
hailin
f62a96f3f1
feat(planting): 已付款未KYC用户强制进入实名认证流程
...
后端 (planting-service):
- 添加 /contract-signing/kyc-requirement 接口检查用户是否需要KYC
- 检查已付款订单但无合同签署任务的情况
前端 (mobile-app):
- ContractCheckService 新增 checkAll() 综合检查方法
- HomeShellPage 综合检查待签署合同和KYC需求
- 需要KYC时弹出强制认证弹窗,不可关闭
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 21:14:53 -08:00
hailin
7a1e789f4d
fix(contract): 合同签署页面和模板优化
...
1. 合同模板:身份证号和联系方式显示完整信息,不再使用星号掩码
2. 签署页面:checkbox 默认不选中,用户阅读到底部后才可点击确认
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 09:31:39 -08:00
hailin
fd04de8696
fix(mobile-app): 增加合同签署页面重试时间
...
KYC 成功后后端通过 Kafka 异步创建合同任务,可能需要较长时间。
将重试从 5 次/500ms 改为 15 次/2s,总等待时间最多 30 秒。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 07:33:04 -08:00
hailin
6b72831cd9
feat(mobile-app): KYC成功后自动跳转合同签署页面
...
从认种流程进入KYC时传递orderNo参数:
- 认种页面 -> KYC Entry -> KYC ID 传递 orderNo
- KYC成功后如果有orderNo则跳转合同签署
- 直接进入KYC(无orderNo)则正常返回
修改文件:
- app_router.dart: KYC路由支持orderNo参数
- kyc_entry_page.dart: 接收并传递orderNo
- kyc_id_page.dart: 成功后判断是否跳转合同签署
- planting_location_page.dart: 跳转KYC时传递orderNo
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 07:07:43 -08:00
hailin
8163804f23
fix(contract-signing): 修复合同签署流程的持仓更新时机
...
问题:支付后直接更新持仓和开启挖矿,导致款还在冻结中树就种下去了
修复:
- planting-application.service: 支付时不再更新持仓和开启挖矿
- contract-signing.service: signContract 在事务里同时完成合同+持仓+挖矿
- contract-signing.service: handleExpiredTasks 超时也更新持仓+挖矿(钱扣总部)
- KYCVerifiedEvent 添加 accountSequence 字段
- kyc-verified-event.consumer 直接用事件里的 accountSequence
流程变为:支付冻结 → 签署合同 → [事务: 合同+持仓+挖矿] → 发事件
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 06:50:03 -08:00
hailin
0e93d2a343
feat(contract): 使用合同编号代替订单号
...
合同编号格式: accountSequence-yyyyMMddHHmm
例如: 10001-202512251003
修改内容:
- 数据库: 添加 contract_no 字段
- 后端: 聚合根、Repository、Service、PDF生成器支持 contractNo
- 前端: 显示合同编号代替订单号
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 04:58:39 -08:00
hailin
9cf1bbbbd3
fix(mobile-app): 合同签署页面添加重试机制解决竞态问题
...
前端在支付完成后立即请求合同签署任务,但后端 Kafka 事件可能还未完成
任务创建。添加最多5次重试,使用指数退避策略(500ms * attempt)。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 04:01:25 -08:00
hailin
82ca233d54
fix(mobile-app): 签署成功后跳转到"我的"页面
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 03:55:23 -08:00
hailin
36e4e875bf
fix(mobile-app): 修复签署成功后导航报错问题
...
- 签署成功后检查 canPop() 再决定返回方式
- 如果没有上一页则跳转到首页
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 03:54:18 -08:00
hailin
2607907bad
fix(mobile-app): 修复合同签署页面问题
...
- 修复 markScrollComplete/acknowledgeContract API 响应处理
(后端返回 success:true 但无 data 时重新获取任务详情)
- 将合同签署页面的 USDT 改成绿积分
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 03:44:39 -08:00
hailin
c657fb5a19
feat(planting-service): 实现合同签名和PDF云存储功能
...
- 添加 MinIO 存储服务,支持上传签名图片和已签署 PDF
- 添加 signedPdfUrl 字段到数据库模型
- 修改签署流程:生成 PDF、嵌入签名、上传到云存储
- 修复前端签署 API 响应处理
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 03:35:15 -08:00
hailin
a2f021fe94
fix(mobile-app): 修复签署合同请求字段名与后端不匹配
...
- signatureImage → signatureBase64
- 添加 signatureHash 字段
- 将 deviceInfo 包装成对象格式 {deviceId, platform}
- 将 latitude/longitude 包装成 location 对象
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 03:20:27 -08:00
hailin
accc043ff0
feat(mobile-app): 添加合同签署 API 详细调试日志
...
- 为 signContract、lateSignContract、markScrollComplete、acknowledgeContract 添加详细日志
- 记录请求参数(签名图片大小、IP、设备信息、位置)
- 记录响应状态码和完整响应数据
- 修复响应解析 bug:正确从 response.data['data'] 提取任务数据
- 增强错误日志,捕获堆栈信息便于调试
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 03:14:10 -08:00
hailin
846bf5b061
fix(mobile-app): 修复 getTask 解析响应格式错误
...
之前直接用 response.data 解析,应该取 response.data['data']。
这导致 expiresAt 等字段无法正确获取,倒计时每次都从 24 小时开始。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 03:09:31 -08:00
hailin
299de2005a
fix(mobile-app): 修复待签署合同列表重复显示问题
...
之前同时调用 getPendingTasks 和 getUnsignedTasks 然后合并,
导致待签署的任务显示两次。现在只使用 getUnsignedTasks。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 03:07:24 -08:00
hailin
c509daa353
feat(contract-signing): 使用 pdf-lib 实现专业 PDF 合同展示
...
后端改动:
- 添加 pdf-lib 和 @pdf-lib/fontkit 依赖
- 新建 PdfGeneratorService 使用 PDF 模板直接填充用户数据
- 添加中文字体支持 (NotoSansSC-Regular.ttf)
- 新增 GET /tasks/:orderNo/pdf 接口返回 PDF 文件
- 合同模板存放于 templates/contract-template.pdf
前端改动:
- 添加 flutter_pdfview 依赖
- 重写合同签署页面使用 PDFView 组件展示 PDF
- 下载 PDF 到临时目录后展示
- 滑动到最后一页自动标记已阅读
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 02:27:54 -08:00
hailin
2a85fcc7fa
fix(mobile-app): 修复路由顺序避免 pending 被当成 orderNo
...
将 /contract-signing/pending 路由放在 /contract-signing/:orderNo 前面,
避免 GoRouter 将 "pending" 匹配为动态参数。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 01:08:27 -08:00
hailin
c826da164c
fix(mobile-app): 支付成功后跳转到合同签署页面
...
修改认种支付成功后的流程:
- 合同签署启用且已完成实名认证 → 跳转到合同签署页面
- 合同签署启用但未完成实名认证 → 弹窗提示去做实名认证
- 合同签署未启用 → 显示成功提示返回个人中心
符合设计流程: 支付(冻结) → 签合同 → 24小时内签署完成/超时取消
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 01:04:00 -08:00
hailin
0c6e73de85
fix(mobile-app): 修复实名认证响应解析层级错误
...
后端返回嵌套结构 { data: { data: {...} } },
前端需要双层解析才能获取实际数据
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 00:45:52 -08:00
hailin
181d11d656
feat(kyc): 升级实名认证为三要素验证(姓名+身份证号+手机号)
...
- 后端 aliyun-kyc.provider.ts: 改用 ID_CARD_THREE 类型,添加 PhoneNumber 参数
- 后端 kyc-application.service.ts: 从用户账户获取手机号传递给 KYC provider
- 前端 kyc_id_page.dart: 更新文案为"三要素验证"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 23:54:13 -08:00
hailin
2edcfc3d0d
fix(kyc): 修复KYC状态接口响应解析错误
...
后端返回的数据结构是嵌套的 data.data,修复前端解析逻辑以正确读取 phoneVerified 等字段。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 22:40:51 -08:00
hailin
b10a158684
fix(kyc): 验证成功后刷新KYC状态
...
在跳转到实名认证页面前调用 ref.invalidate(kycStatusProvider)
确保手机号验证状态能正确更新
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 22:27:59 -08:00
hailin
1c62a8cb29
fix(kyc): 验证成功后点击完成跳转到实名认证页面
...
使用 context.go() 替代 context.pop(),直接跳转到实名认证页面
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 22:25:42 -08:00
hailin
a51fa39a2d
feat(kyc): 首次验证手机号成功后显示选择页面
...
- 添加 verifySuccess 步骤替代弹窗
- 显示"恭喜您!手机号已验证成功"
- 提供两个选择按钮:
- "仅验证手机号,不更换" - 返回上一页
- "继续更换手机号" - 进入输入新手机号步骤
- 已验证过的用户直接进入更换流程
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 22:23:13 -08:00
hailin
941253dd77
fix(frontend): 修复合同签署任务列表响应解析错误
...
后端返回格式为 {"success":true,"data":[]},前端错误地将 response.data 直接作为 List 解析,导致类型转换失败。
修复 getPendingTasks() 和 getUnsignedTasks() 方法,正确解析 responseData['data']。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 22:03:54 -08:00
hailin
8ee65c95e1
fix(planting): 修复KycService构造函数参数
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:13:29 -08:00
hailin
59e9cddf5b
feat(planting): 认种成功后检查实名认证状态
...
当CONTRACT_SIGNING_ENABLED=true时,认种成功后检查用户是否已完成实名认证:
- 如果未完成实名认证,显示提示弹窗引导用户去认证
- 如果已完成或功能未启用,按原有流程返回个人中心
新增:
- KycRequiredDialog 实名认证提示弹窗组件
- ContractSigningConfig 配置类和getConfig()方法
- kycServiceProvider 依赖注入
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:10:55 -08:00
hailin
bc34907a84
fix(auth): 注册验证码页面显示完整手机号
...
验证码页面不再隐藏手机号中间数字,改为完整显示
格式: 138 1234 5678
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:03:30 -08:00
hailin
1d6cbf9335
feat(kyc): 实名认证前检查手机号验证状态
...
- 点击实名认证时检查手机号是否已验证
- 未验证时显示提示弹窗,引导用户先验证手机号
- 实名认证卡片显示"请先验证手机号"提示
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:00:53 -08:00
hailin
a7dc85d8e1
fix(frontend): 添加 geolocator 依赖并移除未使用的 webview_flutter
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 20:45:51 -08:00
hailin
5b8c6bc317
feat(frontend): 添加电子合同签署功能前端实现
...
- 添加 ContractSigningService 合同签署 API 调用服务
- 添加 ContractCheckService App 启动时检查待签署合同
- 添加 ContractSigningPage 完整签署流程页面
- 24小时倒计时
- 滚动阅读 → 确认法律效力 → 手写签名
- 支持超时后补签
- 添加 PendingContractsPage 待签署合同列表
- 添加 SignaturePad 手写签名板组件
- HomeShellPage 启动时检查未签署合同,强制签署
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 20:15:13 -08:00
hailin
1b3d545c0d
fix(admin-web): 优化通知表单标签选择体验
...
- 新建通知时自动刷新可用标签列表
- 添加"刷新标签"按钮方便手动刷新
- 优化空标签提示,说明需勾选"可用于广告定向"
- 改进"指定用户"输入框占位符文本和示例
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 18:33:14 -08:00
hailin
41a47b1b53
feat(admin-web): 添加用户标签分配和查看用户功能
...
- 在标签卡片添加"分配用户"和"查看用户"按钮
- 实现批量分配用户到标签的弹窗
- 实现查看标签下用户列表和移除用户功能
- 添加批量分配API (batch-assign)
- 添加获取标签用户API (tag/:id/users)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 17:36:07 -08:00
hailin
18f24d5f4b
fix(frontend): 修复API响应格式解析问题
...
- 修复userTagService.getTags返回分页响应{items, total}的解析
- 修复audienceSegmentService.getSegments返回分页响应的解析
- 更新组件正确提取items数组
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 17:21:48 -08:00
hailin
e6415f9217
fix(api): 修复前端API端点路径与后端Controller不匹配的问题
...
- 将 /v1/admin/classification-rules 改为 /v1/admin/rules
- 将 /v1/admin/audience-segments 改为 /v1/admin/segments
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:54:41 -08:00
hailin
b5e45c4532
feat(user-profile): 实现用户画像系统和通知定向功能
...
后端 (admin-service):
- 新增用户标签系统:标签分类、标签定义、用户标签分配
- 新增分类规则引擎:支持自动打标规则
- 新增人群包管理:支持复杂条件组合筛选用户
- 增强通知系统:支持按标签、按人群包、指定用户定向发送
- 新增自动标签同步定时任务
- Prisma Schema 扩展支持新数据模型
前端 (admin-web):
- 通知管理页面新增 Tab 切换:通知列表、用户标签、人群包
- 用户标签管理:分类管理、标签 CRUD、颜色/类型配置
- 人群包管理:条件组编辑器、逻辑运算符配置
- 通知编辑器:支持按标签筛选和指定用户定向
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:19:05 -08:00
hailin
934323e4c6
feat(kyc): 优化手机号验证/更换流程
...
- 将入口重命名为"验证/更换手机号"
- 验证旧手机成功后更新 phoneVerified 状态
- 首次验证成功时显示恭喜弹窗,用户可选择完成或继续更换
- 已验证过的用户验证通过后直接进入下一步
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 07:50:54 -08:00
hailin
0a4ec49c8a
fix(kyc): 修复更换手机号页面发送验证码按钮可重复点击的问题
...
- 添加 _isSendingCode 状态检查,防止发送中重复点击
- 发送中显示 loading 指示器
- 倒计时期间和发送中均禁用按钮
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 07:38:26 -08:00
hailin
0f745a17fd
feat(kyc): 实现完整三层KYC认证功能
...
实现三层KYC认证系统,支持后台配置开关:
- 层级1: 实名认证 (二要素: 姓名+身份证号)
- 层级2: 实人认证 (人脸活体检测)
- 层级3: KYC (证件照上传验证)
后端变更:
- 更新 Schema 添加三层认证字段和 KycConfig 表
- 添加 migration 支持增量字段和配置表
- 重写 AliyunKycProvider 支持阿里云实人认证 API
- 重写 KycApplicationService 实现三层认证逻辑
- 更新 KycController 添加用户端和管理端 API
前端变更:
- 更新 KycService 支持三层认证 API
- 重构 KycEntryPage 显示三层认证状态
- 重构 KycIdPage 用于层级1实名认证
- 新增 KycFacePage 用于层级2人脸认证
- 新增 KycIdCardPage 用于层级3证件照上传
- 添加 uploadFile 方法到 ApiClient
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 07:14:11 -08:00
hailin
a549768de4
feat(kyc): 实现实名认证和更换手机号功能
...
主要变更:
- 注册流程: 添加跳过短信验证选项(3分钟后显示)
- KYC功能: 手机号验证 + 身份证实名认证(阿里云二要素)
- 更换手机号: 四步验证流程(旧手机验证→输入新号→新手机验证→确认)
- 独立管控: phoneVerified, emailVerified, kycStatus 三个状态分别管理
后端:
- 新增 KYC 控制器和服务
- 新增更换手机号 API 端点
- Schema 添加 KYC 和验证状态字段
- 集成阿里云身份二要素验证
前端:
- 新增 KYC 入口页、手机验证页、身份证验证页
- 新增更换手机号页面
- Profile 页面添加实名认证入口
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 06:38:39 -08:00
hailin
50bc5a5a20
fix(stickman): 使用顶部对齐实现昵称与数量标签的中心对齐
...
昵称标签和数量标签高度相同,顶部对齐即可实现水平中心对齐
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 04:06:33 -08:00
hailin
d4b802502e
fix: 修复验证码竞态条件和火柴人对齐问题
...
1. 修复验证码发送的竞态条件:
- 调整执行顺序,先存储验证码到 Redis,再发送短信/邮件
- 避免用户收到验证码后立即输入但 Redis 中尚未存储的情况
- 影响:sendSmsCode、sendWithdrawSmsCode、sendResetPasswordSmsCode、sendEmailCode
2. 修复火柴人组件昵称与数量标签对齐问题:
- 使用底部对齐 + Padding 让昵称标签与数量标签在同一水平线
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 03:54:25 -08:00
hailin
ee4cac59c7
fix(profile): 修复嵌套 Row 无界约束导致的白屏问题
...
在 _buildSettlementSection 的"已结算"区域,内层 Row 中使用了 Flexible,
但内层 Row 没有宽度约束,导致 RenderFlex unbounded width constraints 错误。
通过在内层 Row 外添加 Expanded 包裹来提供宽度约束。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 03:41:23 -08:00
hailin
1cd4b352a4
debug(mobile): 添加火柴人组件调试日志
...
- 记录宽度计算的各个参数
- 添加clamp保护防止负值宽度
- 打印排名数据详情
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 03:32:22 -08:00
hailin
ba3e96c606
fix(mobile): 修复SVG头像渲染导致的布局问题
...
- 使用RepaintBoundary隔离SVG渲染
- 添加placeholderBuilder防止加载时闪烁
- 确保SizedBox固定尺寸约束
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 03:26:24 -08:00
hailin
a38727eb7f
Revert "revert(profile): 回滚profile_page.dart到稳定版本"
...
This reverts commit b06f186836 .
2025-12-24 03:16:39 -08:00
hailin
b06f186836
revert(profile): 回滚profile_page.dart到稳定版本
...
修复SVG头像渲染导致的白屏问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 03:11:24 -08:00
hailin
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
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
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
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
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
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
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
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
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
085cb3f40b
fix(mobile-app): 排名详情本月收益单位从 USDT 改为绿积分
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 05:35:22 -08:00
hailin
b4f685e25f
fix(reward-service): 添加 BatchMonthlyEarningsRequest DTO 的 class-validator 装饰器
...
修复 authorization-service 调用 /internal/monthly-earnings/batch 接口时返回 400 错误的问题。
原因是 reward-service 使用了 ValidationPipe,但 DTO 类缺少必要的验证装饰器。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 05:22:34 -08:00
hailin
1d965cffec
chore(mobile-app): 更换火柴人动画为 quickly.lottie
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 05:06:23 -08:00
hailin
b052afa065
feat(mobile-app): 使用 Lottie 动画替换火柴人 CustomPaint 实现
...
- 用 Lottie.asset 加载 stickman_runner.json 替换手动绘制的火柴人
- 使用 ColorFiltered 保持颜色自定义功能(当前用户金色,其他用户棕色)
- 修复火柴人到达100%时无法到达红旗位置的问题
- 代码从约200行精简到约30行,动画效果更流畅
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 04:34:15 -08:00
hailin
0a64024773
fix(mobile-app): 为每个火柴人跑道添加独立终点旗帜
...
- 移除单一的共享终点旗帜
- 为每个跑道生成独立的红旗,与火柴人垂直位置对齐
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 03:29:11 -08:00
hailin
63cf52b9c1
fix(mobile-app): 修复火柴人容器宽度与其他组件不一致
...
- 移除火柴人容器的水平margin,与页面其他内容保持一致
- 重新计算火柴人位置,正确处理容器边距
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 03:27:43 -08:00
hailin
fd9df5d065
fix(mobile-app): 修复火柴人超出屏幕边界问题
...
- 重新计算火柴人水平位置,预留终点区域和火柴人宽度
- 使用 clamp 确保火柴人不会超出右边界
- 当进度达到100%时,火柴人停在终点红旗旁边
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 03:25:33 -08:00
hailin
5fa195e4bc
fix: 修复火柴人排名显示问题
...
1. identity-service: 添加批量获取用户信息内部接口
- 新增 InternalController 提供 POST /internal/users/batch
- repository 添加 findByUserIds 批量查询方法
2. authorization-service: 修复 cumulativeCompleted=0 问题
- assessAndRankRegion 改用 findByAccountSequence 查询团队统计
- referral-service 使用 accountSequence 作为主键
3. mobile-app: 修复火柴人UI显示问题
- 容器边距调整为16px与其他组件一致
- 行高增加到100px避免火柴人重叠
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:48:16 -08:00
hailin
e275724359
feat(mobile-app): 使用 CustomPaint 绘制跑步火柴人动画
...
替换 Lottie 动画为自定义绘制的跑步火柴人:
- 使用 CustomPaint 绘制火柴人形状
- 添加腿部和手臂摆动动画
- 添加速度线效果
- 当前用户显示金色,其他用户显示棕色
- 移除 lottie 依赖
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:13:03 -08:00
hailin
770bcb85a2
fix(mobile-app): 修复火柴人组件宽度和行间隔问题
...
1. 将水平边距从16改为20,与其他组件一致
2. 根据火柴人数量动态计算赛道高度,每个火柴人85px
3. 避免火柴人数量标签覆盖到其他火柴人
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:10:38 -08:00
hailin
2d3891740c
feat(authorization): 火柴人排名改为全系统排名,不按区域过滤
...
- 后端新增 findRankingsByMonthAndRoleType 方法查询全系统排名
- 修改 getStickmanRanking 不再按 regionCode 过滤
- 前端简化加载条件,只要有授权就加载排名
- 添加详细调试日志帮助排查问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 00:20:35 -08:00
hailin
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
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
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
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
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
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
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
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
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
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