diff --git a/domain/model/groupPower_m/group_rank.go b/domain/model/groupPower_m/group_rank.go index 00aa8da9dc6f6c0cfc1d434b9a46e8a846a7f038..387febbcb00b60369b227cc4a7715ab5ddd2edcf 100644 --- a/domain/model/groupPower_m/group_rank.go +++ b/domain/model/groupPower_m/group_rank.go @@ -15,9 +15,11 @@ type GroupPowerExpRank struct { // 获取家族经验排行榜 // param limit: 排行榜人数 +// 10166 线上员工,对应的势力不上榜,groupPowerId=8951 func GetGroupPowerExpRank(model *domain.Model, beginDate, endDate string, limit int, gpStatus groupPower_e.GroupPowerStatus, area int) ([]GroupPowerExpRank, error) { var res []GroupPowerExpRank db := model.DB().Table("group_power_day_exp gpd").Select("gpd.group_power_id,SUM(gpd.exp) as exp"). + Where("gpd.group_power_id <> 8951"). 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("gp.status = ?", gpStatus) diff --git a/domain/model/user_m/country.go b/domain/model/user_m/country.go index 721d1e998b1e20a31b67df868e77ae270dca9cd6..bc94e9d68b3037ba0f064630a73d95df68eebe76 100644 --- a/domain/model/user_m/country.go +++ b/domain/model/user_m/country.go @@ -3,10 +3,12 @@ package user_m import ( "git.hilo.cn/hilo-common/domain" "git.hilo.cn/hilo-common/resource/mysql" + "gorm.io/gorm" "hilo-group/myerr" ) -//获取用户的国家,和所属的区域(是否阿语区) +// 获取用户的国家,和所属的区域(是否阿语区) +// 默认国家给沙特 func GetUserCountryArea(model *domain.Model, id mysql.ID) (string, int, error) { type info struct { Name string @@ -14,7 +16,11 @@ func GetUserCountryArea(model *domain.Model, id mysql.ID) (string, int, error) { } res := new(info) if err := model.DB().Raw("select name, area from res_country where name = (select country from user where id = ?)", id).First(&res).Error; err != nil { - return "", 0, myerr.WrapErr(err) + if err != gorm.ErrRecordNotFound { + return "", 0, myerr.WrapErr(err) + } + // gorm.ErrRecordNotFound + return "KSA", 1, nil } return res.Name, res.Area, nil } diff --git a/route/group_r/group_op.go b/route/group_r/group_op.go index 285adcacd9bc9e652b634657ae08cef2c0baefd8..ffeb25d509b7cbfef6917fa3ccd6d30cf3c2ee9d 100644 --- a/route/group_r/group_op.go +++ b/route/group_r/group_op.go @@ -1738,6 +1738,10 @@ func GroupIn(c *gin.Context) (*mycontext.MyContext, error) { password := c.PostForm("password") enterType := c.PostForm("enterType") gameCode := c.PostForm("gameCode") + // 把id:9 添加进房间:5030的黑名单 + if (userId == 2087771 || userId == 1763211) && groupId == "HTGS#a46766257" { + return myContext, bizerr.NoPrivileges + } model := domain.CreateModelContext(myContext) gi, err := group_m.GetInfoByTxGroupId(model, groupId)