From 0b98ffbb6419b26fc65730f2efea0e0addfb47d4 Mon Sep 17 00:00:00 2001 From: hujiebin Date: Tue, 13 Jun 2023 15:54:30 +0800 Subject: [PATCH] Update rank.go --- domain/model/cp_m/rank.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain/model/cp_m/rank.go b/domain/model/cp_m/rank.go index 27451f8..5bec035 100644 --- a/domain/model/cp_m/rank.go +++ b/domain/model/cp_m/rank.go @@ -42,7 +42,7 @@ func PageCpDayRank(model *domain.Model, beginDate, endDate string, offset, limit var ranks []CpDayRank if err := model.DB().Table("cp_day_rank r").Joins("INNER JOIN cp_relation c ON c.id = r.cp_id"). Where("r.date BETWEEN ? AND ?", beginDate, endDate).Group("cp_id").Select("cp_id,r.user_id1,r.user_id2,SUM(r.score) score"). - Order("r.score DESC").Offset(offset).Limit(limit).Find(&ranks).Error; err != nil { + Order("score DESC").Offset(offset).Limit(limit).Find(&ranks).Error; err != nil { model.Log.Errorf("PageCpDayRank fail:%v", err) } return ranks -- 2.22.0