Authored by qinchao

更新认证查询接口

... ... @@ -21,7 +21,7 @@ public interface IZhiMaCertDao {
ZhiMaCert selectValidByCertNo(String certNo);
//根据业务编号查询
//ZhiMaCert selectByBizNo(String bizNo);
ZhiMaCert selectByBizNo(@Param("bizNo")String bizNo);
... ...
... ... @@ -154,10 +154,6 @@ public class RealNameAuthorizeController {
throw new GatewayException(400, "参数错误,uid不能为空!");
}
//zhiMacertID
if (reqVO.getZhiMaCertId() == null || reqVO.getZhiMaCertId()<=0){
throw new GatewayException(400, "参数错误,芝麻认知记录id不能为空!");
}
//bizNO
if(StringUtils.isBlank(reqVO.getZhiMaBizNo())){
... ...
... ... @@ -370,18 +370,20 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService {
public ApiResponse zhiMaCertResultQuery(RealNameAuthorizeReqVO reqVO) {
logger.info("real name zhiMaCertResultQuery reqVO {}", reqVO);
//根据uid,获取biz_no
ZhiMaCert zhiMaCert=zhiMaCertDao.selectByPrimaryKey(reqVO.getZhiMaCertId());
ZhiMaCert zhiMaCert=zhiMaCertDao.selectByBizNo(reqVO.getZhiMaBizNo());
if(zhiMaCert==null){
logger.error("zhiMaCertResultQuery get cert by id is null ",reqVO.getZhiMaCertId());
logger.error("zhiMaCertResultQuery get cert is null ",reqVO.getZhiMaBizNo());
throw new ServiceException(400, "错误:未找到芝麻认证信息!");
}
logger.info("zhiMaCertResultQuery get zhiMaCert from db is {} ",zhiMaCert);
if(!zhiMaCert.getUid().equals(reqVO.getUid())){
Integer zhiMaCertId=zhiMaCert.getId();
/*if(!zhiMaCert.getUid().equals(reqVO.getUid())){
logger.error("zhiMaCertResultQuery get cert by biz no is not same req uid {} ,db uid {}",reqVO.getUid(),zhiMaCert.getUid());
throw new ServiceException(400, "错误:未找到用户芝麻认证信息!");
}
}*/
ZhimaCustomerCertificationQueryResponse zhiMaResp=ZhiMaCallUtil.zhiMaResult(reqVO.getZhiMaBizNo());
if(zhiMaResp==null){
... ... @@ -391,7 +393,7 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService {
if(zhiMaResp.isSuccess()&&"true".equals(zhiMaResp.getPassed())){
//芝麻认证通过
int updateCount = zhiMaCertDao.updateValidStatusByPrimaryKey(reqVO.getZhiMaCertId());
int updateCount = zhiMaCertDao.updateValidStatusByPrimaryKey(zhiMaCertId);
if(updateCount <1){
logger.error("zhiMaCertResultQuery update zhi ma cert valid status error,req vo {}",reqVO);
throw new ServiceException(400, "错误:更新用户芝麻认证信息错误!");
... ...