...
|
...
|
@@ -32,14 +32,14 @@ func (dao *TaskDao) ListNearThePlannedCompletionTimeTask() ([]*models.Task, erro |
|
|
}
|
|
|
}
|
|
|
|
|
|
// 更新已过期的竞标任务的状态
|
|
|
// 更新已过期的竞标任务的状态,过期时间为竞标结束时间
|
|
|
func (dao *TaskDao) UpdateExpiredPlannedCompletionTimeBidTask() error {
|
|
|
currentTime := time.Now()
|
|
|
currentDay := time.Date(currentTime.Year(), currentTime.Month(), currentTime.Day(), 23, 59, 59, 0, time.Now().Location())
|
|
|
tx := dao.transactionContext.PgTx
|
|
|
_, err := tx.Query(
|
|
|
pg.Scan(),
|
|
|
"UPDATE tasks SET task_status = ? WHERE planned_completion_time < ? AND task_type = ? AND task_status = ?",
|
|
|
"UPDATE tasks SET task_status = ? FROM bid_infos WHERE bid_infos.bid_end_time < ? AND tasks.task_type = ? AND tasks.task_status = ?",
|
|
|
domain.TASK_STATUS_EXPIRED, currentDay, domain.TASK_TYPE_BID, domain.TASK_STATUS_UNCLAIMED)
|
|
|
return err
|
|
|
}
|
...
|
...
|
|