| | |
| | | target.setType(Constants.ZERO); |
| | | |
| | | if (comment.getReplyId() != null){ |
| | | Comment reply = commentMapper.selectById(comment.getReplyId()); |
| | | Comment reply = commentMapper.selectJoinOne(Comment.class,new MPJLambdaWrapper<Comment>() |
| | | .selectAll(Comment.class) |
| | | .selectAs(Member::getNickname,Comment::getReplyMemberNikeName) |
| | | .leftJoin(Member.class,Member::getId,Comment::getMemberId) |
| | | .eq(Comment::getId,comment.getReplyId()) |
| | | ); |
| | | reply = Optional.ofNullable(reply).orElseThrow(() -> new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "回复目标不存在")); |
| | | target.setReplyId(reply.getId()); |
| | | target.setReplyMemberId(reply.getMemberId()); |
| | | target.setReplyMemberNikeName(reply.getReplyMemberNikeName()); |
| | | target.setCommentId(reply.getId()); |
| | | target.setCommentMemberId(reply.getMemberId()); |
| | | target.setType(Constants.ONE); |
| | |
| | | queryWrapper.eq(Comment::getStatus, Constants.ZERO); |
| | | queryWrapper.eq(Comment::getCommentId,pageWrap.getModel().getCommentId()); |
| | | 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(); |