浏览代码

Merge branch 'hot-fix-5-30' into 'Release'

Hot fix 5 30



See merge request !732

chensc 7 年之前
父节点
当前提交
2f81be8125

+ 2 - 2
mooctest-site-server/src/main/java/cn/iselab/mooctest/site/service/updownload/impl/DownloadServiceImpl.java

@@ -75,9 +75,9 @@ public class DownloadServiceImpl implements DownloadService {
                 for(File childFile:file.listFiles()){
                 for(File childFile:file.listFiles()){
                     String fileName=childFile.getName();
                     String fileName=childFile.getName();
                     latestTimestamp=checkoutTimestamp(fileName,caseName,latestTimestamp);
                     latestTimestamp=checkoutTimestamp(fileName,caseName,latestTimestamp);
-                    String downloadUrl = DOWNLOAD_PATH + caseName + "_" + latestTimestamp + ".zip";
-                    return host+downloadUrl;
                 }
                 }
+                String downloadUrl = DOWNLOAD_PATH + caseName + "_" + latestTimestamp + ".zip";
+                return host+downloadUrl;
             }
             }
             return null;
             return null;
         }
         }

+ 4 - 2
mooctest-site-server/src/main/java/cn/iselab/mooctest/site/service/updownload/impl/DownloadServicePCImpl.java

@@ -33,9 +33,9 @@ public class DownloadServicePCImpl implements DownloadService{
             for(File childFile:file.listFiles()){
             for(File childFile:file.listFiles()){
                 String fileName=childFile.getName();
                 String fileName=childFile.getName();
                 latestTimestamp=checkoutTimestamp(fileName,caseName,latestTimestamp);
                 latestTimestamp=checkoutTimestamp(fileName,caseName,latestTimestamp);
-                String downloadUrl = DOWNLOAD_PATH + caseName + "_" + latestTimestamp + ".zip";
-                return host+downloadUrl;
             }
             }
+            String downloadUrl = DOWNLOAD_PATH + caseName + "_" + latestTimestamp + ".zip";
+            return host+downloadUrl;
         }
         }
         return null;
         return null;
     }
     }
@@ -58,4 +58,6 @@ public class DownloadServicePCImpl implements DownloadService{
         }
         }
         return latestTimestamp;
         return latestTimestamp;
     }
     }
+
+
 }
 }

+ 0 - 1
mooctest-site-server/src/main/java/cn/iselab/mooctest/site/web/ctrl/OSSController.java

@@ -87,7 +87,6 @@ public class OSSController extends BaseController {
         return fileLogic.getHeadImage(userId);
         return fileLogic.getHeadImage(userId);
     }
     }
 
 
-    @RequiresRoles("manager")
     @RequestMapping(value = UrlConstants.API_COMMON + "upload/file", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, method = RequestMethod.POST)
     @RequestMapping(value = UrlConstants.API_COMMON + "upload/file", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, method = RequestMethod.POST)
     public Map<String, Object> uploadFile(@RequestParam("file") MultipartFile file, @RequestParam("path") String path, HttpServletRequest request) throws IOException {
     public Map<String, Object> uploadFile(@RequestParam("file") MultipartFile file, @RequestParam("path") String path, HttpServletRequest request) throws IOException {
         String result = ossLogic.saveFile(file, path);
         String result = ossLogic.saveFile(file, path);