소스 검색

国际版下载场景跳过lambda切图文件

dengsixing 3 년 전
부모
커밋
7c9a16df5f

+ 9 - 4
4dkankan-center-scene-download/src/main/java/com/fdkankan/download/service/impl/SceneDownloadHandlerServiceImpl.java

@@ -396,12 +396,18 @@ public class SceneDownloadHandlerServiceImpl {
             return;
         }
 
-        String fileName = key.substring(key.lastIndexOf("/")+1, key.indexOf("."));
-        String ext = key.substring(key.lastIndexOf("."));
+        String fileName = null;
+        String ext = null;
+
+        try {
+            fileName = key.substring(key.lastIndexOf("/")+1, key.indexOf("."));
+            ext = key.substring(key.lastIndexOf("."));
+        }catch (Exception e){
+            log.error("异常文件=" + key);
+        }
         String[] arr = fileName.split("_skybox");
         String dir = arr[0];
         String num = arr[1];
-
         if(StrUtil.isEmpty(fileName)
             || StrUtil.isEmpty(ext)
             || (".jpg".equals(ext) && ".png".equals(ext))
@@ -409,7 +415,6 @@ public class SceneDownloadHandlerServiceImpl {
             || StrUtil.isEmpty(num)){
             throw new Exception("本地下载图片资源不符合规则,key:" + key);
         }
-
         for (ImageType imageType : imageTypes) {
 
             List<ImageTypeDetail> items = Lists.newArrayList();