use of cn.exrick.manager.pojo.TbImageExample in project xmall by Exrick.
the class ContentImageServiceImpl method getContentImage.
@Override
public DataTablesResult getContentImage() {
DataTablesResult result = new DataTablesResult();
List<ImageDto> list = new ArrayList<>();
TbImageExample example = new TbImageExample();
List<TbImage> listImage = tbImageMapper.selectByExample(example);
for (int i = 0; i < listImage.size(); i++) {
ImageDto imageDto = DtoUtil.TbImage2ImageDto(listImage.get(i));
TbContentCategory tbContentCategory = tbContentCategoryMapper.selectByPrimaryKey(Long.valueOf(listImage.get(i).getCategoryId()));
imageDto.setCategory(tbContentCategory.getName());
list.add(imageDto);
}
result.setData(list);
return result;
}
Aggregations