44import com .back .domain .notification .dto .NotificationResponse ;
55import com .back .domain .notification .dto .NotificationListResponse ;
66import com .back .domain .notification .entity .Notification ;
7+ import com .back .domain .notification .entity .NotificationSettingType ;
78import com .back .domain .notification .service .NotificationService ;
89import com .back .domain .studyroom .entity .Room ;
910import com .back .domain .studyroom .repository .RoomRepository ;
@@ -76,12 +77,14 @@ public ResponseEntity<RsData<NotificationResponse>> createNotification(
7677 User actor = userRepository .findById (request .actorId ())
7778 .orElseThrow (() -> new CustomException (ErrorCode .USER_NOT_FOUND ));
7879
80+ // 개인 알림 생성
7981 yield notificationService .createPersonalNotification (
8082 receiver ,
8183 actor ,
8284 request .title (),
8385 request .message (),
84- request .redirectUrl ()
86+ request .redirectUrl (),
87+ NotificationSettingType .SYSTEM
8588 );
8689 }
8790 case "ROOM" -> {
@@ -93,12 +96,14 @@ public ResponseEntity<RsData<NotificationResponse>> createNotification(
9396 User actor = userRepository .findById (request .actorId ())
9497 .orElseThrow (() -> new CustomException (ErrorCode .USER_NOT_FOUND ));
9598
99+ // 스터디룸 알림 생성
96100 yield notificationService .createRoomNotification (
97101 room ,
98102 actor ,
99103 request .title (),
100104 request .message (),
101- request .redirectUrl ()
105+ request .redirectUrl (),
106+ NotificationSettingType .ROOM_NOTICE
102107 );
103108 }
104109 case "COMMUNITY" -> {
@@ -110,12 +115,14 @@ public ResponseEntity<RsData<NotificationResponse>> createNotification(
110115 User actor = userRepository .findById (request .actorId ())
111116 .orElseThrow (() -> new CustomException (ErrorCode .USER_NOT_FOUND ));
112117
118+ // 커뮤니티 알림 생성
113119 yield notificationService .createCommunityNotification (
114120 receiver ,
115121 actor ,
116122 request .title (),
117123 request .message (),
118- request .redirectUrl ()
124+ request .redirectUrl (),
125+ NotificationSettingType .POST_COMMENT
119126 );
120127 }
121128 case "SYSTEM" -> {
0 commit comments