From 820f3435d39fe7e4fcf14593ff194551400cffeb Mon Sep 17 00:00:00 2001 From: yanweidong Date: Wed, 22 Apr 2026 18:17:58 +0800 Subject: [PATCH] fix bug --- internal/logic/storage.go | 2 +- internal/types/req.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/logic/storage.go b/internal/logic/storage.go index f4d3068..41bb208 100644 --- a/internal/logic/storage.go +++ b/internal/logic/storage.go @@ -79,7 +79,7 @@ func SaveData(status *types.StatusData) error { // 查询是否存在 var cnt int64 - impl.DBService.Where("account_id = ? AND order_id = ? AND ymd = ?", status.Data.Assets.AccountID, order.OrderID, ymd).Count(&cnt) + impl.DBService.Model(&models.CollectorOrder{}).Where("account_id = ? AND order_id = ? AND ymd = ?", status.Data.Assets.AccountID, order.OrderID, ymd).Count(&cnt) if cnt > 0 { continue } diff --git a/internal/types/req.go b/internal/types/req.go index 8126e71..2cdd92c 100644 --- a/internal/types/req.go +++ b/internal/types/req.go @@ -9,7 +9,7 @@ type StatusData struct { // Data 数据部分 type Data struct { Assets Assets `json:"assets"` - Orders []Order `json:"order"` + Orders []Order `json:"orders"` Positions []Position `json:"positions"` TickData map[string]Tick `json:"tick_data"` }