From 359f4833b296adc86ae2d5b5dd3d2193656b9f17 Mon Sep 17 00:00:00 2001 From: hujiebin Date: Tue, 25 Jul 2023 15:47:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A4=B4=E5=83=8F=E9=9D=9E=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain/model/recommend_m/gift.go | 1 + 1 file changed, 1 insertion(+) diff --git a/domain/model/recommend_m/gift.go b/domain/model/recommend_m/gift.go index 1091420..430691d 100644 --- a/domain/model/recommend_m/gift.go +++ b/domain/model/recommend_m/gift.go @@ -26,6 +26,7 @@ func GetPastTop50SendGiftUsers(model *domain.Model) []recommendUserGift { limitUserIds, _ := GetBillboardLimitUserList(model) var res []recommendUserGift if err := model.DB().Table("gift_operate g").Joins("INNER JOIN user u ON u.id = g.send_user_id").Select("send_user_id,SUM(send_user_diamond) send_user_diamond"). + Where("u.avatar <> ''"). Where("g.created_time >= ?", time.Now().Add(-time.Hour*12)). Where("send_user_id NOT in ?", limitUserIds). Group("send_user_id"). -- 2.22.0