Commit Graph

5 Commits

Author SHA1 Message Date
hailin 7744abf57d fix(reporting-service): 修复 DashboardController 的依赖注入问题
在 ApiModule 中导入 RedisModule,使 HotWalletBalanceCacheService
可以被 DashboardController 注入使用。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 23:12:24 -08:00
hailin 6e395ce58c feat(reporting): add system account report aggregation feature
## Changes
- Add system account report aggregation APIs in reporting-service
- Add internal statistics APIs in wallet-service, reward-service, authorization-service
- Add system accounts tab in admin-web statistics page
- Enhanced metadata in reward entries for traceability

## Backend Changes
- wallet-service: Add offline settlement summary and system accounts balances APIs
- reward-service: Add expired rewards summary API
- authorization-service: Add fixed accounts list, region accounts summary APIs
- reporting-service: Add HTTP clients and aggregation service for system account reports

## Frontend Changes
- admin-web: Add SystemAccountsTab component with fixed accounts, region summaries,
  offline settlement stats, and expired rewards display

## Rollback Instructions
Each file includes rollback comments with [2026-01-04] tag marking new additions.
To rollback: delete files marked as new, remove code sections marked with date comments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 22:06:58 -08:00
hailin 0e367d042c feat(reporting): 实现 Dashboard API 完整功能
## 概述
为 reporting-service 实现完整的 Dashboard API 端点,支持统计卡片、趋势图表、
区域分布和最近活动等功能。

## API 端点
- GET /dashboard/stats: 获取统计卡片数据
- GET /dashboard/charts: 获取趋势图表数据 (支持 7d/30d/90d 周期)
- GET /dashboard/region: 获取区域分布数据
- GET /dashboard/activities: 获取最近活动列表

## 新增 DTO
- DashboardStatsResponseDto: 统计卡片响应
- DashboardTrendResponseDto: 趋势数据响应
- DashboardRegionResponseDto: 区域分布响应
- DashboardActivitiesResponseDto: 活动列表响应

## Repository 层
- IDashboardStatsSnapshotRepository: 统计快照接口
- IDashboardTrendDataRepository: 趋势数据接口
- ISystemActivityRepository: 系统活动接口

## External Clients (已弃用)
- AuthorizationServiceClient: 授权服务客户端
- IdentityServiceClient: 身份服务客户端
注:已改为事件驱动架构,这些客户端仅作为备用

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 00:31:08 -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 1fe66f34fd feat(reporting-service): Implement complete reporting service with DDD architecture
- Domain layer: ReportDefinition/ReportSnapshot aggregates, value objects (DateRange, ReportPeriod, etc.)
- Application layer: CQRS commands/queries, ReportingApplicationService
- Infrastructure layer: Prisma repositories, Redis cache, export services (Excel/CSV/PDF)
- API layer: REST controllers, DTOs with validation
- Testing: Unit tests, integration tests, E2E tests, Docker test environment
- Documentation: Architecture, API, Development, Testing, Deployment, Data Model docs
- Supports scheduled report generation, multi-format export, and data caching

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 08:12:57 -08:00