提交 4f2f0613 authored 作者: zhouzhigang's avatar zhouzhigang

专题

上级 bcff0428
......@@ -66,31 +66,28 @@ public class SpecialResourceRelationServiceImpl extends BaseServiceImpl<SpecialR
SpecialResourceRelation specialResourceRelation = new SpecialResourceRelation();
specialResourceRelation.setSpecialId(form.getSpecialId());
List<SpecialResourceRelation> voList = this.select(specialResourceRelation);
if(StringUtils.isEmpty(pageParam.getOrderBy())){
pageParam.setOrderBy(" uploadTime desc ");
}
startPage(pageParam);
List<PopupResourceListVo> list = new ArrayList<>();
List<PopupResourceListVo> list1;//图书
List<PopupResourceListVo> list2;//文章
List<String> ids = new ArrayList<>();
if(voList != null && voList.size() > 0){
ids = voList.stream().map(SpecialResourceRelation::getResourceId).collect(Collectors.toList());
}
//图书
if(StringUtils.isEmpty(pageParam.getOrderBy())){
pageParam.setOrderBy(" uploadTime desc ");
}
startPage(pageParam);
List<PopupResourceListVo> list = new ArrayList<>();
if(1 == form.getResourceType().intValue()){
list = specialResourceRelationMapper.popupBookPage(form,ids);
}else if(form.getResourceType() == null){
list1 = specialResourceRelationMapper.popupBookPage(form,ids);
list2 = specialResourceRelationMapper.popupPage(form,ids);
list.addAll(list1);
list.addAll(list2);
}else{
list = specialResourceRelationMapper.popupPage(form,ids);
}
list.forEach(vo ->{
vo.setStatus_zh(LibraryStatusEnum.getName(vo.getStatus()));
});
return new PageInfo<>(list);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论