feat: 添加市场信息管理和订单ID复制功能

- 新增市场信息表和服务,支持市场名称缓存和自动更新
  - 创建 Market 实体和 MarketRepository
  - 实现 MarketService 提供市场信息查询和缓存
  - 实现 MarketPollingService 每30秒自动检查并更新缺失的市场信息
  - 添加数据库迁移 V19 创建 markets 表

- 订单列表显示市场名称
  - 在 BuyOrderInfo、SellOrderInfo、MatchedOrderInfo 中添加 marketTitle 字段
  - 订单查询时自动查询并填充市场名称
  - 前端订单列表显示市场名称(优先显示名称,ID作为辅助信息)

- 前端订单ID复制功能
  - 添加 isAutoGeneratedOrderId 和 copyToClipboard 工具函数
  - 非自动生成的订单ID支持一键复制
  - 买入、卖出、匹配订单列表均支持复制功能

- 仓位检查延迟检测机制优化
  - 首次检测到仓位不存在时先记录,3分钟后再次检查
  - 避免因API延迟导致的误判
This commit is contained in:
WrBug
2026-01-08 11:56:52 +08:00
parent e75c93ddf4
commit d376a82ccc
19 changed files with 1122 additions and 101 deletions
+4
View File
@@ -627,6 +627,7 @@ export interface BuyOrderInfo {
orderId: string
leaderTradeId: string
marketId: string
marketTitle?: string // 市场名称
side: string
quantity: string
price: string
@@ -644,6 +645,7 @@ export interface SellOrderInfo {
orderId: string
leaderTradeId: string
marketId: string
marketTitle?: string // 市场名称
side: string
quantity: string
price: string
@@ -658,6 +660,8 @@ export interface SellOrderInfo {
export interface MatchedOrderInfo {
sellOrderId: string
buyOrderId: string
marketId?: string // 市场ID
marketTitle?: string // 市场名称
matchedQuantity: string
buyPrice: string
sellPrice: string