Helius
2021-01-25 0eb83b49a381c31a51b8c8cec9e4d9d88fd5d16f
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
@@ -439,9 +439,11 @@
   public int apiAddVip(AddVipDto addVipDto) {
      SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
      if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "VIP_NO", addVipDto.getVipNo(),
            "company_id",user.getCompanyId())) {
         throw new GlobleException("编号已存在!");
      if (StringUtils.isNotBlank(addVipDto.getVipNo())) {
         if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "VIP_NO", addVipDto.getVipNo(),
               "company_id", user.getCompanyId())) {
            throw new GlobleException("编号已存在!");
         }
      }
      if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "PHONE", addVipDto.getPhone(),
@@ -502,10 +504,12 @@
         throw new GlobleException("用户不存在");
      }
      if (!modifyVipDto.getVipNo().equals(vipInfo.getVipNo())) {
         if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "VIP_NO", modifyVipDto.getVipNo(),
               "company_id",user.getCompanyId())) {
            throw new GlobleException("编号已存在!");
      if (StringUtils.isNotBlank(modifyVipDto.getVipNo())) {
         if (!modifyVipDto.getVipNo().equals(vipInfo.getVipNo())) {
            if (serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "VIP_NO", modifyVipDto.getVipNo(),
                  "company_id", user.getCompanyId())) {
               throw new GlobleException("编号已存在!");
            }
         }
      }
@@ -545,7 +549,7 @@
   private void batchInsertLabel(List<String> labelList, Long id) {
      Set<String> labels = new HashSet<>(labelList);
      Iterator<String> iterator = labels.iterator();
      if (iterator.hasNext()) {
      while (iterator.hasNext()) {
         SysVipLabelRelate relate = new SysVipLabelRelate();
         relate.setLabelId(Long.parseLong(iterator.next()));
         relate.setVipId(id);