rwadurian/backend/services/trading-service/src
hailin 999d0389b3 refactor(trading): 价格数据源从 SharePool 切换到做市商 cashBalance
积分股价格公式中的"绿积分"(分子)本质上就是做市商的积分值余额,
SharePool 是多余的抽象层。此次改动将价格计算的数据源从独立的
SharePool 表切换到做市商的 TradingAccount.cashBalance。

主要变更:
- price.service.ts: 通过 PrismaService 直接读取做市商 cashBalance
  作为价格公式的分子(绿积分),移除 SharePoolRepository 依赖
- asset.service.ts: getMarketOverview() 同步切换数据源
- order.service.ts: 10%交易手续费从 sharePoolRepository.feeIn()
  改为 increment 回做市商的 TradingAccount,手续费自然留存在池中
- burn.service.ts: 移除 SharePool 初始化逻辑和依赖
- infrastructure.module.ts: 移除 SharePoolRepository 注册和导出
- seed.ts: 移除 SharePool 57.6亿初始化

价格公式、10%手续费扣除、销毁机制均保持不变,仅切换数据源。
SharePool 表和 repository 文件保留在磁盘上供历史数据参考。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 23:13:59 -08:00
..
api feat(c2c-bot): 添加C2C Bot管理页面,支持运行时开关和热钱包查看 2026-02-01 04:47:28 -08:00
application refactor(trading): 价格数据源从 SharePool 切换到做市商 cashBalance 2026-02-02 23:13:59 -08:00
domain feat(trading): 实现完整的CEX做市商双边深度系统 2026-01-17 21:11:23 -08:00
infrastructure refactor(trading): 价格数据源从 SharePool 切换到做市商 cashBalance 2026-02-02 23:13:59 -08:00
shared fix(c2c): 修复水单上传权限、手机号显示、卖方ID显示 2026-01-31 09:13:46 -08:00
app.module.ts fix(trading,auth): add parent .env path for shared JWT_SECRET 2026-01-15 06:57:57 -08:00
main.ts fix(api-gateway): correct Kong routing for trading-service 2026-01-15 05:27:46 -08:00