From 5ac6379e2beab9893d84d3951ad937d11e3d0b40 Mon Sep 17 00:00:00 2001 From: grimm <1769111741@qq.com> Date: Fri, 31 May 2024 11:05:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/jmfy/controller/PayLogic.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/jmfy/controller/PayLogic.java b/src/main/java/com/jmfy/controller/PayLogic.java index 01f508b..3490684 100644 --- a/src/main/java/com/jmfy/controller/PayLogic.java +++ b/src/main/java/com/jmfy/controller/PayLogic.java @@ -114,15 +114,17 @@ public class PayLogic { LOGGER.info("not get the user url,the openID={} ", uid); return "REDIS_ADDRESS_NULL"; } - if (result != null && result.getResultCode() == 1) { - LOGGER.info("callback==>RPC result : ResultCode : " + result.getResultCode() + "; ResultMsg : " + result.getResultMsg()); - cuserDao.addCpayOrder(cPayOrder); - } else { + if (result == null){ + LOGGER.error("发送订单到游戏服,客户端返回为空"); + return "GAME_SERVER_RESULT_NULL"; + } + LOGGER.info("callback==>RPC result, code:{}, msg:{}", result.getResultCode(), result.getResultMsg()); + if (result.getResultCode() != 1) { LOGGER.error("发送订单到游戏服,返回数据异常"); return "GAME_SERVER_RESULT_ERROR"; } + cuserDao.addCpayOrder(cPayOrder); } - } catch (Exception e) { e.printStackTrace(); LOGGER.info("callback==>err " + e.toString());