Files
bl/logic/service/login/create_player.go
昔念 bc4bd7eba6 refactor(login): 重构登录逻辑并优化用户信息获取
- 移除 controller 中的测试代码和不必要的注释
- 优化 login.go 中的用户信息获取逻辑,从 PlayerService 中获取玩家信息
- 删除 LoginSidInfo.go 中的冗余代码和未使用的函数
- 更新 admin 控制器中的 GetSession 方法,返回用户 ID 和 session
- 调整 base_sys_user 模型,移除冗余字段和注释
- 新增 GetPerson 方法在 base_sys_user 服务中获取用户信息
- 在 player 模型中添加 NewPlayerInfo 函数创建默认玩家信息
2025-08-22 22:40:32 +08:00

18 lines
584 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package login
import "blazing/common/socket/handler"
type CreatePlayerInboundInfo struct { //这里直接使用组合来实现将传入的原始头部数据和结构体参数序列化
Head handler.TomeeHeader `cmd:"108" struc:"[0]pad"` //玩家登录
// 玩家昵称对应Java的@ArraySerialize注解
Nickname string `struc:"[16]byte"` // 固定长度16字节
// 机器人人物颜色 rgb对应Java的@UInt注解
Color uint32 `fieldDescription:"机器人人物颜色 rgb" uint:"true"`
}
type CreatePlayerOutInfo struct {
//不用回包,因为前端已经处理了
}