|
@@ -10,7 +10,7 @@ import ( |
|
|
//UserLevelInIDescByWeight is In 查询获取 权重最低 对应等级 |
|
|
//UserLevelInIDescByWeight is In 查询获取 权重最低 对应等级 |
|
|
func UserLevelInIDescByWeightLow(Db *xorm.Engine) ([]*model.UserLevel, error) { |
|
|
func UserLevelInIDescByWeightLow(Db *xorm.Engine) ([]*model.UserLevel, error) { |
|
|
var ms []*model.UserLevel |
|
|
var ms []*model.UserLevel |
|
|
if err := Db.Asc("level_weight").Limit(1).Find(&ms); err != nil { |
|
|
|
|
|
|
|
|
if err := Db.Where("is_use=1").Asc("level_weight").Limit(1).Find(&ms); err != nil { |
|
|
return nil, err |
|
|
return nil, err |
|
|
} |
|
|
} |
|
|
return ms, nil |
|
|
return ms, nil |
|
|