Skip to content
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

[SIX-264] 채팅방 조회 로직 리팩토링 #115

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

bombo-dev
Copy link
Member

@bombo-dev bombo-dev commented Nov 26, 2023

🖊️ 1. Changes

  • 채팅방 조회 로직 중 조인이 필요없는 부분에 대한 쿼리 변경점을 찾고 변경하였습니다.
  • 채팅방 나가기, 채팅방 목록 조회에 대한 테스트 코드를 추가하였습니다.

🖼️ 2. Screenshot

❗️ 3. Issues

😌 4. To Reviewer

  • 유저가 입장중인 채팅방에서 수신자들의 ID 값과 채팅방의 ID 값들을 가지고 오는 데이터를 만들기 위한 부분에 불 필요한 조인이 들어가있어서 제거하였습니다.

✅ 5. Plans

  • - 채팅방 로직 테스트 작성

🙌 6. Checklist

  • - 통합 테스트를 수행해보셨나요?
  • - 혹시 컨벤션에 맞지 않게 작성하지 않았나요?
  • - Change와 Issue, Reviewer를 알아보기 쉽게 작성하였나요?

@bombo-dev bombo-dev self-assigned this Nov 26, 2023
Copy link

github-actions bot commented Nov 26, 2023

Test Results

  55 files    55 suites   8s ⏱️
222 tests 220 ✔️ 2 💤 0
232 runs  230 ✔️ 2 💤 0

Results for commit 00ad2d9.

♻️ This comment has been updated with latest results.

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug B 6 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 68 Code Smells

64.6% 64.6% Coverage
0.0% 0.0% Duplication

Copy link
Collaborator

@heenahan heenahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

private List<Long> getReceiverIds(
Long userId,
List<Long> chatRoomIds
) {
return userMissionChatRoomRepository.findByMissionChatRoom_IdIn(chatRoomIds)
.stream()
.filter(userMissionChatRoom -> !userMissionChatRoom.isUserChatRoom(userId))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사소하지만 Predicate의 not을 쓰면 더 직관적일 것 같습니다..!!

@bombo-dev bombo-dev merged commit 26d7bab into develop Nov 27, 2023
5 checks passed
@bombo-dev bombo-dev deleted the SIX-264/채팅방_조회_로직_리팩토링 branch November 27, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants