|
|
|
@ -148,20 +148,25 @@ public class AliRealNameAuthenticationController { |
|
|
|
|
querys.put("LegalPersonName", enterpriseCertification.getLegalPerson()); |
|
|
|
|
|
|
|
|
|
String errorMsg = ""; |
|
|
|
|
|
|
|
|
|
//查询认证id
|
|
|
|
|
QueryWrapper<EnterpriseCertification> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("account_id", accountId); |
|
|
|
|
EnterpriseCertification certification = enterpriseCertificationService.getOne(queryWrapper); |
|
|
|
|
enterpriseCertification.setId(certification.getId()); |
|
|
|
|
try { |
|
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
|
if (info.getStatus()) { |
|
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName()))) { |
|
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(), certification.getId()))) { |
|
|
|
|
errorMsg = "企业名称已存在"; |
|
|
|
|
throw new RuntimeException(errorMsg); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
enterpriseCertificationService.updateById(enterpriseCertification); |
|
|
|
|
return R.ok("提交成功,请等待审核!"); |
|
|
|
|
} else { |
|
|
|
|
errorMsg = info.getReason(); |
|
|
|
|
return R.ok().put("message", info.getReason()); |
|
|
|
|
return R.error().put("message", info.getReason()); |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
@ -196,7 +201,7 @@ public class AliRealNameAuthenticationController { |
|
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
|
if (info.getStatus()) { |
|
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName()))) { |
|
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(),null))) { |
|
|
|
|
errorMsg = "企业名称已存在"; |
|
|
|
|
throw new RuntimeException(errorMsg); |
|
|
|
|
} |
|
|
|
@ -215,5 +220,4 @@ public class AliRealNameAuthenticationController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |