Przeglądaj źródła

提交app代码

weiwenhai 6 lat temu
rodzic
commit
ce294f2ae2

+ 2 - 2
src/main/java/cn/com/qmth/examcloud/app/controller/OfflineExamController.java

@@ -82,8 +82,8 @@ public class OfflineExamController {
 
     @ApiOperation(value = "下载考题接口")
     @RequestMapping(value = "/paper/download", method = {RequestMethod.GET})
-    public String downloadPaper(@RequestParam String paperId, @RequestParam String orgName) throws Exception {
-        String requestUrl = "redirectPermanent:" + questionPoolService.downloadPaper(paperId, orgName);
+    public String downloadPaper(@RequestHeader String key, @RequestHeader String token, @RequestParam String paperId, @RequestParam String orgName) throws Exception {
+        String requestUrl = "redirectPermanent:" + questionPoolService.downloadPaper(key, token, paperId, orgName);
         log.debug(requestUrl);
         return requestUrl;
     }

+ 1 - 1
src/main/java/cn/com/qmth/examcloud/app/service/QuestionPoolService.java

@@ -25,7 +25,7 @@ public interface QuestionPoolService {
      * @return
      * @throws Exception
      */
-    String downloadPaper(String paperId, String orgName) throws Exception;
+    String downloadPaper(String key, String token, String paperId, String orgName) throws Exception;
 
     /**
      * 获取某份试卷的详细信息

+ 2 - 2
src/main/java/cn/com/qmth/examcloud/app/service/impl/QuestionPoolServiceImpl.java

@@ -40,10 +40,10 @@ public class QuestionPoolServiceImpl implements QuestionPoolService {
     private PropertyService propertyService;
 
     @Override
-    public String downloadPaper(String paperId, String orgName) throws Exception {
+    public String downloadPaper(String key, String token, String paperId, String orgName) throws Exception {
         //封装请求参数
         orgName = URLEncoder.encode(orgName, "utf-8");
-        return String.format("%s/api/ecs_ques/paper/export/%s/PAPER/%s/%s/offLine", propertyService.getQuestionPoolUrl(), paperId, orgName, paperId);
+        return String.format("%s/api/ecs_ques/paper/export/%s/PAPER/%s/%s/offLine?$key=%s&$token=%s", propertyService.getQuestionPoolUrl(), paperId, orgName, paperId, key, token);
     }
 
     @Override