diff --git a/community-service/src/main/java/com/tanpu/community/dao/entity/community/TopicFollowRelEntity.java b/community-service/src/main/java/com/tanpu/community/dao/entity/community/TopicFollowRelEntity.java index 4add5c7c2f91cd8e86cbed3bf429d1cfbe79bd92..60ba2c98203ff7e7f00b6edcd8690247a7bd7439 100644 --- a/community-service/src/main/java/com/tanpu/community/dao/entity/community/TopicFollowRelEntity.java +++ b/community-service/src/main/java/com/tanpu/community/dao/entity/community/TopicFollowRelEntity.java @@ -41,6 +41,9 @@ public class TopicFollowRelEntity implements Serializable { @ApiModelProperty(value = "å–æ¶ˆå…³æ³¨æ—¶é—´") private LocalDateTime unfollowTime; + @ApiModelProperty(value = "是å¦ä¸ºç®¡ç†å‘˜ 1是 0䏿˜¯") + private Integer manager; + private LocalDateTime createTime; private LocalDateTime updateTime; @@ -88,6 +91,14 @@ public class TopicFollowRelEntity implements Serializable { this.unfollowTime = unfollowTime; } + public Integer getManager() { + return manager; + } + + public void setManager(Integer manager) { + this.manager = manager; + } + public LocalDateTime getCreateTime() { return createTime; } diff --git a/community-service/src/main/java/com/tanpu/community/service/TopicService.java b/community-service/src/main/java/com/tanpu/community/service/TopicService.java index cbb2490fc5ce3f770165d7c9604d5da8245399ac..7a2d00f8e7d13dbfaf539de7596cd68d01bca11a 100644 --- a/community-service/src/main/java/com/tanpu/community/service/TopicService.java +++ b/community-service/src/main/java/com/tanpu/community/service/TopicService.java @@ -127,6 +127,7 @@ public class TopicService { public Integer countTotalFollow(String topicId) { return topicFollowRelMapper.selectCount(new LambdaQueryWrapper<TopicFollowRelEntity>() .eq(TopicFollowRelEntity::getTopicId, topicId) + .eq(TopicFollowRelEntity::getManager, 0) .eq(TopicFollowRelEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED.getCode())); } diff --git a/community-service/src/main/java/com/tanpu/community/service/VisitLogService.java b/community-service/src/main/java/com/tanpu/community/service/VisitLogService.java index 7f983c1d95ff85610cfcb42401116f5280a1b0a5..25cd01ca0da616d6e074c88b91f52a0756e3e578 100644 --- a/community-service/src/main/java/com/tanpu/community/service/VisitLogService.java +++ b/community-service/src/main/java/com/tanpu/community/service/VisitLogService.java @@ -1,6 +1,7 @@ package com.tanpu.community.service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.google.common.collect.Lists; import com.tanpu.biz.common.enums.clue.PageEnum; import com.tanpu.community.api.enums.DeleteTagEnum; import com.tanpu.community.cache.RedisCache; @@ -22,7 +23,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import static com.tanpu.biz.common.enums.clue.PageEnum.COMM_VISIT_TOPIC_DETAIL; +import static com.tanpu.biz.common.enums.clue.PageEnum.*; @Slf4j @Service @@ -104,7 +105,7 @@ public class VisitLogService { public Integer queryTopicDetailVisit(String topicId) { return visitLogMapper.selectCount(new LambdaQueryWrapper<VisitLogEntity>() .eq(VisitLogEntity::getRefId, topicId) - .eq(VisitLogEntity::getRefType, COMM_VISIT_TOPIC_DETAIL.getId())); + .in(VisitLogEntity::getRefType, Lists.newArrayList(COMM_VISIT_TOPIC_DETAIL_HOT.getId(), COMM_VISIT_TOPIC_DETAIL_NEW.getId()))); } // 查询主题 æµè§ˆé‡ diff --git a/community-service/src/main/java/com/tanpu/community/service/quartz/TopicReportService.java b/community-service/src/main/java/com/tanpu/community/service/quartz/TopicReportService.java index 919a173a68e572cd845ba3bfcd82b890fa121498..fc46c731e08f08f3b48faa25db9659be8d6c303f 100644 --- a/community-service/src/main/java/com/tanpu/community/service/quartz/TopicReportService.java +++ b/community-service/src/main/java/com/tanpu/community/service/quartz/TopicReportService.java @@ -77,7 +77,7 @@ public class TopicReportService { // æ¯ä¸ªå·¥ä½œæ—¥æ—©ä¸Š09:30汇报 - public static String content_report_topic_weekday = "è¯é¢˜(%s) 当剿€»æˆå‘˜: %s, 当剿€»é˜…读: %s, 当剿€»è®¨è®º: %s, 昨日新增æˆå‘˜: %s, 昨日新增讨论"; + public static String content_report_topic_weekday = "è¯é¢˜(%s) 当剿€»æˆå‘˜: %s, 当剿€»é˜…读: %s, 当剿€»è®¨è®º: %s, 昨日新增æˆå‘˜: %s, 昨日新增讨论: %s"; public void reportTopicWeekday() { // 跳过åŒä¼‘æ—¥ Date now = new Date(); @@ -128,7 +128,7 @@ public class TopicReportService { } // æ¯å‘¨å…早上09:00汇报 - public static String content_report_topic_saturday = "è¯é¢˜(%s) 当剿€»æˆå‘˜: %s, 当剿€»é˜…读: %s, 当剿€»è®¨è®º: %s, 截至本周五新增æˆå‘˜: %s, 昨日新增讨论"; + public static String content_report_topic_saturday = "è¯é¢˜(%s) 当剿€»æˆå‘˜: %s, 当剿€»é˜…读: %s, 当剿€»è®¨è®º: %s, 截至本周五新增æˆå‘˜: %s, 昨日新增讨论: %s"; public void reportTopicSaturday() { List<TopicEntity> topics = topicService.queryTopicNeedReport(); for (TopicEntity topic : topics) { diff --git a/community-service/src/main/resources/mapper/community/TopicFollowRelEntityMapper.xml b/community-service/src/main/resources/mapper/community/TopicFollowRelEntityMapper.xml index fdc9a2909cf1c8e7478a91715783e7e41cb3bdb5..738fb7d6c547cf914d45f5b2d8c6fac898b71f08 100644 --- a/community-service/src/main/resources/mapper/community/TopicFollowRelEntityMapper.xml +++ b/community-service/src/main/resources/mapper/community/TopicFollowRelEntityMapper.xml @@ -1,28 +1,24 @@ <?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.TopicFollowRelMapper"> - - <!-- é€šç”¨æŸ¥è¯¢æ˜ å°„ç»“æžœ --> - <sql id="Base_Column_List"> - id, - topic_id, - user_id, - follow_time, - unfollow_time, - create_time, - update_time, - delete_tag - </sql> - <resultMap id="BaseResultMap" type="com.tanpu.community.dao.entity.community.TopicFollowRelEntity"> - <id column="id" property="id" /> - <result column="topic_id" property="topicId" /> - <result column="user_id" property="userId" /> - <result column="follow_time" property="followTime" /> - <result column="unfollow_time" property="unfollowTime" /> - <result column="create_time" property="createTime" /> - <result column="update_time" property="updateTime" /> - <result column="delete_tag" property="deleteTag" /> - </resultMap> + <resultMap id="BaseResultMap" type="com.tanpu.community.dao.entity.community.TopicFollowRelEntity"> + <!--@mbg.generated--> + <!--@Table topic_follow_rel--> + <id column="id" jdbcType="BIGINT" property="id" /> + <result column="topic_id" jdbcType="VARCHAR" property="topicId" /> + <result column="user_id" jdbcType="VARCHAR" property="userId" /> + <result column="follow_time" jdbcType="TIMESTAMP" property="followTime" /> + <result column="unfollow_time" jdbcType="TIMESTAMP" property="unfollowTime" /> + <result column="manager" jdbcType="INTEGER" property="manager" /> + <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> + <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> + <result column="delete_tag" jdbcType="INTEGER" property="deleteTag" /> + </resultMap> + <sql id="Base_Column_List"> + <!--@mbg.generated--> + id, topic_id, user_id, follow_time, unfollow_time, manager, create_time, update_time, + delete_tag + </sql> <!--auto generated by MybatisCodeHelper on 2022-02-17--> <select id="selectTopicIdByUserId" resultType="java.lang.String"> @@ -35,7 +31,7 @@ <!--auto generated by MybatisCodeHelper on 2022-02-17--> <select id="queryOneByTopicIdAndUserId" resultMap="BaseResultMap"> select - <include refid="Base_Column_List"/> + <include refid="Base_Column_List" /> from topic_follow_rel where topic_id=#{topicId} and user_id=#{userId} and delete_tag = 0 </select>