feat: 관리자 - 사이트관리 > 컨텐츠관리 > 팝업 관리에 번호를 PK값이 아닌 게시글 번호로 변경 건
parent
3a8f9f700e
commit
617bc8d482
|
|
@ -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) {
|
|||
<div className="top_tit">
|
||||
<h1 className="tit_1">팝업 관리</h1>
|
||||
</div>
|
||||
|
||||
{/* <!-- 버튼영역 --> */}
|
||||
<div className="board_btn_area">
|
||||
<div className="right_col btn1">
|
||||
<Link to={URL.ADMIN__CONTENTS__POP_UP__CREATE} className="btn btn_blue_h46 w_100">팝업 추가</Link>
|
||||
</div>
|
||||
</div>
|
||||
{/* <!--// 버튼영역 --> */}
|
||||
|
||||
{/* <!-- 게시판목록 --> */}
|
||||
<div className="board_list BRD008">
|
||||
|
|
@ -146,13 +171,24 @@ function PopUp(props) {
|
|||
</div>
|
||||
{/* <!--// 게시판목록 --> */}
|
||||
|
||||
<div className="board_bot">
|
||||
{/* <!-- Paging --> */}
|
||||
|
||||
|
||||
|
||||
|
||||
{/* <!-- Paging --> */}
|
||||
<div className="board-bot">
|
||||
<div></div>
|
||||
<EgovPagingPaginationInfo pagination={paginationInfo} setPaginationInfo={setPaginationInfo} moveToPage={passedPage => {
|
||||
getList({ ...searchCondition, pageIndex: passedPage })
|
||||
}} />
|
||||
{/* <!--/ Paging --> */}
|
||||
<div className="right_col btn1">
|
||||
<Link to={URL.ADMIN__CONTENTS__POP_UP__CREATE} className="btn btn_blue_h46 w_100">등록</Link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/* <!--/ Paging --> */}
|
||||
|
||||
|
||||
</StyledDiv>
|
||||
{/* <!--// 본문 --> */}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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<Map<String, Object>> listPopup = tnPopupMngRepositoryWithoutPopupContents.findAll(Sort.by(Sort.Direction.DESC, "popupSeq"))
|
||||
List<Map<String, Object>> listPopup = tnPopupMngRepositoryWithoutPopupContents.findAll(pageable)
|
||||
.stream()
|
||||
.map(item -> {
|
||||
Map<String, Object> 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());
|
||||
|
|
|
|||
Loading…
Reference in New Issue