| | |
| | | throw new ServiceException("该企业已存在"); |
| | | } |
| | | //身份证二要素校验 |
| | | identityVerification(dto, company, user); |
| | | identityVerification(dto, user); |
| | | this.save(company); |
| | | } |
| | | |
| | |
| | | throw new ServiceException("该企业已存在"); |
| | | } |
| | | } |
| | | identityVerification(dto, company, user); |
| | | identityVerification(dto, user); |
| | | Company companyUpd = BeanUtils.copyBean(dto, Company.class); |
| | | companyUpd.setId(company.getId()); |
| | | this.updateById(companyUpd); |
| | | } |
| | | |
| | | private void identityVerification(MgtCompanyDTO dto, Company company, User user) { |
| | | private void identityVerification(MgtCompanyDTO dto, User user) { |
| | | //身份证二要素校验 |
| | | Boolean res = aliyunCloudAuthUtil.verifyIdCard(dto.getLegalPersonName(), dto.getIdCardNumber()); |
| | | if (!res) { |
| | | throw new ServiceException("身份证信息不匹配"); |
| | | } |
| | | //营业执照二要素校验 |
| | | res = aliyunCloudAuthUtil.verifyBusinessLicense(dto.getSocialCode(), company.getCompanyName(), user.getUserId()); |
| | | res = aliyunCloudAuthUtil.verifyBusinessLicense(dto.getSocialCode(), dto.getCompanyName(), user.getUserId()); |
| | | if (!res) { |
| | | throw new ServiceException("营业执照信息不匹配"); |
| | | } |