|
@@ -2,6 +2,7 @@ package com.ynfy.app.api.v1.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
+import com.ynfy.app.api.v1.entity.dto.ExamDTO;
|
|
import com.ynfy.buss.exam.exam.dto.ExamSubmitDTO;
|
|
import com.ynfy.buss.exam.exam.dto.ExamSubmitDTO;
|
|
import com.ynfy.buss.exam.exam.dto.QuestionTypeCountDTO;
|
|
import com.ynfy.buss.exam.exam.dto.QuestionTypeCountDTO;
|
|
import com.ynfy.buss.exam.exam.entity.Exam;
|
|
import com.ynfy.buss.exam.exam.entity.Exam;
|
|
@@ -47,15 +48,13 @@ public class ApiExamController {
|
|
/**
|
|
/**
|
|
* 获取考试列表
|
|
* 获取考试列表
|
|
*
|
|
*
|
|
- * @param exam
|
|
|
|
- * @param pageNo
|
|
|
|
- * @param pageSize
|
|
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@PostMapping("/list")
|
|
@PostMapping("/list")
|
|
- public Result<IPage<Exam>> list(Exam exam, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
|
- @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
|
- Page<Exam> page = new Page<>(pageNo, pageSize);
|
|
|
|
|
|
+ public Result<IPage<Exam>> list(@RequestBody ExamDTO dto) {
|
|
|
|
+ Page<Exam> page = new Page<>(dto.getPageNo(), dto.getPageSize());
|
|
|
|
+ Exam exam = new Exam();
|
|
|
|
+ exam.setTitle(dto.getExamTitle());
|
|
IPage<Exam> pageList = examService.selectExamList(page, exam);
|
|
IPage<Exam> pageList = examService.selectExamList(page, exam);
|
|
return Result.OK(pageList);
|
|
return Result.OK(pageList);
|
|
}
|
|
}
|