fix(quota): update time handling to use UnixMilli for start time in quota logic

This commit is contained in:
Chang lue Tsen 2025-09-13 14:12:33 -04:00
parent cf4792cdc8
commit c1c913cb00
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ func (l *CreateQuotaTaskLogic) CreateQuotaTask(req *types.CreateQuotaTaskRequest
query = query.Where("`status` IN ?", []int64{0, 1, 2}) // 0: Pending 1: Active 2: Finished query = query.Where("`status` IN ?", []int64{0, 1, 2}) // 0: Pending 1: Active 2: Finished
} }
if req.StartTime != 0 { if req.StartTime != 0 {
start := time.Unix(req.StartTime, 0) start := time.UnixMilli(req.StartTime)
query = query.Where("`start_time` >= ?", start) query = query.Where("`start_time` >= ?", start)
} }
if req.EndTime != 0 { if req.EndTime != 0 {

View File

@ -37,7 +37,7 @@ func (l *QueryQuotaTaskPreCountLogic) QueryQuotaTaskPreCount(req *types.QueryQuo
tx = tx.Where("`status` IN ?", []int64{0, 1, 2}) // 0: Pending 1: Active 2: Finished tx = tx.Where("`status` IN ?", []int64{0, 1, 2}) // 0: Pending 1: Active 2: Finished
} }
if req.StartTime != 0 { if req.StartTime != 0 {
start := time.Unix(req.StartTime, 0) start := time.UnixMilli(req.StartTime)
tx = tx.Where("`start_time` >= ?", start) tx = tx.Where("`start_time` >= ?", start)
} }
if req.EndTime != 0 { if req.EndTime != 0 {