查询房间信息

This commit is contained in:
sk 2024-09-18 18:42:44 +08:00
parent 3da6a1a667
commit 2629c16689
2 changed files with 5 additions and 5 deletions

View File

@ -106,7 +106,7 @@ func init() {
if err != nil { if err != nil {
pack.Tag = webapiproto.TagCode_FAILED pack.Tag = webapiproto.TagCode_FAILED
pack.Msg = "数据序列化失败" pack.Msg = "数据序列化失败"
return common.ResponseTag_ParamError, pack return transact.TransResult_Failed, pack
} }
pack.Tag = webapiproto.TagCode_SUCCESS pack.Tag = webapiproto.TagCode_SUCCESS
@ -114,7 +114,7 @@ func init() {
if scene == nil || scene.ExtraData == nil { if scene == nil || scene.ExtraData == nil {
pack.Tag = webapiproto.TagCode_NotFound pack.Tag = webapiproto.TagCode_NotFound
pack.Msg = "房间没找到" pack.Msg = "房间没找到"
return common.ResponseTag_NoFindRoom, pack return transact.TransResult_Failed, pack
} }
switch d := scene.ExtraData.(type) { switch d := scene.ExtraData.(type) {
@ -140,11 +140,11 @@ func init() {
} }
pack.List = append(pack.List, item) pack.List = append(pack.List, item)
} }
return common.ResponseTag_Ok, pack return transact.TransResult_Success, pack
default: default:
pack.Tag = webapiproto.TagCode_FAILED pack.Tag = webapiproto.TagCode_FAILED
pack.Msg = "未实现" pack.Msg = "未实现"
} }
return common.ResponseTag_NoData, pack return transact.TransResult_Failed, pack
})) }))
} }

View File

@ -173,7 +173,7 @@ func init() {
}), }),
OnChildRespWrapper: transact.OnChildRespWrapper(func(tNode *transact.TransNode, hChild transact.TransNodeID, retCode int, ud interface{}) transact.TransExeResult { OnChildRespWrapper: transact.OnChildRespWrapper(func(tNode *transact.TransNode, hChild transact.TransNodeID, retCode int, ud interface{}) transact.TransExeResult {
logger.Logger.Tracef("GameSrvApi OnChildRespWrapper %v:%v", hChild, ud) logger.Logger.Tracef("GameSrvApi OnChildRespWrapper %v:%v", hChild, ud)
if retCode == common.ResponseTag_Ok { if retCode == transact.TransResult_Success {
tNode.TransEnv.SetField(GAMESRVAPI_TRANSACTE_RESPONSE, ud) tNode.TransEnv.SetField(GAMESRVAPI_TRANSACTE_RESPONSE, ud)
} }
return transact.TransExeResult_Success return transact.TransExeResult_Success