Commit Graph

2012 Commits

Author SHA1 Message Date
hailin 14d29b62ef fix(asset): 隐藏总资产卡片的每秒增长显示
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:16:42 -08:00
hailin 1aa655f243 fix(asset): 移除积分值冗余的人民币估值显示
积分值与人民币1:1对应,不需要显示"≈ ¥xxx"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:15:11 -08:00
hailin 8728fdce4c feat(trading): 成交明细显示完整卖出信息(销毁倍数、有效积分股、手续费等)
- 后端Trade表新增originalQuantity字段存储原始卖出数量
- quantity字段改为存储有效积分股(含销毁倍数)
- API返回完整明细:销毁倍数、有效积分股、交易总额、进入积分股池
- 前端成交明细页面显示完整卖出信息,类似确认卖出弹窗样式

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:07:52 -08:00
hailin 7da98c248b feat(trading): 交易记录页面添加成交明细Tab,显示手续费
后端:
- trading-service 添加 GET /trading/trades API 获取成交记录
- 成交记录包含: 交易总额、手续费(10%)、实际收到金额

前端:
- 新增 TradeRecord 实体和 TradesPageModel
- 交易记录页面添加 Tab: "订单记录" 和 "成交明细"
- 成交明细显示: 价格、数量、交易总额、手续费、实际收到

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 03:15:25 -08:00
hailin 63e02666ea fix(asset): 积分股估值计算加入倍数(burnMultiplier)
之前只用了 shareBalance * currentPrice,
正确公式应该是 shareBalance * (1 + burnMultiplier) * currentPrice

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 03:07:03 -08:00
hailin 1c787a22a3 fix(mining): 修复 mining-service 订阅错误的 Kafka topic
问题:mining-service 订阅的是 cdc.contribution.outbox (Debezium CDC topic),
但 contribution-service 使用 Outbox Pattern 直接发送到 contribution.{eventType} topic。

修复:
- mining-service 订阅正确的 topic 列表
- 修复消息解析逻辑支持 Outbox Pattern 消息格式
- contribution-service 添加 GET /admin/unallocated-contributions 端点(调试用)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 03:03:17 -08:00
hailin 0fddd3164a fix(trading): 交易记录金额单位从USDT改为积分值
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 02:18:40 -08:00
hailin b1d8561ca5 fix(asset): 积分股估值显示积分值而非人民币
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 02:17:22 -08:00
hailin edfdb1a899 fix(asset): 冻结积分值为0时状态显示为"无"而非"挂单中"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 02:16:35 -08:00
hailin 94d283696f fix(tss): 修复备份恢复后签名失败的问题
问题原因:
- 备份恢复的钱包在签名时使用了当前设备的 partyId,而不是原始 keygen 时的 partyId
- TSS 协议要求签名时使用的 partyId 必须与 keygen 时完全一致

修复内容:
- Android: joinSignSessionViaGrpc() 使用 shareEntity.partyId 而非当前设备 partyId
- Electron: cosign:joinSession 和 cosign:createSession 使用 share.party_id
- Electron: handleCoSignStart() 使用 share.party_id 进行签名
- 所有 gRPC 通信和消息订阅都使用原始 partyId

关键修改点:
- TssRepository.kt: joinSignSessionViaGrpc() 第 1136 行使用 signingPartyId
- main.ts: cosign:joinSession 第 1826 行使用 signingPartyId
- main.ts: cosign:createSession 第 1624-1633 行使用 share.party_id
- main.ts: handleCoSignStart() 第 836 行使用 share.party_id

其他:
- 移除 Android APK 中的 x86_64 ABI (仅用于模拟器)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 00:39:05 -08:00
hailin c5db77d23a feat(tss): 添加积分股(eUSDT)和积分值(fUSDT)代币支持
新增功能:
- 添加 ENERGY_POINTS (积分股/eUSDT) 和 FUTURE_POINTS (积分值/fUSDT) 代币类型
- 实现所有 ERC-20 代币的通用余额查询功能
- 支持四种代币的转账功能 (KAVA, dUSDT, eUSDT, fUSDT)
- 更新 UI 显示所有代币余额和代币选择器

代币合约地址 (Kava EVM):
- dUSDT (绿积分): 0xA9F3A35dBa8699c8E681D8db03F0c1A8CEB9D7c3
- eUSDT (积分股): 0x7C3275D808eFbAE90C06C7E3A9AfDdcAa8563931
- fUSDT (积分值): 0x14dc4f7d3E4197438d058C3D156dd9826A161134

