yujian
2020-01-18 f4a0f2acc63d7785eab108419a4e16f5f688cb95
fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsServiceImpl.java
@@ -22,6 +22,7 @@
import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsImgService;
import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsService;
import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetService;
import com.yeshi.fanli.util.FilePathEnum;
import com.yeshi.fanli.util.StringUtil;
@Service
@@ -198,7 +199,7 @@
      String contentType = file.getContentType();
      String type = contentType.substring(contentType.indexOf("/") + 1);
      // 文件路径
      String filePath="/img/BanLiShopGoods/"+UUID.randomUUID().toString().replace("-", "") + "." + type;
      String filePath=FilePathEnum.banLiShopGoods.getPath() +UUID.randomUUID().toString().replace("-", "") + "." + type;
      // 执行上传
      String fileLink= COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
      return fileLink;