-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 개인 알림 도메인 이벤트 연결 #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
guingguing
merged 8 commits into
develop
from
feature/127-notification-domain-connections
Aug 6, 2026
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e910814
feat: 프로젝트 합류 알림 연결
guingguing f35532e
feat: 프로젝트 일정 등록 알림 연결
guingguing a2c2017
feat: 파일 등록 알림 연결
guingguing 0fb3e87
feat: 공지 등록 알림 연결
guingguing bb5a664
test: 공지 최근활동 테스트 알림 의존성 보강
guingguing ff7d9da
Merge branch 'develop' into feature/127-notification-domain-connections
guingguing d2029f4
fix: 개인 알림 문구 정책서 기준으로 정리
guingguing ccaee95
fix: 파일 알림 대상 ID를 파일 ID로 수정
guingguing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |
| import com.slatto.domain.project.repository.ProjectMemberRepository; | ||
| import com.slatto.domain.project.repository.ProjectUserRoleRepository; | ||
| import com.slatto.domain.notification.service.ActivityLogService; | ||
| import com.slatto.domain.notification.service.NotificationService; | ||
| import com.slatto.domain.user.entity.Users; | ||
| import com.slatto.domain.user.enums.RoleName; | ||
| import com.slatto.domain.user.repository.UserRepository; | ||
|
|
@@ -50,6 +51,7 @@ public class ProjectInvitationService { | |
| private final ProjectAccessValidator projectAccessValidator; | ||
| private final ProjectInvitationProperties projectInvitationProperties; | ||
| private final ActivityLogService activityLogService; | ||
| private final NotificationService notificationService; | ||
| private final SecureRandom secureRandom = new SecureRandom(); | ||
|
|
||
| @Transactional | ||
|
|
@@ -117,6 +119,12 @@ public ProjectInvitationAcceptResponse acceptInvitation( | |
| saveProjectRoles(projectMember, roleNames); | ||
| projectInvitation.accept(accepter); | ||
| activityLogService.createProjectMemberJoinedLog(project.getId(), accepter.getId()); | ||
| notificationService.createProjectJoinedNotifications( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. excludeUserId를 추가하지 않아 다른 서비스들과 다르게 알림 대상에 행위자를 포함한 것은 의도하신 것일까요!? |
||
| project.getId(), | ||
| project.getTitle(), | ||
| accepter.getNickname(), | ||
| getActiveProjectMemberUserIds(project.getId()) | ||
| ); | ||
|
|
||
| return ProjectInvitationAcceptResponse.builder() | ||
| .projectId(project.getId()) | ||
|
|
@@ -134,6 +142,14 @@ private void saveProjectRoles(ProjectMember projectMember, List<RoleName> roleNa | |
| projectUserRoleRepository.saveAll(projectUserRoles); | ||
| } | ||
|
|
||
| private List<Long> getActiveProjectMemberUserIds(Long projectId) { | ||
| return projectMemberRepository.findAllActiveMembersByProjectId(projectId) | ||
| .stream() | ||
| .map(ProjectMember::getUser) | ||
| .map(Users::getId) | ||
| .toList(); | ||
| } | ||
|
|
||
| private void validateAcceptableInvitation(ProjectInvitation projectInvitation) { | ||
| if (projectInvitation.isAccepted()) { | ||
| throw new BaseException(ProjectErrorCode.PROJECT_INVITATION_ALREADY_ACCEPTED); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: SLAT-TO/SLATE-TO-BE
Length of output: 50375
🏁 Script executed:
Repository: SLAT-TO/SLATE-TO-BE
Length of output: 50058
🏁 Script executed:
Repository: SLAT-TO/SLATE-TO-BE
Length of output: 50376
PROJECT_FILE알림의 대상 ID를 파일 ID로 맞추세요.createFileUploadedNotifications()은targetType을PROJECT_FILE로 설정한 뒤targetId에projectId를 저장합니다.NotificationTargetType.PROJECT_FILE을 사용할 목적이라면savedFile.getId()를 전달하고NotificationService의targetId도 해당 파일 id로 고정하세요. 프로젝트 ID가 실제 대상이면PROJECT_FILE대신targetType을PROJECT로 변경하세요.수정 예시
notificationService.createFileUploadedNotifications( projectId, + savedFile.getId(), project.getTitle(),public void createFileUploadedNotifications( Long projectId, + Long fileId, String projectTitle, ... - .targetId(projectId) + .targetId(fileId)🤖 Prompt for AI Agents