修改查询已完成任务列表

This commit is contained in:
chy
2025-07-05 15:27:26 +08:00
parent c34ef7da90
commit 69f46821e7
4 changed files with 22 additions and 11 deletions

View File

@ -303,6 +303,10 @@ func (s *sTask) GetTaskCompletedList(ctx context.Context, in *model.TaskListIn)
m = m.Where(dao.UserTasks.Columns().StoreId, in.StoreId)
}
if in.StartTime != nil && in.StartTime != nil {
m = m.WhereBetween(dao.UserTasks.Columns().CompletedAt, in.StartTime, in.EndTime)
}
//err = m.Page(in.Page, in.Size).Fields(fmt.Sprintf("%s.*, %s.*,%s.*, %s.*", dao.UserTasks.Table(), dao.Users.Table(), dao.Stores.Table(), dao.Games.Table())).
// LeftJoin(dao.Users.Table(), fmt.Sprintf("`%s`.`id` = `%s`.`user_id`", dao.Users.Table(), dao.UserTasks.Table())).
// LeftJoin(dao.Stores.Table(), fmt.Sprintf("`%s`.`id` = `%s`.`store_id`", dao.Stores.Table(), dao.UserTasks.Table())).