From 4a47174343e492948994cf4ebefc844cb2f0ea4f Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 6 Jul 2023 15:31:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/db_user_level.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_user_level.go b/db/db_user_level.go index 493097e..7b17df9 100644 --- a/db/db_user_level.go +++ b/db/db_user_level.go @@ -10,7 +10,7 @@ import ( //UserLevelInIDescByWeight is In 查询获取 权重最低 对应等级 func UserLevelInIDescByWeightLow(Db *xorm.Engine) ([]*model.UserLevel, error) { 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 ms, nil