yangyj 8 mēneši atpakaļ
vecāks
revīzija
31d76c3cb0

+ 6 - 4
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/TaskController.java

@@ -2808,10 +2808,12 @@ public class TaskController extends BladeController {
                         if (reader != null) reader.close();
                         doc.close();
                         rs.setPdfOssPath(CompletableFuture.supplyAsync(() -> {
-                            BladeFile bladeFile = newIOSSClient.uploadFile(rs.getName() + SnowFlakeUtil.getId() + ".pdf", rs.getPdfPath());
-                            String url = bladeFile.getLink();
-                            if (Func.isEmpty(url)) {
-                                url = "无效链接";
+                            String url="无效链接";
+                            try {
+                                BladeFile bladeFile = newIOSSClient.uploadFile(rs.getName() + SnowFlakeUtil.getId() + ".pdf", rs.getPdfPath());
+                                 url = bladeFile.getLink();
+                            }catch (Exception e){
+                                e.printStackTrace();
                             }
                             return url;
                         }));