admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/FloatADServiceImpl.java
@@ -216,6 +216,31 @@
      floatADMapper.updateByPrimaryKey(exchangeObject);
   }
   
   @Override
   public void switchState(Long id) throws FloatADException {
      if (id == null) {
         throw new FloatADException(1, "请传递正确参数");
      }
      FloatAD resultObj = floatADMapper.selectByPrimaryKey(id);
      if (resultObj == null) {
         throw new FloatADException(1, "此内容已不存在");
      }
      Integer state = resultObj.getState();
      if (state == null || state == 0) {
         state = 1;
      } else {
         state = 0;
      }
      FloatAD updateObj = new FloatAD();
      updateObj.setId(id);
      updateObj.setState(state);
      floatADMapper.updateByPrimaryKeySelective(updateObj);
   }
   @Override
   @Transactional(rollbackFor=Exception.class)
   public int deleteByPrimaryKeyList(List<Long> list) throws Exception{