rwadurian/backend/services/trading-service
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
..
prisma refactor(trading): 价格数据源从 SharePool 切换到做市商 cashBalance 2026-02-02 23:13:59 -08:00
src refactor(trading): 价格数据源从 SharePool 切换到做市商 cashBalance 2026-02-02 23:13:59 -08:00
.env.example feat(mining-ecosystem): 添加挖矿生态系统完整微服务与前端 2026-01-10 17:45:46 -08:00
DEVELOPMENT_GUIDE.md feat(mining-ecosystem): 添加挖矿生态系统完整微服务与前端 2026-01-10 17:45:46 -08:00
Dockerfile fix(c2c-bot): 安装中文字体解决水单图片乱码问题 2026-02-02 18:56:55 -08:00
nest-cli.json feat(mining-ecosystem): 添加挖矿生态系统完整微服务与前端 2026-01-10 17:45:46 -08:00
package-lock.json feat(c2c-bot): 顺序处理订单 + 自动生成付款水单图片 2026-02-02 18:32:52 -08:00
package.json feat(c2c-bot): 顺序处理订单 + 自动生成付款水单图片 2026-02-02 18:32:52 -08:00
tsconfig.json fix(trading-service): exclude prisma from tsconfig to fix build output path 2026-01-15 04:46:01 -08:00