*/ | */ | ||||
@PostMapping("/getQuestionList") | @PostMapping("/getQuestionList") | ||||
public Response getQuestionList(@RequestBody InspectQuestionQuery inspectQuestionDto) { | public Response getQuestionList(@RequestBody InspectQuestionQuery inspectQuestionDto) { | ||||
return response.success(inspectQuestionService.getQuestionList(inspectQuestionDto)); | |||||
return inspectQuestionService.getQuestionList(inspectQuestionDto); | |||||
} | } | ||||
/** | /** |
* @param param 参数 | * @param param 参数 | ||||
* @return | * @return | ||||
*/ | */ | ||||
List<InspectQuestionListVo> getQuestionList(IPage<TauvInspectQuestion> page, @RequestParam("param") InspectQuestionQuery param); | |||||
IPage<InspectQuestionListVo> getQuestionList(IPage<TauvInspectQuestion> page, @RequestParam("param") InspectQuestionQuery param); | |||||
/** | /** | ||||
* 获取问题详情 | * 获取问题详情 |
* @param inspectQuestionDto 参数 | * @param inspectQuestionDto 参数 | ||||
* @return | * @return | ||||
*/ | */ | ||||
List<InspectQuestionListVo> getQuestionList(InspectQuestionQuery inspectQuestionDto); | |||||
Response getQuestionList(InspectQuestionQuery inspectQuestionDto); | |||||
/** | /** | ||||
* 获取问题详情 | * 获取问题详情 |
* @return | * @return | ||||
*/ | */ | ||||
@Override | @Override | ||||
public List<InspectQuestionListVo> getQuestionList(InspectQuestionQuery inspectQuestionDto) { | |||||
public Response getQuestionList(InspectQuestionQuery inspectQuestionDto) { | |||||
IPage<TauvInspectQuestion> page = new Page<>(inspectQuestionDto.getPage(), inspectQuestionDto.getPageSize()); | IPage<TauvInspectQuestion> page = new Page<>(inspectQuestionDto.getPage(), inspectQuestionDto.getPageSize()); | ||||
return inspectQuestionMapper.getQuestionList(page, inspectQuestionDto); | |||||
// 获取分页数据 | |||||
IPage<InspectQuestionListVo> data = inspectQuestionMapper.getQuestionList(page, inspectQuestionDto); | |||||
// 返回结果 | |||||
Map<String, Object> result = new HashMap<>(); | |||||
result.put("total", data.getTotal()); | |||||
result.put("size", data.getSize()); | |||||
result.put("current", data.getCurrent()); | |||||
result.put("pages", data.getPages()); | |||||
result.put("records", data.getRecords()); | |||||
return response.success(result); | |||||
} | } | ||||
/** | /** |