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

@@ -38,7 +38,7 @@ public class InspectQuestionController extends ApiBaseController {
*/
@PostMapping("/getQuestionList")
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

@@ -29,7 +29,7 @@ public interface InspectQuestionMapper extends BaseMapper<TauvInspectQuestion> {
* @param param 参数
* @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

@@ -28,7 +28,7 @@ public interface IInspectQuestionService extends IService<TauvInspectQuestion> {
* @param inspectQuestionDto 参数
* @return
*/
List<InspectQuestionListVo> getQuestionList(InspectQuestionQuery inspectQuestionDto);
Response getQuestionList(InspectQuestionQuery inspectQuestionDto);

/**
* 获取问题详情

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

@@ -75,9 +75,20 @@ public class InspectQuestionServiceImpl extends ServiceImpl<InspectQuestionMappe
* @return
*/
@Override
public List<InspectQuestionListVo> getQuestionList(InspectQuestionQuery inspectQuestionDto) {
public Response getQuestionList(InspectQuestionQuery inspectQuestionDto) {
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