|
@@ -156,12 +156,19 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
public TableDataInfo<QuestionVo> selectListByBo(QuestionQueryBo bo) {
|
|
|
TableDataInfo tableDataInfo = new TableDataInfo();
|
|
|
List<Long> ids = questionMapper.selectListByBoBackId(bo);
|
|
|
- bo.setIds(ids);
|
|
|
- List<QuestionVo> list = questionMapper.selectListByBoWithId(bo);
|
|
|
- tableDataInfo.setTotal(new PageInfo(ids).getTotal());
|
|
|
- tableDataInfo.setRows(list);
|
|
|
- tableDataInfo.setCode(HttpStatus.HTTP_OK);
|
|
|
- return tableDataInfo;
|
|
|
+ if(ids.size()>0){
|
|
|
+ bo.setIds(ids);
|
|
|
+ List<QuestionVo> list = questionMapper.selectListByBoWithId(bo);
|
|
|
+ tableDataInfo.setTotal(new PageInfo(ids).getTotal());
|
|
|
+ tableDataInfo.setRows(list);
|
|
|
+ tableDataInfo.setCode(HttpStatus.HTTP_OK);
|
|
|
+ return tableDataInfo;
|
|
|
+ }else{
|
|
|
+ tableDataInfo.setTotal(new PageInfo(ids).getTotal());
|
|
|
+ tableDataInfo.setRows(ids);
|
|
|
+ tableDataInfo.setCode(HttpStatus.HTTP_OK);
|
|
|
+ return tableDataInfo;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|