-
Notifications
You must be signed in to change notification settings - Fork 1
fix: 문의하기에서 기존 문의 채팅방이 아닌 새 채팅방이 생성되는 문제를 해결 #504
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
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7a0e3f5
fix: 어드민이 문의 채팅방에 멤버로 추가되어 중복 생성되는 문제 해결
dh2906 1de69d3
chore: 코드 포맷팅
dh2906 b331bac
fix: SYSTEM_ADMIN 문의방 재사용을 위해 관리자 멤버 재추가를 차단
dh2906 6bf2bcb
fix: 문의방 관리자 답변 알림이 실제 사용자에게 전달되도록 수정
dh2906 7b8810e
fix: 관리자 문의방 조회가 SYSTEM_ADMIN 멤버 기준으로 동작하도록 분리
dh2906 7ecdc26
fix: 관리자 문의 채팅방 조회와 읽음 처리를 SYSTEM_ADMIN 기준으로 분리
dh2906 d6e979f
chore: 코드 포맷팅
dh2906 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
18 changes: 18 additions & 0 deletions
18
src/main/resources/db/migration/V68__remove_admin_members_from_system_admin_rooms.sql
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 |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| -- SYSTEM_ADMIN(1번)이 있는 DIRECT 채팅방에서 다른 어드민 멤버십 제거 | ||
| -- 이유: 어드민이 멤버로 추가되면 findByTwoUsers에서 해당 방을 찾지 못해 중복 생성됨 | ||
| -- 참고: https://github.com/BCSDLab/KONECT_BACK_END/issues/503 | ||
|
|
||
| DELETE FROM chat_room_member | ||
| WHERE user_id IN ( | ||
| SELECT u.id | ||
| FROM users u | ||
| WHERE u.role = 'ADMIN' | ||
| AND u.id != 1 -- SYSTEM_ADMIN(1번)은 제외 | ||
| ) | ||
| AND chat_room_id IN ( | ||
| SELECT DISTINCT crm.chat_room_id | ||
| FROM chat_room_member crm | ||
| JOIN chat_room cr ON crm.chat_room_id = cr.id | ||
| WHERE crm.user_id = 1 -- SYSTEM_ADMIN(1번)이 있는 방 | ||
| AND cr.room_type = 'DIRECT' -- DIRECT 타입 방만 | ||
| ); |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.