mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-12 04:03:44 +08:00
系统大量出现where("id",xx) fields("user_id") 固定字符串,修改按照统一规范使用dao.xxx.Columns().xxx
This commit is contained in:
@@ -207,7 +207,8 @@ func (s *sSysConfig) GetConfigByGroup(ctx context.Context, in *sysin.GetConfigIn
|
||||
}
|
||||
|
||||
var models []*entity.SysConfig
|
||||
if err = dao.SysConfig.Ctx(ctx).Fields("key", "value", "type").Where("group", in.Group).Scan(&models); err != nil {
|
||||
cols := dao.SysConfig.Columns()
|
||||
if err = dao.SysConfig.Ctx(ctx).Fields(cols.Key, cols.Value, cols.Type).Where(cols.Group, in.Group).Scan(&models); err != nil {
|
||||
err = gerror.Wrapf(err, "获取配置分组[ %v ]失败,请稍后重试!", in.Group)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user