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:
2026-01-09 19:58:12 +08:00
parent cde64b1898
commit caa5fc37b9
11 changed files with 76 additions and 108 deletions

View File

@@ -10,7 +10,7 @@ import (
"log"
"net/http"
blservice "blazing/modules/blazing/service"
config "blazing/modules/config/service"
"github.com/filecoin-project/go-jsonrpc"
"github.com/gogf/gf/v2/util/gconv"
@@ -50,7 +50,7 @@ func (h *ServerHandler) RegisterLogic(ctx context.Context, id, port uint16) erro
if !ok {
return fmt.Errorf("no reverse client")
}
t := blservice.NewLoginServiceService().GetServerID(id)
t := config.NewServerService().GetServerID((id))
aa, ok := cool.GetClient(t.Port)
if ok && aa != nil { //如果已经存在且这个端口已经被存过