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); + } + }