fix bug
This commit is contained in:
@@ -79,7 +79,7 @@ func SaveData(status *types.StatusData) error {
|
|||||||
|
|
||||||
// 查询是否存在
|
// 查询是否存在
|
||||||
var cnt int64
|
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 {
|
if cnt > 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ type StatusData struct {
|
|||||||
// Data 数据部分
|
// Data 数据部分
|
||||||
type Data struct {
|
type Data struct {
|
||||||
Assets Assets `json:"assets"`
|
Assets Assets `json:"assets"`
|
||||||
Orders []Order `json:"order"`
|
Orders []Order `json:"orders"`
|
||||||
Positions []Position `json:"positions"`
|
Positions []Position `json:"positions"`
|
||||||
TickData map[string]Tick `json:"tick_data"`
|
TickData map[string]Tick `json:"tick_data"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user