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());