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());