|
@@ -10,9 +10,10 @@ package cn.com.qmth.examcloud.app.controller.v1;
|
|
|
import cn.com.qmth.examcloud.app.model.Result;
|
|
|
import cn.com.qmth.examcloud.app.service.NetExamService;
|
|
|
import cn.com.qmth.examcloud.app.service.QuestionPoolService;
|
|
|
-import cn.com.qmth.examcloud.app.service.UpYunService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -30,12 +31,11 @@ import java.io.File;
|
|
|
@RequestMapping("/api/v1/exam/offline")
|
|
|
@Api(tags = "离线考试相关接口")
|
|
|
public class OfflineExamRestController {
|
|
|
+ private static Logger log = LoggerFactory.getLogger(OfflineExamRestController.class);
|
|
|
@Autowired
|
|
|
private QuestionPoolService questionPoolService;
|
|
|
@Autowired
|
|
|
private NetExamService netExamService;
|
|
|
- @Autowired
|
|
|
- private UpYunService upYunService;
|
|
|
|
|
|
@ApiOperation(value = "获取当前用户参加的离线课程列表接口")
|
|
|
@RequestMapping(value = "/course/list", method = {RequestMethod.GET, RequestMethod.POST})
|
|
@@ -49,12 +49,6 @@ public class OfflineExamRestController {
|
|
|
return netExamService.startOfflineExamRecord(key, token, examStudentId);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "下载考题接口")
|
|
|
- @RequestMapping(value = "/paper/download", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
- public Result downloadPaper(@RequestHeader String key, @RequestHeader String token, @RequestParam String paperId, @RequestParam String orgName) throws Exception {
|
|
|
- return questionPoolService.downloadPaper(key, token, paperId, orgName);
|
|
|
- }
|
|
|
-
|
|
|
@ApiOperation(value = "上传作答文件接口")
|
|
|
@RequestMapping(value = "/paper/answer/upload", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
public Result uploadPaperAnswer(@RequestHeader String key, @RequestHeader String token, @RequestParam String examRecordId, @RequestParam String fileType,
|
|
@@ -64,12 +58,6 @@ public class OfflineExamRestController {
|
|
|
return netExamService.uploadPaperAnswer(key, token, examRecordId, file, fileType, fileMd5);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "下载已上传的“作答文件”接口")
|
|
|
- @RequestMapping(value = "/paper/answer/download", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
- public Result downloadPaperAnswer(@RequestHeader String key, @RequestHeader String token, @RequestParam String filePath) throws Exception {
|
|
|
- return upYunService.downloadPaperAnswer(key, token, filePath);
|
|
|
- }
|
|
|
-
|
|
|
@ApiOperation(value = "获取某份试卷的详细信息接口")
|
|
|
@RequestMapping(value = "/paper/detail", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
public Result getPaperDetail(@RequestHeader String key, @RequestHeader String token, @RequestParam String paperId) throws Exception {
|