From 617bc8d482998f5a55ea174d8411d3f5717b2fde Mon Sep 17 00:00:00 2001 From: thkim Date: Mon, 4 Mar 2024 11:13:40 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B4=80=EB=A6=AC=EC=9E=90=20-=20?= =?UTF-8?q?=EC=82=AC=EC=9D=B4=ED=8A=B8=EA=B4=80=EB=A6=AC=20>=20=EC=BB=A8?= =?UTF-8?q?=ED=85=90=EC=B8=A0=EA=B4=80=EB=A6=AC=20>=20=ED=8C=9D=EC=97=85?= =?UTF-8?q?=20=EA=B4=80=EB=A6=AC=EC=97=90=20=EB=B2=88=ED=98=B8=EB=A5=BC=20?= =?UTF-8?q?PK=EA=B0=92=EC=9D=B4=20=EC=95=84=EB=8B=8C=20=EA=B2=8C=EC=8B=9C?= =?UTF-8?q?=EA=B8=80=20=EB=B2=88=ED=98=B8=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?=EA=B1=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/admin/contents/PopUp.jsx | 58 +++++++++++++++---- .../service/impl/PopUpApiServiceImpl.java | 7 ++- 2 files changed, 52 insertions(+), 13 deletions(-) diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp.jsx index 90cdf8a..ead34b9 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/contents/PopUp.jsx @@ -13,9 +13,42 @@ import EgovPagingPaginationInfo from 'components/EgovPagingPaginationInfo'; import styled from "styled-components"; const StyledDiv = styled.div` + + .BRD008 { + .head > span:nth-child(3) { + width: 180px; + } + .result .list_item > div:nth-child(3) { + width: 180px; + } + } + .board_btn_area { margin: 12px 0px; } + + .board-bot { + margin-top: 20px; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-start; + align-items: stretch; + justify-content: center; + + & > *:nth-child(1) { + width: 16%; + justify-content: left; + } + & > *:nth-child(2) { + width: 68%; + justify-content: center; + } + & > *:nth-child(3) { + width: 16%; + justify-content: right; + } + } `; const label = { inputProps: { 'aria-label': '사용여부' } }; @@ -112,14 +145,6 @@ function PopUp(props) {

팝업 관리

- - {/* */} -
-
- 팝업 추가 -
-
- {/* */} {/* */}
@@ -146,13 +171,24 @@ function PopUp(props) {
{/* */} -
- {/* */} + + + + + {/* */} +
+
{ getList({ ...searchCondition, pageIndex: passedPage }) }} /> - {/* */} +
+ 등록 +
+
+ {/* */} + + {/* */}
diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/contents/popUp/service/impl/PopUpApiServiceImpl.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/contents/popUp/service/impl/PopUpApiServiceImpl.java index 93bdbbf..00266c3 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/contents/popUp/service/impl/PopUpApiServiceImpl.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/contents/popUp/service/impl/PopUpApiServiceImpl.java @@ -24,6 +24,7 @@ import java.time.format.DateTimeFormatter; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @Service("popUpApiService") @@ -47,13 +48,14 @@ public class PopUpApiServiceImpl extends EgovAbstractServiceImpl implements PopU ); - Long totalRecordCount = tnPopupMngRepositoryWithoutPopupContents.count(); + Long totalRecordCount = tnPopupMngRepositoryWithoutPopupContents.count(); + AtomicInteger index = new AtomicInteger(); //List> listPopup = tnPopupMngRepositoryWithoutPopupContents.findAll(Sort.by(Sort.Direction.DESC, "popupSeq")) List> listPopup = tnPopupMngRepositoryWithoutPopupContents.findAll(pageable) .stream() .map(item -> { Map codeMap = new HashMap<>(); - codeMap.put("seq", item.getPopupSeq()); + codeMap.put("seq", totalRecordCount - pageable.getPageNumber() * pageable.getPageSize() - index.getAndIncrement()); codeMap.put("popupTitle", item.getPopupTitle()); codeMap.put("startDate", item.getPopupStartDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); codeMap.put("endDate", item.getPopupEndDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); @@ -65,6 +67,7 @@ public class PopUpApiServiceImpl extends EgovAbstractServiceImpl implements PopU codeMap.put("createDate", item.getFrstCrtDt()); codeMap.put("updateDate", item.getLastChgDt()); codeMap.put("base64String", null); + //nCount ++; return codeMap; }) .collect(Collectors.toList());