技术改进:
- 添加 TokenConfig 工具类统一管理代币配置
- 添加 ERC20Selectors 常量类定义合约方法选择器
- 添加 transaction_records 表用于存储转账历史 (数据库版本升级到 v4)
- 重构余额查询和转账逻辑支持多代币类型
- 所有 ERC-20 代币使用 6 位小数精度

受影响文件:
- Android: Models.kt, TssRepository.kt, TransactionUtils.kt, Database.kt,
          AppModule.kt, TransferScreen.kt, WalletsScreen.kt
- Electron: transaction.ts, Home.tsx

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:36:58 -08:00
hailin d332ef99a7 feat(auth): 隐藏验证码登录和注册功能
- 移除登录方式切换(验证码登录选项卡)
- 隐藏注册入口
- 简化登录页面,仅保留密码登录
- 清理未使用的变量和方法

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:10:24 -08:00
hailin d31bfc4221 feat(c2c): 修改C2C交易为积分值并添加绿积分支付方式
- C2C交易的商品从积分股改为积分值
- 添加绿积分作为默认且不可取消的支付方式
- 添加1.0系统ID输入框(绿积分支付必填)
- 支持多种支付方式同时选择
- 更新交易提示说明

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:07:35 -08:00
hailin 9333cd81c3 fix(kline): auto-load more history when data doesn't fill screen
- Always assume hasMoreHistory=true on initial load
- Auto-trigger loadMoreHistory when klines don't fill drawable area
- This ensures sparse data periods load all available history

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 22:53:48 -08:00
hailin 84d920f98f fix(kline): stop loading when no unique new history data
When deduplicated new klines are empty, mark hasMoreHistory as false
to prevent infinite loading attempts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 22:31:38 -08:00
hailin 13f1b687ee feat(kline): add dynamic history loading on pan
Add support for loading more K-line history data when user pans to the
left edge. Backend API now accepts 'before' parameter for pagination.
Frontend uses KlinesNotifier to manage accumulated data with proper
deduplication.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 22:21:39 -08:00
hailin 99c1ff1fb7 fix(kline): convert time to local timezone for display
- Added toLocal() conversion in _formatTimeLabel (painter)
- Added toLocal() conversion in _formatDateTime (widget)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:55:56 -08:00
hailin 900ba4a555 feat(kline): add dynamic X-axis time labels
- Added _drawTimeAxis method to render time labels
- Labels dynamically adjust spacing based on candleWidth
- Shows HH:MM format, or M/D for midnight
- Labels follow pan/zoom movements
- Increased bottomPadding to 20px for label space

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:51:23 -08:00
hailin 453cab71e4 chore: remove debug logging from kline pan
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:49:34 -08:00
hailin f55fb13f26 feat(kline): implement true pan effect with scrollOffset
- Added scrollOffset parameter to KlinePainter and KlineVolumePainter
- Painters now draw all klines and apply scrollOffset for positioning
- Added canvas clipping to prevent drawing outside chart bounds
- Removed _getVisibleData and related helper methods (no longer needed)
- scrollOffset directly controls the visual position of all klines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:43:45 -08:00
hailin 48ba72ce89 fix(kline): simplify pan logic - scrollX now always controls view position
- Removed _userHasPanned flag and special handling
- _scrollX is initialized in _scrollToCenter() at startup
- Pan gesture directly modifies _scrollX
- _getVisibleData() always uses _scrollX to calculate visible range

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:35:31 -08:00
hailin 7ae58e98e6 debug: 添加平移调试信息 2026-01-19 21:30:41 -08:00
hailin 684367941d feat(kline): 支持左右平移查看历史K线
- 初始状态:最新K线在屏幕中心(保持原有逻辑不变)
- 用户平移后可查看全部历史数据
- 切换周期时重置平移状态

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:25:59 -08:00
hailin f149c2a06a fix(kline): 数据量大时只取最近数据,让最新K线在屏幕中心
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 20:39:33 -08:00
hailin a15ab7600f fix(kline): 修正K线显示逻辑,从左开始排列,最新K线居中
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 20:26:20 -08:00
hailin f51aa44cd9 feat(frontend): K线图组件支持深色模式
- kline_chart_widget.dart: 使用 AppColors 动态颜色,传递 isDark 参数
- kline_painter.dart: 添加 isDark 参数,网格/文字/十字线颜色随主题变化
- kline_volume_painter.dart: 添加 isDark 参数,成交量图颜色随主题变化

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:42:52 -08:00
hailin 2745995a1a feat(frontend): 贡献值页面完整支持深色模式
- 所有卡片背景使用 AppColors.cardOf(context) 动态颜色
- 所有文字颜色改用动态方法 textPrimaryOf/textSecondaryOf/textMutedOf
- 图标背景透明度根据深色模式调整 (isDark ? 0.2 : 0.1)
- 分隔线和边框使用 AppColors.borderOf(context)
- 移除未使用的静态颜色常量

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:32:06 -08:00
hailin 61203d1baf feat(frontend): extend dark mode support to more pages
- Update asset_page.dart with full dark mode support
- Update c2c_market_page.dart with full dark mode support
- Update login_page.dart with full dark mode support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:21:40 -08:00
hailin b0d1771b66 fix(contribution): 恢复静态颜色常量避免编译错误
保留原有浅色模式配色(_grayText, _darkText, _bgGray, _lightGray),
页面背景已支持深色模式切换

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:10:13 -08:00
hailin bbe1754309 feat(frontend): 添加全局深色模式支持
核心改动:
1. app_colors.dart - 添加浅色/深色两套色彩常量和动态颜色获取方法
   - backgroundOf()、surfaceOf()、cardOf() 等方法根据主题返回对应颜色
   - 浅色:#F3F4F6背景、#FFFFFF卡片、#1F2937文字
   - 深色:#111827背景、#1F2937卡片、#E5E7EB文字

2. main.dart - 更新 ThemeData 配置
   - 添加 scaffoldBackgroundColor、appBarTheme、cardTheme 等深色主题配置

3. main_shell.dart - 导航栏支持深色模式
   - 使用 AppColors 动态方法替换硬编码颜色

4. trading_page.dart - 兑换页面支持深色模式
   - 所有卡片、文字颜色使用动态颜色方法
   - 划转弹窗也支持深色模式

5. contribution_page.dart - 贡献值页面开始支持(部分)

后续需要继续更新其他页面以完整支持深色模式切换

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:08:03 -08:00
hailin a47b935bce fix(tss-android): 修复备份恢复后无法签名的问题
问题原因:
备份数据中缺少 partyId 字段。恢复到新手机后,签名时使用的是新设备
生成的 partyId,而不是 keygen 时编码到 LocalPartySaveData 中的
原始 partyId,导致 TSS 签名协议无法正确匹配密钥数据而失败。

修复内容:
1. Models.kt:
   - ShareRecord 添加 partyId 字段
   - ShareBackup 添加 partyId 字段,备份格式版本升级到 v2
   - 更新 fromShareRecord() 和 toShareRecord() 方法

2. Database.kt:
   - ShareRecordEntity 添加 party_id 列
   - 数据库版本升级到 3

3. AppModule.kt:
   - 添加 MIGRATION_2_3 数据库迁移脚本

4. TssRepository.kt:
   - 添加 currentSigningPartyId 成员变量跟踪当前签名使用的 partyId
   - keygen 保存时包含 partyId (3处)
   - 备份导入时保存原始 partyId
   - 签名流程使用 shareEntity.partyId 替代设备 partyId (3处)
   - gRPC 调用 (markPartyReady, reportCompletion) 使用原始 partyId

关键点: 签名时必须使用 keygen 时的原始 partyId,因为该 ID 被编码
到了 TSS 密钥数据结构中。现在备份会保存此关键字段,恢复后签名
将使用正确的 partyId。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 18:56:27 -08:00
hailin b00de68b01 refactor(profile): 重新实现深色模式,保留原有浅色模式配色
问题:之前的深色模式实现使用了 colorScheme,导致浅色模式的原有配色也被改变

