|
|
package com.yohoufo.user.controller.certification;
|
|
|
|
|
|
import com.yoho.core.config.ConfigReader;
|
|
|
import com.yoho.tools.common.beans.ApiResponse;
|
|
|
import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO;
|
|
|
import com.yohoufo.common.exception.GatewayException;
|
...
|
...
|
@@ -36,9 +37,16 @@ public class CertificationController { |
|
|
@Autowired
|
|
|
private ICertificationService certificationService;
|
|
|
|
|
|
@Autowired
|
|
|
private ConfigReader configReader;
|
|
|
|
|
|
@RequestMapping(params = "method=ufo.user.alipayCertification")
|
|
|
public ApiResponse alipayCertification(RealNameAuthorizeReqVO reqVO) throws GatewayException {
|
|
|
logger.info("CertificationController.alipayCertification: Enter alipayCertification param reqVO is {}", reqVO);
|
|
|
//若版本低于6.9.9, 提示升级版本
|
|
|
if(configReader.getBoolean("ufo.user.idCertUpdateVersionSwitch",false) && reqVO.getApp_version().compareTo("6.9.9") < 0){
|
|
|
throw new VersionNotSupportException();
|
|
|
}
|
|
|
//(1) 必要参数的校验
|
|
|
if(reqVO == null || reqVO.getUid() <= 0){
|
|
|
throw new GatewayException(400, "uid不能为空!");
|
...
|
...
|
@@ -66,6 +74,10 @@ public class CertificationController { |
|
|
@RequestMapping(params = "method=ufo.user.alipayCertifyResultQuery")
|
|
|
public ApiResponse alipayCertifyResultQuery(RealNameAuthorizeReqVO reqVO) throws GatewayException {
|
|
|
logger.info("CertificationController.alipayCertifyResultQuery: Enter. RealNameAuthorizeReqVO is {}", reqVO);
|
|
|
//若版本低于6.9.9提示升级版本
|
|
|
if(configReader.getBoolean("ufo.user.idCertUpdateVersionSwitch",false) && reqVO.getApp_version().compareTo("6.9.9") < 0){
|
|
|
throw new VersionNotSupportException();
|
|
|
}
|
|
|
//(1) 校验请求的参数
|
|
|
if (reqVO == null || StringUtils.isBlank(reqVO.getZhiMaBizNo())){
|
|
|
throw new GatewayException(400, "参数错误,zhiMaBizNo不能为空!");
|
...
|
...
|
|