refactor(controller): 重构MapHot方法返回类型,添加错误处理和空结果初始化

This commit is contained in:
1
2025-07-25 13:08:57 +00:00
parent b0ffe1e7f0
commit 487b25ac2f
2 changed files with 13 additions and 5 deletions

View File

@@ -5,9 +5,12 @@ import (
"blazing/logic/service/maps"
)
func (h Controller) MapHot(data *maps.MapHotInboundInfo, c *entity.Player) {
func (h Controller) MapHot(data *maps.MapHotInboundInfo, c *entity.Player) (result *maps.MapHotOutboundInfo, err error) {
data.Def()
//fmt.Println("登录成功")
//log.Printf("任务 %s 执行中,已登录状态: %v\n", , lw.IsLoggedIn())
result = &maps.MapHotOutboundInfo{
HotInfos: make([]maps.MapHotInfo, 0),
}
}