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