refactor(cool): 修复Logger变量名拼写错误

将全局Logger变量从Loger修正为Logger,统一日志实例命名规范,
确保所有模块中日志记录的一致性。

BREAKING CHANGE: 全局日志实例变量名从Loger改为Logger
```
This commit is contained in:
2025-12-25 12:14:04 +08:00
parent ff199e339f
commit 164e70519f
30 changed files with 85 additions and 85 deletions

View File

@@ -31,7 +31,7 @@ func init() {
var (
ctx = gctx.GetInitCtx()
)
cool.Loger.Debug(ctx, "module base init start ...")
cool.Logger.Debug(ctx, "module base init start ...")
var t bool
cool.FillInitData(ctx, "base", &model.BaseSysMenu{}, &t)
@@ -80,7 +80,7 @@ func init() {
// -- 执行函数
// SELECT reset_all_sequences();`, nil) //重置所有序列
cool.Loger.Debug(ctx, "module base init finished ...")
cool.Logger.Debug(ctx, "module base init finished ...")
}
@@ -122,7 +122,7 @@ func ResetAllSequences(ctx context.Context) error {
maxValueRecord, err := g.DB("default").Query(ctx, maxValueQuery)
if err != nil {
cool.Loger.Warning(ctx, fmt.Sprintf("获取表 %s.%s 的最大值失败: %v",
cool.Logger.Warning(ctx, fmt.Sprintf("获取表 %s.%s 的最大值失败: %v",
schemaName, tableName, err))
continue
}
@@ -142,12 +142,12 @@ func ResetAllSequences(ctx context.Context) error {
_, err = g.DB("default").Exec(ctx, resetQuery)
if err != nil {
cool.Loger.Warning(ctx, fmt.Sprintf("重置序列 %s.%s 失败: %v",
cool.Logger.Warning(ctx, fmt.Sprintf("重置序列 %s.%s 失败: %v",
schemaName, sequenceName, err))
continue
}
cool.Loger.Info(ctx, fmt.Sprintf("序列 %s.%s 已重置为 %d",
cool.Logger.Info(ctx, fmt.Sprintf("序列 %s.%s 已重置为 %d",
schemaName, sequenceName, maxValue))
}