From 00157b3b57899a180b2af0691e154253d543c4fc Mon Sep 17 00:00:00 2001 From: Kim Uijin <127496156+sansan20535@users.noreply.github.com> Date: Fri, 24 Jan 2025 00:20:37 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EC=A7=88=EB=B3=91,=20=EC=A6=9D=EC=83=81?= =?UTF-8?q?,=20=EB=8F=99=EB=AC=BC=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20null?= =?UTF-8?q?=EA=B0=92=EC=9D=B4=20=EC=95=84=EB=8B=8C=20=EB=B9=88=20=EB=B0=B0?= =?UTF-8?q?=EC=97=B4=EB=A1=9C=20=ED=8C=90=EB=8B=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cocos/cocos/api/post/service/PostService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/cocos/cocos/api/post/service/PostService.java b/src/main/java/com/cocos/cocos/api/post/service/PostService.java index 05da6b8..27af51d 100644 --- a/src/main/java/com/cocos/cocos/api/post/service/PostService.java +++ b/src/main/java/com/cocos/cocos/api/post/service/PostService.java @@ -257,21 +257,21 @@ public PostListResponse getPosts(final Long memberId, final String keyword, fina if (keyword != null) { spec = spec.and(PostSpecification.hasKeyword(keyword)); } - if (animalIds != null) { + if (!animalIds.isEmpty()) { final List postTags = postTagRepository.findAllByTagIdAndTagType(animalIds, TagType.ANIMAL); final List postIds = postTags.stream() .map(PostTag::getPostId) .toList(); spec = spec.and(PostSpecification.inPostIds(postIds)); } - if (symptomIds != null) { + if (!symptomIds.isEmpty()) { final List postTags = postTagRepository.findAllByTagIdAndTagType(symptomIds, TagType.SYMPTOM); final List postIds = postTags.stream() .map(PostTag::getPostId) .toList(); spec = spec.and(PostSpecification.inPostIds(postIds)); } - if (diseaseIds != null) { + if (!diseaseIds.isEmpty()) { final List postTags = postTagRepository.findAllByTagIdAndTagType(diseaseIds, TagType.DISEASE); final List postIds = postTags.stream() .map(PostTag::getPostId)