mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-10 11:13:44 +08:00
系统大量出现where("id",xx) fields("user_id") 固定字符串,修改按照统一规范使用dao.xxx.Columns().xxx
This commit is contained in:
@@ -7,9 +7,10 @@ package sms
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/dao"
|
||||
"hotgo/internal/model"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
)
|
||||
|
||||
var config *model.SmsConfig
|
||||
@@ -23,5 +24,5 @@ func GetConfig() *model.SmsConfig {
|
||||
}
|
||||
|
||||
func GetModel(ctx context.Context) *gdb.Model {
|
||||
return g.Model("sys_sms_log").Ctx(ctx)
|
||||
return dao.SysSmsLog.Ctx(ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user