관련사이트, 게시물 수정사항 반영
parent
192c9b9b93
commit
242940d653
|
|
@ -86,7 +86,7 @@
|
|||
.P_MAIN .banner_bot > div.b2 > div {background: url(css/images/ico_bn02.png) no-repeat center 60px;}
|
||||
.P_MAIN .banner_bot > div.b3 > div {background: url(css/images/ico_bn03.png) no-repeat center 60px;}
|
||||
.P_MAIN .banner_bot > div.b4 > div {background: url(css/images/ico_bn04.png) no-repeat center 60px;}
|
||||
|
||||
|
||||
|
||||
/* 오늘의 행사 */
|
||||
.BRD001 .head > span:nth-child(1) {width: 150px;}
|
||||
|
|
@ -141,16 +141,16 @@
|
|||
.BRD005 .result .list_item > div:nth-child(4) {width: 120px;}
|
||||
.BRD005 .result .list_item > div:nth-child(5) {width: 100px;}
|
||||
|
||||
/* 게시판생성 관리 */
|
||||
.BRD006 .head > span:nth-child(1) {width: 70px;}
|
||||
/* 게시판 관리 */
|
||||
.BRD006 .head > span:nth-child(1) {width: 75px;}
|
||||
.BRD006 .head > span:nth-child(3) {width: 160px;}
|
||||
.BRD006 .head > span:nth-child(4) {width: 168px;}
|
||||
.BRD006 .head > span:nth-child(5) {width: 140px;}
|
||||
.BRD006 .head > span:nth-child(5) {width: 70px;}
|
||||
.BRD006 .head > span:nth-child(6) {width: 140px;}
|
||||
.BRD006 .result .list_item > div:nth-child(1) {width: 70px;}
|
||||
.BRD006 .result .list_item > div:nth-child(1) {width: 75px;}
|
||||
.BRD006 .result .list_item > div:nth-child(3) {width: 160px;}
|
||||
.BRD006 .result .list_item > div:nth-child(4) {width: 168px;}
|
||||
.BRD006 .result .list_item > div:nth-child(5) {width: 140px;}
|
||||
.BRD006 .result .list_item > div:nth-child(5) {width: 70px;}
|
||||
.BRD006 .result .list_item > div:nth-child(6) {width: 140px;}
|
||||
|
||||
/* 사이트관리 > 사용자관리 > 사용자목록 */
|
||||
|
|
@ -254,13 +254,17 @@
|
|||
.PDS_LIST .tit_5 {margin-top: 42px;}
|
||||
.PDS_LIST .board_list {margin-top: 50px;}
|
||||
.BRD007 .head > span:nth-child(1) {width: 70px;}
|
||||
.BRD007 .head > span:nth-child(3) {width: 90px;}
|
||||
.BRD007 .head > span:nth-child(4) {width: 90px;}
|
||||
.BRD007 .head > span:nth-child(5) {width: 120px;}
|
||||
.BRD007 .head > span:nth-child(3) {width: 160px;}
|
||||
.BRD007 .head > span:nth-child(4) {width: 120px;}
|
||||
.BRD007 .head > span:nth-child(5) {width: 70px;}
|
||||
.BRD007 .head > span:nth-child(6) {width: 120px;}
|
||||
.BRD007 .head > span:nth-child(7) {width: 140px;}
|
||||
.BRD007 .result .list_item > div:nth-child(1) {width: 70px;}
|
||||
.BRD007 .result .list_item > div:nth-child(3) {width: 90px;}
|
||||
.BRD007 .result .list_item > div:nth-child(4) {width: 90px;}
|
||||
.BRD007 .result .list_item > div:nth-child(5) {width: 120px;}
|
||||
.BRD007 .result .list_item > div:nth-child(3) {width: 160px;}
|
||||
.BRD007 .result .list_item > div:nth-child(4) {width: 120px;}
|
||||
.BRD007 .result .list_item > div:nth-child(5) {width: 70px;}
|
||||
.BRD007 .result .list_item > div:nth-child(6) {width: 120px;}
|
||||
.BRD007 .result .list_item > div:nth-child(7) {width: 140px;}
|
||||
|
||||
.PDS_REG .pds_desc_edit {margin: 14px 0 30px 0;}
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,6 @@ function AdminPostMgtEdit({props, reloadFunction}) {
|
|||
},
|
||||
(resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||
alert("삭제되었습니다.")
|
||||
reloadFunction();
|
||||
} else if (Number(resp.resultCode) === Number(CODE.RCV_ERROR_AUTH)) {
|
||||
console.log("토큰 갱신중.")
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import AdminPostMgtEdit from "./AdminPostMgtEdit";
|
|||
import Modal from "react-bootstrap/Modal";
|
||||
import {format} from "date-fns";
|
||||
import {Form} from "react-bootstrap";
|
||||
const fileIconPath = require('../../../css/images/ico_file.png');
|
||||
|
||||
function AdminPostMgtList(props) {
|
||||
console.group("EgovAdminPostList");
|
||||
|
|
@ -44,7 +45,7 @@ function AdminPostMgtList(props) {
|
|||
console.groupCollapsed("EgovAdminPostList.retrieveList()");
|
||||
|
||||
const retrieveListURL = '/admin/boards/post-list' + params;
|
||||
|
||||
|
||||
const requestOptions = {
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
|
@ -58,21 +59,37 @@ function AdminPostMgtList(props) {
|
|||
(resp) => {
|
||||
setPaginationInfo(resp.result.paginationInfo);
|
||||
setCategoryList(resp.result.categoryList);
|
||||
console.log("@@@ resultCnt : " + resp.result.resultCnt);
|
||||
|
||||
let mutListTag = [];
|
||||
setListTag([]);
|
||||
resp.result.fixedList.forEach(function (item) {
|
||||
const finalModifiedDate = item?.lastChgDt ? item?.lastChgDt : item?.frstCrtDt;
|
||||
const formattedDate = finalModifiedDate ? format(finalModifiedDate, "yyyy-MM-dd HH:mm") : "";
|
||||
mutListTag.push(
|
||||
<div className="list_item">
|
||||
<div>공지</div>
|
||||
<div>{item?.bbsContTitle}</div>
|
||||
<div>{item?.frstCrtId}</div>
|
||||
<div>{formattedDate}</div>
|
||||
<div>{item?.bbsReadCnt}</div>
|
||||
<div>{item?.fileGrpId && <img src={fileIconPath} alt="File Icon" />}</div>
|
||||
<div><button className={"btn btn_blue_h31 px-1"} onClick={()=>{editPost(item)}}>수정</button></div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
resp.result.postList.forEach(function (item, index) {
|
||||
const finalModifiedDate = item?.lastChgDt ? item?.lastChgDt : item?.frstCrtDt;
|
||||
const formattedDate = finalModifiedDate ? format(finalModifiedDate, "yyyy-MM-dd HH:mm") : "";
|
||||
mutListTag.push(
|
||||
<div className="list_item">
|
||||
<div>{item?.bbsContSeq}</div>
|
||||
<div>{resp.result.resultCnt - (resp.result.paginationInfo.pageIndex -1) * resp.result.paginationInfo.rowCnt - index}</div>
|
||||
<div>{item?.bbsContTitle}</div>
|
||||
<div>{item?.frstCrtId}</div>
|
||||
<div>{formattedDate}</div>
|
||||
<div>{item?.bbsReadCnt}</div>
|
||||
<div>{item?.fileGrpId}</div>
|
||||
<div>{item?.fileGrpId && <img src={fileIconPath} alt="File Icon" />}</div>
|
||||
<div><button className={"btn btn_blue_h31 px-1"} onClick={()=>{editPost(item)}}>수정</button></div>
|
||||
</div>
|
||||
);
|
||||
|
|
@ -159,7 +176,7 @@ function AdminPostMgtList(props) {
|
|||
{/* <!--// 검색조건 --> */}
|
||||
|
||||
{/* <!-- 게시판목록 --> */}
|
||||
<div className="board_list BRD006">
|
||||
<div className="board_list BRD007">
|
||||
<div className="head">
|
||||
<span>번호</span>
|
||||
<span>제목</span>
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ function EgovAdminBoardEdit({props, reloadFunction}) {
|
|||
},
|
||||
(resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||
alert("삭제되었습니다.")
|
||||
reloadFunction();
|
||||
} else if (Number(resp.resultCode) === Number(CODE.RCV_ERROR_AUTH)) {
|
||||
console.log("토큰 갱신중.")
|
||||
|
|
@ -179,7 +178,6 @@ function EgovAdminBoardEdit({props, reloadFunction}) {
|
|||
<dt><label htmlFor="bbsTitle">게시판 타입</label><span className="req">필수</span></dt>
|
||||
<dd>
|
||||
<Form.Select id="select1" name="bbsType">
|
||||
<option value="">선택</option>
|
||||
{bbsTypeList.map((item) => (
|
||||
<option key={item.itemCd} value={item.itemCd} selected={props?.bbsType === item.itemCd}>{item.itemNm}</option>
|
||||
))}
|
||||
|
|
@ -226,7 +224,7 @@ function EgovAdminBoardEdit({props, reloadFunction}) {
|
|||
<dt><label htmlFor="bbsTitle">읽기 권한</label><span className="req">필수</span></dt>
|
||||
<dd>
|
||||
<Form.Select id="select1" name="readRole">
|
||||
<option value="">선택</option>
|
||||
<option value="0">비회원</option>
|
||||
{roleList.map((item) => (
|
||||
<option key={item.itemCd} value={item.grpOrder} selected={props?.readRole === item.grpOrder}>{item.itemNm}</option>
|
||||
))}
|
||||
|
|
@ -237,7 +235,6 @@ function EgovAdminBoardEdit({props, reloadFunction}) {
|
|||
<dt><label htmlFor="bbsTitle">쓰기 권한</label><span className="req">필수</span></dt>
|
||||
<dd>
|
||||
<Form.Select id="select1" name="writeRole">
|
||||
<option value="">선택</option>
|
||||
{roleList.map((item) => (
|
||||
<option key={item.itemCd} value={item.grpOrder} selected={props?.writeRole === item.grpOrder}>{item.itemNm}</option>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ function EgovAdminBoardList(props) {
|
|||
|
||||
mutListTag.push(
|
||||
<div className="list_item">
|
||||
<div></div>
|
||||
<div>{item.bbsId}</div>
|
||||
<div>{item.bbsTitle}</div>
|
||||
<div>{item.frstCrtId}</div>
|
||||
|
|
@ -122,7 +121,6 @@ function EgovAdminBoardList(props) {
|
|||
{/* <!-- 게시판목록 --> */}
|
||||
<div className="board_list BRD006">
|
||||
<div className="head">
|
||||
<span></span>
|
||||
<span>아이디</span>
|
||||
<span>제목</span>
|
||||
<span>작성자</span>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ function StandardCodeMgt(props) {
|
|||
|
||||
mutListTag.push(
|
||||
<div className="list_item">
|
||||
<div></div>
|
||||
<div>{item.siteTitle}</div>
|
||||
<div>{item.siteUrl}</div>
|
||||
<div><Image src={"http://back.kcsc.dbnt.co.kr/admin/config/get-site-image?fileGrpId=" + item.fileGrpId} alt="이미지" onClick={(e) => window.open(e.target.src)}/></div>
|
||||
|
|
@ -148,7 +147,6 @@ function StandardCodeMgt(props) {
|
|||
{/* <!-- 게시판목록 --> */}
|
||||
<div className="board_list BRD006">
|
||||
<div className="head">
|
||||
<span></span>
|
||||
<span>사이트명</span>
|
||||
<span>URL</span>
|
||||
<span>배너이미지</span>
|
||||
|
|
|
|||
|
|
@ -243,7 +243,11 @@ function AboutSiteModal({props, reloadFunction}) {
|
|||
<dt><label htmlFor="siteOrder">정렬순서</label><span className="req">필수</span></dt>
|
||||
<dd>
|
||||
<Form.Control className="f_txtar w_full" type="text" name="siteOrder" placeholder="정렬순서" required
|
||||
defaultValue={props?.siteOrder}/>
|
||||
defaultValue={props?.siteOrder} onChange={(e) => {
|
||||
const inputValue = e.target.value;
|
||||
const numericValue = inputValue.replace(/\D/g, '');
|
||||
e.target.value = numericValue;
|
||||
}}/>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ public class AdminBoardsController extends BaseController {
|
|||
if (user == null) {
|
||||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
} else {
|
||||
String result = adminBoardsService.deleteBoard(bbs, user.getId());
|
||||
String result = adminBoardsService.deleteBoard(bbs);
|
||||
if (result == null) {
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
} else if (result.equals("notFind")) {
|
||||
|
|
@ -256,7 +256,7 @@ public class AdminBoardsController extends BaseController {
|
|||
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||
} else {
|
||||
contents.setIpAddress(ClientUtils.getRemoteIP(request));
|
||||
String result = adminBoardsService.deletePost(contents, user.getId());
|
||||
String result = adminBoardsService.deletePost(contents);
|
||||
if (result == null) {
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
} else if (result.equals("notFind")) {
|
||||
|
|
|
|||
|
|
@ -57,23 +57,25 @@ public class AdminBoardsService extends EgovAbstractServiceImpl {
|
|||
}
|
||||
|
||||
@Transactional
|
||||
public String deleteBoard(TnBbs bbs, String userId) {
|
||||
public String deleteBoard(TnBbs bbs) {
|
||||
TnBbs savedBoard = tnBbsRepository.findById(bbs.getBbsSeq()).orElse(null);
|
||||
if (savedBoard == null) {
|
||||
return "notFind";
|
||||
} else {
|
||||
savedBoard.setUseYn("N");
|
||||
savedBoard.setLastChgDt(LocalDateTime.now());
|
||||
savedBoard.setLastChgId(userId);
|
||||
tnBbsRepository.save(savedBoard);
|
||||
tnBbsRepository.deleteById(bbs.getBbsSeq());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, Object> selectPostList(TnBbsContents params) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("resultCnt", String.valueOf(adminBoardsMapper.selectPostListCnt(params)));
|
||||
|
||||
params.setFixedYn("N");
|
||||
resultMap.put("postList", adminBoardsMapper.selectPostList(params));
|
||||
resultMap.put("resultCnt", String.valueOf(adminBoardsMapper.selectPostListCnt(params)));
|
||||
|
||||
params.setFixedYn("Y");
|
||||
resultMap.put("fixedList", adminBoardsMapper.selectPostList(params));
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
|
@ -158,16 +160,12 @@ public class AdminBoardsService extends EgovAbstractServiceImpl {
|
|||
}
|
||||
|
||||
@Transactional
|
||||
public String deletePost(TnBbsContents contents, String userId) {
|
||||
public String deletePost(TnBbsContents contents) {
|
||||
TnBbsContents savedPost = tnBbsContentsRepository.findById(contents.getBbsContSeq()).orElse(null);
|
||||
if (savedPost == null) {
|
||||
return "notFind";
|
||||
} else {
|
||||
savedPost.setIpAddress(contents.getIpAddress());
|
||||
savedPost.setUseYn("N");
|
||||
savedPost.setLastChgDt(LocalDateTime.now());
|
||||
savedPost.setLastChgId(userId);
|
||||
tnBbsContentsRepository.save(savedPost);
|
||||
tnBbsContentsRepository.deleteById(contents.getBbsContSeq());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -532,7 +532,6 @@ public class AdminConfigController extends BaseController {
|
|||
})
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/get-site-image")
|
||||
public void getSiteImage(HttpServletResponse response, @RequestParam String fileGrpId) throws Exception {
|
||||
System.out.println("@@@ in : ");
|
||||
List<TnAttachFile> dbImgList = fileService.findByFileGrpId(fileGrpId);
|
||||
String realFile = dbImgList.get(0).getFilePath();
|
||||
String fileNm = dbImgList.get(0).getFileNewName();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@
|
|||
from tn_bbs_contents
|
||||
<include refid="selectPostListWhere"></include>
|
||||
order by bbs_cont_seq desc
|
||||
<if test='fixedYn != "Y"'>
|
||||
limit #{rowCnt} offset #{firstIndex}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPostListCnt" parameterType="TnBbsContents" resultType="int">
|
||||
|
|
@ -41,6 +43,9 @@
|
|||
|
||||
<sql id="selectPostListWhere">
|
||||
<where>
|
||||
<if test='fixedYn != null and fixedYn != ""'>
|
||||
and fixed_yn = #{fixedYn}
|
||||
</if>
|
||||
<if test='bbsSeq != null and bbsSeq != ""'>
|
||||
and bbs_seq = #{bbsSeq}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue