Skip to content

Commit

Permalink
#237 fix: 채팅방 목록 조회API-status=='ACTIVE'조건 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
xhaktmchl committed Jan 14, 2023
1 parent 14fe09e commit cc5ea28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public interface PartyChatRoomMemberRepository extends MongoRepository<PartyChat
Optional<PartyChatRoomMember> findByIdAndChatRoomId(ObjectId memberId, ObjectId chatRoomId);

//TODO STATUS 추가해야함
@Query(value = "{ 'memberId' : ?0 }")
@Query(value = "{ 'memberId' : ?0, 'status' : 'ACTIVE'}")
Slice<PartyChatRoomMember> findPartyChatRoomMemberByMemberId(int memberId, Pageable pageable);

@Query("{'_id': ?0 , 'partyChatRoom': ?1 }")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ public void createChat(int memberId, String chatRoomId, String content, Boolean
e.printStackTrace();
}
mqController.sendMessage(saveChatJson, chatRoomId); // rabbitMQ 메시지 publish


}


Expand Down Expand Up @@ -231,6 +233,8 @@ public GetPartyChatRoomsRes findPartyChatRooms(int memberId, int cursor) {

return new GetPartyChatRoomsRes(result, members.isLast());
}


@Transactional(readOnly = true)
public List<Chat> findPartyChattings(int memberId, String partyChatRoomId) {
List<Chat> chattingList = chatRepository.findAll();
Expand Down

0 comments on commit cc5ea28

Please sign in to comment.