refactor(common): 重构 common 模块
- 移除 global.go 文件 - 更新 player.go 中的玩家数据存储方式 - 删除 session.go 文件 - 调整 rpc.go 中的 RPC 客户端方法 - 更新 ServerEvent.go 中的会话管理 - 调整 controller 中的 Maincontroller 结构 - 更新 login.go 中的用户登录逻辑 - 调整 service 中的玩家数据获取方式 - 更新 admin/login.go 和 login.go 中的会话管理
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"blazing/common/data/session"
|
||||
"blazing/common/data/cache"
|
||||
"blazing/cool"
|
||||
baseservice "blazing/modules/base/service"
|
||||
"blazing/modules/blazing/service"
|
||||
@@ -77,7 +77,7 @@ func (c *BlazingController) GetSession(ctx context.Context, req *SessionReq) (re
|
||||
|
||||
res.Session = retsid
|
||||
|
||||
if err := session.SaveSession(sid, gconv.String(accountID)); err != nil {
|
||||
if err := cache.NewSessionManager().SaveSession(sid, gconv.String(accountID)); err != nil {
|
||||
res.Code = 400
|
||||
res.Msg = err.Error()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user