Commit 5abd49f1 authored by chenweijian's avatar chenweijian

家族月度排行活动

parent c835a8d9
......@@ -20,7 +20,7 @@ func GetGroupPowerExpRank(model *domain.Model, beginDate, endDate string, limit
db := model.DB().Table("group_power_day_exp gpd").Select("gpd.group_power_id,SUM(gpd.exp) as exp").
Where("gpd.date BETWEEN ? AND ?", beginDate, endDate)
if gpStatus > 0 {
db = db.Joins("left join group_power gp on gpd.group_power_id = gp.id").Where("status = ?", gpStatus)
db = db.Joins("left join group_power gp on gpd.group_power_id = gp.id").Where("gp.status = ?", gpStatus)
if area > 0 {
db = db.Joins("left join group_info gi on gp.group_uid = gi.im_group_id left join res_country rs on gi.country = rs.name").
Where("rs.area = ?", area)
......
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