修复方案:
- 定义浅色/深色两套色彩常量,浅色模式使用原有设计色值
- 添加基于 Theme.brightness 的颜色辅助函数动态返回对应颜色
- 浅色模式:保持原有 #1F2937/#6B7280/#9CA3AF/#F3F4F6/白色配色
- 深色模式:使用 #E5E7EB/#9CA3AF/#6B7280/#111827/#1F2937 配色
- 所有 widget 方法更新为使用动态颜色函数

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 18:44:31 -08:00
hailin d8df50a68f fix(c2c): 修复分页参数类型转换问题导致的500错误
- 为 QueryC2cOrdersDto 和 QueryMyC2cOrdersDto 的 page/pageSize 字段添加 @Type(() => Number) 装饰器
- Query参数从URL获取时默认为字符串,需要显式转换为数字类型
- 添加 @IsInt() 验证确保参数为整数
- 修复 Prisma findMany take 参数期望 Int 但收到 String 的错误

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 18:32:38 -08:00
hailin 63c192e90d feat(pending-contributions): 添加待解锁算力分类账功能
功能说明:
- 待解锁算力是因用户未满足解锁条件(如直推数不足)而暂存的层级/奖励算力
- 这部分算力参与挖矿,但收益归入总部账户(HEADQUARTERS)

后端变更:
- mining-service: 添加4个待解锁算力相关API
  - GET /admin/pending-contributions - 获取待解锁算力列表(支持分页和类型筛选)
  - GET /admin/pending-contributions/summary - 获取汇总统计(按类型统计、总挖矿收益)
  - GET /admin/pending-contributions/:id/records - 获取单条记录的挖矿明细
  - GET /admin/pending-contributions/mining-records - 获取所有挖矿记录汇总视图
- mining-admin-service: 添加代理层
  - 新建 PendingContributionsService 调用 mining-service API
  - 新建 PendingContributionsController 暴露 API 给前端

前端变更:
- 新建 pending-contributions feature 模块(API、hooks、类型定义)
- 新建 /pending-contributions 页面
  - 汇总统计卡片(总量、已归入总部积分股、挖矿记录数)
  - 按类型统计展示
  - 算力列表Tab(来源用户、归属用户、类型、算力、原因、创建时间)
  - 挖矿记录Tab(时间、类型、算力、占比、每秒分配量、挖得数量、归入)
- 在仪表盘的层级算力和团队奖励卡片添加"查看分类账"链接

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 18:13:22 -08:00
hailin d815792deb feat(kline): 默认隐藏MA均线指标
- 将主图指标默认值从 0(MA) 改为 -1(无)
- 首次加载K线图时不再显示 MA5/MA10/MA20/MA60 均线
- 保留指标切换功能,用户可手动开启 MA/EMA/BOLL 指标
- 使K线图界面更简洁清爽

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 18:05:30 -08:00
hailin a97e0b51b8 feat(kline): 首次加载时让最新K线居中显示
- 新增 _scrollToCenter() 方法,计算让最新K线居中的滚动位置
- 初始化时调用 _scrollToCenter() 替代 _scrollToEnd()
- 如果K线总宽度小于屏幕宽度,不滚动,从左开始显示
- 保留 _scrollToEnd() 方法供刷新按钮等场景使用

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 18:03:23 -08:00
hailin 8326f8c35c fix(cdc): 添加 Debezium heartbeat 机制防止 WAL 堆积
问题背景:
- PostgreSQL pg_wal 目录从 80MB 膨胀到 60.4GB,导致磁盘使用率达到 96%
- 根因: wallet/planting/referral 三个数据库的业务表长期无写入
- 虽然 Debezium 有 heartbeat 配置,但未配置 heartbeat.action.query
- 导致 replication slot 的 restart_lsn 无法推进,WAL 文件无法被清理

解决方案:
1. 在 wallet/planting/referral 三个服务中添加 debezium_heartbeat 表
2. 配置 Debezium connector 的 heartbeat.action.query
3. 每 60 秒自动执行 UPDATE 语句推进 restart_lsn

修改内容:
- wallet-service/prisma/schema.prisma: 添加 DebeziumHeartbeat model
- planting-service/prisma/schema.prisma: 添加 DebeziumHeartbeat model
- referral-service/prisma/schema.prisma: 添加 DebeziumHeartbeat model
- scripts/debezium/wallet-connector.json: 添加 heartbeat.action.query 配置
- scripts/debezium/planting-connector.json: 添加 heartbeat.action.query 配置
- scripts/debezium/referral-connector.json: 添加 heartbeat.action.query 配置
- 新增三个服务的 Prisma migration 文件

效果:
- pg_wal 从 60.4GB 降至 80.2MB
- 磁盘使用率从 96% 降至 40%
- replication slot lag 从 51-60GB 降至 KB 级别

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 17:42:41 -08:00
hailin 964b06b370 fix(trading): 修复"我的挂单"全部按钮点击无响应问题
问题原因:
- trading_page.dart 中"我的挂单"卡片的"全部 >"按钮 onTap 回调为空(TODO 注释)
- 用户点击时没有任何响应

