Selaa lähdekoodia

优化参数

shuiqilin
zhangxin 1 vuosi sitten
vanhempi
commit
9d0d3eecb6

+ 9
- 0
src/main/java/com/qtzl/alterSales/manager/model/protocol/account/request/CenterAccountCertificationRequest.java Näytä tiedosto

@@ -17,6 +17,7 @@ public class CenterAccountCertificationRequest extends CenterAccountRequest {
private String idcode;
private String realName;
private String fileImg;
private String fileBase64;

public String getEtcQzOpenId() {
return etcQzOpenId;
@@ -49,4 +50,12 @@ public class CenterAccountCertificationRequest extends CenterAccountRequest {
public void setFileImg(String fileImg) {
this.fileImg = fileImg;
}

public String getFileBase64() {
return fileBase64;
}

public void setFileBase64(String fileBase64) {
this.fileBase64 = fileBase64;
}
}

+ 12
- 5
src/main/java/com/qtzl/alterSales/manager/service/account/CenterAccountServiceImpl.java Näytä tiedosto

@@ -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);

Loading…
Peruuta
Tallenna