From 483ae3580a20f3965cee79c1615d615c51dfa18b Mon Sep 17 00:00:00 2001 From: minuk926 Date: Mon, 18 Apr 2022 21:17:36 +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 --- .../biz/ctgy/repository/IBoardRepository.java | 2 +- .../repository/IBoardRepositoryCustom.java | 10 ++++++ .../ctgy/repository/IBoardRepositoryImpl.java | 35 +++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryCustom.java create mode 100644 src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryImpl.java diff --git a/src/main/java/com/xit/biz/ctgy/repository/IBoardRepository.java b/src/main/java/com/xit/biz/ctgy/repository/IBoardRepository.java index a61f819..12d7df2 100644 --- a/src/main/java/com/xit/biz/ctgy/repository/IBoardRepository.java +++ b/src/main/java/com/xit/biz/ctgy/repository/IBoardRepository.java @@ -7,5 +7,5 @@ import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; -public interface IBoardRepository extends JpaRepository { +public interface IBoardRepository extends JpaRepository, IBoardRepositoryCustom { } diff --git a/src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryCustom.java b/src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryCustom.java new file mode 100644 index 0000000..ef0a966 --- /dev/null +++ b/src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryCustom.java @@ -0,0 +1,10 @@ +package com.xit.biz.ctgy.repository; + +import com.xit.biz.ctgy.entity.MinCivBoard680; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +public interface IBoardRepositoryCustom { + + Page findAll2(final MinCivBoard680 entity, Pageable pageable); +} diff --git a/src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryImpl.java b/src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryImpl.java new file mode 100644 index 0000000..e05e3d4 --- /dev/null +++ b/src/main/java/com/xit/biz/ctgy/repository/IBoardRepositoryImpl.java @@ -0,0 +1,35 @@ +package com.xit.biz.ctgy.repository; + +import com.querydsl.jpa.impl.JPAQueryFactory; +import com.xit.biz.ctgy.entity.MinCivBoard680; +import lombok.AllArgsConstructor; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +@AllArgsConstructor +public class IBoardRepositoryImpl implements IBoardRepositoryCustom{ + + private final JPAQueryFactory queryFactory; + + @Override + public Page findAll2(final MinCivBoard680 entity, Pageable pageable){ + /* + SELECT Ci_code, + Ci_name, + ci_contentNo, + Ci_title, + Ci_nalja, + Ci_step, + Ci_revel, + Ci_ref, + ci_hit +FROM MIN_CIV_BOARD680 +WHERE Ci_code IN (SELECT Ci_code + FROM (SELECT Ci_code, rownum RCNT + FROM MIN_CIV_BOARD680 "& strSearchSQL1 &" + ORDER BY Ci_ref DESC, ci_step ASC, Ci_code DESC)) + */ + + return null; + } +}