fix(quota): update time handling to use UnixMilli for start time in quota logic
This commit is contained in:
parent
cf4792cdc8
commit
c1c913cb00
@ -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
|
||||
}
|
||||
if req.StartTime != 0 {
|
||||
start := time.Unix(req.StartTime, 0)
|
||||
start := time.UnixMilli(req.StartTime)
|
||||
query = query.Where("`start_time` >= ?", start)
|
||||
}
|
||||
if req.EndTime != 0 {
|
||||
|
||||
@ -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
|
||||
}
|
||||
if req.StartTime != 0 {
|
||||
start := time.Unix(req.StartTime, 0)
|
||||
start := time.UnixMilli(req.StartTime)
|
||||
tx = tx.Where("`start_time` >= ?", start)
|
||||
}
|
||||
if req.EndTime != 0 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user