1
luodangjia
2025-01-22 3eb56cab8a5a453ac5e70b6e36618dde32431326
ruoyi-modules/ruoyi-company/src/main/java/com/ruoyi/company/service/impl/CompanyServiceImpl.java
@@ -115,7 +115,7 @@
            throw new ServiceException("该企业已存在");
        }
        //身份证二要素校验
        identityVerification(dto, company, user);
        identityVerification(dto, user);
        this.save(company);
    }
@@ -168,20 +168,20 @@
                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("营业执照信息不匹配");
        }