fix comment cacheEvict

main
wangqing 5 months ago
parent 2411044665
commit 6116568fe3

@ -349,6 +349,8 @@ public class CommentController extends BaseController {
comment.setLocation(IpUtil.getIpLocation(getIpAddr(request)));
Comment commentResp = commentService.save(comment,userLoginDto);
UserInfo commentUserInfo = userInfoService.findById(comment.getUserId());
commentResp.setNickName(commentUserInfo.getNickName());
commentResp.setAvatar(Constants.RESOURCE_PREFIX+commentUserInfo.getAvatar());
if (StringUtils.isNotEmpty(commentUserInfo.getBadges())){
Set<Integer> badgeSet = new HashSet<>();
Arrays.stream(commentUserInfo.getBadges().split(",")).forEach(b->{

@ -144,7 +144,7 @@ public class CommentService {
}
cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_COMMENT_PAGE_CHILDREN+"_"+comment.getParentId());
}

Loading…
Cancel
Save