hailin
e2cf3c3d7e
fix(admin-service): 修复通知查询时publishedAt为null的问题
...
问题:当 publishedAt 为 NULL(表示立即发布)时,Prisma 的
`publishedAt: { lte: now }` 条件不匹配,导致通知无法显示
修复:将查询条件改为 OR 逻辑:
- publishedAt 为 null(立即发布)
- publishedAt <= now(定时发布且已到时间)
影响的方法:
- findNotificationsForUser
- countUnreadForUser
- markAllAsRead
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 05:56:43 -08:00
hailin
fea0b42223
fix(admin-service): 修复维护拦截器路径检测和错误处理
...
问题:添加系统维护检测后站内通知功能失效
修复:
1. 使用 request.url 获取完整路径(包含 /api/v1 前缀)
2. 同时支持带前缀和不带前缀的路径检测
3. 添加 try-catch 错误处理,数据库错误时放行请求而非阻断
4. 添加日志记录便于调试
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 05:01:32 -08:00
hailin
0781c53101
fix(admin-service): 修复 getCurrentStatus 方法使用旧响应格式的问题
...
AdminMaintenanceController.getCurrentStatus() 方法仍使用旧的 inMaintenance 字段,
导致构建失败。更新为与 MobileMaintenanceController 一致的新格式:
- 使用 isUnderMaintenance 代替 inMaintenance
- 使用嵌套的 maintenance 对象包含详情
- 添加 remainingMinutes 字段计算
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:11:54 -08:00
hailin
75a9ffadef
fix(admin-service): 修复移动端维护状态API响应格式不匹配问题
...
移动端期望的格式:
{
"isUnderMaintenance": true,
"maintenance": { "title", "message", "startTime", "endTime", "remainingMinutes" }
}
后端之前返回的格式:
{
"inMaintenance": true,
"title", "message", "endTime"
}
修改内容:
- 字段名 inMaintenance → isUnderMaintenance
- 嵌套维护详情到 maintenance 对象
- 添加 startTime 和 remainingMinutes 字段
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 05:10:18 -08:00
hailin
1af5780b19
fix(admin-service): 修复共管钱包 status 类型不匹配问题
...
使用 Prisma 生成的类型替代手动定义的接口:
- PrismaCoManagedWalletSession -> @prisma/client
- PrismaCoManagedWallet -> @prisma/client
- status 字段使用 PrismaWalletSessionStatus 枚举类型
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 00:02:18 -08:00
hailin
e51450d9f9
chore(admin-service): 添加系统维护和共管钱包的数据库迁移
...
添加缺失的 migration 文件,包含:
- system_maintenances 表 (系统维护公告)
- WalletSessionStatus 枚举
- co_managed_wallet_sessions 表 (共管钱包会话)
- co_managed_wallets 表 (共管钱包记录)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:36:42 -08:00
hailin
c328d8b59b
feat(mobile-app,admin): 添加系统维护功能和通知徽章功能
...
系统维护功能:
- 后端: 添加系统维护配置实体、仓库和控制器
- 后端: 添加维护模式拦截器,返回503状态码
- admin-web: 添加系统维护管理页面,支持创建/编辑/开关维护配置
- mobile-app: 添加维护状态检查服务和阻断弹窗
- mobile-app: 在启动页、向导页集成维护检查
- mobile-app: 支持App从后台恢复时自动检查维护状态
通知徽章功能:
- 添加通知徽章Provider,监听登录状态自动刷新
- 底部导航栏"我的"标签显示未读通知红点
- 进入通知页面自动刷新徽章状态
- 切换账号、退出登录自动清除徽章
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:26:01 -08:00
hailin
fea01642e7
feat(co-managed-wallet): 添加分布式多方共管钱包创建功能
...
## 功能概述
实现分布式多方共管钱包创建功能,包括 Admin-Web 扩展和 Service-Party 桌面应用。
## 主要变更
### 1. Admin-Web 扩展 (前端)
- 新增 CoManagedWalletSection 组件 (frontend/admin-web/src/components/features/co-managed-wallet/)
- 在授权管理页面添加共管钱包入口卡片
- 实现创建钱包向导: 配置 → 邀请 → 生成 → 完成
- 包含组件: ThresholdConfig, InviteQRCode, ParticipantList, SessionProgress, WalletResult
### 2. Admin-Service 后端 API
- 新增共管钱包领域实体和枚举 (domain/entities/co-managed-wallet.entity.ts)
- 新增 REST 控制器 (api/controllers/co-managed-wallet.controller.ts)
- 新增服务层 (application/services/co-managed-wallet.service.ts)
- 新增 Prisma 模型: CoManagedWalletSession, CoManagedWallet
- 更新 app.module.ts 注册新模块
### 3. Session Coordinator 扩展 (Go)
- 新增会话类型: SessionTypeCoManagedKeygen ("co_managed_keygen")
- 扩展 MPCSession 实体添加 WalletName 和 InviteCode 字段
- 更新 PostgreSQL 和 Redis 适配器支持新字段
- 新增数据库迁移: 008_add_co_managed_wallet_fields
### 4. Service-Party 桌面应用 (新项目)
- 位置: backend/mpc-system/services/service-party-app/
- 技术栈: Electron + React + TypeScript + Vite
- 包含模块:
- gRPC 客户端 (连接 Message Router)
- TSS 处理器 (子进程方式运行 Go TSS 协议)
- 本地加密存储 (AES-256-GCM)
- 页面: Home, Join, Create, Session, Settings
## 修改的现有文件 (便于回滚)
1. backend/mpc-system/services/session-coordinator/domain/entities/mpc_session.go
- 添加 SessionTypeCoManagedKeygen 常量
- 添加 IsKeygen() 方法
- 添加 WalletName, InviteCode 字段
- 更新 ReconstructSession, ToDTO, SessionDTO
2. backend/mpc-system/services/session-coordinator/adapters/output/postgres/session_postgres_repo.go
- 更新 SQL 查询包含 wallet_name, invite_code
- 更新 Save, FindByUUID, FindByStatus 等方法
- 更新 scanSessions, sessionRow
3. backend/mpc-system/services/session-coordinator/adapters/output/redis/session_cache_adapter.go
- 更新 sessionCacheEntry 结构
- 更新 sessionToCacheEntry, cacheEntryToSession
4. backend/services/admin-service/prisma/schema.prisma
- 新增 WalletSessionStatus 枚举
- 新增 CoManagedWalletSession, CoManagedWallet 模型
5. backend/services/admin-service/src/app.module.ts
- 导入并注册共管钱包相关组件
6. frontend/admin-web/src/app/(dashboard)/authorization/page.tsx
- 导入并添加 CoManagedWalletSection
7. frontend/admin-web/src/infrastructure/api/endpoints.ts
- 添加 CO_MANAGED_WALLETS API 端点
## 回滚说明
如需回滚此功能:
1. 回滚数据库迁移: 运行 008_add_co_managed_wallet_fields.down.sql
2. 删除新增文件夹:
- backend/mpc-system/services/service-party-app/
- frontend/admin-web/src/components/features/co-managed-wallet/
- backend/services/admin-service/src/**/co-managed-wallet*
3. 恢复修改的文件到前一个版本
4. 运行 prisma generate 重新生成 Prisma 客户端
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 21:39:07 -08:00
hailin
fe593714ae
fix(admin-service): 修复上传版本时isForceUpdate始终为true的问题
...
问题原因:
- ValidationPipe配置了enableImplicitConversion: true
- FormData发送字符串"false"时,Boolean("false")被隐式转换为true
- @Transform装饰器在隐式转换之后执行,收到的value已经是true
解决方案:
- 在@Transform中使用obj参数获取原始未转换的值
- 手动判断字符串"true"/"false"并正确转换为布尔值
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 19:31:47 -08:00
hailin
058849dc2c
fix(admin-service): 修复上传版本时isForceUpdate默认为true的问题
...
- 改进Transform装饰器,正确处理FormData传递的字符串"false"
- 添加调试日志用于排查问题
问题原因:FormData传递的布尔值会被转为字符串,
原来的Transform可能在某些情况下处理不正确
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 19:21:48 -08:00
hailin
fff88d0323
chore(db): 添加用户画像系统数据库迁移
...
新增表:
- tag_categories: 标签分类
- user_tags: 用户标签定义
- user_tag_assignments: 用户-标签关联
- user_classification_rules: 分类规则
- user_features: 用户特征 (RFM等)
- audience_segments: 人群包
- user_tag_logs: 标签变更日志
- notification_tag_targets: 通知-标签关联
- notification_user_targets: 通知-用户关联
新增枚举:
- TagType, TagValueType, TagAction, SegmentUsageType, TargetLogic
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:43:19 -08:00
hailin
b5e45c4532
feat(user-profile): 实现用户画像系统和通知定向功能
...
后端 (admin-service):
- 新增用户标签系统:标签分类、标签定义、用户标签分配
- 新增分类规则引擎:支持自动打标规则
- 新增人群包管理:支持复杂条件组合筛选用户
- 增强通知系统:支持按标签、按人群包、指定用户定向发送
- 新增自动标签同步定时任务
- Prisma Schema 扩展支持新数据模型
前端 (admin-web):
- 通知管理页面新增 Tab 切换:通知列表、用户标签、人群包
- 用户标签管理:分类管理、标签 CRUD、颜色/类型配置
- 人群包管理:条件组编辑器、逻辑运算符配置
- 通知编辑器:支持按标签筛选和指定用户定向
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:19:05 -08:00
hailin
726b317c23
fix(admin-service): 修复用户事件消费时 payload 嵌套层级错误
...
identity-service 发布的消息结构为 { eventId, eventType, payload: {...} },
但 admin-service 消费时直接使用 eventData 而不是 eventData.payload,
导致 payload.userId 为 undefined,BigInt(undefined) 抛出异常被静默吞掉,
用户数据无法同步到 UserQueryView。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 19:06:23 -08:00
hailin
45fcae5ef5
revert: 撤销 admin-service seed 脚本
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-21 22:41:24 -08:00
hailin
a1a9a087c5
fix(admin-service): 修复 Kafka topic 订阅不匹配问题
...
问题:admin-web 用户管理页面无数据
原因:admin-service 订阅的是 'identity.events',
但 identity-service 发送到的是具体的 topic 如 'identity.UserAccountCreated'
修复:将订阅的 topics 改为与 identity-service 的 IDENTITY_TOPICS 一致:
- identity.UserAccountCreated
- identity.UserAccountAutoCreated
- identity.PhoneBound
- identity.KYCSubmitted
- identity.KYCVerified
- identity.KYCRejected
- identity.UserAccountFrozen
- identity.UserAccountDeactivated
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-21 22:40:31 -08:00
hailin
8579529571
feat(admin-service): 添加 seed 脚本同步系统账户到 user_query_view
...
问题:admin-web 用户管理页面无数据,因为 user_query_view 表是空的
原因:identity-service 的 seed 创建的系统账户不会触发 Kafka 事件
解决方案:
- 创建 admin-service 的 seed.ts,直接同步系统账户到 user_query_view
- 配置 package.json 的 prisma.seed
运行方式:
cd backend/services/admin-service && npx prisma db seed
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-21 22:35:32 -08:00
hailin
86d3a3f6a2
perf(docker): 优化Dockerfile构建,避免最后chown整个目录
...
- 在build阶段提前创建用户和设置目录权限
- 使用--chown=nestjs:nodejs复制文件
- 删除chown -R nestjs:nodejs /app
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 19:31:58 -08:00
hailin
4fabefc5d2
fix(admin-service): 添加 Kafka 配置解决用户数据同步问题
...
添加 KAFKA_BROKERS, KAFKA_CLIENT_ID, KAFKA_CONSUMER_GROUP 环境变量,
使 admin-service 能够正确连接 Kafka 并从 identity-service 同步用户数据。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 03:09:44 -08:00
hailin
3d93ebe928
fix(admin-service): 修复 Dockerfile 启动脚本生成问题
...
使用 printf 替代 echo 来创建 start.sh 脚本,确保正确处理换行符,
使数据库迁移能够在容器启动时正确执行。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 02:59:53 -08:00
hailin
00a239a271
fix(admin-service): 添加 user_query_view 等表的迁移文件
...
添加缺失的迁移文件:
- user_query_view 表(用户查询视图)
- event_consumer_offsets 表(事件消费位置追踪)
- processed_events 表(已处理事件记录)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 02:37:11 -08:00
hailin
f20643599e
fix: 修复多个服务的 TypeScript 编译错误
...
- admin-service: 添加 kafkajs 依赖,修复 SystemConfigEntity null vs undefined 类型
- authorization-service: 修复 selfPlantingCount 属性名,修复 AuthorizationRole factory 参数
- identity-service: 修复测试文件 accountSequence 类型(number -> string)
- admin-web: 在 authSlice 中添加 refreshToken 支持
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 06:29:49 -08:00
hailin
943fd9efe9
chore: 提交所有未提交的修改
...
包括:
- admin-service: 系统配置功能
- authorization-service: 自助授权申请功能
- planting-service: 资金分配服务
- reward-service: 奖励计算服务
- admin-web: 用户管理和设置页面
- mobile-app: 授权、认证、路由等功能
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 06:09:43 -08:00
hailin
ca619bff0b
feat(admin): 实现用户管理功能完整前后端架构
...
## 概述
为 admin-web 用户管理页面实现完整的前后端架构,采用事件驱动 CQRS 模式,
通过 Kafka 事件同步用户数据到本地物化视图,避免跨服务 HTTP 调用。
## admin-service 后端变更
### 数据库 Schema
- UserQueryView: 用户查询视图表 (通过 Kafka 事件同步)
- EventConsumerOffset: 事件消费位置追踪
- ProcessedEvent: 已处理事件记录 (幂等性)
### 新增组件
- IUserQueryRepository: 用户查询仓储接口
- UserQueryRepositoryImpl: 用户查询仓储实现
- UserEventConsumerService: Kafka 事件消费者
- UserController: 用户管理 API 控制器
### API 端点
- GET /admin/users: 用户列表 (分页/筛选/排序)
- GET /admin/users/🆔 用户详情
- GET /admin/users/stats/summary: 用户统计
## identity-service 变更
- 新增 UserProfileUpdatedEvent 事件
- updateProfile 方法现在会发布事件
## admin-web 前端变更
- userService: 用户 API 服务封装
- useUsers/useUserDetail: React Query hooks
- 用户管理页面接入真实 API
- 添加加载骨架屏/错误重试/空数据提示
## 架构特点
- CQRS: 读从本地视图,写触发事件
- 事件驱动: Kafka 事件同步,微服务解耦
- Outbox 模式: 可靠事件发布
- 幂等性: ProcessedEvent 防重复处理
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 02:29:11 -08:00
hailin
bad14bcb32
chore(admin-service): 更新 package-lock.json
...
同步 uuid 依赖到 lock 文件
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 01:00:08 -08:00
hailin
44f7e16d3a
fix(admin-service): 添加缺失的 uuid 依赖
...
notification.controller.ts 使用了 uuid 生成 ID,但 package.json 缺少依赖
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 00:57:04 -08:00
hailin
db37fbf860
feat(notification): 添加通知中心功能
...
后端 (admin-service):
- 新增 Notification 和 NotificationRead 数据模型
- 支持通知类型: 系统/活动/收益/升级/公告
- 实现管理端 API: 创建/更新/删除/列表
- 实现移动端 API: 获取通知列表/未读数量/标记已读
前端 (mobile-app):
- 新增 NotificationService 和 Provider
- 新增通知中心页面 (NotificationInboxPage)
- 在"我的"页面右上角添加通知图标(带未读角标)
- 支持查看通知详情、标记已读、全部已读
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 20:45:03 -08:00
hailin
2ed1658c16
fix(admin-service): exclude /downloads from API prefix
...
Downloads route was getting /api/v1 prefix, making it inaccessible at /downloads
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 07:44:53 -08:00
hailin
424fa3514f
fix(admin-service): add BASE_URL for APK download URLs
...
Set BASE_URL to public API gateway address so mobile app can download
APK files from correct URL instead of localhost.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 07:30:16 -08:00
hailin
eceb927d54
fix(admin-service): relax changelog and minOsVersion validation
...
- Changelog: allow empty value, return default "No changelog provided"
- MinOsVersion: allow empty value and single number format (e.g., "24" -> "24.0")
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 07:09:03 -08:00
hailin
58a359d9b3
fix: changelog default value and referrals map syntax
...
- admin-service: provide default empty string for optional changelog
- profile page: fix map literal syntax for referrals list
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 07:00:02 -08:00
hailin
586dfda8f7
fix(admin): support 4-segment version in domain layer & make changelog optional
...
- VersionName value object now accepts x.y.z.w format
- changelog field is now optional in upload version DTO
- profile page: ensure expired section has full width
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 06:54:55 -08:00
hailin
4307d1eb91
fix(admin): support 4-segment version number format (x.y.z.w)
...
Allow version names like 1.0.0.4 in addition to the standard x.y.z format.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 06:41:46 -08:00
hailin
0c00382a98
fix: convert deploy.sh CRLF to LF and add executable permission
...
- Convert Windows CRLF line endings to Unix LF for all deploy.sh files
- Add executable permission to all deploy.sh scripts
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 07:01:13 -08:00
hailin
dba9d16074
.
2025-12-07 00:40:19 -08:00
hailin
6451cd6fc3
refactor: unify docker-compose configs to use shared infrastructure
...
All microservices now use the shared rwa-network and connect to:
- rwa-postgres: Shared PostgreSQL database server
- rwa-redis: Shared Redis cache
- rwa-kafka: Shared Kafka message broker
Each service's docker-compose.yml now only defines the application
container and uses `networks: external: true` to connect to the
shared infrastructure defined in the root docker-compose.yml.
This prevents duplicate infrastructure containers and ensures all
services can communicate via Kafka and share the same Redis/PostgreSQL.
Services updated:
- admin-service
- backup-service
- blockchain-service
- identity-service
- leaderboard-service
- mpc-service
- presence-service
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 00:35:56 -08:00
hailin
747e4ae8ef
refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing
...
- Remove Address field from PartyEndpoint (parties connect to router themselves)
- Update K8s Discovery to only manage PartyID and Role labels
- Add Party registration and SessionEvent protobuf definitions
- Implement PartyRegistry and SessionEventBroadcaster domain logic
- Add RegisterParty and SubscribeSessionEvents gRPC handlers
- Prepare infrastructure for party-driven MPC coordination
This is the first phase of migrating from coordinator-driven to party-driven
architecture following international MPC system design patterns.
2025-12-05 08:11:28 -08:00
Developer
9898665506
feat(all-services): 添加数据库自动迁移到所有服务启动流程
...
在每个服务的 Dockerfile 中添加启动脚本:
- 服务启动前先执行 prisma migrate deploy
- 如果迁移失败则回退到 prisma db push
- 确保数据库表在服务启动时自动创建
修改的服务:
- identity-service
- wallet-service
- backup-service
- planting-service
- referral-service
- reward-service
- leaderboard-service
- reporting-service
- authorization-service
- admin-service
- presence-service
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 01:50:01 -08:00
Developer
db8350b2f5
fix(identity-service): 更换 npm 镜像为华为云解决超时问题
...
- npmmirror CDN 超时 (EIDLETIMEOUT)
- 改用 mirrors.huaweicloud.com/repository/npm/
- 添加 disturl 配置加速 node 二进制下载
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 18:45:18 -08:00
Developer
114a9e611c
fix(admin-service): 修复 APK 解析 - 使用临时文件代替 Buffer
...
adbkit-apkreader 库只支持文件路径,不支持 Buffer
现在先将 Buffer 写入临时文件,解析后删除
参考: https://github.com/openstf/adbkit-apkreader
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 08:22:14 -08:00
Developer
b1bee7f44e
fix(admin-service): 修复 adbkit-apkreader 模块导入问题
...
使用 require() 代替 ES Module 导入,解决 'Cannot read properties of undefined' 错误
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 08:19:39 -08:00
Developer
f8607ce0b2
feat: 增强移动端版本管理功能
...
## admin-service
- 添加 APK/IPA 预解析 API (/api/v1/versions/parse)
- 添加断点续传下载控制器 (/api/v1/downloads/:filename)
- 配置 uploads volume 持久化存储
- 下载 URL 从 /uploads 改为 /downloads (支持 Range 请求)
## mobile-upgrade (前端)
- 上传文件后自动解析并填充版本信息
- 添加 ParsedPackageInfo 类型和 parsePackage API
## mobile-app (Flutter)
- DownloadManager 支持断点续传 (HTTP Range)
- 添加临时文件管理和清理功能
- 添加构建脚本自动增加版本号 (scripts/build.sh)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 06:57:26 -08:00
Developer
d55a2673dc
fix(admin-service): 修复 APK 解析模块的 TypeScript 编译错误
...
- 修改 adbkit-apkreader 的 import 语法为 default export
- 更新类型声明文件支持 default export 模式
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 02:52:18 -08:00
Developer
f9deca5df0
feat(admin-service): 增强移动端版本上传功能
...
- 添加 APK/IPA 文件解析器自动提取版本信息
- 支持从安装包自动读取 versionName 和 versionCode
- 添加 adbkit-apkreader 依赖解析 APK 文件
- 添加 plist 依赖解析 IPA 文件
- 优化上传接口支持自动填充版本信息
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 02:39:36 -08:00
Developer
086d82f98a
feat(admin-service): 添加 init-db 命令自动创建数据库
...
用法: ./deploy.sh init-db
- 自动创建 rwa_admin 数据库(如不存在)
- 自动运行 Prisma 迁移
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 22:02:41 -08:00
Developer
6f55dc3195
fix(admin-service): 排除移动端API路由的全局前缀
...
移动端APP需要访问 /api/app/version/check,而不是 /api/v1/api/app/version/check
使用 setGlobalPrefix 的 exclude 选项排除移动端路由
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 21:50:04 -08:00
Developer
8a57013596
feat(admin-service): 实现完整的移动端版本管理和升级服务
...
- 添加版本CRUD API:list, get, update, delete, toggle
- 添加文件上传支持:APK/IPA文件上传并计算SHA256校验
- 新增移动端专用API endpoint: /api/app/version/check
- 修复deploy.sh自调用权限问题(使用绝对路径)
- 添加完整的技术文档 APP_UPGRADE_SERVICE.md
新增文件:
- MobileVersionController: 移动端兼容的版本检查接口
- FileStorageService: 文件上传和存储服务
- CQRS handlers: ListVersions, GetVersion, UpdateVersion, DeleteVersion, ToggleVersion, UploadVersion
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 21:31:36 -08:00
Developer
893399e07f
refactor(infra): 统一微服务基础设施为共享模式
...
- 将 presence-service 添加到主 docker-compose.yml(端口 3011,Redis DB 10)
- 更新 init-databases.sh 添加 rwa_admin 和 rwa_presence 数据库
- 重构 admin-service/deploy.sh 使用共享基础设施
- 重构 presence-service/deploy.sh 使用共享基础设施
- 添加 authorization-service 开发指南文档
解决多个微服务独立启动重复基础设施(PostgreSQL/Redis/Kafka)的问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 20:46:50 -08:00
Developer
37c255bdc1
fix(admin-service): 修复TypeScript编译错误
...
- 修复 version.controller.ts 中 FileSize 使用 .bytes 替代 .value
- 修复测试文件中 AppVersion.create 缺少 isForceUpdate 参数
- 修复测试文件中使用正确的 Prisma Platform 枚举类型
- 修复 CreateVersionCommand 参数顺序错误
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 20:01:08 -08:00
Developer
eae1350f35
feat(admin-service): 添加完整的量产部署设施
...
参考 identity-service 的部署配置,为 admin-service 添加:
新增文件:
- .dockerignore: Docker 构建排除配置
- .env.development: 开发环境配置
- .env.production: 生产环境配置(使用变量引用)
- docker-compose.yml: 完整的 Docker 编排(含 PostgreSQL, Redis)
更新文件:
- deploy.sh: 增强部署脚本,新增 30+ 命令(健康检查、测试、清理等)
- docs/DEPLOYMENT.md: 整合快速开始指南和命令速查表
服务架构:
- admin-service: 端口 3010
- PostgreSQL: 端口 5433(避免冲突)
- Redis: 端口 6380(避免冲突)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 19:34:31 -08:00
Developer
79e2b9bfdd
docs(admin-service): 添加完整的技术文档体系
...
文档结构:
- docs/ARCHITECTURE.md: DDD+Hexagonal 架构设计详解
- docs/API.md: RESTful API 完整接口文档
- docs/DEVELOPMENT.md: 开发环境设置和代码规范
- docs/TESTING.md: 三层测试架构 (Unit/Integration/E2E)
- docs/DEPLOYMENT.md: 本地/Docker/生产环境部署指南
- docs/README.md: 文档中心导航和快速入门
架构文档 (ARCHITECTURE.md):
- 服务职责和核心功能说明
- DDD 领域模型 (聚合根、值对象、领域服务)
- 六边形架构分层设计
- 数据流和依赖方向详解
- SOLID 原则应用示例
- 性能优化和安全性考量
API 文档 (API.md):
- 6 个核心 API 端点完整说明
- 请求/响应格式和数据模型
- 错误处理和状态码规范
- cURL/Postman 使用示例
- 版本控制和更新策略
- 最佳实践和常见问题
开发文档 (DEVELOPMENT.md):
- VSCode 配置和推荐插件
- 本地环境初始化步骤
- Git 工作流和 Commit 规范
- 完整开发迭代流程示例
- TypeScript/DDD/NestJS/Prisma 代码规范
- 调试技巧和常见开发任务
测试文档 (TESTING.md):
- 测试金字塔三层架构 (53+21+15=89 测试用例)
- 本地/WSL2/Docker 测试环境设置
- 单元/集成/E2E 测试详细示例
- Make/npm 脚本快速执行
- 覆盖率目标和 CI/CD 集成
- GitHub Actions 配置示例
部署文档 (DEPLOYMENT.md):
- 部署架构和系统要求
- Ubuntu 服务器环境准备
- PM2 本地部署流程
- Docker Compose 容器化部署
- Nginx 反向代理和 SSL 配置
- 数据库备份和日志管理
- 监控告警和故障排查
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 19:01:12 -08:00