Files
bl/modules/dict/dict.go
昔念 c1065062fb refactor(initdb): 重构数据库初始化逻辑
- 修改 FillInitData 函数签名,增加 ismod 参数用于指示是否成功插入数据
- 在 base 模块初始化中使用 If 函数处理数据库初始化结果
- 优化 login 模块中的日志输出
- 修复 websocket 中的错误处理
- 更新 dict 和 task 模块的初始化逻辑
2025-07-11 18:04:15 +08:00

24 lines
478 B
Go

package dict
import (
"blazing/cool"
_ "blazing/modules/dict/packed"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
_ "blazing/modules/dict/controller"
"blazing/modules/dict/model"
)
func init() {
var (
ctx = gctx.GetInitCtx()
)
g.Log().Debug(ctx, "module dict init start ...")
cool.FillInitData(ctx, "dict", &model.DictInfo{}, nil)
cool.FillInitData(ctx, "dict", &model.DictType{}, nil)
g.Log().Debug(ctx, "module dict init finished ...")
}