Commit 513b338f authored by hujiebin's avatar hujiebin

feat:去掉没有头像的

parent 6d0b1f9f
......@@ -25,8 +25,8 @@ func GetPastTop50SendGiftUsers(model *domain.Model) []recommendUserGift {
}
limitUserIds, _ := GetBillboardLimitUserList(model)
var res []recommendUserGift
if err := model.DB().Table("gift_operate").Select("send_user_id,SUM(send_user_diamond) send_user_diamond").
Where("created_time >= ?", time.Now().Add(-time.Hour*12)).
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("g.created_time >= ?", time.Now().Add(-time.Hour*12)).
Where("send_user_id NOT in ?", limitUserIds).
Group("send_user_id").
Having("send_user_diamond > 100000").Order("send_user_diamond DESC").Limit(34).Find(&res).Error; err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment