refactor(logic): 重构逻辑处理和错误处理机制

- 新增 Conn 结构体的 NewConn 工厂方法
- 优化 Controller 中的 Recv 方法,增加错误处理逻辑
- 修改 GetServer、Login、MapHot 等方法的返回值类型
- 重构 SystemTimeInfo 方法,使用新的 OutInfo 接口
- 更新 CommendSvrInfo 结构体和相关方法
- 统一错误处理机制,使用新的 OutInfo 接口
This commit is contained in:
2025-07-25 22:50:08 +08:00
parent 487b25ac2f
commit 449552bea7
10 changed files with 73 additions and 76 deletions

View File

@@ -2,11 +2,11 @@ package controller
import (
"blazing/common/data/entity"
"blazing/logic/service/system"
"blazing/logic/service"
"blazing/logic/service/SystemTime"
)
func (h Controller) SystemTimeInfo(data *system.SystemTimeInfo, c *entity.Player) {
data.Def()
//fmt.Println("登录成功")
//log.Printf("任务 %s 执行中,已登录状态: %v\n", , lw.IsLoggedIn())
func (h Controller) SystemTimeInfo(data *SystemTime.InInfo, c *entity.Player) (result *SystemTime.OutInfo, err service.OutInfo) {
result = SystemTime.NewOutInfo()
return
}