admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialLabelImpl.java
@@ -55,6 +55,30 @@
      }
   }
   
   @Override
   public void switchState(Long id) throws SpecialLabelException {
      if (id == null) {
         throw new SpecialLabelException(1, "请传递正确参数");
      }
      SpecialLabel resultObj = specialLabelMapper.selectByPrimaryKey(id);
      if (resultObj == null) {
         throw new SpecialLabelException(1, "此内容已不存在");
      }
      Integer state = resultObj.getState();
      if (state == null || state == 0) {
         state = 1;
      } else {
         state = 0;
      }
      SpecialLabel updateObj = new SpecialLabel();
      updateObj.setId(id);
      updateObj.setState(state);
      specialLabelMapper.updateByPrimaryKeySelective(updateObj);
   }
   @Override
   public int deleteByPrimaryKeyBatch(List<Long> list){