From 94dcceaf22aaa3994138a9ff775ef7be30d6ee2e Mon Sep 17 00:00:00 2001 From: ronger Date: Wed, 26 Jul 2023 11:52:53 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=A2=9E=E5=8A=A0=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E4=B8=8B=E6=9E=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/rymcu/forest/util/NotificationUtils.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/com/rymcu/forest/util/NotificationUtils.java b/src/main/java/com/rymcu/forest/util/NotificationUtils.java index 9a2529f..ce118b3 100644 --- a/src/main/java/com/rymcu/forest/util/NotificationUtils.java +++ b/src/main/java/com/rymcu/forest/util/NotificationUtils.java @@ -126,6 +126,16 @@ public class NotificationUtils { notificationDTO.setAuthor(genAuthor(user)); } break; + case "5": + // 文章状态变更 + article = articleService.findArticleDTOById(notification.getDataId(), 0); + if (Objects.nonNull(article)) { + notificationDTO.setDataTitle("系统通知"); + notificationDTO.setDataUrl(article.getArticlePermalink()); + user = userService.findById(article.getArticleAuthorId().toString()); + notificationDTO.setAuthor(genAuthor(user)); + } + break; default: break; }