Commit fb2e0aae by “Kongxiangkun”

我的收藏增加图片字段

parent c64def53
...@@ -285,16 +285,17 @@ public class StudyCaseController { ...@@ -285,16 +285,17 @@ public class StudyCaseController {
try { try {
Page<FavoriteVO> favoriteVOPage = studyCaseClient.getFavoriteList(pageNo, pageSize); Page<FavoriteVO> favoriteVOPage = studyCaseClient.getFavoriteList(pageNo, pageSize);
if(favoriteVOPage!=null&& CollectionUtils.isNotEmpty(favoriteVOPage.getRecords())){ if(favoriteVOPage!=null&& CollectionUtils.isNotEmpty(favoriteVOPage.getRecords())){
LOGGER.info("我的收藏列表查询,记录数:{},数据:{}", favoriteVOPage.getRecords().size(), JSONUtil.toJsonStr(favoriteVOPage.getRecords())); LOGGER.info("我的收藏列表查询,记录数:{}", favoriteVOPage.getRecords().size());
List<Long> bizIds = favoriteVOPage.getRecords().stream().map(FavoriteVO::getFavoriteId).collect(Collectors.toList()); List<Long> bizIds = favoriteVOPage.getRecords().stream().map(FavoriteVO::getFavoriteId).collect(Collectors.toList());
List<InformationVo> informationVoList =informationManageFeignClients.listbyIds(bizIds); List<InformationVo> informationVoList =informationManageFeignClients.listbyIds(bizIds);
LOGGER.info("我的收藏获取资讯信息,记录数:{},数据:{}", informationVoList.size(), JSONUtil.toJsonStr(informationVoList)); LOGGER.info("我的收藏获取资讯信息,记录数:{}", informationVoList.size());
if(CollectionUtils.isNotEmpty(informationVoList)){ if(CollectionUtils.isNotEmpty(informationVoList)){
favoriteVOPage.getRecords().stream().forEach(vo->{ favoriteVOPage.getRecords().stream().forEach(vo->{
Optional<InformationVo> optional = informationVoList.stream().filter(i->Objects.equals(i.getId(),vo.getFavoriteId())).findFirst(); Optional<InformationVo> optional = informationVoList.stream().filter(i->Objects.equals(i.getId(),vo.getFavoriteId())).findFirst();
if(optional!=null&&optional.isPresent()){ if(optional!=null&&optional.isPresent()){
InformationVo informationVo = optional.get(); InformationVo informationVo = optional.get();
vo.setStudentCaseTittle(informationVo.getFileName()); vo.setStudentCaseTittle(informationVo.getFileName());
vo.setStudentCaseLogoUrl(informationVo.getLogoPath());
} }
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment