Browse Source

更新

master
鲲鹏 4 years ago
parent
commit
26583799db
4 changed files with 16 additions and 5 deletions
  1. +1
    -1
      src/main/java/com/taauav/app/controller/InspectQuestionController.java
  2. +1
    -1
      src/main/java/com/taauav/app/mapper/InspectQuestionMapper.java
  3. +1
    -1
      src/main/java/com/taauav/app/service/IInspectQuestionService.java
  4. +13
    -2
      src/main/java/com/taauav/app/service/impl/InspectQuestionServiceImpl.java

+ 1
- 1
src/main/java/com/taauav/app/controller/InspectQuestionController.java View File

*/ */
@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);
} }


/** /**

+ 1
- 1
src/main/java/com/taauav/app/mapper/InspectQuestionMapper.java View File

* @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);


/** /**
* 获取问题详情 * 获取问题详情

+ 1
- 1
src/main/java/com/taauav/app/service/IInspectQuestionService.java View File

* @param inspectQuestionDto 参数 * @param inspectQuestionDto 参数
* @return * @return
*/ */
List<InspectQuestionListVo> getQuestionList(InspectQuestionQuery inspectQuestionDto);
Response getQuestionList(InspectQuestionQuery inspectQuestionDto);


/** /**
* 获取问题详情 * 获取问题详情

+ 13
- 2
src/main/java/com/taauav/app/service/impl/InspectQuestionServiceImpl.java View File

* @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);
} }


/** /**

Loading…
Cancel
Save