use of com.duan.blogos.dto.blogger.BloggerLinkDTO in project BlogSystem by DuanJiaNing.
the class BloggerLinkServiceImpl method listBloggerLink.
@Override
public ResultBean<List<BloggerLinkDTO>> listBloggerLink(int bloggerId, int offset, int rows) {
List<BloggerLink> list = linkDao.listBlogLinkByBloggerId(bloggerId, offset, rows);
List<BloggerLinkDTO> result = new ArrayList<>();
for (BloggerLink link : list) {
Integer iconId = link.getIconId();
BloggerPicture icon = iconId == null ? pictureDao.getBloggerUniquePicture(bloggerProperties.getPictureManagerBloggerId(), DEFAULT_BLOGGER_LINK_ICON.getCode()) : pictureDao.getPictureById(iconId);
icon.setPath(constructorManager.constructPictureUrl(icon, DEFAULT_BLOGGER_LINK_ICON));
BloggerLinkDTO dto = fillingManager.bloggerLinkToDTO(link, icon);
result.add(dto);
}
return CollectionUtils.isEmpty(result) ? null : new ResultBean<>(result);
}
Aggregations