|
@@ -177,14 +177,14 @@ public class PostCollectionsSystemServiceImpl implements IPostCollectionsSystemS
|
|
public List<CollectionsVo> selectPostCollectionsSystemListPage(PostCollectionsSystem postCollectionsSystem) {
|
|
public List<CollectionsVo> selectPostCollectionsSystemListPage(PostCollectionsSystem postCollectionsSystem) {
|
|
List<PostCollectionsSystem> list = postCollectionsSystemMapper.selectPostCollectionsSystemList(postCollectionsSystem);
|
|
List<PostCollectionsSystem> list = postCollectionsSystemMapper.selectPostCollectionsSystemList(postCollectionsSystem);
|
|
List<CollectionsVo> collectionsVos=list.stream().map((item)->{
|
|
List<CollectionsVo> collectionsVos=list.stream().map((item)->{
|
|
- List<Long> ids=postCollectionsSystemMapper.selectPostCollectionsSystemId(postCollectionsSystem);
|
|
|
|
|
|
+ // 创建 vo实体
|
|
CollectionsVo collectionsVo=new CollectionsVo();
|
|
CollectionsVo collectionsVo=new CollectionsVo();
|
|
BeanUtils.copyProperties(item,collectionsVo);
|
|
BeanUtils.copyProperties(item,collectionsVo);
|
|
- for (Long id: ids
|
|
|
|
- ) {
|
|
|
|
- Integer list1= postCollectionsSystemMapper.getCopiesById(id);
|
|
|
|
- collectionsVo.setCopies(list1);
|
|
|
|
- }
|
|
|
|
|
|
+ // 获取套系id
|
|
|
|
+ Long id = item.getId();
|
|
|
|
+ //根据id 查询该套系藏品数量
|
|
|
|
+ Integer copiesById = postCollectionsSystemMapper.getCopiesById(id);
|
|
|
|
+ collectionsVo.setCopies(copiesById);
|
|
return collectionsVo;
|
|
return collectionsVo;
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
return collectionsVos;
|
|
return collectionsVos;
|