|
@@ -753,10 +753,9 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
|
|
|
|
|
|
// at 人插入at通知表 判断是不是草稿箱 草稿箱不需要通知
|
|
|
- if (!communityArticle.getIsDraft()) {
|
|
|
+ if (communityArticle.getIsDraft() != null && !communityArticle.getIsDraft()) {
|
|
|
//拿到需要At人的ID
|
|
|
List<Long> atUserIds = communityArticle.getAtUserIds();
|
|
|
-
|
|
|
if (atUserIds != null && !atUserIds.isEmpty()) {
|
|
|
List<CommunityArticleAt> communityArticleAts = new ArrayList<>();
|
|
|
CommunityArticleAt communityArticleAt = null;
|
|
@@ -806,20 +805,19 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
|
|
|
//插入标签日志
|
|
|
List<String> tags = communityArticle.getTags();
|
|
|
-
|
|
|
- //不在本次更新的标签都传失效
|
|
|
- communityArticleTagMapper.update(
|
|
|
- null,
|
|
|
- new UpdateWrapper<CommunityArticleTag>()
|
|
|
- .eq("article_id", communityArticle.getId())
|
|
|
- .notIn("tag_id", tags)
|
|
|
- .set("is_delete", true)
|
|
|
- .and((wrapper) -> {
|
|
|
- wrapper.ne("is_delete", 1).or().isNull("is_delete");
|
|
|
- })
|
|
|
- );
|
|
|
-
|
|
|
if (tags != null && !tags.isEmpty()) {
|
|
|
+ //不在本次更新的标签都传失效
|
|
|
+ communityArticleTagMapper.update(
|
|
|
+ null,
|
|
|
+ new UpdateWrapper<CommunityArticleTag>()
|
|
|
+ .eq("article_id", communityArticle.getId())
|
|
|
+ .notIn("tag_id", tags)
|
|
|
+ .set("is_delete", true)
|
|
|
+ .and((wrapper) -> {
|
|
|
+ wrapper.ne("is_delete", 1).or().isNull("is_delete");
|
|
|
+ })
|
|
|
+ );
|
|
|
+
|
|
|
CommunityArticleTag tagLog = null;
|
|
|
for (String tag : tags) {
|
|
|
|
|
@@ -936,7 +934,7 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
|
|
|
|
|
|
|
|
|
// at 人插入at通知表 判断是不是草稿箱 草稿箱不需要通知
|
|
|
- if (!communityArticle.getIsDraft()) {
|
|
|
+ if (communityArticle.getIsDraft() != null && !communityArticle.getIsDraft()) {
|
|
|
//拿到需要At人的ID
|
|
|
List<Long> atUserIds = communityArticle.getAtUserIds();
|
|
|
|