Sfoglia il codice sorgente

[停车][修改]:etcp server error handle

release_toaliyun_real
Stormeye Wu 6 anni fa
parent
commit
52fdcd6225
1 ha cambiato i file con 25 aggiunte e 18 eliminazioni
  1. +25
    -18
      mallinkService/src/main/java/com/iformall/utils/ETCPUtil.java

+ 25
- 18
mallinkService/src/main/java/com/iformall/utils/ETCPUtil.java Vedi File

@@ -290,6 +290,13 @@ public class ETCPUtil {
return payType; return payType;
} }


private boolean checkRespFailed(String resp) {
if(resp.startsWith("<html>") || resp.startsWith("<!DOCTYPE html>")) {
return true;
}
return false;
}

/** /**
* 6.1. 联合登录 * 6.1. 联合登录
* *
@@ -322,7 +329,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -360,7 +367,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -393,7 +400,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -431,7 +438,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -471,7 +478,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -508,7 +515,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -542,7 +549,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -575,7 +582,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -602,7 +609,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -641,7 +648,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -684,7 +691,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -714,7 +721,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -741,7 +748,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")){
if(checkRespFailed(respStr)){
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -770,7 +777,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -803,7 +810,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -830,7 +837,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -862,7 +869,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;
@@ -890,7 +897,7 @@ public class ETCPUtil {
if(respStr == null) { if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
if(respStr.startsWith("<html>")) {
if(checkRespFailed(respStr)) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL); throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
} }
return respStr; return respStr;


Caricamento…
Annulla
Salva