admin
2020-05-12 2ec42a5aacea35d2918f0e17f07685cf5b4d25c8
fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetServiceImpl.java
@@ -41,7 +41,7 @@
      return banLiShopGoodsSetsMapper.selectByPrimaryKey(id);
   }
   @Transactional
   @Transactional(rollbackFor=Exception.class)
   @Override
   public void addSet(BanLiShopGoodsSets set) throws BanLiShopGoodsSetException, BanLiShopGoodsSetPayException {
      if (set.getId() == null)// 添加
@@ -136,7 +136,29 @@
   }
   
   @Override
   public void switchState(Long id) throws BanLiShopGoodsSetException {
      if (id == null) {
         throw new BanLiShopGoodsSetException(1, "请传递正确参数");
      }
      BanLiShopGoodsSets resultObj = banLiShopGoodsSetsMapper.selectByPrimaryKey(id);
      if (resultObj == null) {
         throw new BanLiShopGoodsSetException(1, "此内容已不存在");
      }
      Integer state = resultObj.getState();
      if (state == null || state == 0) {
         state = 1;
      } else {
         state = 0;
      }
      BanLiShopGoodsSets updateObj = new BanLiShopGoodsSets();
      updateObj.setId(id);
      updateObj.setState(state);
      banLiShopGoodsSetsMapper.updateByPrimaryKeySelective(updateObj);
   }
   @Override
   public void updateSelectiveByPrimaryKey(BanLiShopGoodsSets set) {
      if (set.getId() == null)