...
|
...
|
@@ -35,6 +35,10 @@ public class RealNameAuthorizeController { |
|
|
/*@Autowired
|
|
|
GraphVerifyService graphVerifyService;*/
|
|
|
|
|
|
/***************************************************************************************
|
|
|
* 支付宝账号绑定 (给客户打款用)
|
|
|
**************************************************************************************/
|
|
|
|
|
|
/**
|
|
|
* 获取绑定的支付宝账号信息
|
|
|
*/
|
...
|
...
|
@@ -87,6 +91,39 @@ public class RealNameAuthorizeController { |
|
|
return apiResponse;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 支付宝账号绑定接口--新
|
|
|
* 支付宝授权后自动绑定, 1)查询支付宝账号信息,2)支付宝账号信息入库
|
|
|
*/
|
|
|
@RequestMapping(params = "method=ufo.user.autoBindAliPayAccount")
|
|
|
public ApiResponse autoBindAliPayAccount(RealNameAuthorizeReqVO reqVO) throws GatewayException {
|
|
|
logger.info("enter autoBindAliPayAccount reqVO is {}", reqVO);
|
|
|
|
|
|
//(1) 优先校验请求的参数
|
|
|
if (reqVO == null || reqVO.getUid()<=0){
|
|
|
throw new GatewayException(402, "支付宝绑定失败,请重试");
|
|
|
}
|
|
|
//检查是否已经实名认证,如果已经认证直接返回
|
|
|
if(null != realNameAuthorizeService.getValidAuthorizeInfo(reqVO.getUid())){
|
|
|
throw new GatewayException (601,"已实名认证");
|
|
|
}
|
|
|
//2)走绑定流程
|
|
|
try{
|
|
|
realNameAuthorizeService.autoBindAliPayAccount(reqVO);
|
|
|
return new ApiResponse(200,"绑定成功");
|
|
|
}catch(Exception e){
|
|
|
logger.warn("autoBindAliPayAccount error! reqVO ={}, e : {}", reqVO, e);
|
|
|
if (e instanceof GatewayException) {
|
|
|
throw e;
|
|
|
}
|
|
|
return new ApiResponse(400,"支付宝绑定失败,请重试");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/***************************************************************************************
|
|
|
* 芝麻认证 (实名认证用)
|
|
|
**************************************************************************************/
|
|
|
/**
|
|
|
* 是否已经芝麻认证
|
|
|
*/
|
...
|
...
|
@@ -300,34 +337,4 @@ public class RealNameAuthorizeController { |
|
|
return result;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 支付宝账号绑定接口--新
|
|
|
* 支付宝授权后自动绑定, 1)查询支付宝账号信息,2)支付宝账号信息入库
|
|
|
*/
|
|
|
@RequestMapping(params = "method=ufo.user.autoBindAliPayAccount")
|
|
|
public ApiResponse autoBindAliPayAccount(RealNameAuthorizeReqVO reqVO) throws GatewayException {
|
|
|
logger.info("enter autoBindAliPayAccount reqVO is {}", reqVO);
|
|
|
|
|
|
//(1) 优先校验请求的参数
|
|
|
if (reqVO == null || reqVO.getUid()<=0){
|
|
|
throw new GatewayException(402, "支付宝绑定失败,请重试");
|
|
|
}
|
|
|
//检查是否已经实名认证,如果已经认证直接返回
|
|
|
if(null != realNameAuthorizeService.getValidAuthorizeInfo(reqVO.getUid())){
|
|
|
throw new GatewayException (601,"已实名认证");
|
|
|
}
|
|
|
//2)走绑定流程
|
|
|
try{
|
|
|
realNameAuthorizeService.autoBindAliPayAccount(reqVO);
|
|
|
return new ApiResponse(200,"绑定成功");
|
|
|
}catch(Exception e){
|
|
|
logger.warn("autoBindAliPayAccount error! reqVO ={}, e : {}", reqVO, e);
|
|
|
if (e instanceof GatewayException) {
|
|
|
throw e;
|
|
|
}
|
|
|
return new ApiResponse(400,"支付宝绑定失败,请重试");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|