|
@ -32,7 +32,7 @@ func (s *sClient) ClientGetHomeworkList(ctx context.Context, jwcode int) (homewo |
|
|
// 如果Redis中没有数据,查询数据库
|
|
|
// 如果Redis中没有数据,查询数据库
|
|
|
// 查询活动互动组表,根据条件查询id、name、end_date字段,并按照end_date降序排列
|
|
|
// 查询活动互动组表,根据条件查询id、name、end_date字段,并按照end_date降序排列
|
|
|
err = dao.ActivityInteractiveGroup.Ctx(ctx).Fields("id", "name", "DATE_FORMAT(end_date, '%Y-%m-%d') as end_date"). |
|
|
err = dao.ActivityInteractiveGroup.Ctx(ctx).Fields("id", "name", "DATE_FORMAT(end_date, '%Y-%m-%d') as end_date"). |
|
|
Where("end_date>?", gtime.Now()).Where("status", 1).OrderDesc("end_date").Scan(&homeworkList) |
|
|
|
|
|
|
|
|
Where("end_date>=?", gtime.Date()).Where("status", 1).OrderDesc("end_date").Scan(&homeworkList) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|