|
@@ -61,7 +61,7 @@ class AppServer {
|
|
* 后处理逻辑
|
|
* 后处理逻辑
|
|
* @param Resp $resp
|
|
* @param Resp $resp
|
|
*/
|
|
*/
|
|
- private static function AfterProc(&$resp) {
|
|
|
|
|
|
+ static function AfterProc(&$resp) {
|
|
if (req()->cmd != CmdCode::cmd_user_delUserUid) {
|
|
if (req()->cmd != CmdCode::cmd_user_delUserUid) {
|
|
if (req()->userInfoChanged || (null != ctx() && ctx()->NeedSave())) { # 回写玩家数据
|
|
if (req()->userInfoChanged || (null != ctx() && ctx()->NeedSave())) { # 回写玩家数据
|
|
if (!UserProc::setUserInfo(ctx())) { # 失败, 改写返回值
|
|
if (!UserProc::setUserInfo(ctx())) { # 失败, 改写返回值
|
|
@@ -70,8 +70,9 @@ class AppServer {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- $resp->AfterProc();
|
|
|
|
-
|
|
|
|
|
|
+ if (null != $resp) { # resp后处理
|
|
|
|
+ $resp->AfterProc();
|
|
|
|
+ }
|
|
self::LogCmdMongo($resp); # 向MongoDB写入操作日志
|
|
self::LogCmdMongo($resp); # 向MongoDB写入操作日志
|
|
// CLog::flush(); # flush日志
|
|
// CLog::flush(); # flush日志
|
|
return true;
|
|
return true;
|