ExamController.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package cn.com.qmth.examcloud.app.controller;
  2. import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_KEY;
  3. import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_TOKEN;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.PathVariable;
  7. import org.springframework.web.bind.annotation.RequestHeader;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.web.bind.annotation.RestController;
  10. import cn.com.qmth.examcloud.app.model.Result;
  11. import cn.com.qmth.examcloud.app.service.CoreOeService;
  12. import cn.com.qmth.examcloud.web.support.ControllerSupport;
  13. import io.swagger.annotations.Api;
  14. import io.swagger.annotations.ApiOperation;
  15. @RestController
  16. @RequestMapping("${$rmp}/v2/exam")
  17. @Api(tags = "考试相关接口")
  18. public class ExamController extends ControllerSupport {
  19. @Autowired
  20. private CoreOeService oeService;
  21. @ApiOperation(value = "查询考生的考试批次属性集")
  22. @GetMapping("getExamProperty/{examId}/{keys}")
  23. public Result getExamPropertyFromCacheByStudentSession(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token,@PathVariable Long examId,
  24. @PathVariable String keys) throws Exception{
  25. return oeService.getExamPropertyFromCacheByStudentSession(key, token, examId, keys);
  26. }
  27. }