From 17c038723e976b0e3c003c08df881078cfde14cc Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Mon, 15 Jul 2019 07:52:02 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=81=9C=E8=BD=A6][=E4=BF=AE=E6=94=B9]:etcp?= =?UTF-8?q?=20server=20error=20handle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/utils/ETCPUtil.java | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/utils/ETCPUtil.java b/mallinkService/src/main/java/com/iformall/utils/ETCPUtil.java index 57904820d..9cea00079 100755 --- a/mallinkService/src/main/java/com/iformall/utils/ETCPUtil.java +++ b/mallinkService/src/main/java/com/iformall/utils/ETCPUtil.java @@ -290,6 +290,13 @@ public class ETCPUtil { return payType; } + private boolean checkRespFailed(String resp) { + if(resp.startsWith("") || resp.startsWith("")) { + return true; + } + return false; + } + /** * 6.1. 联合登录 * @@ -322,7 +329,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -360,7 +367,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -393,7 +400,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -431,7 +438,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -471,7 +478,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -508,7 +515,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -542,7 +549,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -575,7 +582,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -602,7 +609,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -641,7 +648,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -684,7 +691,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -714,7 +721,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -741,7 +748,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")){ + if(checkRespFailed(respStr)){ throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -770,7 +777,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -803,7 +810,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -830,7 +837,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -862,7 +869,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr; @@ -890,7 +897,7 @@ public class ETCPUtil { if(respStr == null) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } - if(respStr.startsWith("")) { + if(checkRespFailed(respStr)) { throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); } return respStr;