系统大量出现where("id",xx) fields("user_id") 固定字符串,修改按照统一规范使用dao.xxx.Columns().xxx

This commit is contained in:
ss
2025-04-21 17:46:06 +08:00
parent 0c5b27d864
commit 19c0c0c1bc
34 changed files with 272 additions and 227 deletions

View File

@@ -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)
}