Browse Source

Merge remote-tracking branch 'origin/develop' into develop

release_toaliyun_real
luozukai 7 years ago
parent
commit
2f39132e09
1 changed files with 54 additions and 3 deletions
  1. +54
    -3
      mallinkService/src/main/java/com/iformall/utils/ETCPUtil.java

+ 54
- 3
mallinkService/src/main/java/com/iformall/utils/ETCPUtil.java View File

@@ -319,6 +319,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + userSigninUrl.replaceAll("\\{version}", version), data, sign,
timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -354,6 +357,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + bindCarUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -384,6 +390,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + unbindCarUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -419,6 +428,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + carAuthUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -456,6 +468,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + carRetrieveUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -490,6 +505,9 @@ public class ETCPUtil {

String respStr = doGet(baseUrl + carNumUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -521,6 +539,9 @@ public class ETCPUtil {

String respStr = doGet(baseUrl + orderUnpayUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -551,6 +572,9 @@ public class ETCPUtil {

String respStr = doGet(baseUrl + couponListUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -575,6 +599,9 @@ public class ETCPUtil {

String respStr = doGet(baseUrl + orderHistoryUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -611,6 +638,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + orderpayUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -651,6 +681,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + orderPaidUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -678,6 +711,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + parkingInfoUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -731,6 +767,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + parkingStatusUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -761,6 +800,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + parkingStatusUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -785,6 +827,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + bCouponListUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -814,6 +859,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + bCouponRecordUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -839,6 +887,9 @@ public class ETCPUtil {

String respStr = doPost(baseUrl + bCarSimulationUrl.replaceAll("\\{version}", version),
data, sign, timeStamp, merchantNo);
if(respStr == null) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
if(respStr.startsWith("<html>")) {
throw new MallinkException(ErrorCode.ETCP_CMD_FAIL);
}
@@ -856,7 +907,7 @@ public class ETCPUtil {
logger.info("post接口响应信息为:{}", responseStr);
return responseStr;
} catch (IOException e) {
e.printStackTrace();
logger.error(e.getMessage());
}
return null;
}
@@ -873,7 +924,7 @@ public class ETCPUtil {
logger.info("get请求接口响应信息为:{}", responseStr);
return responseStr;
} catch (IOException e) {
e.printStackTrace();
logger.error(e.getMessage());
}
return null;
}
@@ -901,7 +952,7 @@ public class ETCPUtil {
sb.append(Integer.toHexString(val));
}
} catch (Exception ex) {
logger.error(ex.getMessage());
}
return sb.toString().toUpperCase();
}


Loading…
Cancel
Save