智慧保安后台管理-外网项目备份
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -1900,11 +1900,11 @@
   @Override
   public Boolean wxRegister(User user) {
      User params = new User();
      params.setPhone(user.getPhone());
      //查看数据库是否有相同手机号
      params.setCardid(user.getCardid());
      //查看数据库是否有相同身份证号
      List<User> list = list(Condition.getQueryWrapper(params));
      if (list.size()>0){
         throw new ServiceException("该用户已注册");
         throw new ServiceException("该身份证号已注册");
      }
      //注册新用户
@@ -1966,13 +1966,12 @@
            }
         }
         //根据身份证获取用户
         User userInfoByIdCardNo = baseMapper.getUserInfoByIdCardNo(userExcel.getCardid());
         //根据身份证、保安证编号获取用户
         User userInfoByIdCardNo = baseMapper.getUserInfoByIdCardNoAndSecurityNumber(userExcel.getCardid(),userExcel.getSecuritynumber());
         if (!userInfoByIdCardNo.getSecuritynumber().equals( userExcel.getSecuritynumber())){
            throw new ServiceException("导入失败!保安证编号与系统不匹配!");
         if (userInfoByIdCardNo == null){
            throw new ServiceException("导入失败!身份证号和保安证编号与系统不匹配!");
         }
         User user = new User();
         user.setId(userInfoByIdCardNo.getId());