This commit is contained in:
2025-02-18 09:59:51 +08:00
parent eb2455f967
commit 08a7da607f
9 changed files with 420 additions and 548 deletions

View File

@ -158,7 +158,7 @@ func (t LimitOrderTimeoutDuration) Exec(arg interface{}) error {
}
limitOrderTimeoutDuration := utility.StringAsInt64(resp.ConfigValue)
orders := make([]models.LinePreOrder, 0)
err := db.Model(&models.LinePreOrder{}).Where("status = '5' AND main_order_type = 'LIMIT' AND order_type in ('0','4') AND order_category = 3 AND updated_at < ?", time.Now().Add(-time.Duration(limitOrderTimeoutDuration)*time.Second)).Find(&orders).Error
err := db.Model(&models.LinePreOrder{}).Where("status = '5' AND main_order_type = 'LIMIT' AND order_type in ('4') AND order_category = 3 AND updated_at < ?", time.Now().Add(-time.Duration(limitOrderTimeoutDuration)*time.Second)).Find(&orders).Error
if err != nil {
return err
}