From 34e8471afd0f50c5b36dcaaa2fc2dfa407d87e2f Mon Sep 17 00:00:00 2001 From: minuk926 Date: Tue, 19 Apr 2022 20:46:35 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xit/biz/ctgy/repository/IBoardRepositoryImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryImpl.java b/src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryImpl.java index e7c5878..153af39 100644 --- a/src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryImpl.java +++ b/src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryImpl.java @@ -29,7 +29,7 @@ public class IBoardRepositoryImpl implements IBoardRepositoryCustom{ QueryResults ciCodes = queryFactory .select(minCivBoard680.ciCode) .from(minCivBoard680) - .where(ciTitleLike(dto.getCiTitle()), ciNameLike(dto.getCiName())) + .where(ciTitleLike(dto.getCiTitle()), ciNameLike(dto.getCiName()), ciContentsLike(dto.getCiContents())) .orderBy(minCivBoard680.ciRef.desc(), minCivBoard680.ciStep.asc(), minCivBoard680.ciCode.desc()) .offset(pageable.getOffset()) .limit(pageable.getPageSize()) @@ -75,4 +75,9 @@ public class IBoardRepositoryImpl implements IBoardRepositoryCustom{ return minCivBoard680.ciName.contains(ciName); } + private BooleanExpression ciContentsLike(String ciContents){ + if(Checks.isEmpty(ciContents)) return null; + return minCivBoard680.ciContents.contains(ciContents); + } + }