diff --git a/egovframe-template-simple-backend-contribution/src/main/java/egovframework/dbnt/kcsc/standardCode/StandardCodeController.java b/egovframe-template-simple-backend-contribution/src/main/java/egovframework/dbnt/kcsc/standardCode/StandardCodeController.java index e85c2c5..fe3f7dc 100644 --- a/egovframe-template-simple-backend-contribution/src/main/java/egovframework/dbnt/kcsc/standardCode/StandardCodeController.java +++ b/egovframe-template-simple-backend-contribution/src/main/java/egovframework/dbnt/kcsc/standardCode/StandardCodeController.java @@ -283,13 +283,18 @@ public class StandardCodeController { paginationInfo.setRecordCountPerPage(propertyService.getInt("Globals.pageUnit")); paginationInfo.setPageSize(propertyService.getInt("Globals.pageSize")); + System.out.println("@@@ pageIndex : " + tnDocumentInfoVO.getPageIndex()); + + tnDocumentInfoVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + tnDocumentInfoVO.setLastIndex(paginationInfo.getLastRecordIndex()); + tnDocumentInfoVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + Map resultMap = standardCodeListService.selectStandardCodeList(tnDocumentInfoVO); int totCnt = Integer.parseInt((String)resultMap.get("resultCnt")); paginationInfo.setTotalRecordCount(totCnt); - resultMap.put("codeList", standardCodeListService.selectStandardCodeList(tnDocumentInfoVO)); - resultMap.put("codeListCnt", totCnt); + resultMap.put("tnDocumentInfoVO", tnDocumentInfoVO); resultMap.put("paginationInfo", paginationInfo); resultMap.put("user", user); diff --git a/egovframe-template-simple-backend-contribution/src/main/java/egovframework/dbnt/kcsc/standardCode/entity/TnDocumentInfoVO.java b/egovframe-template-simple-backend-contribution/src/main/java/egovframework/dbnt/kcsc/standardCode/entity/TnDocumentInfoVO.java index 2e55465..421515c 100644 --- a/egovframe-template-simple-backend-contribution/src/main/java/egovframework/dbnt/kcsc/standardCode/entity/TnDocumentInfoVO.java +++ b/egovframe-template-simple-backend-contribution/src/main/java/egovframework/dbnt/kcsc/standardCode/entity/TnDocumentInfoVO.java @@ -17,7 +17,7 @@ import java.util.Date; @DynamicInsert @DynamicUpdate @Table(name = "tn_document_info") -public class TnDocumentInfoVO { +public class TnDocumentInfoVO extends TnDocumentInfo { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "doc_info_seq") @@ -89,4 +89,16 @@ public class TnDocumentInfoVO { @Schema(description = "현재페이지") private int pageIndex = 1; + @Schema(description = "페이지갯수") + private int pageUnit = 10; + @Schema(description = "페이지사이즈") + private int pageSize = 10; + @Schema(description = "첫페이지 인덱스") + private int firstIndex = 1; + @Schema(description = "마지막페이지 인덱스") + private int lastIndex = 1; + @Schema(description = "페이지당 레코드 개수") + private int recordCountPerPage = 10; + @Schema(description = "레코드 번호") + private int rowNo = 0; } \ No newline at end of file diff --git a/egovframe-template-simple-backend-contribution/src/main/resources/application.properties b/egovframe-template-simple-backend-contribution/src/main/resources/application.properties index 31338b9..aa56b6e 100644 --- a/egovframe-template-simple-backend-contribution/src/main/resources/application.properties +++ b/egovframe-template-simple-backend-contribution/src/main/resources/application.properties @@ -60,7 +60,7 @@ spring.mvc.pathmatch.matching-strategy=ant_path_matcher #file path\uc758 default \uac12\uc740 \ud504\ub85c\uc81d\ud2b8 root \uacbd\ub85c\uc774\ubbc0\ub85c \uc6d0\ud558\uc2dc\ub294 \uacbd\ub85c\ub85c \ubcc0\uacbd\ud558\uc5ec \uc0ac\uc6a9\ud558\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4. #TRACE > DEBUG > INFO > WARN > ERROR logging.scan=false -logging.root.level=ERROR +logging.root.level=DEBUG logging.file.name=backend logging.file.path=./log logging.rollingpolicy.maxFileSize=1MB diff --git a/egovframe-template-simple-backend-contribution/src/main/resources/egovframework/mapper/let/std/list/StandardCode_SQL_postgresql.xml b/egovframe-template-simple-backend-contribution/src/main/resources/egovframework/mapper/let/std/list/StandardCode_SQL_postgresql.xml index 72e17e1..e5a49c7 100644 --- a/egovframe-template-simple-backend-contribution/src/main/resources/egovframework/mapper/let/std/list/StandardCode_SQL_postgresql.xml +++ b/egovframe-template-simple-backend-contribution/src/main/resources/egovframework/mapper/let/std/list/StandardCode_SQL_postgresql.xml @@ -71,8 +71,8 @@ FROM tn_document_info WHERE 1 = 1 - and doc_info_seq = '5243' ORDER BY doc_info_seq desc + LIMIT #{recordCountPerPage} OFFSET #{firstIndex}