|
@@ -205,9 +205,9 @@ public class TEExamController {
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
|
|
|
@Transactional
|
|
|
public Result examToggle(@ApiJsonObject(name = "examToggle", value = {
|
|
|
- @ApiJsonProperty(key = "id", type = "long", example = "1", description = "考试批次ID"),
|
|
|
- @ApiJsonProperty(key = "enable", type = "int", example = "1", description = "是否启用")
|
|
|
- }) @ApiParam(value = "考试批次信息", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
|
+ @ApiJsonProperty(key = "id", type = "long", example = "1", description = "考试批次ID"),
|
|
|
+ @ApiJsonProperty(key = "enable", type = "int", example = "1", description = "是否启用")
|
|
|
+ }) @ApiParam(value = "考试批次信息", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
|
if (Objects.isNull(mapParameter.get("id")) || Objects.equals(mapParameter.get("id"), "")) {
|
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
|
|
|
}
|
|
@@ -307,4 +307,19 @@ public class TEExamController {
|
|
|
}
|
|
|
return ResultUtil.ok(JacksonUtil.parseJson(SystemConstant.SUCCESS));
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "监考端获取考试批次接口")
|
|
|
+ @RequestMapping(value = "/list", method = RequestMethod.POST)
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "考试批次信息", response = TEExam.class)})
|
|
|
+ public Result list(@ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
|
+ TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
+ if (Objects.isNull(tbUser)) {
|
|
|
+ throw new BusinessException(ExceptionResultEnum.LOGIN_NO);
|
|
|
+ }
|
|
|
+ IPage<TEExamQueryDto> teExamQueryDtoIPage = teExamService.examList(new Page<>(pageNumber, pageSize), tbUser.getOrgId());
|
|
|
+ BasePage basePage = new BasePage(teExamQueryDtoIPage.getRecords(), teExamQueryDtoIPage.getCurrent(), teExamQueryDtoIPage.getSize(), teExamQueryDtoIPage.getTotal());
|
|
|
+ Map map = new HashMap<>();
|
|
|
+ map.put(SystemConstant.RECORDS, basePage);
|
|
|
+ return ResultUtil.ok(map);
|
|
|
+ }
|
|
|
}
|