Commit 2298b759 authored by 刘基明's avatar 刘基明

增加举报字段

parent 2c139d2d
......@@ -29,4 +29,16 @@ public class FollowQo {
@ApiModelProperty(value = "是否关注")
private boolean followed;
//认证标签相关
@ApiModelProperty("认证标签用-用户等级体系 0 游客 1注册用户 10投资人 20 探普理顾 30 探普专家理顾 40 交易理财师 50 首席投顾")
private Integer levelGrade;
@ApiModelProperty("认证标签用-当levelGrade=10有值 1投资萌新 2投资达人")
private String userInvestorType;
@ApiModelProperty("认证标签用-用户类型 1普通账号 2机构账号 3机构人员")
private Integer userType;
@ApiModelProperty("认证标签用-所属机构id")
private String belongUserOrgId;
@ApiModelProperty("认证标签用-所属机构名")
private String belongUserOrgName;
}
......@@ -56,17 +56,7 @@ public class ThemeQo implements Serializable {
@ApiModelProperty(value = "当前用户是否关注该作者")
public boolean follow;
//认证标签相关
@ApiModelProperty("认证标签用-用户等级体系 0 游客 1注册用户 10投资人 20 探普理顾 30 探普专家理顾 40 交易理财师 50 首席投顾")
private Integer levelGrade;
@ApiModelProperty("认证标签用-当levelGrade=10有值 1投资萌新 2投资达人")
private String userInvestorType;
@ApiModelProperty("认证标签用-用户类型 1普通账号 2机构账号 3机构人员")
private Integer userType;
@ApiModelProperty("认证标签用-所属机构id")
private String belongUserOrgId;
@ApiModelProperty("认证标签用-所属机构名")
private String belongUserOrgName;
@ApiModelProperty(value = "认证机构")
......@@ -106,6 +96,17 @@ public class ThemeQo implements Serializable {
public Long updateTime;
//认证标签相关
@ApiModelProperty("认证标签用-用户等级体系 0 游客 1注册用户 10投资人 20 探普理顾 30 探普专家理顾 40 交易理财师 50 首席投顾")
private Integer levelGrade;
@ApiModelProperty("认证标签用-当levelGrade=10有值 1投资萌新 2投资达人")
private String userInvestorType;
@ApiModelProperty("认证标签用-用户类型 1普通账号 2机构账号 3机构人员")
private Integer userType;
@ApiModelProperty("认证标签用-所属机构id")
private String belongUserOrgId;
@ApiModelProperty("认证标签用-所属机构名")
private String belongUserOrgName;
//工作室相关
@ApiModelProperty("工作室展示状态 1不展示 2展示(未认证) 3展示(已认证)")
......
......@@ -22,7 +22,7 @@ public class CodeAutoGenerator {
String mysqlUserName = "dev";
String mysqlPassword = "qimeng123";
String jdbcUrl = "jdbc:mysql://47.101.189.151:31931/tamp_community";
String[] tables = new String[]{"visit_summary"};
String[] tables = new String[]{"comment"};
// String[] tables = new String[]{"follow_rel", "black_list","collection","comment","follow_rel","file_record","home_page","theme","topic","theme_attachment"};
String basePackage = "com.tanpu.community";
String mapperPackage = "dao.mapper.community";
......
......@@ -18,7 +18,7 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-07-07
* @since 2021-07-21
*/
@TableName("comment")
@Builder
......@@ -33,10 +33,10 @@ public class CommentEntity implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "uuid")
@ApiModelProperty(value = "评论主键Id")
private String commentId;
@ApiModelProperty(value = "类型")
@ApiModelProperty(value = "类型 1:评论")
private Integer commentType;
@ApiModelProperty(value = "文本内容")
......@@ -54,8 +54,11 @@ public class CommentEntity implements Serializable {
@ApiModelProperty(value = "回复评论id")
private String replyId;
@ApiModelProperty(value = "是否屏蔽")
private Integer isBlock;
@ApiModelProperty(value = "是否通过 0:初始值 1:已通过(管理后台使用)")
private Integer isPass;
@ApiModelProperty(value = "举报状态 0:未被举报 1:被举报 2:已处理")
private Integer reportStatus;
private LocalDateTime createTime;
......@@ -128,12 +131,20 @@ public class CommentEntity implements Serializable {
this.replyId = replyId;
}
public Integer getIsBlock() {
return isBlock;
public Integer getIsPass() {
return isPass;
}
public void setIsPass(Integer isPass) {
this.isPass = isPass;
}
public Integer getReportStatus() {
return reportStatus;
}
public void setIsBlock(Integer isBlock) {
this.isBlock = isBlock;
public void setReportStatus(Integer reportStatus) {
this.reportStatus = reportStatus;
}
public LocalDateTime getCreateTime() {
......@@ -171,7 +182,8 @@ public class CommentEntity implements Serializable {
", themeId=" + themeId +
", parentId=" + parentId +
", replyId=" + replyId +
", isBlock=" + isBlock +
", isPass=" + isPass +
", reportStatus=" + reportStatus +
", createTime=" + createTime +
", updateTime=" + updateTime +
", deleteTag=" + deleteTag +
......
package com.tanpu.community.dao.entity.community;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 举报记录
* </p>
*
* @author xudong
* @since 2021-07-21
*/
@TableName("report_log")
@ApiModel(value="ReportLogEntity对象", description="举报记录")
public class ReportLogEntity implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "举报发起人")
private String userId;
@ApiModelProperty(value = "举报类型,1:主题,2:评论 3、用户")
private Integer reportType;
@ApiModelProperty(value = "举报对象id")
private String targetId;
@ApiModelProperty(value = "举报对象作者id")
private String targetUserId;
@ApiModelProperty(value = "上报时间")
private LocalDateTime reportTime;
@ApiModelProperty(value = "处理结果 0:无操作 1:屏蔽 2:删除 ")
private Integer dealResult;
@ApiModelProperty(value = "处理管理员")
private Integer dealUserId;
@ApiModelProperty(value = "处理时间")
private LocalDateTime dealTime;
private LocalDateTime createTime;
private LocalDateTime updateTime;
private Integer deleteTag;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public Integer getReportType() {
return reportType;
}
public void setReportType(Integer reportType) {
this.reportType = reportType;
}
public String getTargetId() {
return targetId;
}
public void setTargetId(String targetId) {
this.targetId = targetId;
}
public String getTargetUserId() {
return targetUserId;
}
public void setTargetUserId(String targetUserId) {
this.targetUserId = targetUserId;
}
public LocalDateTime getReportTime() {
return reportTime;
}
public void setReportTime(LocalDateTime reportTime) {
this.reportTime = reportTime;
}
public Integer getDealResult() {
return dealResult;
}
public void setDealResult(Integer dealResult) {
this.dealResult = dealResult;
}
public Integer getDealUserId() {
return dealUserId;
}
public void setDealUserId(Integer dealUserId) {
this.dealUserId = dealUserId;
}
public LocalDateTime getDealTime() {
return dealTime;
}
public void setDealTime(LocalDateTime dealTime) {
this.dealTime = dealTime;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getDeleteTag() {
return deleteTag;
}
public void setDeleteTag(Integer deleteTag) {
this.deleteTag = deleteTag;
}
@Override
public String toString() {
return "ReportLogEntity{" +
"id=" + id +
", userId=" + userId +
", reportType=" + reportType +
", targetId=" + targetId +
", targetUserId=" + targetUserId +
", reportTime=" + reportTime +
", dealResult=" + dealResult +
", dealUserId=" + dealUserId +
", dealTime=" + dealTime +
", createTime=" + createTime +
", updateTime=" + updateTime +
", deleteTag=" + deleteTag +
"}";
}
}
......@@ -18,7 +18,7 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-07-07
* @since 2021-07-21
*/
@TableName("theme")
@Builder
......@@ -33,31 +33,38 @@ public class ThemeEntity implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "UUID")
@ApiModelProperty(value = "主题主键Id")
private String themeId;
@ApiModelProperty(value = "标题")
private String title;
@ApiModelProperty(value = "类型")
@ApiModelProperty(value = "类型 1:讨论无标题 2:长文有标题 3:转发")
private Integer themeType;
@ApiModelProperty(value = "文本内容")
@ApiModelProperty(value = "文本内容(json),type:附件类型(8:文本,88:产品 3:直播 6:短视频 300:课程,9:图片 10:多图),productType:基金类型(0 公募,1 私募,2 白名单,3 私有)")
private String content;
@ApiModelProperty(value = "作者id")
private String authorId;
@ApiModelProperty(value = "转发的主题")
@ApiModelProperty(value = "转发的主题")
private String formerThemeId;
@ApiModelProperty(value = "所属的话题")
private String topicId;
@ApiModelProperty(value = "是否通过 0:初始值 1:已通过(管理后台使用)")
private Integer isPass;
@ApiModelProperty(value = "举报状态 0:未被举报 1:被举报 2:已处理")
private Integer reportStatus;
private LocalDateTime createTime;
private LocalDateTime updateTime;
@ApiModelProperty(value = "1:删除")
private Integer deleteTag;
......@@ -125,6 +132,22 @@ public class ThemeEntity implements Serializable {
this.topicId = topicId;
}
public Integer getIsPass() {
return isPass;
}
public void setIsPass(Integer isPass) {
this.isPass = isPass;
}
public Integer getReportStatus() {
return reportStatus;
}
public void setReportStatus(Integer reportStatus) {
this.reportStatus = reportStatus;
}
public LocalDateTime getCreateTime() {
return createTime;
}
......@@ -160,6 +183,8 @@ public class ThemeEntity implements Serializable {
", authorId=" + authorId +
", formerThemeId=" + formerThemeId +
", topicId=" + topicId +
", isPass=" + isPass +
", reportStatus=" + reportStatus +
", createTime=" + createTime +
", updateTime=" + updateTime +
", deleteTag=" + deleteTag +
......
......@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* </p>
*
* @author xudong
* @since 2021-07-07
* @since 2021-07-21
*/
public interface CommentMapper extends BaseMapper<CommentEntity> {
......
package com.tanpu.community.dao.mapper.community;
import com.tanpu.community.dao.entity.community.ReportLogEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 举报记录 Mapper 接口
* </p>
*
* @author xudong
* @since 2021-07-21
*/
public interface ReportLogMapper extends BaseMapper<ReportLogEntity> {
}
......@@ -2,10 +2,6 @@ package com.tanpu.community.dao.mapper.community;
import com.tanpu.community.dao.entity.community.ThemeEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* <p>
......@@ -13,7 +9,7 @@ import java.util.List;
* </p>
*
* @author xudong
* @since 2021-07-07
* @since 2021-07-21
*/
public interface ThemeMapper extends BaseMapper<ThemeEntity> {
......
......@@ -18,7 +18,6 @@ import com.tanpu.community.dao.entity.fund.CompanyInfo;
import com.tanpu.community.dao.entity.fund.FundInfo;
import com.tanpu.community.dao.entity.jydb.MfAdvisorscalerank;
import com.tanpu.community.dao.entity.jydb.MfInvestadvisoroutline;
import com.tanpu.community.dao.entity.user.UserInfoEntity;
import com.tanpu.community.dao.mapper.community.FollowRelMapper;
import com.tanpu.community.dao.mapper.fund.CompanyInfoMapper;
import com.tanpu.community.dao.mapper.fund.FundInfoMapper;
......@@ -35,9 +34,7 @@ import com.tanpu.community.util.PageUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.*;
......@@ -182,10 +179,9 @@ public class HomePageManager {
followRelService.queryFansByIdolId(req.getUserId()) : followRelService.queryFansByFollowerId(req.getUserId());
List<FollowQo> followQos = new ArrayList<>();
if (!CollectionUtils.isEmpty(userIds)) {
List<UserInfoEntity> userInfos = userInfoService.queryUserByIds(userIds);
List<FollowQo> collect = userInfos.stream().map(ConvertUtil::userInfoEntity2FollowQo).collect(Collectors.toList());
List<UserInfoNew> userInfoNews = feignClientForFatools.queryUserListNew(userIds);
List<FollowQo> collect = userInfoNews.stream().map(ConvertUtil::userInfoNew2FollowQo).collect(Collectors.toList());
followQos = judgeFollowed(collect, userId);
}
//分页
return PageUtils.page(req.getPage(), followQos);
......
......@@ -5,7 +5,6 @@ import com.tanpu.common.exception.BizException;
import com.tanpu.common.uuid.UuidGenHelper;
import com.tanpu.community.api.enums.CommentTypeEnum;
import com.tanpu.community.api.enums.DeleteTagEnum;
import com.tanpu.community.api.enums.StatusEnum;
import com.tanpu.community.dao.entity.community.CommentEntity;
import com.tanpu.community.dao.mapper.community.CommentMapper;
import org.apache.commons.collections4.CollectionUtils;
......@@ -66,7 +65,6 @@ public class CommentService {
LambdaQueryWrapper<CommentEntity> queryWrapper = new LambdaQueryWrapper<CommentEntity>()
.eq(CommentEntity::getThemeId, themeId)
.eq(CommentEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED.getCode())
.eq(CommentEntity::getIsBlock, StatusEnum.FALSE.getCode())
.orderByDesc(CommentEntity::getCreateTime);
//二级评论,暂未开放,注意“”与null的区别
// if (parentId == null) {
......
......@@ -136,6 +136,9 @@ public class RankService {
}
public List<TopicRankQo> getRankTopicListTop4() {
if (this.rankTopicList.size()==0){
this.rankTopics();
}
return rankTopicListTop4;
}
}
......@@ -8,6 +8,7 @@ import com.tanpu.community.api.beans.vo.TopicDTO;
import com.tanpu.community.api.beans.qo.*;
import com.tanpu.community.api.beans.req.theme.CreateThemeReq;
import com.tanpu.community.api.beans.req.theme.ThemeContentReq;
import com.tanpu.community.api.beans.vo.feign.fatools.UserInfoNew;
import com.tanpu.community.api.enums.DeleteTagEnum;
import com.tanpu.community.api.enums.RelTypeEnum;
import com.tanpu.community.api.enums.TopicStatusEnum;
......@@ -222,6 +223,22 @@ public class ConvertUtil {
.build();
}
public static FollowQo userInfoNew2FollowQo(UserInfoNew entity) {
if (entity == null) {
return null;
}
return FollowQo.builder().userId(entity.getUserId())
.nickName(entity.getNickName())
.headImg(entity.getHeadImageUrl())
.introduction(entity.getIntroduction())
.userType(entity.getUserType())
.levelGrade(entity.getLevelGrade())
.userInvestorType(entity.getUserInvestorType())
.belongUserOrgId(entity.getBelongUserOrgId())
.belongUserOrgName(entity.getBelongUserOrgName())
.build();
}
public static FormerThemeQo themeQo2FormerThemeQo(ThemeQo formerTheme) {
if (formerTheme == null) {
return null;
......
......@@ -12,7 +12,8 @@
<result column="theme_id" property="themeId" />
<result column="parent_id" property="parentId" />
<result column="reply_id" property="replyId" />
<result column="is_block" property="isBlock" />
<result column="is_pass" property="isPass" />
<result column="report_status" property="reportStatus" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="delete_tag" property="deleteTag" />
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tanpu.community.dao.mapper.community.ReportLogMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.tanpu.community.dao.entity.community.ReportLogEntity">
<id column="id" property="id" />
<result column="user_id" property="userId" />
<result column="report_type" property="reportType" />
<result column="target_id" property="targetId" />
<result column="target_user_id" property="targetUserId" />
<result column="report_time" property="reportTime" />
<result column="deal_result" property="dealResult" />
<result column="deal_user_id" property="dealUserId" />
<result column="deal_time" property="dealTime" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="delete_tag" property="deleteTag" />
</resultMap>
</mapper>
......@@ -12,6 +12,8 @@
<result column="author_id" property="authorId" />
<result column="former_theme_id" property="formerThemeId" />
<result column="topic_id" property="topicId" />
<result column="is_pass" property="isPass" />
<result column="report_status" property="reportStatus" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="delete_tag" property="deleteTag" />
......
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