Commit 3617c248 authored by 刘基明's avatar 刘基明

评论回复评论

parent 3e985168
...@@ -23,6 +23,12 @@ public class CommentQo { ...@@ -23,6 +23,12 @@ public class CommentQo {
@ApiModelProperty(value = "作者id") @ApiModelProperty(value = "作者id")
private String authorId; private String authorId;
@ApiModelProperty(value = "回复对象的用户id,根据这个来判断是否有回复对象")
private String replyUserId;
@ApiModelProperty(value = "回复对象的用户名")
private String replyUserName;
@ApiModelProperty(value = "点赞次数") @ApiModelProperty(value = "点赞次数")
private Integer likeCount; private Integer likeCount;
...@@ -44,6 +50,7 @@ public class CommentQo { ...@@ -44,6 +50,7 @@ public class CommentQo {
@ApiModelProperty(value = "是否讨论区管理员") @ApiModelProperty(value = "是否讨论区管理员")
private boolean isManager; private boolean isManager;
// 认证标签相关 // 认证标签相关
@ApiModelProperty("认证标签用-用户等级体系 0 游客 1注册用户 10投资人 20 探普理顾 30 探普专家理顾 40 交易理财师 50 首席投顾") @ApiModelProperty("认证标签用-用户等级体系 0 游客 1注册用户 10投资人 20 探普理顾 30 探普专家理顾 40 交易理财师 50 首席投顾")
private Integer levelGrade; private Integer levelGrade;
......
...@@ -23,7 +23,7 @@ public class CodeAutoGenerator { ...@@ -23,7 +23,7 @@ public class CodeAutoGenerator {
String mysqlPassword = "@imeng123"; String mysqlPassword = "@imeng123";
String jdbcUrl = "jdbc:mysql://rm-uf6r22t3d798q4kmkao.mysql.rds.aliyuncs.com:3306/tamp_community"; String jdbcUrl = "jdbc:mysql://rm-uf6r22t3d798q4kmkao.mysql.rds.aliyuncs.com:3306/tamp_community";
// String[] tables = new String[]{"theme"}; // String[] tables = new String[]{"theme"};
String[] tables = new String[]{"topic_follow_rel"}; String[] tables = new String[]{"comment"};
String basePackage = "com.tanpu.community"; String basePackage = "com.tanpu.community";
String mapperPackage = "dao.mapper.community"; String mapperPackage = "dao.mapper.community";
String entityPackage = "dao.entity.community"; String entityPackage = "dao.entity.community";
......
...@@ -18,7 +18,7 @@ import java.time.LocalDateTime; ...@@ -18,7 +18,7 @@ import java.time.LocalDateTime;
* </p> * </p>
* *
* @author xudong * @author xudong
* @since 2021-07-28 * @since 2022-02-18
*/ */
@TableName("comment") @TableName("comment")
@ApiModel(value="CommentEntity对象", description="评论") @ApiModel(value="CommentEntity对象", description="评论")
...@@ -54,6 +54,9 @@ public class CommentEntity implements Serializable { ...@@ -54,6 +54,9 @@ public class CommentEntity implements Serializable {
@ApiModelProperty(value = "回复评论id") @ApiModelProperty(value = "回复评论id")
private String replyId; private String replyId;
@ApiModelProperty(value = "回复对象的用户id")
private String replyUserId;
@ApiModelProperty(value = "审核状态 0:初始值 1:已通过(管理后台使用)") @ApiModelProperty(value = "审核状态 0:初始值 1:已通过(管理后台使用)")
private Integer reviewStatus; private Integer reviewStatus;
...@@ -131,6 +134,14 @@ public class CommentEntity implements Serializable { ...@@ -131,6 +134,14 @@ public class CommentEntity implements Serializable {
this.replyId = replyId; this.replyId = replyId;
} }
public String getReplyUserId() {
return replyUserId;
}
public void setReplyUserId(String replyUserId) {
this.replyUserId = replyUserId;
}
public Integer getReviewStatus() { public Integer getReviewStatus() {
return reviewStatus; return reviewStatus;
} }
...@@ -182,6 +193,7 @@ public class CommentEntity implements Serializable { ...@@ -182,6 +193,7 @@ public class CommentEntity implements Serializable {
", themeId=" + themeId + ", themeId=" + themeId +
", parentId=" + parentId + ", parentId=" + parentId +
", replyId=" + replyId + ", replyId=" + replyId +
", replyUserId=" + replyUserId +
", reviewStatus=" + reviewStatus + ", reviewStatus=" + reviewStatus +
", reportStatus=" + reportStatus + ", reportStatus=" + reportStatus +
", createTime=" + createTime + ", createTime=" + createTime +
......
...@@ -16,7 +16,7 @@ import java.util.List; ...@@ -16,7 +16,7 @@ import java.util.List;
* </p> * </p>
* *
* @author xudong * @author xudong
* @since 2021-07-22 * @since 2022-02-18
*/ */
public interface CommentMapper extends BaseMapper<CommentEntity> { public interface CommentMapper extends BaseMapper<CommentEntity> {
......
...@@ -15,8 +15,8 @@ import com.tanpu.community.api.beans.vo.feign.fatools.UserInfoResp; ...@@ -15,8 +15,8 @@ import com.tanpu.community.api.beans.vo.feign.fatools.UserInfoResp;
import com.tanpu.community.api.enums.DeleteTagEnum; import com.tanpu.community.api.enums.DeleteTagEnum;
import com.tanpu.community.api.enums.NotificationTypeEnum; import com.tanpu.community.api.enums.NotificationTypeEnum;
import com.tanpu.community.api.enums.TopicSpecialPermissionEnum; import com.tanpu.community.api.enums.TopicSpecialPermissionEnum;
import com.tanpu.community.dao.entity.NotificationLikeDO;
import com.tanpu.community.dao.entity.NotificationForwardDO; import com.tanpu.community.dao.entity.NotificationForwardDO;
import com.tanpu.community.dao.entity.NotificationLikeDO;
import com.tanpu.community.dao.entity.community.CommentEntity; import com.tanpu.community.dao.entity.community.CommentEntity;
import com.tanpu.community.dao.entity.community.FileRecordEntity; import com.tanpu.community.dao.entity.community.FileRecordEntity;
import com.tanpu.community.dao.entity.community.NotificationEntity; import com.tanpu.community.dao.entity.community.NotificationEntity;
...@@ -24,8 +24,8 @@ import com.tanpu.community.dao.entity.community.ThemeAttachmentEntity; ...@@ -24,8 +24,8 @@ import com.tanpu.community.dao.entity.community.ThemeAttachmentEntity;
import com.tanpu.community.dao.entity.community.ThemeEntity; import com.tanpu.community.dao.entity.community.ThemeEntity;
import com.tanpu.community.dao.entity.community.TopicEntity; import com.tanpu.community.dao.entity.community.TopicEntity;
import com.tanpu.community.dao.entity.community.VisitLogEntity; import com.tanpu.community.dao.entity.community.VisitLogEntity;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.util.StringUtils;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneOffset; import java.time.ZoneOffset;
...@@ -159,6 +159,9 @@ public class ConvertUtil { ...@@ -159,6 +159,9 @@ public class ConvertUtil {
BeanUtils.copyProperties(entity, qo); BeanUtils.copyProperties(entity, qo);
qo.setContent(OtherUtil.blockPhoneAndEmail(entity.getContent())); qo.setContent(OtherUtil.blockPhoneAndEmail(entity.getContent()));
qo.setUpdateTime(TimeUtils.getTimestampOfDateTime(entity.getUpdateTime())); qo.setUpdateTime(TimeUtils.getTimestampOfDateTime(entity.getUpdateTime()));
if (StringUtils.isBlank(entity.getReplyUserId())){
qo.setReplyUserId(null);
}
return qo; return qo;
} }
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<result column="theme_id" property="themeId" /> <result column="theme_id" property="themeId" />
<result column="parent_id" property="parentId" /> <result column="parent_id" property="parentId" />
<result column="reply_id" property="replyId" /> <result column="reply_id" property="replyId" />
<result column="reply_user_id" property="replyUserId" />
<result column="review_status" property="reviewStatus" /> <result column="review_status" property="reviewStatus" />
<result column="report_status" property="reportStatus" /> <result column="report_status" property="reportStatus" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment