浏览代码

1.7.5认证通版本功能优化

JiangChongBo 2 年之前
父节点
当前提交
c5bfa85821
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 8 5
      src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java

+ 8 - 5
src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java

@@ -1492,10 +1492,12 @@ public class AuthServiceImpl implements AuthService {
             for (ChallengeRoundVo challengeRoundVo : fileTreeVos) {
                     //普通文件直接下载到临时文件夹uuid下
                     String fileName = "";
-                    if ("dev".equals(active)) {
-                        fileName = zipPath + "\\"+challengeRoundVo.getTitle() ;
+                String ossurl = challengeRoundVo.getOssUrl();
+                ossurl.indexOf(".");
+                if ("dev".equals(active)) {
+                        fileName = zipPath + "\\"+challengeRoundVo.getTitle() + ossurl.substring(ossurl.lastIndexOf("."));
                     } else {
-                        fileName = zipPath + "/"+challengeRoundVo.getTitle() ;
+                        fileName = zipPath + "/"+challengeRoundVo.getTitle() + ossurl.substring(ossurl.lastIndexOf("."));
                     }
                     OSSUtils.downFileByFilePath("authFile/", challengeRoundVo.getOssName(), fileName);
 //                else {
@@ -1557,10 +1559,11 @@ public class AuthServiceImpl implements AuthService {
             for (ChallengeRoundVo challengeRoundVo : fileTreeVos) {
                 //普通文件直接下载到临时文件夹uuid下
                 String fileName = "";
+                String ossurl = challengeRoundVo.getOssUrl();
                 if ("dev".equals(active)) {
-                    fileName = zipPath + "\\"+challengeRoundVo.getTitle() ;
+                    fileName = zipPath + "\\"+challengeRoundVo.getTitle() +ossurl.substring(ossurl.lastIndexOf("."));
                 } else {
-                    fileName = zipPath + "/"+challengeRoundVo.getTitle() ;
+                    fileName = zipPath + "/"+challengeRoundVo.getTitle() + ossurl.substring(ossurl.lastIndexOf("."));
                 }
                 OSSUtils.downFileByFilePath("authFile/", challengeRoundVo.getOssName(), fileName);
 //                else {