|
@@ -0,0 +1,33 @@
|
|
|
+package cn.com.qmth.examcloud.app.controller;
|
|
|
+
|
|
|
+import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_KEY;
|
|
|
+import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_TOKEN;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import cn.com.qmth.examcloud.app.model.Result;
|
|
|
+import cn.com.qmth.examcloud.app.service.CoreOeService;
|
|
|
+import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("${$rmp}/v2/paper")
|
|
|
+public class PaperController extends ControllerSupport {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private CoreOeService oeService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "根据Id获取试卷")
|
|
|
+ @GetMapping("{paperId}")
|
|
|
+ public Result getPaperById(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token,
|
|
|
+ @PathVariable String paperId) throws Exception{
|
|
|
+ return oeService.getPaperById(key, token,paperId);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|