From 3a5a549f7f6874973b991420b3a03fc7536308b6 Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Wed, 9 Aug 2023 08:53:00 +0800 Subject: [PATCH] =?UTF-8?q?cp=E6=A6=9C=E5=8D=95=E9=BB=91=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain/model/cp_m/rank.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/domain/model/cp_m/rank.go b/domain/model/cp_m/rank.go index 915587c..3637084 100644 --- a/domain/model/cp_m/rank.go +++ b/domain/model/cp_m/rank.go @@ -41,7 +41,9 @@ func AddCpDayRank(model *domain.Model, cpRelation CpRelation, score mysql.Num) ( func PageCpDayRank(model *domain.Model, beginDate, endDate string, offset, limit int) []CpDayRank { 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"). + Where("r.date BETWEEN ? AND ?", beginDate, endDate). + Where("cp_id not in (1581, 12651, 5171, 9191, 39131, 28801, 181, 35221)"). + Group("cp_id").Select("cp_id,r.user_id1,r.user_id2,SUM(r.score) score"). Order("score DESC").Offset(offset).Limit(limit).Find(&ranks).Error; err != nil { model.Log.Errorf("PageCpDayRank fail:%v", err) } -- 2.22.0