diff --git a/domain/model/cp_m/rank.go b/domain/model/cp_m/rank.go index 27451f8d0f3d44b573e7bdcd47d6fde732cbbd0d..5bec035a32038074c2b6e44593d767b1099df766 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