瀏覽代碼

fix: 标签为空时捕获异常

WANGKANG 7 月之前
父節點
當前提交
7db3ba8253

+ 6 - 2
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/TrackSequenceServiceImpl.java

@@ -115,8 +115,12 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
     }
 
     public String getLabelDirPath(Long ossId) {
-        SysOssVo ossEntity = ossService.getById(ossId);
-        return getResourcePath(ossEntity);
+        try {
+            SysOssVo ossEntity = ossService.getById(ossId);
+            return getResourcePath(ossEntity);
+        } catch (Exception e) {
+            throw new RuntimeException("oss标签文件不存在");
+        }
     }
 
     private String getTxtDirPath(Long id) {