|
@@ -1080,6 +1080,9 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
wrapper.ne("is_delete", true).or().isNull("is_delete");
|
|
wrapper.ne("is_delete", true).or().isNull("is_delete");
|
|
})
|
|
})
|
|
);
|
|
);
|
|
|
|
+ if (communityArticleComments.size() == 0 ){
|
|
|
|
+ return communityCommentRaffleVo;
|
|
|
|
+ }
|
|
// 使用 Random 类生成一个随机索引
|
|
// 使用 Random 类生成一个随机索引
|
|
Random random = new Random();
|
|
Random random = new Random();
|
|
int randomIndex = random.nextInt(communityArticleComments.size());
|
|
int randomIndex = random.nextInt(communityArticleComments.size());
|