Helius
2021-01-22 81406fbab9b6be9c61c115f5daf3f9bbfa4d256a
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
@@ -17,6 +17,7 @@
import com.matrix.system.common.tools.ServiceUtil;
import com.matrix.system.constance.Dictionary;
import com.matrix.system.constance.TableMapping;
import com.matrix.system.hive.action.util.QueryUtil;
import com.matrix.system.hive.bean.*;
import com.matrix.system.hive.dao.*;
import com.matrix.system.hive.plugin.util.CollectionUtils;
@@ -425,6 +426,7 @@
      if (!DataAuthUtil.hasAllShopAuth()) {
         vipInfoListDto.setShopId(sysUsers.getShopId());
      }
      QueryUtil.setQueryLimitCom(vipInfoListDto);
      return sysVipInfoDao.selectVipAddressBookByList(vipInfoListDto);
   }
@@ -448,6 +450,7 @@
      }
      SysVipInfo vipInfo = new SysVipInfo();
      vipInfo.setPhoto(addVipDto.getPhoto());
      vipInfo.setVipName(addVipDto.getVipName());
      vipInfo.setVipNo(addVipDto.getVipNo());
@@ -482,7 +485,7 @@
      int i=sysVipInfoDao.insert(vipInfo);
      if (CollectionUtils.isNotEmpty(addVipDto.getLabels())) {
         batchInsertLabel(addVipDto.getLabels(), user.getSuName(), vipInfo.getId());
//         batchInsertLabel(addVipDto.getLabels(), user.getSuName(), vipInfo.getId());
      }
      //创建用户默认储值卡
@@ -533,9 +536,8 @@
      int i = sysVipInfoDao.update(vipInfo);
      if (CollectionUtils.isNotEmpty(modifyVipDto.getLabels())) {
         sysVipLabelDao.deleteByVipId(modifyVipDto.getVipId());
         batchInsertLabel(modifyVipDto.getLabels(), user.getSuName(), vipInfo.getId());
//         sysVipLabelDao.deleteByVipId(modifyVipDto.getVipId());
//         batchInsertLabel(modifyVipDto.getLabels(), user.getSuName(), vipInfo.getId());
      }
      return i;
   }
@@ -548,7 +550,6 @@
         sysVipLabel.setCreateTime(new Date());
         sysVipLabel.setCreateBy(suName);
         sysVipLabel.setLabel(iterator.next());
         sysVipLabel.setVipId(id);
         sysVipLabelDao.insert(sysVipLabel);
      }
   }