hailin
8e63547a3e
fix(transfer): 修复积分股划转到分配账户失败问题
...
后端:
- transfer.service.ts: Error → BadRequestException,业务错误返回HTTP 400而非500
- transfer.controller.ts: Error → UnauthorizedException,正确返回HTTP 401
- 错误信息改为中文:余额不足、账户不存在等提示更明确
前端:
- asset_display.dart: 新增 tradingAvailableShares 计算属性(总可用 - 挖矿可用)
- trading_page.dart: 划转弹窗显示可用余额(扣除冻结)而非总余额
- trading_page.dart: 划转失败时显示后端具体错误信息而非通用提示
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 06:24:35 -08:00
hailin
0ffa875a85
fix(mining-app): 移除 debug applicationIdSuffix 修复升级后双图标
...
debug buildType 设置了 applicationIdSuffix = ".debug",导致
debug 包名为 com.rwadurian.mining_app.debug,release 包名为
com.rwadurian.mining_app。Android 将它们视为两个不同应用,
升级安装 release 包时不覆盖 debug 包,出现两个相同图标。
移除 applicationIdSuffix 后 debug/release 使用同一包名,
升级安装时会正确覆盖旧版本。versionNameSuffix 保留用于区分版本号。
注:用户手机上需手动卸载旧的 debug 包才能清除已存在的重复图标。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 05:57:34 -08:00
hailin
03cc5bc324
fix(mining-app): QR码解析加固 + debugPrint排查
...
- 清除不可见字符(BOM/零宽空格)
- 三级宽松解析:正则→Uri.parse→兜底phone=提取
- 添加 [QR_SCAN] 调试日志定位实际扫码值
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 05:54:34 -08:00
hailin
8c31dee000
fix(c2c): 修复买方待付款页面灰色无法操作问题
...
根因: c2c_order_model.dart 的 _parsePaymentMethod 不识别 GREEN_POINTS,
导致 paymentMethod=null → hasPaymentInfo=false → 收款信息卡片隐藏 → 页面不可操作
前端修复:
- C2cPaymentMethod 枚举增加 greenPoints,解析器支持 GREEN_POINTS
- 支持逗号分隔的多支付方式字符串(取第一个作为主要方式)
- 订单详情页增加绿积分图标和卖方 Kava 地址显示(买方可复制)
后端修复:
- takeOrder() 接买单时自动获取卖方 Kava 地址写入 sellerKavaAddress
- 买方在订单详情页可看到卖方 Kava 地址用于转绿积分
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 05:41:14 -08:00
hailin
9e83127113
fix(mining-app): C2C"我的"列表待接单订单增加取消按钮
...
在我的订单卡片上直接显示取消按钮(PENDING状态),
弹出确认对话框后调用 cancelOrder API
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:46:50 -08:00
hailin
7c416adecd
feat(mining-app): P2P转出记录显示手续费及合计扣除
...
- P2pTransferModel 新增 fee 字段解析
- 转出卡片聚合显示:转账金额 + 手续费 + 合计扣除
- 转入卡片保持只显示转账金额
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:45:37 -08:00
hailin
7d548dac4e
fix(mining-app): C2C接单验证收款信息 + 数字显示优化
...
- 接BUY单时验证收款账号和姓名必填,仅绿积分时自动使用账户ID
- 所有C2C价格/数量/金额显示改用formatCompact,去掉多余小数位
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:31:08 -08:00
hailin
b50091eb1e
fix(mining-app): C2C 发布页"积分值金额"改为"绿积分数量"
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:09:17 -08:00
hailin
a0750fbd42
fix(mining-app): C2C 发布页单价单位改为"绿积分/积分值"
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:07:31 -08:00
hailin
d91550f704
fix(mining-app): FileProvider 使用 root-path 覆盖 Flutter app_flutter 目录
...
files-path 映射到 getFilesDir() 即 /data/data/<pkg>/files/,
但 Flutter getApplicationDocumentsDirectory() 返回 /data/data/<pkg>/app_flutter/,
两者是同级目录而非父子关系,files-path 无法覆盖。
使用 root-path 映射设备根路径 /,确保所有内部路径都能被 FileProvider 解析。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:58:23 -08:00
hailin
45d038bd4b
fix(mining-app): FileProvider 添加 app_flutter 路径,修复 APK 安装 IllegalArgumentException
...
下载的 APK 保存在 getApplicationDocumentsDirectory() 即 /data/data/<pkg>/app_flutter/updates/,
但 file_paths.xml 只配置了 files-path(对应 /data/data/<pkg>/files/),
导致 FileProvider.getUriForFile() 找不到匹配的根路径。
添加 <files-path name="app_flutter" path="app_flutter/" /> 与 mobile-app 保持一致。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:44:00 -08:00
hailin
a27ed0fa16
fix(mining-app): APK 安装后调用 finishAffinity() 退出旧应用,与 mobile-app 保持一致
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:30:42 -08:00
hailin
94d4524ee3
fix(c2c): 积分股→积分值,C2C交易对象修正为积分值(cash)
...
C2C交易的产品是积分值,支付方式是绿积分(外部1.0系统),与积分股无关。
前端:
- c2c_publish_page: 余额卡、数量输入、提示文案、确认弹窗全部改为积分值
- c2c_market_page: 余额概览(availableShares→availableCash)、订单数量标签、接单弹窗
- c2c_order_detail_page: 订单详情、划转提示、确认收款弹窗
后端 c2c.service.ts:
- createOrder SELL: freezeShares→freezeCash
- takeOrder BUY(taker=卖方): freezeShares→freezeCash
- takeOrder SELL(taker=买方): 移除冻结(买方通过外部支付绿积分)
- cancelOrder SELL: unfreezeShares→unfreezeCash
- expireOrder: unfreezeShares→unfreezeCash,SELL不再解冻taker
- executeTransfer: 统一BUY/SELL为单向积分值划转,assetType改为CASH
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:41:23 -08:00
hailin
cfa0e2ca40
fix(mining-app): 更新弹窗点击"立即更新"无反应 — 进度流订阅竞态修复
...
问题根因:
SelfHostedUpdater._listenToProgress() 在 initState 和 _startDownload 中
订阅 UpdateService.downloadProgressStream,但该 getter 返回
_downloadManager?.progressStream —— _downloadManager 在 downloadUpdate()
调用前为 null,?.listen 无操作。downloadUpdate() 创建新 _downloadManager
后,其 progressStream 无人监听,进度事件全部丢失,UI 无任何反馈。
修复:
1. UpdateService 新增持久化广播流 _downloadProgressController,
downloadUpdate() 创建新 DownloadManager 后将其进度转发到此流
2. downloadProgressStream getter 改为返回持久化流(非 nullable)
3. SelfHostedUpdater 在 initState 中一次性订阅持久化流,
dispose 时取消订阅,_startDownload 不再重复订阅
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:24:47 -08:00
hailin
bde7f0c53b
fix(mining-app): 自动更新检查未触发 — 修复双重节流 + 添加调试日志
...
问题原因:
1. checkForUpdate() 未传 force:true,被 UpdateService 内部的60分钟
SharedPreferences 间隔二次节流,导致实际请求被跳过
2. 缺少日志输出,无法诊断检查流程是否执行
修复:
- checkForUpdate(force: true) 跳过内部60分钟限制,
因为 MainShell 已有自己的90-300秒随机冷却节流
- 在 initState / dispose / didChangeAppLifecycleState /
_checkForUpdateIfNeeded 各关键节点添加 debugPrint 日志,
方便 flutter run 控制台追踪完整检查流程
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:20:56 -08:00
hailin
53a2e64cad
feat(mining-app): 启动和切回前台自动检测升级
...
MainShell 从 StatelessWidget 转为 StatefulWidget + WidgetsBindingObserver,
参考 mobile-app HomeShellPage 模式,实现:
- initState 首帧后自动检查更新
- didChangeAppLifecycleState(resumed) 从后台恢复时自动检查
- 90-300秒随机冷却间隔防止频繁请求(static 变量跨 rebuild 保持)
- 延迟3秒启动检查,避免干扰用户操作
- 有更新时弹出 SelfHostedUpdater 对话框(支持强制更新)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:07:40 -08:00
hailin
187b82e9ac
feat(c2c): 修复6项C2C交易问题 (#11-#16)
...
- #11 : 价格固定1:1,最小交易数量为1
- #12 : BUY买单不再冻结买方积分值(绿积分通过外部1.0系统支付)
- #13 : 支持部分成交,taker可指定数量,剩余自动拆分为新PENDING订单
- #14 : 发布页双向输入,积分股数量与积分值金额1:1联动
- #15 : 接BUY单时弹出收款信息输入(收款方式、账号、姓名)
- #16 : BUY单创建时验证积分值余额但不冻结
后端: cancelOrder/expireOrder/executeTransfer 均按BUY/SELL分别处理
前端: 发布页价格只读、市场页接单对话框增加数量和收款输入
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:36:57 -08:00
hailin
c28ccb6206
fix(mining-app): 总资产估值仅显示积分值,未包含积分股估值
...
问题:_calculateTotalAssetValue() 依赖 WebSocket 推送的 _currentPrice
和定时器初始化的 _currentShareBalance,在 WebSocket 未连接或定时器未
启动时这些值均为 0,导致 shareValue=0,总资产仅显示现金余额。
修复:当 WebSocket/_timer 未初始化时,回退到 API 返回的
asset.currentPrice、asset.burnMultiplier 和 asset.shareBalance,
与 _buildAssetList 中积分股估值的计算逻辑保持一致。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:03:41 -08:00
hailin
9adef67bb8
feat(admin-web): P2P划转记录管理页面 + 手续费汇总
...
## 后端 — mining-admin-service
- users.controller: 新增 GET /users/p2p-transfers 端点(搜索+分页)
- 放在 :accountSequence 路由之前避免被 catch-all 拦截
- users.service: 新增 getP2pTransfers() 代理方法
- 调用 trading-service 的 /api/v2/p2p/internal/all-transfers
- 返回划转记录列表 + 汇总统计 + 分页信息
## 前端 — mining-admin-web
- 新增 /p2p-transfers 页面:
- 三个汇总卡片:累计手续费收入、累计划转金额、成功划转笔数
- 搜索框支持账号、手机号、转账单号搜索
- 记录表格:转账单号、发送方、接收方、转账金额、手续费、备注、时间
- 分页控件
- sidebar: 新增"P2P划转"导航项(位于"交易管理"下方)
- users.api: 新增 getP2pTransfers API + P2pTransferRecord 类型
- use-users: 新增 useP2pTransfers hook
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:41:55 -08:00
hailin
9f94344e8b
feat: 算力记录排序 + P2P转账管理后台查询端点
...
## 算力记录排序(全栈)
- mining-admin-service controller: 新增 sortBy/sortOrder 查询参数
- users.service: 动态构建 orderBy(支持 sourceType, levelDepth, amount, createdAt)
- levelDepth 排序特殊处理:先按 sourceType 分组,再按 levelDepth/bonusTier 排序,null 值排末尾
- admin-web contribution-records-list: 可点击排序表头(来源、获得算力、层级/等级、生效日期)
- 三态切换:升序 → 降序 → 取消排序
- 排序图标指示当前状态
## P2P转账管理后台查询端点(后端准备)
- trading-service P2pTransferService: 新增 getAllTransfers() 方法
- 列出全部已完成 P2P 转账记录(分页 + 搜索)
- 返回汇总统计:总手续费、总转账金额、总笔数
- trading-service controller: 新增 GET /p2p/internal/all-transfers(@Public 内部端点)
- P2pTransferHistoryItem 接口扩展 fromPhone/fromNickname/toNickname 字段
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:37:22 -08:00
hailin
ca4e5393be
feat(p2p-transfer): 实现P2P划转手续费功能(全栈)
...
## 功能概述
- P2P转账(积分值)支持手续费收取,手续费存入系统成本费账户 S0000000002
- 发送方实际扣除 = 转账金额 + 手续费,接收方全额收到转账金额
- 手续费金额和最小划转金额可在管理后台动态配置(默认: 手续费5, 最小划转6)
## 后端 — mining-admin-service
- GET /configs/p2p-transfer-fee: 管理端获取手续费配置(需鉴权)
- POST /configs/p2p-transfer-fee: 管理端设置手续费配置,校验最小划转 > 手续费
- GET /configs/internal/p2p-transfer-fee: 内部调用端点(@Public 无鉴权)
## 后端 — trading-service
- Prisma schema: P2pTransfer model 新增 fee Decimal(30,8) 字段
- docker-compose: 新增 MINING_ADMIN_SERVICE_URL 环境变量
- p2p-transfer.service: 动态获取手续费配置,余额校验含手续费,
事务内分别记录转账流水和手续费流水(P2P_TRANSFER_FEE),
手续费存入系统成本费账户 S0000000002
- p2p-transfer.controller: 新增 GET /p2p/transfer-fee-config 代理端点
- 转账结果和历史记录新增 fee 字段返回
## 前端 — mining-admin-web
- configs.api.ts: 新增 getP2pTransferFee / setP2pTransferFee API
- use-configs.ts: 新增 useP2pTransferFee / useSetP2pTransferFee hooks
- configs/page.tsx: 新增"P2P划转手续费设置"卡片(手续费 + 最小划转金额)
## 前端 — mining-app (Flutter)
- api_endpoints.dart: 新增 p2pTransferFeeConfig 端点常量
- p2p_transfer_fee_config_model.dart: 新增手续费配置 Model
- trading_remote_datasource.dart: 新增 getP2pTransferFeeConfig 方法
- transfer_providers.dart: 新增 p2pTransferFeeConfigProvider
- send_shares_page.dart: 发送页面显示手续费信息、最小划转金额提示、
实际扣除金额计算、"全部"按钮扣除手续费、确认弹窗展示手续费明细
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 06:44:19 -08:00
hailin
830d99a504
feat(mining-app): 分离发送/接收记录 + 隐藏买入待开启
...
- 发送页右上角"转出记录"只显示转出明细
- 接收页右上角新增"接收记录"只显示转入明细
- P2pTransferRecordsPage 支持 filterDirection 参数过滤方向
- 兑换页隐藏"买入待开启" Tab(_showBuyTab=false,保留代码备启用)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 22:10:47 -08:00
hailin
99dbce2053
feat(mining-app): 添加自动版本号增长机制
...
mining-app 的 versionCode 写死为 1,导致版本升级检测永远无法触发。
参照 mobile-app 实现,添加 Gradle 层自增 + 构建脚本两层机制:
- build.gradle.kts: version.properties 自增 versionCode
- scripts/build.sh: 自动 bump pubspec.yaml buildNumber
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 21:32:15 -08:00
hailin
35fc957eaf
fix(mobile-upgrade): 自动解包 mining-admin-service TransformInterceptor 响应
...
mining-admin-service 的 TransformInterceptor 将所有响应包装为
{ success, data, timestamp } 格式,导致前端 .map() 调用崩溃。
在 API client 的 response interceptor 中自动检测并解包,
对不包装响应的 admin-service (1.0) 无影响。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:01:12 -08:00
hailin
4112b45b9e
feat(mining-admin): 新建公开版本管理接口供 mobile-upgrade 前端使用
...
mining-admin-service 有全局 AdminAuthGuard,导致 mobile-upgrade 前端
调用版本接口返回 401。新建 UpgradeVersionController (@Public) 作为
独立的公开接口,路径为 /api/v2/upgrade-versions,不影响现有需认证的
/api/v2/versions 接口。前端 apiPrefix 同步更新。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:53:29 -08:00
hailin
7b7c9cd9f6
Revert "fix(mobile-upgrade): 修复股行App版本管理API路径匹配Kong路由"
...
This reverts commit 5ef0992448 .
2026-01-29 12:30:52 -08:00
hailin
5ef0992448
fix(mobile-upgrade): 修复股行App版本管理API路径匹配Kong路由
...
NEXT_PUBLIC_MINING_API_URL 从 /mining-admin 改为 /api/v2/mining-admin,
apiPrefix 从 /api/v2/versions 改为 /versions,使最终URL匹配Kong路由
/api/v2/mining-admin/*
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:29:39 -08:00
hailin
263f1ecf8e
feat(c2c): 卖单自动获取账户ID和Kava地址,移除手动输入
...
后端创建卖单时自动从 identity-service 获取卖家 Kava 地址并存入订单,
前端发布页面自动展示 accountSequence(只读),不再需要手动输入1.0系统ID。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:08:56 -08:00
hailin
2b7a30983e
fix(mining-app): 修复贡献值明细筛选栏溢出问题
...
使用 SingleChildScrollView 包装筛选栏,支持横向滚动
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:52:37 -08:00
hailin
c02d0b4c3c
fix(mining-app): 移除遗留的 kDebugMode 调试代码
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:48:51 -08:00
hailin
7560940e14
fix(mining-app): 修复贡献值明细页面筛选和文字溢出问题
...
- 将贡献值记录筛选从客户端过滤改为服务端过滤,解决同伴上贡献值记录无法显示的问题
- 使用 FittedBox 包装三栏统计标签文字,防止"同伴上贡献值"溢出
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:44:12 -08:00
hailin
776d181ef3
fix(trading-service): 修复P2P转账API响应双重包装问题
...
- 移除controller中的手动包装,由TransformInterceptor统一处理
- 前端增加类型检查防止解析错误
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:11:59 -08:00
hailin
1448435b06
chore(mining-app): 移除发送页面调试日志
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 08:40:37 -08:00
hailin
6ebc1f8767
fix(mining-app): 添加收款方验证成功提示和调试日志
...
- 验证成功时显示绿色 SnackBar 提示
- 添加调试日志帮助诊断可用余额问题
- 温馨提示中添加积分值获取方式说明
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 08:26:22 -08:00
hailin
8fe38525a2
fix(mining-app): 验证收款方失败时显示提示信息
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 08:19:39 -08:00
hailin
40389fcfc7
feat(trading-service, mining-admin-web): 支持在管理后台配置做市商钱包地址
...
- 后端: 在 UpdateConfigDto 和 updateConfig 方法中添加 kavaWalletAddress 字段
- 前端: 在充值对话框中添加钱包地址配置输入框
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 07:53:04 -08:00
hailin
6bcfa18b01
fix(mining-app): 修复转账二维码扫描无效问题
...
- 修改二维码生成格式为 durian://transfer/?phone=xxx (添加路径分隔符)
- 更新解析函数使用正则匹配,兼容新旧格式
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 07:39:42 -08:00
hailin
76d566d145
feat: 集成 mining-app 升级和遥测功能,扩展 mobile-upgrade 支持多应用
...
## mining-app (Flutter)
- 新增 updater 模块: 版本检查、APK下载(断点续传+SHA256校验)、安装
- 新增 telemetry 模块: 事件上报、会话追踪、心跳检测(DAU统计)
- 集成原生 MethodChannel 实现 APK 安装
- 在关于页面添加"检查更新"功能入口
## mining-admin-service (NestJS)
- 新增版本管理 API (/api/v2/versions)
- 实现 DDD 架构: Entity, Value Objects, Repository
- 支持 APK/IPA 解析 (需安装 adbkit-apkreader, jszip, plist)
- 支持文件上传和静态文件服务
## mobile-upgrade (Next.js)
- 扩展支持多后端: 榴莲 App (admin-service) + 股行 App (mining-admin-service)
- 添加应用选择器 UI
- 配置独立的 API 端点
## 修复
- 移除未使用的 _apiBaseUrl 字段 (Flutter)
- 替换废弃的 WillPopScope 为 PopScope (Flutter)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:03:26 -08:00
hailin
58feec255d
feat(market-maker): 实现做市商区块链充提功能
...
- 扩展 mining-blockchain-service 支持 eUSDT/fUSDT 转账
- 添加 trading-service 区块链提现 API(自动回滚失败交易)
- 前端支持中心化和区块链充提两种模式(Tab切换)
- 区块链充值显示钱包地址和二维码
- 区块链提现支持输入目标地址直接转账
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:56:15 -08:00
hailin
a2da841d59
feat(transfer): 添加扫码转账功能
...
- 添加 mobile_scanner 依赖用于二维码扫描
- 创建 QrScannerSheet 组件,支持底部弹窗扫码
- 发送积分值页面添加扫码按钮,扫描后自动填入收款方手机号
- 支持解析 durian://transfer?phone={phone} 格式的二维码
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:22:53 -08:00
hailin
0c0750ce93
feat(c2c): 前端添加 Bot 自动购买信息展示
...
- C2cOrderModel 添加 botPurchased/sellerKavaAddress/paymentTxHash 字段
- 订单详情页新增 Bot 支付信息卡片,显示 dUSDT 交易哈希
- 支持复制 Kava 地址和交易哈希
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 07:26:36 -08:00
hailin
2597d0ef46
feat: 实现P2P转账功能及前端资产页面优化
...
- trading-service: 添加P2pTransfer模型和P2P转账API
- auth-service: 添加用户手机号查询接口用于转账验证
- frontend: 修复资产页面冻结份额显示和转账页面余额字段
- frontend: 添加P2P转账记录页面
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 06:25:42 -08:00
hailin
e9dea69ee9
feat(batch-mining): 动态获取批量补发计算起始日期
...
重构批量补发功能,将硬编码的起始日期(2025-11-08)改为从 Excel 数据中
动态获取,提高计算的准确性和灵活性。
后端改动 (mining-service):
- 新增 DEFAULT_MINING_START_DATE 常量作为找不到有效数据时的默认值
- 新增 getCalculatedStartDate() 方法:从批次1用户的 miningStartDate 中
获取最早日期
- 新增 parseDate() 方法:支持解析 2025.11.8、2025-11-08、2025/11/8 格式
- 修改 buildMiningPhases() 方法:新增 startDateStr 参数,不再硬编码日期
- 修改 preview/execute 方法:在返回结果中包含 calculatedStartDate 字段
前端改动 (mining-admin-web):
- 更新 BatchPreviewResult 接口,新增 calculatedStartDate 字段
- 预览结果描述中显示计算起始日期(蓝色高亮)
- 确认对话框中新增"计算起始日期"行
降级策略:
- 若批次1用户不存在或日期均无效,自动使用默认日期 2025-11-08
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 02:01:40 -08:00
hailin
f3d460ba09
fix(mining-app): 修复批量补发记录解析字段名
...
API 返回 records 字段,而非 data 或 items
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 02:11:10 -08:00
hailin
623e695353
fix(mining-app): 修正批量补发记录 API 路径
...
添加 /admin 前缀以匹配 mining-service 的 AdminController 路由
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 01:45:41 -08:00
hailin
b6d723333c
fix(mining-app): 修复 BatchMiningRecordsPage 类名冲突
...
将页面类重命名为 BatchMiningRecordsListPage 以避免与实体类冲突
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 01:42:46 -08:00
hailin
d5dc248a16
feat(mining-app): 添加补发记录功能
...
- 添加批量补发记录 API endpoint
- 创建 BatchMiningRecord 实体和模型
- 添加批量补发记录 provider 和页面
- 在"我的"页面动态显示补发记录入口(仅当用户有记录时显示)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 01:35:53 -08:00
hailin
8a47659c47
feat(batch-mining): 按阶段创建补发记录并添加用户查询功能
...
- 修改BatchMiningRecord表结构,添加phase和daysInPhase字段
- 修改execute函数,按阶段为每个用户创建记录
- 添加用户批量补发记录查询API
- mining-admin-web用户详情页添加"批量补发"Tab
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 00:30:06 -08:00
hailin
7a5faad665
feat(mining-app): UI调整 - 隐藏部分功能和文案修改
...
- 兑换页面:将"挖矿账户"改为"分配账户"
- 我的页面:隐藏"账户设置"栏目(2.0版本暂不需要)
- 贡献值页面:隐藏"今日预估收益"栏目
- 贡献值明细页:同伴上贡献值不显示用户ID
- 参与记录页:将"算力"改为"贡献值"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:00:40 -08:00
hailin
8f0fc09a4c
fix(mining-admin-web): 解包 mining-admin-service 响应的 TransformInterceptor 包装
...
mining-admin-service 也使用 TransformInterceptor 将所有响应包装为 { success, data, timestamp } 结构,
前端需要从 res.data.data 中提取实际数据。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:34:36 -08:00
hailin
7a4f5591b7
feat(batch-mining): 添加详细的调试日志
...
- mining-service batch-mining.service.ts: 添加所有方法的详细日志
- mining-admin-service batch-mining.service.ts: 添加 HTTP 请求和响应日志
- mining-admin-service batch-mining.controller.ts: 添加控制器层日志
- frontend batch-mining page.tsx: 添加前端 console.log 日志
便于调试部署后的 404 等问题
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:49:04 -08:00
hailin
cb9831f2fc
feat(mining-admin-web): 前端实现区域代码到中文名称转换
...
系统账户列表现在显示中文省市名称(如"广州市公司")而不是区域代码(如"440100账户")
- 新增 region-codes.ts 包含完整的省市行政区划代码映射
- 修改 accounts-table.tsx 使用 getRegionDisplayName() 转换名称
- 修改 account-card.tsx 使用区域代码映射
- 修改账户详情页使用区域代码映射显示标题
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 05:20:50 -08:00
hailin
71151eaabf
feat(mining): 添加批量补发挖矿功能
...
- 新增批量补发服务和API (mining-service)
- 支持按批次累积计算全网算力
- 用户算力 = 认种棵数 × 22617 × 70%
- 补发金额 = (用户算力/全网算力) × 每秒分配量 × 天数 × 86400
- 防重复执行机制(只能执行一次)
- 新增文件上传和批量补发API (mining-admin-service)
- 支持上传 Excel 文件解析
- 预览和执行两步操作
- 审计日志记录
- 新增批量补发页面 (mining-admin-web)
- Excel 文件上传
- 按批次预览计算结果
- 执行确认对话框
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 04:59:13 -08:00
hailin
e7260be219
feat(contribution): 添加系统账户算力来源类型字段
...
- 添加 sourceType 字段区分算力来源类型:
- FIXED_RATE: 固定比例分配(OPERATION 12%、PROVINCE 1%、CITY 2%)
- LEVEL_OVERFLOW: 层级溢出归总部(上线未解锁该级别)
- LEVEL_NO_ANCESTOR: 无上线归总部(该级无上线)
- BONUS_TIER_1/2/3: 团队奖励未解锁归总部
- 添加 levelDepth 字段记录层级深度(1-15级)
- 更新前端表格显示来源类型列
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 04:23:50 -08:00
hailin
e89c3166bf
feat(mining-admin-web): 系统账户算力明细显示更多信息
...
- 显示认种订单:日期、树数
- 显示认种用户:姓名/手机号
- 更新类型定义匹配后端新字段
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 03:36:02 -08:00
hailin
fda022d29c
fix(frontend): 添加 regionCode 到 SystemAccount 类型
2026-01-21 02:23:35 -08:00
hailin
97e974b6da
fix(frontend): 添加 regionCode 参数到算力来源 API 调用
2026-01-21 02:13:41 -08:00
hailin
09b0bc077e
feat(system-accounts): 实现系统账户按省市细分算力和挖矿分配
...
## 核心功能
### 1. 算力按省市细分分配
- accountType 从枚举改为组合键字符串:PROVINCE_440000, CITY_440100
- 新增 baseType (基础类型) 和 regionCode (区域代码) 字段
- 认种时根据 selectedProvince/selectedCity 分配到具体省市账户
- 无省市信息时归入汇总账户
### 2. 系统账户参与挖矿
- 运营、省、市账户按各自 totalContribution 参与挖矿
- 总部账户(HEADQUARTERS)不直接参与,接收待解锁算力收益
- 待解锁算力 100% 参与挖矿,收益归总部
### 3. 算力来源明细追溯
- 新增 SystemContributionRecord 记录每笔算力来源
- 新增 SystemContributionRecordCreatedEvent 事件同步明细
- 前端新增"算力来源"标签页展示明细
## 修改的服务
### contribution-service
- schema: SystemAccount 新增 baseType, regionCode
- contribution-calculator: 按省市生成组合键
- system-account.repository: 支持动态创建省市账户
- 新增 SystemContributionRecordCreatedEvent 事件
### mining-service
- schema: SystemMiningAccount 从枚举改为字符串
- network-sync: 处理带 baseType/regionCode 的同步事件
- mining-distribution: 系统账户和待解锁算力参与挖矿
### mining-admin-service
- schema: 新增 SyncedSystemContributionRecord 表
- cdc-sync: 处理 SystemContributionRecordCreated 事件
- system-accounts.service: 新增算力来源明细和统计 API
### mining-admin-web
- 新增 ContributionRecordsTable 组件
- 系统账户详情页新增"算力来源"标签页
- 显示来源认种ID、用户、分配比例、金额
## 数据库迁移
- contribution-service: 20250120000001_add_region_to_system_accounts
- mining-service: 20250120000001_add_region_to_system_mining_accounts
- mining-admin-service: 20250120000001, 20250120000002
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 19:55:14 -08:00
hailin
1d5e3ebff2
fix(contribution): 使用 upsert 替代 update 避免记录不存在错误
...
将 addContribution 方法改为 upsert,当系统账户不存在时自动创建,
存在时增加算力余额。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 08:43:37 -08:00
hailin
5668de0a58
fix(asset): formatCompact保留原始精度(最多8位小数)
...
修复资产页面累计卖出等数字显示没有小数位的问题
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 05:27:50 -08:00
hailin
995dfa898e
feat(trading): 添加涨跌幅显示及修复成交明细数据
...
1. 后端:
- 添加 getFirstSnapshot() 获取上线首日价格
- PriceInfo 接口增加 priceChangePercent 和 initialPrice 字段
- 计算涨跌幅 = (当前价格 - 首日价格) / 首日价格 × 100%
- 修复 originalQuantity 为0时的数据计算逻辑
2. 前端:
- 交易页面涨跌幅移到价格下方单独显示
- 添加"较上线首日"说明文字
- 根据涨跌正负显示不同颜色和图标
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 05:24:23 -08:00
hailin
7ff7157115
refactor(ui): 隐藏"我的"页面中的"同伴与收益"栏
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:44:16 -08:00
hailin
e1cc364b0d
refactor(ui): 兑换页面文案调整
...
- 标题"积分股交易"改为"积分股兑换"
- "当前积分股价格"改为"当前积分股价值"
- 移除价格前的¥符号
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:43:08 -08:00
hailin
93c06920bd
refactor(ui): 引荐人数改为引荐
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:32:48 -08:00
hailin
9fb51fa30a
fix(ui): 恢复同伴下贡献值统计卡片的两行布局
...
- 恢复"已解锁上"项(去掉"级"字)
- 保持两行四项布局:引荐人数、已解锁上、已解锁下、是否参与
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:31:54 -08:00
hailin
33bf14b225
refactor(ui): 调整同伴下贡献值统计卡片
...
- 删除"已解锁上级"项
- "引荐人数"去掉"人"单位
- "已解锁下级"改为"已解锁下"
- 三个统计项改为单行显示
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:29:40 -08:00
hailin
728497afc1
refactor(ui): 将"个人"替换为"本人"
...
- team_tree_widget.dart: 节点详情弹窗中"个人参与"改为"本人参与"
- team_page.dart: 统计卡片中"个人参与"改为"本人参与"
- contribution_page.dart: 贡献值统计中"个人贡献值"改为"本人贡献值","个人参与产生的贡献值"改为"本人参与产生的贡献值"
- contribution_records_page.dart: 筛选标签"个人"改为"本人",来源类型标签"个人参与"改为"本人参与"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:28:10 -08:00
hailin
9c705d7478
fix(ui): 将UI界面上所有"团队"替换为"同伴"
...
- team_tree_widget: 团队参与 → 同伴参与
- contribution_records_page: 团队下/上贡献值 → 同伴下/上贡献值
- about_page: 团队收益 → 同伴收益
- help_center_page: 团队收益/计算 → 同伴收益/计算
- contribution_page: 团队下/上贡献值 → 同伴下/上贡献值
- team_page: 我的团队 → 我的同伴, 团队参与 → 同伴参与
- profile_page: 团队与收益 → 同伴与收益, 我的团队 → 我的同伴
- contribution_record: 团队奖励/额外奖励 → 同伴奖励/额外奖励
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:24:54 -08:00
hailin
21e536d829
fix(ui): 移除所有人民币符号,统一使用积分值单位
...
- asset_page: 总资产估值改为显示"积分值"后缀
- asset_page: 估值占位符移除¥符号
- c2c_publish_page: 交易总额、单价、总额改为积分值单位
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:19:52 -08:00
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
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
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
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
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
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
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
hailin
747e8bfee1
refactor(frontend): replace all '直推' with '引荐'
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:43:31 -08:00
hailin
1efe39c6bd
refactor(frontend): replace all '认种' with '参与'
...
- Update terminology across all pages and entities
- Change '认种' to '参与' in user-facing text
- Update comments and documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:39:15 -08:00
hailin
e48bf3e81f
refactor(frontend): replace all '榴莲' references with '股行'
...
- Update app name and branding across all pages
- Remove references to '榴莲树' in contribution and adoption contexts
- Update user-facing text in login, register, splash pages
- Update FAQ content in help center and about pages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:33:47 -08:00
hailin
d9d46065e0
fix(asset): 总资产估值包含积分值余额
...
总资产估值 = 积分股价值 + 积分值余额
- 积分股价值 = 积分股 × (1 + burnMultiplier) × 价格
- 积分值余额 = 可用积分值 + 冻结积分值
之前只计算了积分股价值,现在加上了积分值(现金)余额。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:26:21 -08:00
hailin
d4f7cd834a
fix(android): 添加 strings.xml 解决部分手机 app 名称显示问题
...
某些 Android 手机会从 strings.xml 读取 app 名称而非 AndroidManifest.xml,
导致显示旧名称。通过添加 strings.xml 并引用它来解决兼容性问题。
- 添加 values/strings.xml 定义 app_name
- 添加 values-zh/strings.xml 支持中文系统
- AndroidManifest.xml 改为引用 @string/app_name
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:15:18 -08:00
hailin
7df57b9de5
fix(trading): 修复卖出预估计算,加入销毁倍数
...
卖出预估计算现在使用与后端一致的公式:
- 有效积分股 = 卖出量 × (1 + burnMultiplier)
- 卖出交易额 = 有效积分股 × 价格 × 0.9
修复的位置:
1. _calculateEstimate() 方法 - 预计获得显示
2. _handleTrade() 确认弹窗 - 显示销毁倍数和有效积分股明细
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 04:10:32 -08:00
hailin
94153058d8
chore(mining-app): remove WebSocket debug logs
...
移除前端 WebSocket 相关的调试日志
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 21:34:07 -08:00
hailin
192e2551bf
feat(trading): 资产页面实时价格 WebSocket 推送
...
## 后端变更
- 添加 @nestjs/websockets, @nestjs/platform-socket.io, socket.io 依赖
- 新增 PriceGateway (price.gateway.ts): WebSocket 网关,namespace /price
- 新增 PriceBroadcastScheduler: 每秒广播价格更新到所有连接的客户端
- 更新 ApiModule 和 ApplicationModule 注册新模块
## Kong API Gateway
- 添加 WebSocket 路由: /ws/price -> trading-service:3022/price
- 支持 ws/wss 协议
## 前端变更
- 添加 socket_io_client 依赖
- 新增 PriceWebSocketService: 带自动断线重连机制的 WebSocket 服务
- 指数退避重连策略 (1s -> 30s)
- 最大重连次数 10 次
- 连接状态流监听
- 资产页面集成 WebSocket:
- initState 时连接,dispose 时断开
- 实时更新价格和销毁倍数
- 保持原有的每秒积分股增长计算
## 调试日志
- 前后端都添加了详细的调试日志方便排查问题
- 日志前缀: [PriceWS], [AssetPage], [PriceGateway], [PriceBroadcastScheduler]
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 21:18:34 -08:00
hailin
533ad3ba82
feat(mining-app): 兑换页面价格改为只读,使用实时价格
...
- 价格输入框改为只读模式,用户不能修改
- 始终使用后端返回的实时价格
- 价格会随实时刷新自动更新
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 20:56:59 -08:00
hailin
cfa3979a97
revert: 恢复资产页面的倍数显示和计算
...
- 资产显示值恢复为 积分股余额 × (1 + burnMultiplier) × price
- 显示有效积分股(含倍数)而非实际积分股数量
- 实时计算也考虑倍数因子
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 20:46:57 -08:00
hailin
07247fe05f
fix: 将划转最小限制从5改为0.01积分股
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 19:29:05 -08:00
hailin
2154d5752f
fix: 修复K线图NaN错误并添加mining-service划转端点
...
- 修复K线图当价格范围为0时导致的NaN Offset错误
- 在mining-service添加transfer-out和transfer-in端点
- 划转操作会在mining_transactions表中记录明细
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 07:12:32 -08:00
hailin
4e181354f4
feat(frontend): 添加积分股划转功能
...
- 交易页面添加划转入口链接
- 实现双向划转弹窗(划入交易账户/划出到挖矿账户)
- 新增划转历史记录页面
- 添加划转相关 API 调用
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 06:57:23 -08:00
hailin
dd011c13d4
fix(mining-admin-web): 修复 Kong 网关响应数据解包
...
在 axios 拦截器中统一处理 Kong 网关的数据包装层,
解决做市商配置页面初始化后界面不刷新的问题。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 05:55:06 -08:00
hailin
4bb5a2b09d
refactor(frontend): 资产页面显示实际积分股和价格,移除倍数
...
- 资产显示值改为 积分股余额 × price(不含倍数)
- 显示实际积分股数量而非含倍数的有效积分股
- 简化实时计算逻辑
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 04:28:30 -08:00
hailin
7bc911d4d7
feat(mining): 实现手工补发挖矿功能
...
为从1.0系统同步的用户提供手工补发历史挖矿收益功能:
- mining-service: 添加 ManualMiningRecord 表和计算/执行补发逻辑
- mining-wallet-service: 添加 MANUAL_MINING_REWARD 交易类型和 Kafka 消费者
- mining-admin-service: 添加补发 API 控制器和代理服务
- mining-admin-web: 添加手工补发页面和侧边栏菜单项
功能特点:
- 根据用户算力和当前挖矿配置计算补发金额
- 每个用户只能执行一次补发操作
- 通过 Kafka 事件确保跨服务数据一致性
- 完整的操作记录和钱包同步状态追踪
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 03:50:03 -08:00
hailin
4a4393f995
fix(frontend): 修复资产页面实时增长计算漏乘burnMultiplier
...
资产每秒增长公式应为: 每秒积分股增长 × (1 + burnMultiplier) × price
之前漏掉了 (1 + burnMultiplier) 因子,导致增长被低估约5000倍
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 03:42:21 -08:00
hailin
b826511f3c
chore(frontend): 移除资产页面调试日志
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 23:16:15 -08:00
hailin
4f1f1f9eaf
feat(mining): 添加 perSecondEarning 到挖矿账户 API
...
- 后端:计算每秒收益 = (用户贡献 / 全网贡献) × 每秒分配量
- 前端:修正字段映射以匹配后端返回格式
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:56:19 -08:00
hailin
33233901a9
debug(frontend): 添加资产页面定时器调试日志
...
添加 debugPrint 日志帮助定位1秒刷新不生效的问题
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:49:46 -08:00
hailin
d8dd38e91b
fix(frontend): 修复资产页面1秒实时刷新问题
...
- 使用 mining-service 的 perSecondEarning 替代 assetGrowthPerSecond
- 添加 _timerStarted 标志防止定时器重复启动
- 修复页面进入时定时器可能未启动的问题
- 下拉刷新时同步刷新 shareAccountProvider
- 正确显示每秒增长值
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:42:23 -08:00
hailin
5c633b9979
perf(frontend): 优化交易页面数据刷新策略
...
- 价格刷新: 5分钟 → 15秒
- 订单刷新: 2分钟 → 10秒
- 市场概览: 5分钟 → 30秒
- 交易账户: 2分钟 → 15秒
- 交易成功后立即刷新 + 2秒后再刷新 + 5秒后最终刷新
- 确保用户能快速看到做市商吃单后的成交状态
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:14:52 -08:00
hailin
8c78f26e6d
feat(trading): 实现做市商吃单/挂单模式互斥机制
...
## 后端 - trading-service
### MarketMakerService
- 新增 MarketMakerMode 类型:'idle' | 'taker' | 'maker'
- 新增 getCurrentMode() 和 getRunningStatus() 方法获取当前运行状态
- start() (吃单模式): 启动前自动停止挂单模式
- startMaker() (挂单模式): 启动前自动停止吃单模式
- 两种模式互斥,同一时间只能运行一种
### MarketMakerController
- getConfig 接口返回 runningStatus 运行状态
- 新增 GET /status 接口获取做市商运行状态
## 前端 - mining-admin-web
### 做市商管理页面
- 新增运行模式状态卡片,显示当前模式(空闲/吃单/挂单)
- 吃单模式和挂单模式使用 runningStatus 判断状态
- 添加互斥提示:启动一个模式会自动停止另一个
- 挂单模式添加警告提示:卖单被吃会触发销毁导致价格上涨
### API 更新
- 新增 RunningStatus 接口类型
- getConfig 返回类型增加 runningStatus
- 新增 getRunningStatus API
## 设计说明
- 吃单模式(推荐):做市商只作为买方,不触发额外销毁
- 挂单模式(谨慎使用):做市商挂卖单会触发销毁机制
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 21:41:39 -08:00
hailin
3b6bd29283
feat(trading): 实现完整的CEX做市商双边深度系统
...
## 后端 - trading-service
### 数据库模型扩展 (Prisma Schema)
- TradingConfig: 新增 depthEnabled 字段控制深度显示开关
- MarketMakerConfig: 新增双边挂单配置
- makerEnabled: 做市商挂单模式开关
- bidEnabled/askEnabled: 买/卖方向独立开关
- bidLevels/askLevels: 买/卖档位数量
- bidSpread/askSpread: 买/卖价差比例
- bidLevelSpacing/askLevelSpacing: 档位间距
- bidQuantityPerLevel/askQuantityPerLevel: 每档数量
- refreshIntervalMs: 刷新间隔
- MarketMakerOrder: 新增做市商订单追踪模型
- MarketMakerLedger: 新增做市商账户流水模型
### 做市商服务 (MarketMakerService)
- depositShares/withdrawShares: 积分股充值/提现
- startMaker/stopMaker: 做市商挂单模式启停
- refreshMakerOrders: 核心双边挂单逻辑
- 根据当前价格计算买卖各档位价格和数量
- 自动撤销旧订单并创建新订单
- 记录做市商订单关联
- cancelAllMakerOrders: 撤销所有做市商订单
- getDepth: 获取订单簿深度数据
- updateMakerConfig/getMakerOrders: 配置和订单查询
### API 端点
- MarketMakerController:
- POST /deposit-shares: 积分股充值
- POST /withdraw-shares: 积分股提现
- POST /start-maker: 启动挂单模式
- POST /stop-maker: 停止挂单模式
- POST /refresh-orders: 手动刷新订单
- POST /cancel-all-orders: 撤销所有订单
- PUT /maker-config: 更新挂单配置
- GET /maker-orders: 查询做市商订单
- GET /depth: 获取深度数据
- AdminController:
- GET/POST /trading/depth-enabled: 深度显示开关
- PriceController:
- GET /depth: 公开深度接口 (受 depthEnabled 控制)
### 领域层扩展
- TradingAccountAggregate: 新增 depositShares/withdrawShares 方法
- OrderAggregate: 支持 source 字段标识订单来源
## 前端 - mining-admin-web
### 做市商管理页面 (/market-maker)
- 账户余额展示: 积分值和积分股余额
- 资金管理: 积分值/积分股的充值和提现对话框
- 吃单模式: 启动/停止/手动吃单控制
- 挂单模式: 启动/停止/刷新订单/撤销所有
- 深度开关: 控制公开 API 是否返回深度数据
- 深度展示: 实时显示买卖盘深度数据表格
### 前端架构
- market-maker.api.ts: 完整的 API 客户端
- use-market-maker.ts: React Query hooks 封装
- sidebar.tsx: 新增"做市商管理"导航菜单
## 数据库迁移
- 0003_add_market_maker_depth: 双边深度相关字段
- 0005_add_market_maker_and_order_source: 订单来源追踪
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 21:11:23 -08:00
hailin
481a355d72
feat(trading): add buy function control switch with admin management
...
- Add buyEnabled field to TradingConfig in trading-service with migration
- Add API endpoints for get/set buy enabled status in admin controller
- Add buy function switch card in mining-admin-web trading page
- Implement buyEnabledProvider in mining-app with 2-minute cache
- Show "待开启" when buy function is disabled in trading page
- Add real-time asset value refresh in asset page (1-second updates)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:56:35 -08:00
hailin
e8f3c34723
fix(contribution): 认种记录总贡献值显示用户实际有效算力
...
后端:
- get-planting-ledger.query.ts: 添加effectiveContribution字段
- 从contributionAccount获取用户实际的个人算力(personalContribution)
前端:
- planting_record.dart: PlantingSummary添加effectiveContribution字段
- planting_record_model.dart: 解析effectiveContribution字段
- planting_records_page.dart: 总贡献值显示effectiveContribution而非totalAmount
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:29:14 -08:00
hailin
613fb33ff9
refactor(frontend): 删除兑换页面卖出功能中的销毁比例标签
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:24:26 -08:00
hailin
d5f3f3b868
feat(frontend): 实现我的页面其他设置4项功能
...
- 消息通知: 添加开关控制,状态持久化到SharedPreferences
- 深色模式: 添加开关控制,状态持久化到SharedPreferences
- 帮助中心: 新建页面,包含常见问题FAQ和联系方式
- 关于我们: 新建页面,包含应用简介、功能特点、联系方式和法律条款
新增文件:
- settings_providers.dart: 设置状态管理
- help_center_page.dart: 帮助中心页面
- about_page.dart: 关于我们页面
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 01:08:21 -08:00
hailin
1e33ab178d
fix(mining): move progress endpoint to MiningController for correct Kong routing
...
- Add /api/v2/mining/progress endpoint in MiningController
- Update frontend API to call /progress instead of /admin/mining/status
- Kong routes /api/v2/mining/* with strip_path=false, so endpoint must
be under /mining controller path
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:55:58 -08:00
hailin
1aaf32cbb3
refactor(frontend): 认种记录汇总中总金额改为总贡献值
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:33:57 -08:00
hailin
d424f2a18e
refactor: rename '算力占比' to '贡献值占比' in mining records
...
- Update label in Flutter mining records page
- Update table header in admin web mining records list
- Update memo strings in mining-wallet-service
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:33:02 -08:00
hailin
725fb80f80
refactor(frontend): 删除我的页面中的支付密码功能
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:28:30 -08:00
hailin
76d6c30a20
refactor(frontend): 发送/接收积分股改名为积分值
...
- send_shares_page.dart: 标题改为发送积分值,提示信息同步更新
- receive_shares_page.dart: 标题改为接收积分值
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:26:44 -08:00
hailin
216394a44f
refactor(trading): rename 卖出相关 黑洞 to 积分股池
...
- Update 10% 进入黑洞 to 10% 进入积分股池
- Update 销毁金额 to 进入积分股池 in sell confirmation
- Update 注意 text in sell confirmation
- Change color from red to green for 积分股池 text
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:15:38 -08:00
hailin
e80e672ffe
feat(mining-admin): add mining progress dashboard component
...
Add real-time mining progress statistics similar to burn progress:
- Backend: new /admin/mining/status endpoint in mining-service
- Frontend: MiningProgress component with progress bar and stats
- Shows: total distributed, remaining pool, minutes left, per-minute rate
- Auto-refresh every 60 seconds via React Query
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:00:20 -08:00
hailin
ea1e376939
chore(app): rename app to 股行
...
- Update Android app label in AndroidManifest.xml
- Update iOS CFBundleDisplayName and CFBundleName in Info.plist
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:50:23 -08:00
hailin
d5e5bf642c
fix(kline-chart): prevent overflow in indicator selector and legend
...
- Wrap indicator selector Row in SingleChildScrollView for horizontal scrolling
- Add maxX boundary checks in _drawLegend to stop drawing when exceeding available space
- Prevents text overflow on narrow screens or when displaying many indicators
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:55:49 -08:00
hailin
27bf67e561
fix(kline-chart): improve pinch-to-zoom and fullscreen display
...
- Refactor to pixel-based scrolling system for smoother interaction
- Fix pinch-to-zoom to properly scale around focal point
- Adjust fullscreen layout to give more space to main chart (65%)
- Add candleWidth parameter to all painters for consistent rendering
- Detect multi-touch gestures using pointerCount
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:49:14 -08:00
hailin
1f0bd15946
feat(mining-app): add trading records page and remove withdrawal records
...
- Add TradingRecordsPage to display trade order history with status
- Connect trading records to profile page "交易记录" button
- Remove unused "提现记录" button from profile page
- Add route and navigation for trading records
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:22:15 -08:00
hailin
4ec6c9f48b
feat(contribution/mining-app): add team tree API using contribution-service 2.0
...
Add team info and direct referrals endpoints to contribution-service,
using SyncedReferral data synced via CDC. Update mining-app to use the
new v2 contribution API instead of legacy referral-service.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:17:18 -08:00
hailin
3d6b6ae405
feat(mining-app): connect my team page from profile
...
Link the "我的团队" menu item in profile page to the team tree page,
completing the integration of the team tree feature.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:03:06 -08:00
hailin
64ccb8162a
fix(admin): correct distributed shares calculation to use 2M pool
...
The dashboard was incorrectly using 5 billion as the distribution pool
default when calculating already distributed shares. The actual mining
distribution pool is 2 million shares, not 100 billion.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:59:46 -08:00
hailin
20a90fce4c
feat(mining-app): add professional kline chart with technical indicators
...
- Add KlineChartWidget with pinch-to-zoom, fullscreen mode
- Implement MA, EMA, BOLL indicators for main chart
- Implement MACD, KDJ, RSI indicators for sub chart
- Add volume display with crossline info
- Add C2C trading feature with market/publish/detail pages
- Add P2P transfer functionality (send/receive shares)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:51:00 -08:00
hailin
3ce8bb0044
fix(mining-admin): parse burn records response correctly
...
The trading-service wraps all responses with { success, data, timestamp }.
Need to extract data.data for burn records endpoint.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:41:16 -08:00
hailin
3096297198
feat(mining-app): 资产页面优化及个人资料编辑功能
...
- 删除资产页面的"提现"按钮,将"划转"改为"C2C"
- 删除积分值卡片上的"可提现"标签
- 简化资产页面和兑换页面的标题栏,移除左右图标
- 统一资产页面背景色与兑换页面一致
- 新增个人资料编辑页面,支持头像颜色选择和昵称修改
- 头像和昵称支持本地存储
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 07:58:16 -08:00
hailin
854bb7a0ac
fix(mining-admin): correct ContributionSyncStatus property names
...
Property names should match what's used in the UI component:
- miningNetworkTotal (was miningTotal)
- networkTotalContribution (was contributionTotal)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 07:41:59 -08:00
hailin
2534068f70
fix(mining): remove duplicate burn mechanism from mining-service
...
Mining-service incorrectly implemented its own burn mechanism (10-year
cycle) which was not in the requirements. Per requirements, only
trading-service should handle per-minute burn (4756.47/minute).
Removed:
- BlackHoleRepository and all burn-related methods
- executeBurn() from mining distribution service
- Burn stats from admin API and queries
- Burn progress UI from mining admin web
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 07:31:13 -08:00
hailin
9e15fa4fd8
fix(admin-web): 修复全网算力同步状态显示
...
- 将显示内容从用户有效算力改为全网理论算力
- 显示 mining-service 和 contribution-service 的全网理论算力对比
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 04:02:29 -08:00
hailin
7c00c900a0
feat(mining-admin): 算力同步完成前禁用激活挖矿按钮
...
- 后端:getMiningStatus 接口并行获取 contribution-service 总算力,对比两边是否一致
- 前端:未同步时显示"全网算力同步中..."提示,禁用激活按钮
- 前端:同步中每 3 秒刷新状态,同步完成后恢复 30 秒刷新
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 03:00:40 -08:00
hailin
72b3b44d37
feat(trading): 实现K线图真实数据展示与Y轴自适应
...
后端 (trading-service):
- 新增 GET /api/v2/price/klines API 端点
- 支持多周期K线聚合 (1m/5m/15m/30m/1h/4h/1d)
- 将 PriceSnapshot 数据聚合为 OHLC 格式
前端 (mining-app):
- 添加 klinesProvider 获取K线数据
- 重写 _CandlestickPainter 使用真实数据
- 实现 Y轴自适应显示,放大价格变化
- 周期选择器联动数据刷新
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 23:57:12 -08:00
hailin
7b3c222b24
fix(admin-web): use dedicated trading client with correct base URL
...
Trading API was incorrectly routed through mining-admin baseURL in production,
causing 404 errors. Created independent tradingClient with /api/trading baseURL
to properly route requests through Next.js rewrites to Kong -> trading-service.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 21:12:33 -08:00
hailin
52a5ae64c0
Revert "fix(admin-web): add API_GATEWAY_URL env var for Docker build"
...
This reverts commit 1d7f05b12d .
2026-01-15 21:03:57 -08:00
hailin
1d7f05b12d
fix(admin-web): add API_GATEWAY_URL env var for Docker build
...
The Next.js rewrites in next.config.js require API_GATEWAY_URL to be set
at build time. Added this environment variable to both Dockerfile and
docker-compose.yml to ensure proper routing to Kong gateway in production.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 21:01:27 -08:00
hailin
967e6c1f44
fix(admin-web): fix API response data extraction for trading endpoints
...
- Add proper extraction of nested data from { success, data, timestamp } response format
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 20:54:26 -08:00
hailin
2da02e0823
fix(admin-web): fix trading-service proxy routing for Kong gateway
...
- Add production/development environment detection
- Production: route through Kong gateway at /api/v2/trading/*
- Development: direct connection to trading-service at localhost:3022
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 20:48:31 -08:00
hailin
8018fa5110
feat(admin): add trading system management UI and API
...
- Add trading system activate/deactivate endpoints to trading-service
- Add trading management page to mining-admin-web with:
- Trading system status display and control
- Market overview (price, green points, circulation pool)
- Burn progress visualization
- Burn records list with filtering
- Add trading-service proxy configuration to next.config.js
- Add trading menu item to sidebar navigation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 20:37:52 -08:00
hailin
1e2d8d1df7
feat(asset): aggregate mining and trading account balances in asset display
...
- Modify AssetService to fetch mining account balance from mining-service
- Sum mining balance + trading balance for total share display
- Add miningShareBalance and tradingShareBalance fields to AssetDisplay
- Update frontend entity and model to support new fields
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 19:53:31 -08:00
hailin
ed715111ae
fix(trading): auto-initialize SharePool and CirculationPool on startup
...
- Add SharePool and CirculationPool initialization in BurnService.initialize()
- Initialize SharePool with 5760 green points (fixes price showing as 0)
- Remove misleading "= 5,760 积分值" display from trading page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 19:32:46 -08:00
hailin
4b1855f57a
fix(mining-app): use public API for asset page to avoid JWT mismatch
...
Changed from myAssetProvider (requires JWT) to accountAssetProvider
(public API) to avoid 401 errors when trading-service JWT_SECRET
doesn't match auth-service.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 06:34:19 -08:00
hailin
40869ef00f
feat: split share pool into A (100亿) and B (200万) accounts
...
Backend changes:
- mining-wallet-service: Split SHARE_POOL into SHARE_POOL_A (100亿, for burning)
and SHARE_POOL_B (200万, for mining distribution)
- Add /pool-accounts/share-pool-balance API endpoint to get total balance
- Update pool initialization logic and seed data
- Fix Kong routing for mining-wallet-service (strip_path: true)
- Fix Kong routing for trading-service (strip_path: true)
Constant updates (100.02亿 = 10,002,000,000):
- mining-service: TOTAL_SHARES
- trading-service: TOTAL_SHARES, trading config defaults
- trading-service seed: initial green points = 5760
Frontend changes:
- Add sharePoolBalanceProvider to fetch pool balance from mining-wallet-service
- Update contribution page to display real-time share pool balance (A + B)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 05:55:52 -08:00
hailin
d12bbb17be
feat(mining-app): add share pool balance display on contribution page
...
Display real-time share pool balance (积分股池实时余量) in the total
contribution card on the contribution page.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 04:27:48 -08:00
hailin
183b2bef59
style(mining-app): hide accountSequence and rename phone to ID on profile page
...
- Remove accountSequence (ID: xxxx) display from profile page
- Rename "手机:" label to "ID:" for phone number display
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 03:39:18 -08:00
hailin
1bdb9bb336
style(mining-admin-web): display all numbers with 8 decimal places
...
Update all formatDecimal, formatNumber, formatPercent, formatCompactNumber
and formatShareAmount calls to use 8 decimal precision for consistent display
across all pages (dashboard, users, reports, system-accounts).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 02:55:23 -08:00
hailin
420dfbfd9f
fix(mining-admin-web): display theoretical network contribution instead of effective
...
Changed "全网算力" card to show theoretical total (totalTrees * 22617) instead
of effective contribution. Added effective contribution to subValue for reference.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 02:04:08 -08:00
hailin
cfbf1b21f3
feat(dashboard): add detailed contribution breakdown by category
...
Backend (contribution-service):
- Add getDetailedContributionStats() to repository
- Add getUnallocatedByLevelTier/BonusTier() to repository
- Extend stats API with level/bonus breakdown by tier
- Add getTotalTrees() to synced-data repository
Backend (mining-admin-service):
- Add detailed contribution stats calculation
- Calculate theoretical vs actual values per category
- Return level/bonus breakdown with unlocked/pending amounts
Frontend (mining-admin-web):
- Add ContributionBreakdown component showing:
- Personal (70%), Operation (12%), Province (1%), City (2%)
- Level contribution (7.5%) by tier: 1-5, 6-10, 11-15
- Bonus contribution (7.5%) by tier: T1, T2, T3
- Update DashboardStats type definition
- Integrate breakdown component into dashboard page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 01:43:37 -08:00
hailin
1f15daa6c5
fix(planting-records): filter only MINING_ENABLED records and fix UI overflow
...
- Backend: Add status filter to getPlantingLedger and getPlantingSummary
- Frontend: Change Row to Wrap for info items to prevent width overflow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 00:12:07 -08:00
hailin
8ae9e217ff
fix(mining-app): fix mining records data parsing from mining-service
...
Map miningMinute->distributionMinute, minedAmount->shareAmount,
secondDistribution->priceSnapshot to match entity fields
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 00:02:30 -08:00
hailin
12f8fa67fc
feat(mining-admin): add totalTrees, separate level/bonus pending display
...
- Add totalTrees field from syncedAdoption aggregate
- Rename fields: networkLevelPending, networkBonusPending
- Stats card: show level pending and bonus pending separately
- Add new stats card for total trees count
- Price overview: 2-row layout showing all contribution metrics
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 23:59:32 -08:00
hailin
b310fde426
feat(mining-admin): show pending contribution in dashboard
...
- Add networkPendingContribution and networkBonusPendingContribution to API
- Display combined pending contribution (teamLevel + teamBonus) in stats card
- Replace 'total contribution' with 'pending contribution' in price overview
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 23:46:05 -08:00
hailin
debc8605df
fix(mining-app): rename MiningRecordsPage widget to avoid name conflict
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 23:33:38 -08:00
hailin
dee9c511e5
feat(mining-admin): add total contribution to dashboard stats
...
- Add networkTotalContribution field to dashboard API response
- Display total hashrate alongside effective hashrate in stats cards
- Update price overview to show both effective and total contribution
- Change grid from 3 to 4 columns in price overview
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 23:32:29 -08:00
hailin
546c0060da
feat(mining-app): add mining records and planting records pages
...
- Add mining records page showing distribution history with share amounts
- Add planting records page with adoption summary and detailed records
- Remove 推广奖励 and 收益明细 from profile page
- Add planting-ledger API endpoint and data models
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 23:23:31 -08:00
hailin
b81ae634a6
fix(mining-app): hardcode team bonus tiers display to 15
...
- Profile page: 团队上级 shows '15' instead of actual unlockedBonusTiers
- Contribution page: 已解锁上级 shows '15级' instead of actual value
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 20:28:02 -08:00
hailin
0cccc0e2cd
refactor(mining-app): rename VIP等级 to 团队上级 and 直推人数 to 引荐人数
...
- Changed "VIP等级" label to "团队上级" in profile stats row
- Changed display value from vipLevel (V3 format) to unlockedBonusTiers (raw number)
- Changed "直推人数" label to "引荐人数" for consistency
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 20:07:52 -08:00
hailin
cd938f4a34
refactor(mining-app): rename team contribution labels
...
Update contribution page labels:
- "团队层级" → "团队下级"
- "团队奖励" → "团队上级"
- "直推人数" → "引荐人数"
- "已解锁奖励" → "已解锁上级" (with unit "档" → "级")
- "已解锁层级" → "已解锁下级"
- "直推及间推" → "引荐及间推" in subtitle
Update contribution records page labels:
- "团队层级" → "团队下级"
- "团队奖励" → "团队上级"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:58:41 -08:00
hailin
84fa3e5e19
refactor(mining-app): rename 绿积分 to 积分值 across all pages
...
Replace all occurrences of "绿积分" with "积分值" in:
- trading_page.dart (price display, pool name, input field)
- asset_page.dart (account labels)
- trading_account.dart (entity comment)
- price_info.dart (entity comment)
- market_overview.dart (entity comment)
- DEVELOPMENT_GUIDE.md (documentation)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:57:17 -08:00
hailin
adeeadb495
fix(mining-app): update profile page - hide items and rename label
...
- Rename "团队层级" to "团队下级" in stats row
- Hide "实名认证" option from account settings
- Hide "我的邀请码" card section entirely
- Remove unused _buildInvitationCard and _buildActionButton methods
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:47:14 -08:00
hailin
42a28efe74
fix(mining-app): remove operator account note from expiration card
...
Remove the "运营账号贡献值永不失效" note from the contribution
expiration countdown card.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:28:31 -08:00
hailin
91b8cca41c
feat(mining-app): implement hide/show amounts toggle
...
- Add hideAmountsProvider to control amount visibility
- Add tap handler to eye icon in total contribution card
- Toggle icon between visibility_outlined and visibility_off_outlined
- Hide amounts with **** when toggled in:
- Total contribution value
- Three column stats (personal, team level, team bonus)
- Today's estimated earnings
- Contribution detail summary rows
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:22:03 -08:00
hailin
02cc79d67a
fix(mining-app): reduce bottom padding on navigation pages
...
Reduce bottom SizedBox from 100 to 24 on all four main navigation
pages (contribution, trading, asset, profile) to eliminate excessive
whitespace when scrolling to bottom.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:17:59 -08:00
hailin
7bc8547a96
fix(mining-app): rename ContributionRecordsListPage to avoid name conflict
...
- Rename page class from ContributionRecordsPage to ContributionRecordsListPage
- Add typedef RecordsPageData for ContributionRecordsPage data model
- Fix import statements and unused variable
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:08:09 -08:00
hailin
caffb124d2
feat(mining-app): add contribution records page with category summary
...
- Create contribution_records_page.dart with full list view
- Pagination support with page navigation
- Filter by source type (personal, team level, team bonus)
- Show detailed info: tree count, base contribution, rate, amount
- Display effective/expire dates and status badges
- Update contribution_page.dart detail card
- Show category summary instead of record list
- Display three categories with icons: personal, team level, team bonus
- Add navigation to full records page via "查看全部"
- Add route configuration for /contribution-records
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 19:02:30 -08:00
hailin
f57b0f9c26
chore(mining-app): configure release build
...
- Add kDebugMode check to LoggingInterceptor to suppress logs in release
- Remove debug print statements from contribution_providers
- Add Play Core proguard rules to fix R8 missing classes error
Build command: flutter build apk --release --split-per-abi --target-platform android-arm,android-arm64
Output:
- app-arm64-v8a-release.apk: 18MB
- app-armeabi-v7a-release.apk: 16MB
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 17:24:42 -08:00
hailin
cb3c7623dc
fix(mining-app): fix Riverpod ref usage in router redirect callback
...
Use cached auth state from AuthNotifier instead of ref.read() to avoid
"Cannot use ref functions after provider changed" exception during rebuild.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 08:49:52 -08:00
hailin
ed9f817fae
feat(mining-app): add estimated earnings and contribution stats API
...
- Add ContributionStats entity and model for network-wide statistics
- Add /api/v2/contribution/stats endpoint
- Implement estimatedEarningsProvider to calculate daily earnings
- Formula: (user contribution / total contribution) × daily allocation
- Update contribution page to display real estimated earnings
- Add debug logs for contribution records API
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 08:37:30 -08:00
hailin
6bcb4af028
feat(mining-app): integrate real APIs for Asset and Profile pages
...
- Asset page now uses trading-service /asset/my endpoint
- Profile page integrates auth-service /user/profile and contribution-service
- Add new entities: AssetDisplay, PriceInfo, MarketOverview, TradingAccount
- Add corresponding models with JSON parsing
- Create asset_providers and profile_providers for state management
- Update trading_providers with real API integration
- Extend UserState and UserInfo with additional profile fields
- Remove obsolete buy_shares and sell_shares use cases
- Fix compilation errors in get_current_price and trading_page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 08:22:40 -08:00
hailin
467d637ccc
fix(mining-admin-web): prevent duplicate /api/v2 in rewrite destination
...
Clean NEXT_PUBLIC_API_URL to remove trailing /api/v2 if present,
preventing paths like /api/v2/api/v2/configs/mining/status
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 04:37:32 -08:00
hailin
c9690b0d36
Revert "fix(mining-admin-web): always use /api proxy instead of direct API URL"
...
This reverts commit 7a65ab3319 .
2026-01-14 04:34:22 -08:00