瀏覽代碼

update

master
dengbiao 1 月之前
父節點
當前提交
fa0fc0ae78
共有 2 個檔案被更改,包括 10 行新增1 行删除
  1. +9
    -0
      db/db_user_level.go
  2. +1
    -1
      rule/service_award_dividend/index.go

+ 9
- 0
db/db_user_level.go 查看文件

@@ -17,6 +17,15 @@ func UserLevelInIDescByWeightLow(Db *xorm.Engine) ([]*model.UserLevel, error) {

}

func UserLevelInIDescByWeightLowV1(Db *xorm.Engine) ([]*model.UserLevel, error) {
var ms []*model.UserLevel
if err := Db.Where("is_use=1").Asc("level_weight").Limit(100).Find(&ms); err != nil {
return nil, err
}
return ms, nil

}

//UserLevelByID is 根据用户id 获取对应的等级信息
func UserLevelByID(Db *xorm.Engine, id interface{}) (*model.UserLevel, error) {
m := new(model.UserLevel)


+ 1
- 1
rule/service_award_dividend/index.go 查看文件

@@ -56,7 +56,7 @@ func JoinServiceAwardDividendRelation(eg *xorm.Engine, req md.JoinServiceAwardDi
return err
}
var levelMap = map[int]model.UserLevel{}
lvList, err := db.UserLevelInIDescByWeightLow(eg)
lvList, err := db.UserLevelInIDescByWeightLowV1(eg)
for _, v := range lvList {
levelMap[v.Id] = *v
}


Loading…
取消
儲存