| | |
| | | target.setCommentId(reply.getId()); |
| | | target.setCommentMemberId(reply.getMemberId()); |
| | | target.setType(Constants.ONE); |
| | | } |
| | | |
| | | if (comment.getCommentId() != null ){ |
| | | target.setCommentId(reply.getCommentId()); |
| | | target.setCommentMemberId(reply.getCommentMemberId()); |
| | | }else if (comment.getCommentId() != null ){ |
| | | Comment reply = commentMapper.selectById(comment.getCommentId()); |
| | | reply = Optional.ofNullable(reply).orElseThrow(() -> new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "一级评论目标不存在")); |
| | | target.setCommentId(reply.getCommentId()); |
| | |
| | | replyWrapper.eq(Comment::getType, Constants.ONE); |
| | | replyWrapper.eq(Comment::getStatus, Constants.ZERO); |
| | | replyWrapper.in(Comment::getCommentId,commentIds); |
| | | replyWrapper.orderByDesc(Comment::getId); |
| | | replyWrapper.groupBy(Comment::getCommentId); |
| | | |
| | | List<ActivityReplyCommentDTO> activityCommentDTOS = commentJoinMapper.selectJoinList(ActivityReplyCommentDTO.class, replyWrapper); |
| | |
| | | queryWrapper.eq(Comment::getType, Constants.ONE); |
| | | queryWrapper.eq(Comment::getStatus, Constants.ZERO); |
| | | queryWrapper.eq(Comment::getCommentId,pageWrap.getModel().getCommentId()); |
| | | queryWrapper.orderByDesc(Comment::getId); |
| | | IPage<ActivityReplyCommentDTO> result = commentJoinMapper.selectJoinPage(page, ActivityReplyCommentDTO.class, queryWrapper); |
| | | |
| | | if (CollectionUtils.isEmpty(result.getRecords())){ |
| | | return PageData.from(result); |
| | | } |
| | | String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode(); |
| | | String memberFile = path + systemDictDataBiz.queryByCode(Constants.OSS, Constants.MEMBER_FILE).getCode(); |
| | | String commentFile = path + systemDictDataBiz.queryByCode(Constants.OSS, Constants.COMMENT_FILE).getCode(); |