|
@@ -2,7 +2,11 @@ package com.ruoyi.system.service.impl;
|
|
|
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
+import com.ruoyi.system.domain.vo.CollectionsVo;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.ruoyi.system.mapper.PostCollectionsSystemMapper;
|
|
@@ -166,4 +170,21 @@ public class PostCollectionsSystemServiceImpl implements IPostCollectionsSystemS
|
|
|
public int getCopies(Long id) {
|
|
|
return postCollectionsSystemMapper.getCopiesById(id);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<CollectionsVo> selectPostCollectionsSystemListPage(PostCollectionsSystem postCollectionsSystem) {
|
|
|
+ List<PostCollectionsSystem> list = postCollectionsSystemMapper.selectPostCollectionsSystemList(postCollectionsSystem);
|
|
|
+ List<CollectionsVo> collectionsVos=list.stream().map((item)->{
|
|
|
+ List<Long> ids=postCollectionsSystemMapper.selectPostCollectionsSystemId(postCollectionsSystem);
|
|
|
+ CollectionsVo collectionsVo=new CollectionsVo();
|
|
|
+ BeanUtils.copyProperties(item,collectionsVo);
|
|
|
+ for (Long id: ids
|
|
|
+ ) {
|
|
|
+ Integer list1= postCollectionsSystemMapper.getCopiesById(id);
|
|
|
+ collectionsVo.setCopies(list1);
|
|
|
+ }
|
|
|
+ return collectionsVo;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ return collectionsVos;
|
|
|
+ }
|
|
|
}
|