release-- 评论模块加isBetaUser

release-2024-04-25
wangqing 2 months ago
parent 8d7796e3cb
commit 8576a038b4

@ -298,6 +298,7 @@ public class CommentController extends BaseController {
if(null != topCommentUserInfo) {
topComment.setNickName(topCommentUserInfo.getNickName());
topComment.setAvatar(getAvatar(topCommentUserInfo));
topComment.setIsBetaUser(topCommentUserInfo.getIsBetaUser());
}
if(StringUtils.isNotEmpty(topComment.getReplyToUserId())){
@ -429,7 +430,7 @@ public class CommentController extends BaseController {
List<CommentResp> list = (List<CommentResp>) cacheChannel.get(Constants.J2CACHE_REGION_JOURNAL_COMMENT_PAGE_CHILDREN+"_"+parentId,page+"_"+size, key->getChildrenCommentList(parentId,page,size),true).getValue();
// List<CommentResp> list = getChildrenCommentList(parentId,page,size);
//验证是否登录并且拿到ID
Long count = (Long) cacheChannel.get(Constants.J2CACHE_REGION_JOURNAL_COMMENT_PAGE_CHILDREN_COUNT,parentId, key->getChildrenCommentListCount(parentId,page,size),true).getValue();
Integer count = (Integer) cacheChannel.get(Constants.J2CACHE_REGION_JOURNAL_COMMENT_PAGE_CHILDREN_COUNT,parentId, key->getChildrenCommentListCount(parentId,page,size),true).getValue();
UserLoginDto userLoginDto = getUserLoginDto(authorization);
if (null == userLoginDto) {
@ -438,7 +439,7 @@ public class CommentController extends BaseController {
String userId = userLoginDto.getUserId();
Set<String> publicationLikeSet = publicationLikeDao.findAllByUserId(userId).parallelStream().map(p->p.getLikedItemId()).collect(Collectors.toSet());
list = list.parallelStream().map(c->updateHaveThumbup(c,publicationLikeSet)).collect(Collectors.toList());
return Result.success(new PageResult<CommentResp>(count,list));
return Result.success(new PageResult<CommentResp>(Long.valueOf(count),list));
}

Loading…
Cancel
Save