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 | 98 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 94 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 911ce7d..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; @@ -34,6 +33,7 @@ private Long workspaceId; private String projectType; private String deep; + private String isApi; private Long parentIssueId; // �긽�쐞 �씪媛� private String useValue; private List<Long> projectIds = Lists.newArrayList(); @@ -52,8 +52,18 @@ private List<Long> statusIds = Lists.newArrayList(); private List<Long> excludeIds = Lists.newArrayList(); private List<Long> myDepartmentIds; // �궡媛� �냽�빐�엳�뒗 遺��꽌 ID + private Boolean hideDownIssue; + private Boolean hideCompleteIssue; + private Boolean isTree; // �듃由ш뎄議� 紐⑤뱶 �씪�븣 + private Pageable relPageable; + private Pageable downPageable; public IssueCondition(){} + + public IssueCondition(Long issueId, Long parentIssueId){ + this.id = issueId; + this.parentIssueId = parentIssueId; + } // ���떆蹂대뱶 �쐞湲곌�由� �쐞�젽�뿉�꽌 �궗�슜 public IssueCondition(List<String> issueIds){ this.issueIds = issueIds; @@ -61,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("-")) { @@ -171,6 +195,24 @@ if (MapUtil.getLong(conditions, "issueId") != null) { condition.setId(MapUtil.getLong(conditions, "issueId")); + } + + if (MapUtil.getBoolean(conditions, "hideDownIssue") != null) { + if(MapUtil.getBoolean(conditions, "isTree") != null && !MapUtil.getBoolean(conditions, "isTree")){ + condition.setHideDownIssue(MapUtil.getBoolean(conditions, "hideDownIssue")); + }else if(MapUtil.getBoolean(conditions, "isTree")) { + condition.setHideDownIssue(false); + } + } + + if (MapUtil.getBoolean(conditions, "hideCompleteIssue") != null) { + condition.setHideCompleteIssue(MapUtil.getBoolean(conditions, "hideCompleteIssue")); + } + + if (MapUtil.getBoolean(conditions, "isTree") != null) { + condition.setTree(MapUtil.getBoolean(conditions, "isTree")); + } else { + condition.setTree(false); } return condition; @@ -294,6 +336,14 @@ public void setDeep(String deep) { this.deep = deep; + } + + public String getIsApi() { + return isApi; + } + + public void setIsApi(String isApi) { + this.isApi = isApi; } public List<Long> getProjectIds() { @@ -483,4 +533,44 @@ public void setMyDepartmentIds(List<Long> myDepartmentIds) { this.myDepartmentIds = myDepartmentIds; } + + public Boolean getHideDownIssue() { + return hideDownIssue; + } + + public void setHideDownIssue(Boolean hideDownIssue) { + this.hideDownIssue = hideDownIssue; + } + + public Boolean getHideCompleteIssue() { + return hideCompleteIssue; + } + + public void setHideCompleteIssue(Boolean hideCompleteIssue) { + this.hideCompleteIssue = hideCompleteIssue; + } + + public Boolean getTree() { + return isTree; + } + + 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