```
refactor(common/rpc): 修改服务引用从blazing到config模块 将RPC服务中的blservice引用替换为config服务, 统一使用config.NewServerService()进行服务器信息获取。 feat(blazing): 实现新的会话生成机制 - 添加Gensession方法,基于accountID、UUID生成唯一会话标识 - 会话ID由accountID(4字节) + UUID(16字节)组成,编码为十六进制字符串 - 更新登录控制器使用新的会话生成方式 fix(pet_info): 添加宠物信息空值检查 在切换宠物背包仓库时,当宠物信息查询结果为空时, 返回系统错误避免空指针异常。
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"blazing/modules/base/service"
|
||||
|
||||
blazing_service "blazing/modules/blazing/service"
|
||||
blazing "blazing/modules/blazing/service"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
@@ -50,7 +50,7 @@ func (c *BaseSysUserController) GetSession(ctx context.Context, req *SessionReq)
|
||||
|
||||
return &SessionRes{}, nil
|
||||
}
|
||||
retsid := blazing_service.NewLoginServiceService().GetSessionId(t.UserId)
|
||||
retsid := blazing.NewInfoService(uint32(t.UserId)).Gensession()
|
||||
|
||||
res = &SessionRes{}
|
||||
|
||||
@@ -58,7 +58,7 @@ func (c *BaseSysUserController) GetSession(ctx context.Context, req *SessionReq)
|
||||
|
||||
res.Session = retsid
|
||||
|
||||
if !blazing_service.NewUserService(uint32(t1.ID)).Info.IsReg() {
|
||||
if !blazing.NewUserService(uint32(t1.ID)).Info.IsReg() {
|
||||
res.UserID = int(t1.ID)
|
||||
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ func init() {
|
||||
g.Server().BindHandler("/server/*", func(r *ghttp.Request) {
|
||||
|
||||
tt := new(ServerHandler)
|
||||
id := gconv.Uint32(r.URL.Query().Get("id"))
|
||||
tt.ServerList = service.NewServerService().GetServerByID(id)
|
||||
id := gconv.Uint16(r.URL.Query().Get("id"))
|
||||
tt.ServerList = service.NewServerService().GetServerID(id)
|
||||
tt.isinstall = gconv.Uint32(r.URL.Query().Get("isinstall"))
|
||||
|
||||
upgrader := gws.NewUpgrader(tt, &gws.ServerOption{
|
||||
|
||||
@@ -300,6 +300,7 @@ echo "#SCRIPT_EXECUTION_COMPLETE#"
|
||||
|
||||
// 保存会话名称
|
||||
config.NewServerService().SetServerScreen(s.ServerList.OnlineID, randomFileName)
|
||||
|
||||
s.sendTerminalOutput(s.session.WebSocket, "自动化部署完成")
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user