|
@@ -47,6 +47,7 @@ import vip.xiaonuo.forum.modular.sensitivityrecord.mapper.ForumSensitivityRecord
|
|
|
import vip.xiaonuo.sys.api.SysUserApi;
|
|
import vip.xiaonuo.sys.api.SysUserApi;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
@@ -155,6 +156,8 @@ public class ForumPostReplyServiceImpl extends ServiceImpl<ForumPostReplyMapper,
|
|
|
if (userByIdWithoutException != null) {
|
|
if (userByIdWithoutException != null) {
|
|
|
forumPostReply.setUserEduIdentity(userByIdWithoutException.getInt("eduIdentity"));
|
|
forumPostReply.setUserEduIdentity(userByIdWithoutException.getInt("eduIdentity"));
|
|
|
}
|
|
}
|
|
|
|
|
+ // 设置帖子的类型
|
|
|
|
|
+ forumPostReply.setPostType(forumPostInfo.getPostType());
|
|
|
// 过滤敏感词
|
|
// 过滤敏感词
|
|
|
String replyContent = filterSensitivity(forumPostReplyAddParam.getReplyContent(), loginUser, forumPostReplyAddParam.getPostId());
|
|
String replyContent = filterSensitivity(forumPostReplyAddParam.getReplyContent(), loginUser, forumPostReplyAddParam.getPostId());
|
|
|
forumPostReply.setReplyContent(replyContent);
|
|
forumPostReply.setReplyContent(replyContent);
|
|
@@ -243,4 +246,24 @@ public class ForumPostReplyServiceImpl extends ServiceImpl<ForumPostReplyMapper,
|
|
|
return forumPostReply;
|
|
return forumPostReply;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询两个时间段的发帖数
|
|
|
|
|
+ */
|
|
|
|
|
+ public long getPostCountByDateAndType(String startTime, String endTime, Integer postType) {
|
|
|
|
|
+ QueryWrapper<ForumPostReply> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
+ queryWrapper.lambda().eq(ForumPostReply::getPostType, 3);
|
|
|
|
|
+ queryWrapper.lambda().between(ForumPostReply::getCreateTime, startTime, endTime);
|
|
|
|
|
+ queryWrapper.lambda().eq(ForumPostReply::getParentId, "-1");
|
|
|
|
|
+ return this.count(queryWrapper);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public long getReplyCountByDateAndType(String startTime, String endTime, Integer postType) {
|
|
|
|
|
+ QueryWrapper<ForumPostReply> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
+ queryWrapper.lambda().eq(ForumPostReply::getPostType, 3);
|
|
|
|
|
+ queryWrapper.lambda().between(ForumPostReply::getCreateTime, startTime, endTime);
|
|
|
|
|
+ queryWrapper.lambda().notIn(ForumPostReply::getParentId, "-1");
|
|
|
|
|
+ return this.count(queryWrapper);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|