|
@@ -4,11 +4,11 @@ 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.qmth.themis.business.annotation.ApiJsonObject;
|
|
import com.qmth.themis.business.annotation.ApiJsonObject;
|
|
import com.qmth.themis.business.annotation.ApiJsonProperty;
|
|
import com.qmth.themis.business.annotation.ApiJsonProperty;
|
|
|
|
+import com.qmth.themis.business.base.BasePage;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.dto.response.TEStudentDto;
|
|
import com.qmth.themis.business.dto.response.TEStudentDto;
|
|
import com.qmth.themis.business.dto.response.TEStudentExamRecordDto;
|
|
import com.qmth.themis.business.dto.response.TEStudentExamRecordDto;
|
|
import com.qmth.themis.business.entity.TBUser;
|
|
import com.qmth.themis.business.entity.TBUser;
|
|
-import com.qmth.themis.business.entity.TEExamStudent;
|
|
|
|
import com.qmth.themis.business.entity.TEStudent;
|
|
import com.qmth.themis.business.entity.TEStudent;
|
|
import com.qmth.themis.business.service.TEStudentService;
|
|
import com.qmth.themis.business.service.TEStudentService;
|
|
import com.qmth.themis.business.util.JacksonUtil;
|
|
import com.qmth.themis.business.util.JacksonUtil;
|
|
@@ -46,8 +46,9 @@ public class TEStudentController {
|
|
@ApiResponses({@ApiResponse(code = 200, message = "考生信息", response = TEStudentDto.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "考生信息", response = TEStudentDto.class)})
|
|
public Result query(@ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity, @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name, @ApiParam(value = "是否启用", required = false) @RequestParam(required = false) Integer enable, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
public Result query(@ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity, @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name, @ApiParam(value = "是否启用", required = false) @RequestParam(required = false) Integer enable, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
IPage<TEStudentDto> teExamStudentIPage = teStudentService.studentQuery(new Page<>(pageNumber, pageSize), identity, name, enable);
|
|
IPage<TEStudentDto> teExamStudentIPage = teStudentService.studentQuery(new Page<>(pageNumber, pageSize), identity, name, enable);
|
|
|
|
+ BasePage basePage = new BasePage(teExamStudentIPage.getRecords(), teExamStudentIPage.getCurrent(), teExamStudentIPage.getSize(), teExamStudentIPage.getTotal());
|
|
Map map = new HashMap<>();
|
|
Map map = new HashMap<>();
|
|
- map.put(SystemConstant.RECORDS, teExamStudentIPage);
|
|
|
|
|
|
+ map.put(SystemConstant.RECORDS, basePage);
|
|
return ResultUtil.ok(map);
|
|
return ResultUtil.ok(map);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -112,9 +113,10 @@ public class TEStudentController {
|
|
if (Objects.isNull(id) || Objects.equals(id, "")) {
|
|
if (Objects.isNull(id) || Objects.equals(id, "")) {
|
|
throw new BusinessException(ExceptionResultEnum.STUDENT_ID_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.STUDENT_ID_IS_NULL);
|
|
}
|
|
}
|
|
- IPage<TEStudentExamRecordDto> studentExamRecordQuery = teStudentService.studentExamRecordQuery(new Page<>(pageNumber, pageSize), id, name);
|
|
|
|
|
|
+ IPage<TEStudentExamRecordDto> teStudentExamRecordDtoIPage = teStudentService.studentExamRecordQuery(new Page<>(pageNumber, pageSize), id, name);
|
|
|
|
+ BasePage basePage = new BasePage(teStudentExamRecordDtoIPage.getRecords(), teStudentExamRecordDtoIPage.getCurrent(), teStudentExamRecordDtoIPage.getSize(), teStudentExamRecordDtoIPage.getTotal());
|
|
Map map = new HashMap<>();
|
|
Map map = new HashMap<>();
|
|
- map.put(SystemConstant.RECORDS, studentExamRecordQuery);
|
|
|
|
|
|
+ map.put(SystemConstant.RECORDS, basePage);
|
|
return ResultUtil.ok(map);
|
|
return ResultUtil.ok(map);
|
|
}
|
|
}
|
|
}
|
|
}
|