修复内容:
- 添加 context.push(Routes.tradingRecords) 导航到交易记录页面
- 用户现在可以点击"全部 >"查看完整的交易订单列表

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 07:23:38 -08:00
hailin af339b19b9 feat(c2c): 完善C2C场外交易功能 - 收款信息与订单超时处理
## 后端更新

### Prisma Schema (0008_add_c2c_orders migration)
- 新增 C2cPaymentMethod 枚举 (ALIPAY/WECHAT/BANK)
- C2cOrder 模型新增字段:
  - 收款信息:paymentMethod, paymentAccount, paymentQrCode, paymentRealName
  - 超时配置:paymentTimeoutMinutes (默认15分钟), confirmTimeoutMinutes (默认60分钟)
  - 截止时间:paymentDeadline, confirmDeadline
- 新增索引优化超时查询

### API层
- c2c.dto.ts: 新增收款信息和超时配置字段
- c2c.controller.ts: 新增C2C控制器,支持完整的订单生命周期管理

### 业务层
- c2c.service.ts:
  - createOrder: 卖单必须提供收款信息验证
  - takeOrder: 接单时自动设置付款截止时间
  - confirmPayment: 确认付款时设置确认收款截止时间
  - processExpiredOrders/expireOrder: 处理超时订单(释放冻结资产)
- c2c-expiry.scheduler.ts: 每分钟执行超时订单检查(带分布式锁)

### 数据层
- c2c-order.repository.ts: 新增 findExpiredOrders 方法
- trading-account.repository.ts: 新增 unfreezeShares/unfreezeCash 方法

## 前端更新

### 数据模型
- c2c_order_model.dart:
  - 新增 C2cPaymentMethod 枚举
  - 新增收款信息和超时相关字段
  - 新增辅助方法:paymentMethodText, hasPaymentInfo, paymentRemainingSeconds, confirmRemainingSeconds

### API层
- trading_remote_datasource.dart: createC2cOrder/takeC2cOrder 支持收款信息参数

### 状态管理
- c2c_providers.dart: createOrder/takeOrder 方法支持收款信息参数

### UI层
- c2c_publish_page.dart:
  - 新增收款方式选择器 (支付宝/微信/银行卡)
  - 新增收款账号和收款人姓名输入框
  - 卖单发布时验证收款信息必填
  - 确认对话框显示收款信息摘要

- c2c_order_detail_page.dart:
  - 新增收款信息卡片展示(买家视角/卖家视角区分)
  - 新增倒计时进度条显示(付款/确认收款截止时间)
  - 剩余时间<5分钟时高亮警告
  - 支持复制收款账号

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 07:17:22 -08:00
hailin 928d6c8df2 refactor(frontend): 优化K线图显示与交互体验
主要改动:
1. 隐藏技术指标 - 暂时隐藏MA/EMA/BOLL主图指标和MACD/KDJ/RSI副图指标
   - 保留全部代码,便于未来恢复(取消注释即可)
   - 调整高度分配:主图75%、成交量25%

2. 修复单指滑动(pan)问题
   - 移除错误的scale阈值检测 `(details.scale - 1.0).abs() > 0.01`
   - 改用 `pointerCount > 1` 区分单指滑动和双指缩放
   - 单指滑动现可正常左右拖动K线图

3. 优化首次加载显示
   - 新增 `_initialized` 标志控制初始化时机
   - 新增 `_initializeCandleWidth()` 方法动态计算K线宽度
   - K线首次加载时自动填满可视区域宽度
   - 数据量变化时自动重新初始化

技术细节:
- 使用 LayoutBuilder 获取实际图表宽度后再初始化
- 通过 postFrameCallback 确保在布局完成后执行初始化
- K线宽度限制在 3.0-30.0 像素范围内

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 06:31:24 -08:00
hailin 7fb77bcc7e refactor(frontend): 暂时隐藏"我的"页面中的"团队与收益"栏目
- 注释掉 _buildTeamEarningsSection 调用
- 保留代码方便后续恢复

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 06:19:54 -08:00
hailin f7cfb4ef8c refactor(frontend): 优化参与记录和贡献值页面的文案显示
参与记录页面(planting_records_page.dart):
- 将状态 "已开始挖矿" 改为 "已开始"
- 将 "xx棵" 改为 "xx个"
- 将 "单棵算力" 改为 "单个算力"

