feat(login): 重构 login 服务启动方式

- 修改 login 服务端口配置,支持动态分配
- 优化 login 服务启动流程,增加信号处理
- 调整 ServerOption 类型,支持 int 类型端口
- 移除 CommendSvrInfo 相关代码,简化结构
- 更新 main 函数,采用新的服务启动方式
This commit is contained in:
2025-07-06 01:49:19 +08:00
parent 86c38fbc84
commit 2f3ca21165
19 changed files with 301 additions and 45 deletions

View File

@@ -28,6 +28,7 @@ func init() {
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 ...")

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
[
{
"id": 1,
"createTime": "2021-02-26 13:53:05.000000",
"updateTime": "2021-03-03 17:50:04.000000",
"cKey": "server_ip",
"cValue": "127.0.0.1"
}
]

View File

@@ -43,7 +43,10 @@ func (s *BaseSysConfService) UpdateValue(cKey, cValue string) error {
// GetValue 获取配置值
func (s *BaseSysConfService) GetValue(cKey string) string {
m := cool.DBM(s.Model).Where("cKey = ?", cKey)
// t1, _ := cool.DBM(s.Model).All()
// fmt.Println(t1)
m := cool.DBM(s.Model).Where("cKey", cKey)
record, err := m.One()
if err != nil {
return ""