- 修改 login 服务端口配置,支持动态分配 - 优化 login 服务启动流程,增加信号处理 - 调整 ServerOption 类型,支持 int 类型端口 - 移除 CommendSvrInfo 相关代码,简化结构 - 更新 main 函数,采用新的服务启动方式
36 lines
949 B
Go
36 lines
949 B
Go
package base
|
|
|
|
import (
|
|
_ "blazing/modules/base/packed"
|
|
|
|
"blazing/cool"
|
|
|
|
_ "blazing/modules/base/controller"
|
|
_ "blazing/modules/base/funcs"
|
|
_ "blazing/modules/base/middleware"
|
|
"blazing/modules/base/model"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/os/gctx"
|
|
)
|
|
|
|
func init() {
|
|
var (
|
|
ctx = gctx.GetInitCtx()
|
|
)
|
|
g.Log().Debug(ctx, "module base init start ...")
|
|
|
|
cool.FillInitData(ctx, "base", &model.BaseSysMenu{})
|
|
cool.FillInitData(ctx, "base", &model.BaseSysUser{})
|
|
cool.FillInitData(ctx, "base", &model.BaseSysUserRole{})
|
|
cool.FillInitData(ctx, "base", &model.BaseSysRole{})
|
|
cool.FillInitData(ctx, "base", &model.BaseSysRoleMenu{})
|
|
cool.FillInitData(ctx, "base", &model.BaseSysDepartment{})
|
|
cool.FillInitData(ctx, "base", &model.BaseSysRoleDepartment{})
|
|
cool.FillInitData(ctx, "base", &model.BaseSysParam{})
|
|
cool.FillInitData(ctx, "base", &model.BaseSysConf{})
|
|
|
|
g.Log().Debug(ctx, "module base init finished ...")
|
|
|
|
}
|