refactor(logic): 重构逻辑处理和错误处理机制
- 新增 Conn 结构体的 NewConn 工厂方法 - 优化 Controller 中的 Recv 方法,增加错误处理逻辑 - 修改 GetServer、Login、MapHot 等方法的返回值类型 - 重构 SystemTimeInfo 方法,使用新的 OutInfo 接口 - 更新 CommendSvrInfo 结构体和相关方法 - 统一错误处理机制,使用新的 OutInfo 接口
This commit is contained in:
@@ -2,10 +2,11 @@ package controller
|
||||
|
||||
import (
|
||||
"blazing/common/data/entity"
|
||||
"blazing/logic/service"
|
||||
"blazing/logic/service/maps"
|
||||
)
|
||||
|
||||
func (h Controller) MapHot(data *maps.MapHotInboundInfo, c *entity.Player) (result *maps.MapHotOutboundInfo, err error) {
|
||||
func (h Controller) MapHot(data *maps.MapHotInboundInfo, c *entity.Player) (result *maps.MapHotOutboundInfo, err service.OutInfo) {
|
||||
|
||||
data.Def()
|
||||
result = &maps.MapHotOutboundInfo{
|
||||
@@ -13,4 +14,5 @@ func (h Controller) MapHot(data *maps.MapHotInboundInfo, c *entity.Player) (resu
|
||||
HotInfos: make([]maps.MapHotInfo, 0),
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user