hailin
|
a41feb841f
|
fix(mining-service): 添加 ManualMiningRecord 缺失的 migration 0004
schema 中定义的 manual_mining_records 表缺少对应的 migration 文件,
导致 schema 与 migration 不一致。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 22:30:04 -08:00 |
hailin
|
534d4ce70c
|
fix(2.0): 所有 Kafka consumer 改为 fromBeginning: true 确保 full-reset 全量同步
- mining-blockchain-service: withdrawal/mpc/deposit-ack consumer 改为 fromBeginning: true
- trading-service: cdc-consumer/market-maker-deposit consumer 改为 fromBeginning: true
- mining-service: contribution-event handler 改为 fromBeginning: true
- deploy-mining.sh: CDC_CONSUMER_GROUPS 补充所有 2.0 服务的 consumer group ID
确保 ./deploy-mining.sh full-reset 可以 100% 从 0 开始同步所有 1.0 数据。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 22:20:23 -08:00 |
hailin
|
5dc37e24d2
|
fix(deploy): cdc_resnapshot 清空 rwa_auth 的 processed_cdc_events
cdc_resnapshot 之前只清空 rwa_contribution 的幂等表,遗漏了 rwa_auth,
导致 wallet address CDC 重新快照后消息被幂等检查跳过,KAVA 地址无法重新同步。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 14:24:59 -08:00 |
hailin
|
f2b83650b5
|
fix(deploy): full-reset 添加 wallet CDC consumer group 和修复 cdc-resnapshot
- CDC_CONSUMER_GROUPS 添加 auth-service-cdc-group-wallet
- cdc_resnapshot 同时停止 auth-service(之前只停了 contribution-service)
- cdc_resnapshot 完成后同时启动 auth-service
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 14:12:45 -08:00 |
hailin
|
6f01892945
|
fix(debezium): identity connector 添加 wallet_addresses 表
Debezium identity-connector 之前只捕获 user_accounts 表,
导致 auth-service 的 WalletAddressCdcConsumer 收不到任何事件。
添加 public.wallet_addresses 到 table.include.list。
需要重新注册 connector 才能生效。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 14:06:42 -08:00 |
hailin
|
dc51c19dfd
|
fix(mining-admin): 修复 APK 解析 adbkit-apkreader 导入方式
adbkit-apkreader 是 CJS 模块,直接导出 class(module.exports = ApkReader),
不存在 .default 属性。将 dynamic import 改为 require 直接调用 ApkReader.open()。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 13:45:25 -08:00 |
hailin
|
3ff38ca9c2
|
fix(mining-admin): 添加 buildNumber 到版本检查返回结果
mining-app VersionInfo.fromJson 要求 buildNumber 字段,
CheckUpdateResult 接口和 checkUpdate 方法之前未包含该字段。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 13:29:53 -08:00 |
hailin
|
96e1fa4534
|
fix(mining-admin): 适配 mining-app 版本检查 API 格式
- CheckUpdateDto: current_version_code 改为 versionCode 匹配 mining-app 请求参数
- MobileVersionController: 响应格式改为 { hasUpdate, latestVersion: {...} } 匹配 mining-app 解析
- TransformInterceptor: 添加 @SkipTransform() 装饰器,移动端版本检查接口跳过响应包装
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 13:26:13 -08:00 |
hailin
|
f595c6f26d
|
fix(mining-admin): 将 upload DTO 的 changelog 改为可选
前端 upload-modal 在用户未填写更新日志时不发送 changelog 字段,
导致 DTO 校验失败返回 400。将 changelog 改为 @IsOptional(),
与前端行为一致。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 13:13:57 -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
|
7e289430ae
|
feat(auth-service): CDC 同步 wallet_addresses 并提供内部 API
- auth-service: 新增 SyncedWalletAddress Prisma model 和 migration
- auth-service: 新增 WalletAddressCdcConsumer 消费 1.0 钱包地址变更
- auth-service: 新增 InternalController 提供 kava 地址查询 API
- trading-service: IdentityClient 改调 auth-service 内部 API
- docker-compose.2.0.yml: 添加 CDC_TOPIC_WALLET_ADDRESSES 和 AUTH_SERVICE_URL
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 12:20:23 -08:00 |
hailin
|
83fa6bec74
|
feat(c2c): 支持绿积分(GREEN_POINTS)作为默认支付方式
- 后端 paymentMethod 字段从 PostgreSQL 枚举改为 String,支持逗号分隔多种支付方式
- 添加数据库迁移将 C2cPaymentMethod 枚举列转为 TEXT 类型
- DTO 验证改为 @IsString() 接受 GREEN_POINTS 及其组合
- 前端保持发送完整的支付方式列表(含 GREEN_POINTS)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 11:39:00 -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
|
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
|
28c73136a8
|
fix(trading-service): 修复P2P转账历史查询参数解析
确保 page 和 pageSize 是有效数字,避免 skip: NaN 错误
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 09:00:28 -08:00 |
hailin
|
dcc83b9f79
|
fix(trading-service): 使用Docker容器名调用auth-service
改为使用 auth-service:3024 替代 IP 地址
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 08:56:24 -08:00 |
hailin
|
8b459dd33f
|
fix(trading-service): 修复P2P转账AUTH_SERVICE_URL默认值
默认值从localhost改为内网IP,解决Docker环境中调用auth-service失败的问题
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 08:49:54 -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
|
7a8a3a8fd1
|
feat(trading-service): 初始化做市商时自动读取环境变量配置钱包地址
- 从 FUSDT_MARKET_MAKER_ADDRESS 环境变量读取做市商钱包地址
- 初始化时自动设置 kavaWalletAddress
- 如果做市商已存在但钱包地址为空,也会从环境变量更新
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 07:31:16 -08:00 |
hailin
|
812b127ace
|
fix(trading-service): 添加缺失的数据库字段迁移
Schema 中有但 migration 中缺失的字段:
- market_maker_configs: kava_wallet_address, mpc_username
- c2c_orders: seller_kava_address, bot_purchased, payment_tx_hash
这些字段缺失导致 500 错误:
"The column `market_maker_configs.kava_wallet_address` does not exist"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-29 07:20:21 -08:00 |
hailin
|
b4afc4615c
|
fix(mining-admin-service): 修复 APK 解析和添加 AppVersion migration
1. 修复 package-parser.service.ts:
- ApkReader.open 需要文件路径,改为先写入临时文件再解析
- 添加 fs/path/os 模块导入
- 完成后自动清理临时文件
2. 添加 AppVersion 表 migration:
- 创建 Platform 枚举类型 (ANDROID, IOS)
- 创建 app_versions 表
- 添加必要索引
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 22:24:45 -08:00 |
hailin
|
fd64903841
|
fix(mining-admin-service): 添加 adbkit-apkreader 类型声明
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 22:21:18 -08:00 |
hailin
|
8314dda670
|
fix(mining-admin-service): 更新 package-lock.json
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 22:17:01 -08:00 |
hailin
|
4ce43c20cc
|
fix(mining-admin-service): 添加 APK/IPA 解析依赖包
添加版本管理所需的包解析依赖:
- adbkit-apkreader: 解析 Android APK 文件
- jszip: 解压 iOS IPA 文件
- plist: 解析 iOS Info.plist 文件
- @types/plist: TypeScript 类型声明
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 22:15:43 -08:00 |
hailin
|
edc0ea46c9
|
fix: 修复 mining-blockchain-service Kafka consumer group 冲突
- mining-blockchain-service 使用独立的 consumer group ID,避免与 blockchain-service 冲突
- withdrawal-event-consumer: blockchain-service-withdrawal-events -> mining-blockchain-service-withdrawal-events
- mpc-event-consumer: blockchain-service-mpc-events -> mining-blockchain-service-mpc-events
- deposit-ack-consumer: blockchain-service-deposit-acks -> mining-blockchain-service-deposit-acks
- 更新 docker-compose.yml 和 kafka.config.ts 的默认配置
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 22:05:55 -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
|
219fb7bb69
|
fix(mining-blockchain): 移除旧的 MARKET_MAKER_* 变量名引用
- main.ts: 使用 EUSDT/FUSDT_MARKET_MAKER_* 验证配置
- blockchain.config.ts: 使用 eusdtMarketMaker/fusdtMarketMaker 配置
- market-maker-deposit-detection.service.ts: 每种代币使用独立的做市商钱包地址
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 19:20:48 -08:00 |
hailin
|
3b95a8a332
|
feat(mining-blockchain): 支持 eUSDT 和 fUSDT 独立做市商钱包
- 新增 EUSDT_MARKET_MAKER_USERNAME/ADDRESS 配置
- 新增 FUSDT_MARKET_MAKER_USERNAME/ADDRESS 配置
- mpc-signing.client.ts: 分离 eUSDT 和 fUSDT 做市商签名方法
- erc20-transfer.service.ts: 根据代币类型选择对应钱包转账
- transfer.controller.ts: 更新余额查询和状态接口
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 19:05:15 -08:00 |
hailin
|
aa33803d08
|
fix(mining-blockchain): 修正做市商钱包配置项顺序
统一 USERNAME 在前,ADDRESS 在后的格式,与 HOT_WALLET 保持一致
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 18:33:16 -08:00 |
hailin
|
cfdcd9352a
|
feat(mining-blockchain-service): 支持做市商独立MPC钱包签名
- MpcSigningClient 支持两个钱包: C2C Bot 和做市商
- HOT_WALLET_USERNAME/ADDRESS: C2C Bot 热钱包
- MARKET_MAKER_MPC_USERNAME/WALLET_ADDRESS: 做市商钱包
- Erc20TransferService 新增 transferTokenAsMarketMaker() 方法
- eUSDT/fUSDT 转账使用做市商钱包签名和转账
- 新增 /transfer/market-maker/status 状态检查接口
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 18:27:09 -08:00 |
hailin
|
4283a369ae
|
fix(mining-blockchain-service): 修复Redis DB配置超出范围问题
- 将 REDIS_DB 从 16 改为 8(Redis 仅支持 0-15)
- 更新 .env.example 添加做市商钱包配置说明
- 添加 eUSDT/fUSDT 合约地址配置
- 添加区块扫描配置项
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 18:16:38 -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
|
94f9e7d5b5
|
fix(trading-service): 使用事务确保成交时账户余额更新的原子性
## 问题描述
用户 D25122700015 的卖单成交后,订单状态变为 FILLED,成交记录存在,
但 frozenShares 未释放,cashBalance 未增加,交易流水缺少 SELL 记录。
## 根本原因
`tryMatch` 方法中的数据库操作没有使用事务:
1. trade.create - 单独提交
2. orderRepository.save - 单独提交
3. accountRepository.save(buyerAccount) - 单独提交
4. accountRepository.save(sellerAccount) - 可能因前面异常而跳过
如果步骤 1-3 成功但步骤 4 失败,会导致:
- 成交记录存在 ✓
- 订单状态 FILLED ✓
- 买方账户正常 ✓
- 卖方账户未更新 ✗
## 修复方案
使用 Prisma 事务包装所有关键操作,确保原子性:
1. 创建成交记录
2. 更新买单状态
3. 更新卖单状态(含销毁信息)
4. 更新买方账户(扣除冻结现金,增加积分股)
5. 更新卖方账户(扣除冻结积分股,增加现金)
6. 记录交易流水
任何一步失败,整个事务回滚。
## 受影响用户
- D25122700015: 订单 OMKXYTXS6KKC3A6
- 成交记录: TMKXYTXXH8CYQZ7
- 需要手动修复现有数据
## 回滚方法
git revert <此commit>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 17:20:31 -08:00 |
hailin
|
1974c43eba
|
feat(market-maker): 实现做市商区块链充值监控功能
- mining-blockchain-service:
- 添加 MarketMakerDeposit 和 MarketMakerBlockCheckpoint 表
- 添加 eUSDT/fUSDT 代币合约配置
- 实现做市商钱包充值检测服务
- 添加启动时配置验证和错误日志
- 发布充值确认事件到 Kafka
- trading-service:
- 添加做市商充提记录表 (MarketMakerDeposit, MarketMakerWithdraw)
- 添加 Kafka 消费者监听充值确认事件
- 实现充值自动入账和流水记录
- 部署配置:
- 更新 docker-compose 添加新环境变量
- 更新 deploy-mining.sh 添加 blockchain 服务
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 17:13:41 -08:00 |
hailin
|
042a52550b
|
feat(c2c): 实现C2C Bot自动交易系统
- 创建独立的 mining-blockchain-service 服务 (基于 blockchain-service)
- 添加 dUSDT 转账接口供 C2C Bot 调用
- 实现 C2cBotService 自动购买卖单
- 实现 C2cBotScheduler 每10秒扫描待处理卖单
- 添加 BlockchainClient 和 IdentityClient 客户端
- 更新 C2cOrder 模型添加 Bot 购买相关字段
- 使用 MPC 热钱包签名交易
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 07:10:25 -08:00 |
hailin
|
cec98e9d3e
|
feat(contribution): 添加定时任务补发未完全解锁的贡献值
每10分钟扫描已认种但解锁状态不完整的账户,检查其直推用户认种情况,
若满足新的解锁条件则自动补发层级贡献值和奖励档位。
- 添加 findAccountsWithIncompleteUnlock 查询方法
- 添加 findPendingLevelByAccountSequence 和 claimLevelRecords 方法
- 实现 processBackfillForAccount 和 claimLevelContributions 补发逻辑
- 添加 processContributionBackfill 定时任务(每10分钟执行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-28 06:25:57 -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
|
37d3300b17
|
fix(contribution-service): CDC planting_orders 阶段按 order_id 排序处理
## 问题背景
用户 D25122700018 的层级已解锁(unlocked_level_depth=5),但缺少 TEAM_LEVEL 算力记录。
其下级用户 D25122700019 的团队算力被错误地分配给了 D25122700015(level 2)而非 D25122700018(level 1)。
## 根本原因分析
1. 源系统数据顺序正确:
- D25122700018: order_id=55, created_at=2026-01-09 11:57:01 (先认种)
- D25122700019: order_id=57, created_at=2026-01-09 12:00:38 (后认种)
2. Kafka 消息顺序错误:
- D25122700019: offset=732, synced_at=10:15:32 (先处理)
- D25122700018: offset=798, synced_at=10:15:41 (后处理)
3. 原因:Debezium snapshot 按 PostgreSQL 物理存储顺序(heap order)读取数据,
而非按主键顺序。即使 topic 只有 1 个分区,消息顺序仍然错误。
4. 后果:当处理 D25122700019 的认种时,D25122700018 的 unlocked_level_depth 还是 0,
导致 D25122700019 的 TEAM_LEVEL 算力跳过 level 1 直接分配给 level 2。
## 解决方案
对 planting_orders 阶段实现"收集-排序-处理"模式:
1. 先收集所有消息到内存数组(不立即处理)
2. 按 order_id(源系统主键)升序排序
3. 再按排序后的顺序逐条处理
这确保上游用户的认种记录先于下游用户处理,避免算力分配错误。
## 受影响用户案例
- 上游用户: D25122700018 (order_id=55)
- 下游用户: D25122700019 (order_id=57, 58, 59)
- 错误分配: D25122700019 的 TEAM_LEVEL 给了 D25122700015 而非 D25122700018
## 回滚方法
如需回滚此修改,将 consumePhaseToEnd 方法中的判断条件改为 false:
```typescript
const needsSorting = false; // 原: phase.tableName === 'planting_orders'
```
或直接 revert 此 commit。
## 风险评估
- 业务逻辑完全不变,只改变处理顺序
- user_accounts 和 referral_relationships 阶段保持原有逻辑
- 内存开销可控(10000 条记录约 5MB)
- 排序开销可忽略(O(n log n))
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-23 03:41:14 -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
|
0009a9358d
|
fix(mining-admin-service): 修正调用 mining-service admin API 路径
mining-service 的 AdminController 路由前缀改为 mining/admin 后,
mining-admin-service 中调用的路径也需要相应修改
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-22 02:15:12 -08:00 |
hailin
|
ab320083f7
|
fix(mining-service): 修复批量补发记录分页参数类型问题
Query 参数是字符串类型,需要显式转换为数字
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-22 02:05:16 -08:00 |
hailin
|
c7f7c10d59
|
fix(mining-service): 修正 AdminController 路由前缀
将 AdminController 路由从 /admin 改为 /mining/admin,
以匹配 Kong 网关路由 /api/v2/mining
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-22 01:51:11 -08:00 |
hailin
|
134e45e0bf
|
fix(mining-admin-service): 审计日志失败不影响批量补发返回结果
批量补发实际操作完成后,即使审计日志创建失败也应返回成功响应。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-22 00:57:00 -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
|
f44af3a2ed
|
fix(batch-mining): 修正grandTotalAmount重复累加问题
用户可能在多个批次中出现,之前按批次累加batchTotalAmount会导致
同一用户的收益被重复计算。改为直接累加所有用户的amount(去重)。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-22 00:04:35 -08:00 |
hailin
|
18e9749ad8
|
fix(batch-mining): 修正总天数计算逻辑
- 总挖矿天数 = 从2025-11-08到今天的自然天数
- 最后阶段天数 = 总天数 - 前面各阶段天数之和
- 不再累加preMineDays作为总天数
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-21 23:46:27 -08:00 |
hailin
|
d47276a460
|
fix(batch-mining): 添加详细日志追踪阶段划分和总天数计算
- 添加更清晰的阶段划分注释说明
- 添加日志打印最后批次preMineDays=0时改为1天的情况
- 添加预期总金额日志用于验证计算正确性
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-21 23:44:10 -08:00 |
hailin
|
0adc4c8c26
|
fix(batch-mining): 最后批次preMineDays=0时改为1天
最后一个批次即使 preMineDays=0,也要算1天(所有人一起挖1天生成收益)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-21 23:37:35 -08:00 |
hailin
|
d98e22f151
|
fix(batch-mining): 移除多余的最后阶段
根据需求:总天数 = 所有批次的 preMineDays 之和
- 阶段1: 只有第一批,分配第一批的 preMineDays 天
- 阶段2: 第一批+第二批,分配第二批的 preMineDays 天
- 依次类推...
没有额外的"最后阶段",不再使用 maxTotalMiningDays
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-21 23:35:50 -08:00 |
hailin
|
c90d88a047
|
Revert "fix(batch-mining): 修正阶段划分逻辑"
This reverts commit 9e9c791283.
|
2026-01-21 23:34:12 -08:00 |