|
|
|
@@ -83,6 +83,10 @@ public class WxMicroPayController extends BaseController { |
|
|
|
logger.error("totalFee不能为空"); |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "totalFee不能为空"); |
|
|
|
} |
|
|
|
if (!checkAuthCode(authCode)) { |
|
|
|
logger.error("totalFee不能为空"); |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "authCode不符合规则"); |
|
|
|
} |
|
|
|
|
|
|
|
String ipStr = IPUtil.getIpAddr(request); |
|
|
|
|
|
|
|
@@ -436,6 +440,10 @@ public class WxMicroPayController extends BaseController { |
|
|
|
logger.error("authCode不能为空"); |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "authCode不能为空"); |
|
|
|
} |
|
|
|
if (!checkAuthCode(authCode)) { |
|
|
|
logger.error("authCode不符合规则"); |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "authCode不符合规则"); |
|
|
|
} |
|
|
|
|
|
|
|
WxPayOrder record = new WxPayOrder(); |
|
|
|
record.updateTenantInfo(user); |
|
|
|
@@ -471,4 +479,19 @@ public class WxMicroPayController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private Boolean checkAuthCode(String authCode) { |
|
|
|
if (authCode.length() == 18) { |
|
|
|
String head = authCode.substring(0, 2); |
|
|
|
if (head.equalsIgnoreCase("10") || |
|
|
|
head.equalsIgnoreCase("11") || |
|
|
|
head.equalsIgnoreCase("12") || |
|
|
|
head.equalsIgnoreCase("13") || |
|
|
|
head.equalsIgnoreCase("14") || |
|
|
|
head.equalsIgnoreCase("15")) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |