|
@@ -257,7 +257,12 @@ public class CommunityCollectionServiceImpl extends ServiceImpl<CommunityCollect
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<CommunityCollectionVo> selectUserCollection(Long userId, Long articleId) {
|
|
public List<CommunityCollectionVo> selectUserCollection(Long userId, Long articleId) {
|
|
- return communityCollectionMapper.selectUserCollection(userId, articleId);
|
|
|
|
|
|
+ List<CommunityCollectionVo> communityCollectionVos = communityCollectionMapper.selectUserCollection(userId, articleId);
|
|
|
|
+ for (CommunityCollectionVo communityCollectionVo : communityCollectionVos) {
|
|
|
|
+ JSONArray objects = selectArticleInfoInCollection(communityCollectionVo.getId(), 1L);
|
|
|
|
+ communityCollectionVo.setArticleCount(objects.getJSONObject(0).getLong("articleNumber"));
|
|
|
|
+ }
|
|
|
|
+ return communityCollectionVos;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|