From 4e0dda3a24327c9a30780154d2ca0a6bcc095edf Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 5 Aug 2025 23:26:15 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20=E9=80=9A=E7=9F=A5=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=EF=BC=8C=E5=B9=B6=E4=B8=94=E9=87=87=E7=94=A8?= =?UTF-8?q?=E4=BA=8B=E5=8A=A1=EF=BC=8C=E7=9C=8B=E7=9C=8B=E8=83=BD=E5=90=A6?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=20400?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/openisle/service/NotificationService.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/com/openisle/service/NotificationService.java b/backend/src/main/java/com/openisle/service/NotificationService.java index 9ad4d9cdd..628c36a51 100644 --- a/backend/src/main/java/com/openisle/service/NotificationService.java +++ b/backend/src/main/java/com/openisle/service/NotificationService.java @@ -51,10 +51,7 @@ public class NotificationService { pushNotificationService.sendNotification(user, buildPayload(body, url)); } - public Notification createNotification(User user, NotificationType type, Post post, Comment comment, Boolean approved) { - return createNotification(user, type, post, comment, approved, null, null, null); - } - + @Transactional public Notification createNotification(User user, NotificationType type, Post post, Comment comment, Boolean approved, User fromUser, ReactionType reactionType, String content) { Notification n = new Notification(); @@ -71,7 +68,7 @@ public class NotificationService { } n = notificationRepository.save(n); - notificationExecutor.execute(() -> { +// notificationExecutor.execute(() -> { if (type == NotificationType.COMMENT_REPLY && user.getEmail() != null && post != null && comment != null) { String url = String.format("%s/posts/%d#comment-%d", websiteUrl, post.getId(), comment.getId()); emailSender.sendEmail(user.getEmail(), "有人回复了你", url); @@ -95,7 +92,7 @@ public class NotificationService { // } // } } - }); +// }); return n; }