Sfoglia il codice sorgente

fix bug:修复downloadStream下载文件的错误

lijie 3 anni fa
parent
commit
895851f28e

+ 1 - 1
dmp-comp/dmp-file-starter/src/main/java/com/persagy/dmp/file/utils/FileStorageHelper.java

@@ -183,7 +183,7 @@ public class FileStorageHelper {
      */
      */
     public static InputStream downloadStream(String fileId) {
     public static InputStream downloadStream(String fileId) {
         FileInfo info = downloadUrl(fileId);
         FileInfo info = downloadUrl(fileId);
-        if (StrUtil.isNotBlank(info.getFileDownloadUrl())){
+        if (StrUtil.isBlank(info.getFileDownloadUrl())){
             throw new BusinessException(ResponseCode.B0300.getCode(),ResponseCode.B0300.getDesc());
             throw new BusinessException(ResponseCode.B0300.getCode(),ResponseCode.B0300.getDesc());
         }
         }
         return IoUtil.toStream(HttpUtil.downloadBytes(info.getFileDownloadUrl()));
         return IoUtil.toStream(HttpUtil.downloadBytes(info.getFileDownloadUrl()));