From 87246a5c3ff6fe01869cfcf3ce8a4fe7896931f5 Mon Sep 17 00:00:00 2001 From: geneaky Date: Mon, 7 Oct 2024 00:06:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20tag=EA=B2=80=EC=83=89=20=EB=8F=99?= =?UTF-8?q?=EC=A0=81=EC=BF=BC=EB=A6=AC=20=EB=88=84=EB=9D=BD=20=EA=B1=B4=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/query/ChatRoomQueryRepositoryImpl.java | 8 ++++---- .../bookchat/localtest/rest/chatroom/ChatRoomAPI.http | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/toy/bookchat/bookchat/db_module/chatroom/repository/query/ChatRoomQueryRepositoryImpl.java b/src/main/java/toy/bookchat/bookchat/db_module/chatroom/repository/query/ChatRoomQueryRepositoryImpl.java index 40e1d5c2..980e1a44 100644 --- a/src/main/java/toy/bookchat/bookchat/db_module/chatroom/repository/query/ChatRoomQueryRepositoryImpl.java +++ b/src/main/java/toy/bookchat/bookchat/db_module/chatroom/repository/query/ChatRoomQueryRepositoryImpl.java @@ -10,8 +10,8 @@ import static toy.bookchat.bookchat.db_module.chatroom.QHashTagEntity.hashTagEntity; import static toy.bookchat.bookchat.db_module.participant.QParticipantEntity.participantEntity; import static toy.bookchat.bookchat.db_module.user.QUserEntity.userEntity; -import static toy.bookchat.bookchat.support.RepositorySupport.toSlice; import static toy.bookchat.bookchat.domain.participant.ParticipantStatus.HOST; +import static toy.bookchat.bookchat.support.RepositorySupport.toSlice; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.core.types.dsl.Expressions; @@ -26,7 +26,6 @@ import toy.bookchat.bookchat.db_module.book.BookEntity; import toy.bookchat.bookchat.db_module.chat.QChatEntity; import toy.bookchat.bookchat.db_module.chatroom.ChatRoomEntity; -import toy.bookchat.bookchat.db_module.chatroom.QHashTagEntity; import toy.bookchat.bookchat.db_module.chatroom.repository.query.dto.ChatRoomParticipantModel; import toy.bookchat.bookchat.db_module.chatroom.repository.query.dto.ChatRoomResponse; import toy.bookchat.bookchat.db_module.chatroom.repository.query.dto.QChatRoomParticipantModel; @@ -49,7 +48,7 @@ public ChatRoomQueryRepositoryImpl(JPAQueryFactory queryFactory) { this.queryFactory = queryFactory; } - private BooleanExpression inTags(QHashTagEntity hashTagEntity, List tags) { + private BooleanExpression inTags(List tags) { if (tags.isEmpty()) { return null; } @@ -192,7 +191,8 @@ public Slice findChatRooms(ChatRoomRequest chatRoomRequest, Pa ltCursorId(chatRoomRequest.getPostCursorId()), eqIsbn(chatRoomRequest.getIsbn()), containsTitle(chatRoomRequest.getTitle()), - containsRoomName(chatRoomRequest.getRoomName()) + containsRoomName(chatRoomRequest.getRoomName()), + inTags(chatRoomRequest.getTags()) ) .limit(pageable.getPageSize()) .orderBy(chatEntity.id.desc(), chatRoomEntity.id.desc()) diff --git a/src/main/java/toy/bookchat/bookchat/localtest/rest/chatroom/ChatRoomAPI.http b/src/main/java/toy/bookchat/bookchat/localtest/rest/chatroom/ChatRoomAPI.http index 61da849a..e632194d 100644 --- a/src/main/java/toy/bookchat/bookchat/localtest/rest/chatroom/ChatRoomAPI.http +++ b/src/main/java/toy/bookchat/bookchat/localtest/rest/chatroom/ChatRoomAPI.http @@ -62,5 +62,5 @@ Authorization: {{jwt_token}} ### 전체 채팅방 조회 -GET localhost:8080/v1/api/chatrooms?isbn=1234567890 +GET localhost:8080/v1/api/chatrooms?tags=a Authorization: {{jwt_token}} \ No newline at end of file