Authored by qinchao

fix

@@ -13,6 +13,7 @@ import com.yoho.error.exception.ServiceException; @@ -13,6 +13,7 @@ import com.yoho.error.exception.ServiceException;
13 import com.yoho.tools.common.beans.ApiResponse; 13 import com.yoho.tools.common.beans.ApiResponse;
14 import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO; 14 import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO;
15 import com.yohoufo.common.exception.GatewayException; 15 import com.yohoufo.common.exception.GatewayException;
  16 +import com.yohoufo.common.exception.UfoServiceException;
16 import com.yohoufo.common.utils.HttpClient; 17 import com.yohoufo.common.utils.HttpClient;
17 import com.yohoufo.common.utils.UserInfoHiddenHelper; 18 import com.yohoufo.common.utils.UserInfoHiddenHelper;
18 import com.yohoufo.dal.user.IUserAuthorizeInfoDao; 19 import com.yohoufo.dal.user.IUserAuthorizeInfoDao;
@@ -30,6 +31,7 @@ import org.slf4j.LoggerFactory; @@ -30,6 +31,7 @@ import org.slf4j.LoggerFactory;
30 import org.springframework.beans.factory.annotation.Autowired; 31 import org.springframework.beans.factory.annotation.Autowired;
31 import org.springframework.beans.factory.annotation.Value; 32 import org.springframework.beans.factory.annotation.Value;
32 import org.springframework.stereotype.Service; 33 import org.springframework.stereotype.Service;
  34 +
33 import java.time.LocalDateTime; 35 import java.time.LocalDateTime;
34 import java.time.ZoneOffset; 36 import java.time.ZoneOffset;
35 37
@@ -311,11 +313,11 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService { @@ -311,11 +313,11 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService {
311 logger.info("real name zhiMaCertInit reqVO {}", reqVO); 313 logger.info("real name zhiMaCertInit reqVO {}", reqVO);
312 //检查是否已经认证,如果已经认证,报错 314 //检查是否已经认证,如果已经认证,报错
313 if (isValidZhiMaCert(reqVO.getUid())) { 315 if (isValidZhiMaCert(reqVO.getUid())) {
314 - throw new ServiceException(400, "已实名认证!"); 316 + throw new UfoServiceException(400, "已实名认证!");
315 } 317 }
316 //检查身份证号认证信息是否已经存在,存在则不允许再次使用 318 //检查身份证号认证信息是否已经存在,存在则不允许再次使用
317 if (null != zhiMaCertDao.selectValidByCertNo(reqVO.getCertNo())) { 319 if (null != zhiMaCertDao.selectValidByCertNo(reqVO.getCertNo())) {
318 - throw new ServiceException(400, "身份证号已被占用!"); 320 + throw new UfoServiceException(400, "身份证号已被占用!");
319 } 321 }
320 322
321 //调用芝麻接口,返回biz_no 323 //调用芝麻接口,返回biz_no
@@ -373,7 +375,7 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService { @@ -373,7 +375,7 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService {
373 ZhiMaCert zhiMaCert=zhiMaCertDao.selectByBizNo(reqVO.getZhiMaBizNo()); 375 ZhiMaCert zhiMaCert=zhiMaCertDao.selectByBizNo(reqVO.getZhiMaBizNo());
374 if(zhiMaCert==null){ 376 if(zhiMaCert==null){
375 logger.error("zhiMaCertResultQuery get cert is null ",reqVO.getZhiMaBizNo()); 377 logger.error("zhiMaCertResultQuery get cert is null ",reqVO.getZhiMaBizNo());
376 - throw new ServiceException(400, "错误:未找到芝麻认证信息!"); 378 + throw new UfoServiceException(400, "错误:未找到芝麻认证信息!");
377 } 379 }
378 380
379 logger.info("zhiMaCertResultQuery get zhiMaCert from db is {} ",zhiMaCert); 381 logger.info("zhiMaCertResultQuery get zhiMaCert from db is {} ",zhiMaCert);