mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-12 04:53:47 +08:00
系统大量出现where("id",xx) fields("user_id") 固定字符串,修改按照统一规范使用dao.xxx.Columns().xxx
This commit is contained in:
@@ -39,7 +39,7 @@ func (c *cSms) SendBindSms(ctx context.Context, _ *common.SendBindSmsReq) (res *
|
||||
return
|
||||
}
|
||||
|
||||
if err = g.Model("admin_member").Fields("mobile").Where("id", memberId).Scan(&models); err != nil {
|
||||
if err = dao.AdminMember.Ctx(ctx).Fields(dao.AdminMember.Columns().Mobile).Where(dao.AdminMember.Columns().Id, memberId).Scan(&models); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user