From 6211b73ad7750a62652bacf5bcf05002c62fb907 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 목, 06 1월 2022 15:57:16 +0900
Subject: [PATCH] - 이슈 상세페이지 연관,하위 이슈 페이징 처리 완료

---
 src/main/java/kr/wisestone/owl/web/condition/IssueCondition.java |   39 +++++++++++++++++++++++++++++++++++----
 1 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/src/main/java/kr/wisestone/owl/web/condition/IssueCondition.java b/src/main/java/kr/wisestone/owl/web/condition/IssueCondition.java
index 23b0d61..74c96ee 100644
--- a/src/main/java/kr/wisestone/owl/web/condition/IssueCondition.java
+++ b/src/main/java/kr/wisestone/owl/web/condition/IssueCondition.java
@@ -1,10 +1,9 @@
 package kr.wisestone.owl.web.condition;
 
 import com.google.common.collect.Lists;
-import kr.wisestone.owl.util.CommonUtil;
-import kr.wisestone.owl.util.ConvertUtil;
-import kr.wisestone.owl.util.DateUtil;
-import kr.wisestone.owl.util.MapUtil;
+import kr.wisestone.owl.util.*;
+import kr.wisestone.owl.vo.PageVo;
+import org.springframework.data.domain.Pageable;
 import org.springframework.util.StringUtils;
 
 import java.util.Date;
@@ -56,6 +55,8 @@
     private Boolean hideDownIssue;
     private Boolean hideCompleteIssue;
     private Boolean isTree; // �듃由ш뎄議� 紐⑤뱶 �씪�븣
+    private Pageable relPageable;
+    private Pageable downPageable;
 
     public IssueCondition(){}
 
@@ -70,6 +71,20 @@
 
     public static IssueCondition make(Map<String, Object> conditions) {
         IssueCondition condition = ConvertUtil.convertMapToClass(conditions, IssueCondition.class);
+        Map<String, Object> pageContents = (Map<String, Object>) conditions.get("pageContent");
+        if (pageContents != null) {
+            PageVo downPageVo = new PageVo();
+            downPageVo.setPage(MapUtil.getInteger(pageContents, "downPage"));
+            downPageVo.setPageSize(MapUtil.getInteger(pageContents, "downPageSize"));
+
+            PageVo relPageVo = new PageVo();
+            relPageVo.setPage(MapUtil.getInteger(pageContents, "relPage"));
+            relPageVo.setPageSize(MapUtil.getInteger(pageContents, "relPageSize"));
+
+            PageUtil pageUtil = new PageUtil();
+            condition.setRelPageable(pageUtil.convertPageable(relPageVo));
+            condition.setDownPageable(pageUtil.convertPageable(downPageVo));
+        }
 
         if (!StringUtils.isEmpty(condition.getCombinationIssueNumber())) {
             if (condition.getCombinationIssueNumber().contains("-")) {
@@ -542,4 +557,20 @@
     public void setTree(Boolean tree) {
         isTree = tree;
     }
+
+    public Pageable getRelPageable() {
+        return relPageable;
+    }
+
+    public void setRelPageable(Pageable relPageable) {
+        this.relPageable = relPageable;
+    }
+
+    public Pageable getDownPageable() {
+        return downPageable;
+    }
+
+    public void setDownPageable(Pageable downPageable) {
+        this.downPageable = downPageable;
+    }
 }

--
Gitblit v1.8.0