xiatian 4 лет назад
Родитель
Сommit
10b6591d4c

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

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

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

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

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

@@ -40,10 +40,9 @@ public class CoreQuestionServiceImpl implements CoreQuestionService {
     private SysProperty sysProperty;
 
     @Override
-    public String downloadPaper(String key, String token, String paperId, String orgName) throws Exception {
+    public String downloadPaper(String key, String token, String paperId) throws Exception {
         //封装请求参数
-        orgName = URLEncoder.encode(orgName, "utf-8");
-        return String.format("%s/api/branch_ecs_ques/paper/export/%s/PAPER/%s/%s/offLine?$key=%s&$token=%s", sysProperty.getCoreQuestionUrl(), paperId, orgName, paperId, key, token);
+        return String.format("%s/api/branch_ecs_ques/paper/export/%s/PAPER/%s/offLine?$key=%s&$token=%s", sysProperty.getCoreQuestionUrl(), paperId,  paperId, key, token);
     }
 
     @Override