yujian
2020-04-02 0ec22dcf4fd9c4496e6f681e7fab89f56c6e4e8a
fanli/src/main/java/com/yeshi/fanli/service/impl/help/HelpClassServiceImpl.java
@@ -29,6 +29,7 @@
import com.yeshi.fanli.exception.homemodule.FloatADException;
import com.yeshi.fanli.service.inter.help.HelpClassService;
import com.yeshi.fanli.service.inter.homemodule.AdActivityVersionControlService;
import com.yeshi.fanli.util.FilePathEnum;
import com.yeshi.fanli.util.StringUtil;
@Service
@@ -82,7 +83,7 @@
         InputStream inputStream = file.getInputStream();
         String contentType = file.getContentType();
         String type = contentType.substring(contentType.indexOf("/") + 1);
         String filePath ="/img/HelpClass/" + UUID.randomUUID().toString().replace("-", "") + "." + type;
         String filePath =FilePathEnum.helpClass.getPath() + UUID.randomUUID().toString().replace("-", "") + "." + type;
         picture = COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
      }
            
@@ -194,7 +195,7 @@
      String contentType = file.getContentType();
      String type = contentType.substring(contentType.indexOf("/") + 1);
      
      String filePath ="/img/HelpClass/" + UUID.randomUUID().toString().replace("-", "") + "." + type;
      String filePath =FilePathEnum.helpClass.getPath()+ UUID.randomUUID().toString().replace("-", "") + "." + type;
      
      /*  修改图片时,先删除已存在图片  */
      String picture = helpClass.getPicture();