1、优化凌晨2:30的定时任务,改为查询最近2天的退订数据,不再限制为新增订单的退订数据。

This commit is contained in:
chenlin 2025-02-03 22:07:58 +08:00
parent cb6b269185
commit e8fc850ca1

View File

@ -1274,7 +1274,7 @@ func CheckCancelOrderState() {
twoDaysAgo := time.Now().Add(-48 * time.Hour)
err := database.Db.Where("state = 2").
Where("created_at >= ?", twoDaysAgo).
Where("unsubscribe_time >= ?", twoDaysAgo).
Order("created_at desc").
Find(&orderList).Error