|
|
@@ -190,10 +190,11 @@ public class CenterAccountServiceImpl extends CenterAccountAbstract implements C |
|
|
|
if (StringUtils.isEmpty(request.getRealName())) { |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("身份证姓名不允许为空"); |
|
|
|
} |
|
|
|
if (StringUtils.isEmpty(request.getFileImg())) { |
|
|
|
if (StringUtils.isEmpty(request.getFileImg())&&StringUtils.isEmpty(request.getFileBase64())) { |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("身份证图片不允许为空"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
AflCertificationInfo aflCertificationInfo = aflCertificationInfoRepo.findByEtcQzOpenId(request.getEtcQzOpenId()); |
|
|
|
if (aflCertificationInfo==null) { |
|
|
|
aflCertificationInfo=new AflCertificationInfo(); |
|
|
@@ -201,11 +202,17 @@ public class CenterAccountServiceImpl extends CenterAccountAbstract implements C |
|
|
|
aflCertificationInfo.setEtcQzOpenId(request.getEtcQzOpenId()); |
|
|
|
aflCertificationInfo.setIdCardNumber(request.getIdcode()); |
|
|
|
aflCertificationInfo.setUserName(request.getRealName()); |
|
|
|
aflCertificationInfo.setUserIdImageUrl(request.getFileImg()); |
|
|
|
String fileBase64 = Base64Util.NetImageToBase64(request.getFileImg()); |
|
|
|
if (StringUtils.isEmpty(fileBase64)){ |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("身份证图片转换失败"); |
|
|
|
String fileBase64 =null; |
|
|
|
if (!StringUtils.isEmpty(request.getFileImg())){ |
|
|
|
aflCertificationInfo.setUserIdImageUrl(request.getFileImg()); |
|
|
|
fileBase64 = Base64Util.NetImageToBase64(request.getFileImg()); |
|
|
|
if (StringUtils.isEmpty(fileBase64)){ |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("身份证图片转换失败"); |
|
|
|
} |
|
|
|
}else { |
|
|
|
fileBase64 =request.getFileBase64(); |
|
|
|
} |
|
|
|
|
|
|
|
CenterAccountCertificationRequestVo centerAccountCertificationRequestVo = new CenterAccountCertificationRequestVo(); |
|
|
|
BeanUtils.copyProperties(request,centerAccountCertificationRequestVo); |
|
|
|
centerAccountCertificationRequestVo.setFileBase64(fileBase64); |