hailin
|
978dfcb2bf
|
feat(docker): 添加 mining-wallet-service 到 docker-compose.2.0.yml
- 添加 mining-wallet-service 服务配置
- 端口: 3025
- 数据库: rwa_mining_wallet
- Redis DB: 15
- KAVA 区块链配置
- 更新所有服务的 healthcheck 路径为 /api/v2/health
- mining-service
- trading-service
- mining-admin-service
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-11 22:53:57 -08:00 |
hailin
|
4d5c9e7c49
|
fix(docker): 为contribution-service添加JWT_SECRET配置
contribution-service需要JWT_SECRET来验证auth-service签发的token。
与auth-service共享相同的密钥配置。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-11 18:14:37 -08:00 |
hailin
|
4b55c63e71
|
fix(contribution-service): 修复CDC同步字段映射,支持完整同步referral数据
主要更改:
1. synced_referrals表增加referrer_user_id和original_user_id字段
- 1.0的referral_relationships表只有referrer_id(user_id),没有referrer_account_sequence
- 保存原始user_id以便后续解析推荐人的account_sequence
2. 修复referral-synced.handler字段映射
- 正确处理1.0的user_id、referrer_id、ancestor_path字段
- ancestor_path从BigInt[]数组转换为逗号分隔的字符串
3. 修复cdc-event-dispatcher表名注册
- 使用正确的表名: referral_relationships, planting_orders
- 移除不需要的user_accounts注册
4. 更新docker-compose.2.0.yml
- 添加CDC_TOPIC_REFERRALS配置
- 移除未使用的CDC_TOPIC_PAYMENTS
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-11 09:27:01 -08:00 |
hailin
|
05a8168a31
|
fix(contribution-service): 修复CDC同步配置,使用正确的planting-service topic
- 修改CDC topic为cdc.planting.public.planting_orders
- 更新healthcheck使用api/v2
- 更新handler适配planting_orders表字段
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-11 09:18:37 -08:00 |
hailin
|
a749a3b9e1
|
fix: 修复auth-service CDC配置和API路由
- 修复docker-compose.2.0.yml中CDC_TOPIC_USERS为正确的topic名称
- 添加CDC_ENABLED环境变量
- 更新Kong配置auth-service路由使用strip_path
- 更新mining-app API端点匹配v2服务路由
- 更新mining-app baseUrl指向Kong网关根路径
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-11 08:29:16 -08:00 |
hailin
|
36d7b7ebfe
|
fix(docker-compose.2.0): 修复healthcheck路径为/api/v1/health并增加start_period到60s
docker-compose.yml里的healthcheck配置会覆盖Dockerfile里的配置
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-11 07:25:30 -08:00 |
hailin
|
1c3e7809ad
|
fix(docker-compose.2.0): 使用external连接1.0网络services_rwa-network
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-10 23:31:53 -08:00 |
hailin
|
86091097a6
|
fix(docker-compose.2.0): 使用bridge驱动自建网络而非external
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-10 23:28:41 -08:00 |
hailin
|
0467e17032
|
fix(docker-compose.2.0): 移除对外部基础设施服务的depends_on
2.0服务使用external network连接1.0的基础设施,不需要depends_on
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-10 23:18:20 -08:00 |
hailin
|
15a5fb6c14
|
feat(mining-admin-service): 添加CDC同步和完整用户管理API
## Prisma Schema 更新
- 添加 CDC 同步表:SyncedUser, SyncedContributionAccount, SyncedMiningAccount, SyncedTradingAccount
- 添加系统数据同步表:SyncedMiningConfig, SyncedDailyMiningStat, SyncedDayKLine, SyncedCirculationPool
- 添加 CDC 进度跟踪:CdcSyncProgress, ProcessedEvent
## CDC 消费者模块
- CdcConsumerService: Kafka 消费者,支持 Debezium CDC 和服务间事件
- CdcSyncService: 同步处理器,从 auth/contribution/mining/trading 服务同步数据
## 新增 API 端点
### 用户管理 (/api/v1/users)
- GET /users - 用户列表(分页、搜索、过滤)
- GET /users/:accountSequence - 用户详情
- GET /users/:accountSequence/contributions - 算力记录
- GET /users/:accountSequence/mining-records - 挖矿记录
- GET /users/:accountSequence/orders - 交易订单
### 系统账户 (/api/v1/system-accounts)
- GET /system-accounts - 系统账户列表
- GET /system-accounts/summary - 系统账户汇总
### 仪表盘增强 (/api/v1/dashboard)
- GET /dashboard - 统计数据(新增用户/算力/挖矿/交易统计)
- GET /dashboard/realtime - 实时数据
- GET /dashboard/stats - 统计数据(别名)
## Docker Compose 更新
- 添加 Kafka 依赖和 CDC topic 配置
- 添加与 auth-service 的依赖关系
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-10 20:36:21 -08:00 |
hailin
|
6ffde0f4c6
|
refactor(docker): 2.0系统共享1.0基础设施并保持完全隔离
- 网络: 使用共享的 rwa-network (external)
- 数据库: 连接 postgres:5432,使用独立数据库名
- Redis: 连接 redis:6379,使用 DB 10-14 分区隔离
- Kafka: 连接 kafka:29092,仅消费 CDC 事件(单向同步)
- 服务依赖: 添加 postgres/redis/kafka 健康检查依赖
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-10 20:01:15 -08:00 |
hailin
|
821c70bf38
|
feat(docker): 添加 2.0 系统 Docker 部署支持
为所有 2.0 服务添加 Dockerfile 和 docker-compose 配置:
后端服务:
- contribution-service (3020) - 算力服务
- mining-service (3021) - 挖矿服务
- trading-service (3022) - 交易服务
- mining-admin-service (3023) - 管理后台 API
- auth-service (3024) - 用户认证服务
前端服务:
- mining-admin-web (3100) - 管理后台前端
Docker 配置:
- docker-compose.2.0.yml: 独立的 2.0 系统编排文件
- 多阶段构建优化镜像大小
- 健康检查确保服务可用性
- 服务依赖顺序正确
部署脚本更新:
- deploy-mining.sh 使用 docker-compose.2.0.yml
- 添加 mining-admin-web 服务别名 (web, admin-web)
- 更新服务端口配置
使用方式:
cd backend/services
docker-compose -f docker-compose.2.0.yml up -d
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-01-10 19:31:02 -08:00 |