贡献值页面(contribution_page.dart):
- 将贡献值明细中的 "本人种植" 改为 "本人"
- 移除 "已解锁上级" 和 "已解锁下级" 后的 "级" 字后缀

实体类(planting_record.dart):
- 同步更新状态显示文案 "已开始挖矿" → "已开始"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 06:17:19 -08:00
hailin d957e5a841 feat(admin): 系统账户添加已挖积分股显示和分类账功能
## 后端改动

### mining-service
- 新增 GET /admin/system-accounts/:accountType/records - 获取系统账户挖矿记录(分钟级)
- 新增 GET /admin/system-accounts/:accountType/transactions - 获取系统账户交易记录

### mining-admin-service
- 添加 @nestjs/axios 依赖用于 HTTP 调用
- 修改 SystemAccountsService,通过 HTTP 调用 mining-service 获取挖矿数据(totalMined, availableBalance)
- 新增挖矿记录和交易记录的代理 API

## 前端改动

### 类型定义
- SystemAccount 新增 totalMined, availableBalance, miningContribution, miningLastSyncedAt 字段

### API 层
- 新增 getMiningRecords 和 getTransactions API 方法
- 新增 SystemMiningRecord, SystemTransaction 等类型定义

### Hooks
- 新增 useSystemAccountMiningRecords 和 useSystemAccountTransactions

### 组件
- AccountsTable 新增"已挖积分股"列,显示每个系统账户累计挖到的积分股
- AccountsTable 新增"分类账"按钮,可跳转到账户详情页

### 新页面
- 新建 /system-accounts/[accountType] 详情页面
  - 账户概览卡片:当前算力、已挖积分股、可用余额、挖矿记录数
  - 挖矿记录 Tab:分钟级挖矿明细(时间、算力占比、全网算力、每秒分配量、挖得数量)
  - 交易记录 Tab:所有交易流水(时间、类型、金额、交易前后余额、备注)
  - 支持分页浏览

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 05:53:03 -08:00
hailin 07498271d3 feat(blockchain): 部署 eUSDT 和 fUSDT 代币合约
新增两个 ERC-20 代币合约,部署在 KAVA 主网:

## eUSDT (Energy USDT)
- 合约地址: 0x7C3275D808eFbAE90C06C7E3A9AfDdcAa8563931
- 总供应量: 100.02亿 (10,002,000,000)
- 交易哈希: 0x5bebaa4a35378438ba5c891972024a1766935d2e01397a33502aa99e956a6b19

## fUSDT (Future USDT)
- 合约地址: 0x14dc4f7d3E4197438d058C3D156dd9826A161134
- 总供应量: 1万亿 (1,000,000,000,000)
- 交易哈希: 0x071f535971bc3a134dd26c182b6f05c53f0c3783e91fe6ef471d6c914e4cdb06

## 共同特性
- 固定供应量,不可增发
- 6位小数精度(与USDT一致)
- 标准ERC-20接口
- 部署者: 0x4F7E78d6B7C5FC502Ec7039848690f08c8970F1E

## 文件结构
- eUSDT/: 合约源码、编译脚本、部署脚本、README
- fUSDT/: 合约源码、编译脚本、部署脚本、README
- contracts/README.md: 补充dUSDT说明文档

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 05:30:25 -08:00
hailin 8619b0bf26 feat(frontend): add dark mode support and fix mining records overflow
- Add darkTheme configuration in main.dart with themeModeProvider
- Refactor profile_page.dart to use Theme.of(context).colorScheme for dynamic theming
- Fix mining_records_page.dart layout overflow by using Expanded/Flexible widgets

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 05:06:28 -08:00
hailin 75e74b07c3 refactor(frontend): hide multiplier-related UI elements in asset page
- Comment out '积分股(含倍数)' display
- Comment out '含倍数资产' tag

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:56:07 -08:00
hailin e098cd44f6 refactor(frontend): replace '手机号' with '账号' in send shares page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:54:24 -08:00
hailin 71a9961f94 refactor(frontend): update UI text labels
- Change contribution page subtitle to '股行用户引荐'
- Change receive shares page text from '手机号' to '账号'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:52:38 -08:00
hailin 5ea8d8fea5 docs(frontend): update about page description
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:47:05 -08:00
hailin 1c9bb1aa60 refactor(frontend): rename '团队上级/下级' to '团队上/下贡献值'
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:45:15 -08:00