yujian
2020-01-03 c9cbdfa41d645d42eeaa7e06d550d4ef8ac328e7
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/FloatADServiceImpl.java
@@ -21,6 +21,7 @@
import com.yeshi.fanli.exception.homemodule.FloatADException;
import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
import com.yeshi.fanli.service.inter.homemodule.FloatADService;
import com.yeshi.fanli.util.FilePathEnum;
import com.yeshi.fanli.util.StringUtil;
@Service
@@ -53,6 +54,10 @@
         throw new FloatADException(1, "跳转参数非JSON格式");
      }
      
      FloatADTypeEnum typeEnum = record.getTypeEnum();
      if (typeEnum == null)
         throw new FloatADException(1, "类型不能为空");
      if (!StringUtil.isNullOrEmpty(jumpType)) {
         List<JumpDetailV2> listByType = jumpDetailV2Service.listByType(jumpType);
         if (listByType !=null && listByType.size() > 0) {
@@ -142,7 +147,7 @@
      String type = contentType.substring(contentType.indexOf("/") + 1);
   
      // 文件路径
      String filePath="/img/FloatAD/"+UUID.randomUUID().toString().replace("-", "") + "." + type;
      String filePath= FilePathEnum.floatAD.getPath() +UUID.randomUUID().toString().replace("-", "") + "." + type;
      // 执行上传
      String fileLink= COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
      
@@ -161,7 +166,7 @@
   }
   
   @Override
   @Transactional
   @Transactional(rollbackFor=Exception.class)
   public void updateOrder(Long id, Integer moveType) throws FloatADException {
      
      if (id == null || moveType == null || (!moveType.equals(1) && !moveType.equals(-1))) {
@@ -194,7 +199,7 @@
   }
   
   @Override
   @Transactional
   @Transactional(rollbackFor=Exception.class)
   public int deleteByPrimaryKeyList(List<Long> list) throws Exception{
      
      List<FloatAD> listSwiper = floatADMapper.ListByPrimaryKey(list);