parent
150310ebf3
commit
a4362f3783
|
|
@ -84,16 +84,15 @@ const URL = {
|
||||||
ADMIN_ABOUT_SITE : "/admin/config/about-site-mgt", // 사이트관리/환경설정/관련사이트 관리
|
ADMIN_ABOUT_SITE : "/admin/config/about-site-mgt", // 사이트관리/환경설정/관련사이트 관리
|
||||||
|
|
||||||
// 관리자 - 사용자 현황
|
// 관리자 - 사용자 현황
|
||||||
ADMIN__USERS__LIST : "/admin/users/list", // 사용자 현황
|
ADMIN__USERS__LIST : "/admin/users/mgt", // 사용자 현황
|
||||||
|
|
||||||
// 관리자 - 게시판 현황
|
// 관리자 - 게시판 현황
|
||||||
ADMIN__BOARDS__LIST : "/admin/boards/list", // 게시판 현황/게시판 관리
|
ADMIN__BOARDS__LIST : "/admin/boards/mgt", // 게시판 현황/게시판 관리
|
||||||
ADMIN__BOARDS__POSTS : "/admin/boards/posts", // 게시판 현황/게시물 관리
|
ADMIN__BOARDS__POSTS : "/admin/boards/posts", // 게시판 현황/게시물 관리
|
||||||
ADMIN__BOARDS__KEYWORDS : "/admin/boards/keywords", // 게시판 현황/키워드 관리
|
|
||||||
|
|
||||||
// 관리자 - 건설기준 관리
|
// 관리자 - 건설기준 관리
|
||||||
ADMIN__STANDARDS__REFERENCE_CODES : "/admin/standards/reference-codes", // 건설기준 관리/참조코드 조회
|
ADMIN__STANDARDS__REFERENCE_CODES : "/admin/standards/reference-codes", // 건설기준 관리/참조코드 조회
|
||||||
ADMIN__STANDARDS__API_KYES : "/admin/standards/api-kyes", // 건설기준 관리/API KEY 관리
|
ADMIN__STANDARDS__API_KYES : "/admin/standards/api-keys", // 건설기준 관리/API KEY 관리
|
||||||
ADMIN__STANDARDS__SIMILARITY_CHECK : "/admin/standards/standards/similarity-check", // 건설기준 관리/유사성 검사
|
ADMIN__STANDARDS__SIMILARITY_CHECK : "/admin/standards/standards/similarity-check", // 건설기준 관리/유사성 검사
|
||||||
ADMIN__STANDARDS__INFO_DISCLOSURE : "/admin/standards/info-disclosure", // 건설기준 관리/정보공개 관리
|
ADMIN__STANDARDS__INFO_DISCLOSURE : "/admin/standards/info-disclosure", // 건설기준 관리/정보공개 관리
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ function AdminPostMgtEdit({props, reloadFunction}) {
|
||||||
const [categoryList, setCategoryList] = useState([]);
|
const [categoryList, setCategoryList] = useState([]);
|
||||||
|
|
||||||
const retrieveList = useCallback(() => {
|
const retrieveList = useCallback(() => {
|
||||||
const retrieveListURL = '/admin/boards/get-category-and-file-list';
|
const retrieveListURL = '/admin/boards/posts/get-category-and-file-list';
|
||||||
|
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
@ -100,7 +100,7 @@ function AdminPostMgtEdit({props, reloadFunction}) {
|
||||||
formData.append('bbsContSeq', props.bbsContSeq);
|
formData.append('bbsContSeq', props.bbsContSeq);
|
||||||
}
|
}
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/admin/boards/post-mgt',
|
'/admin/boards/posts/post-mgt',
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
body: formData
|
body: formData
|
||||||
|
|
@ -121,7 +121,7 @@ function AdminPostMgtEdit({props, reloadFunction}) {
|
||||||
function deletePost(post) {
|
function deletePost(post) {
|
||||||
if (window.confirm("삭제하시겠습니까?")) {
|
if (window.confirm("삭제하시겠습니까?")) {
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/admin/boards/post-mgt',
|
'/admin/boards/posts/post-mgt',
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ function AdminPostMgtList(props) {
|
||||||
const params = EgovNet.convParams(searchCondition);
|
const params = EgovNet.convParams(searchCondition);
|
||||||
console.groupCollapsed("EgovAdminPostList.retrieveList()");
|
console.groupCollapsed("EgovAdminPostList.retrieveList()");
|
||||||
|
|
||||||
const retrieveListURL = '/admin/boards/post-list' + params;
|
const retrieveListURL = '/admin/boards/posts/post-list' + params;
|
||||||
|
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ function EgovAdminBoardEdit({props, reloadFunction}) {
|
||||||
const [roleList, setRoleList] = useState([]);
|
const [roleList, setRoleList] = useState([]);
|
||||||
|
|
||||||
const retrieveList = useCallback(() => {
|
const retrieveList = useCallback(() => {
|
||||||
const retrieveListURL = '/admin/boards/get-option-list';
|
const retrieveListURL = '/admin/boards/mgt/get-option-list';
|
||||||
|
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
|
|
@ -88,7 +88,7 @@ function EgovAdminBoardEdit({props, reloadFunction}) {
|
||||||
info.bbsSeq = props.bbsSeq;
|
info.bbsSeq = props.bbsSeq;
|
||||||
}
|
}
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/admin/boards/board-mgt',
|
'/admin/boards/mgt/board-mgt',
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -112,7 +112,7 @@ function EgovAdminBoardEdit({props, reloadFunction}) {
|
||||||
function deleteBoard(bbs){
|
function deleteBoard(bbs){
|
||||||
if(window.confirm("삭제하시겠습니까?")) {
|
if(window.confirm("삭제하시겠습니까?")) {
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/admin/boards/board-mgt',
|
'/admin/boards/mgt/board-mgt',
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -1,185 +0,0 @@
|
||||||
import React, {useState, useEffect, useCallback} from 'react';
|
|
||||||
import {Link, useLocation} from 'react-router-dom';
|
|
||||||
|
|
||||||
import * as EgovNet from 'api/egovFetch';
|
|
||||||
import URL from 'constants/url';
|
|
||||||
|
|
||||||
import {default as EgovLeftNav} from 'components/leftmenu/EgovLeftNavAdmin';
|
|
||||||
import Modal from "react-bootstrap/Modal";
|
|
||||||
import CODE from "../../../constants/code";
|
|
||||||
import EgovAdminBoardEdit from "../board/EgovAdminBoardEdit";
|
|
||||||
import {format} from "date-fns";
|
|
||||||
|
|
||||||
function StandardCodeMgt(props) {
|
|
||||||
|
|
||||||
const location = useLocation();
|
|
||||||
|
|
||||||
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { pageIndex: 1, searchCnd: '0', searchWrd: '' });// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시
|
|
||||||
const [paginationInfo, setPaginationInfo] = useState({});
|
|
||||||
const [listTag, setListTag] = useState([]);
|
|
||||||
|
|
||||||
const [show, setShow] = useState(false);
|
|
||||||
const [modalBody, setModalBody] = useState();
|
|
||||||
const handleClose = () => setShow(false);
|
|
||||||
const handleShow = () => setShow(true);
|
|
||||||
|
|
||||||
const retrieveList = useCallback(() => {
|
|
||||||
handleClose();
|
|
||||||
console.groupCollapsed("AdminBoardList.retrieveList()");
|
|
||||||
|
|
||||||
const retrieveListURL = '/admin/boards/board-list';
|
|
||||||
|
|
||||||
const requestOptions = {
|
|
||||||
method: "GET",
|
|
||||||
headers: {
|
|
||||||
'Content-type': 'application/json',
|
|
||||||
|
|
||||||
},
|
|
||||||
body: JSON.stringify()
|
|
||||||
}
|
|
||||||
|
|
||||||
EgovNet.requestFetch(retrieveListURL,
|
|
||||||
requestOptions,
|
|
||||||
(resp) => {
|
|
||||||
|
|
||||||
let mutListTag = [];
|
|
||||||
listTag.push(<p className="no_data" key="0">검색된 결과가 없습니다.</p>); // 게시판 목록 초기값
|
|
||||||
|
|
||||||
// 리스트 항목 구성
|
|
||||||
resp.result.boardList.forEach(function (item, index) {
|
|
||||||
if (index === 0) mutListTag = []; // 목록 초기화
|
|
||||||
|
|
||||||
mutListTag.push(
|
|
||||||
<div className="list_item">
|
|
||||||
<div>{item.bbsSeq}</div>
|
|
||||||
<div>{item.bbsId}</div>
|
|
||||||
<div>{item.bbsTitle}</div>
|
|
||||||
<div>{item.frstCrtId}</div>
|
|
||||||
<div>{item.frstCrtDt ? format(item.frstCrtDt, "yyyy-MM-dd HH:mm") : ""}</div>
|
|
||||||
<div>{item.lastChgDt ? format(item.lastChgDt, "yyyy-MM-dd HH:mm") : ""}</div>
|
|
||||||
<div><button className={"btn btn_blue_h31 px-1"} onClick={()=>{editBoard(item)}}>수정</button></div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
setListTag(mutListTag);
|
|
||||||
console.log("@@@ resp : ");
|
|
||||||
},
|
|
||||||
function (resp) {
|
|
||||||
console.log("err response : ", resp);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
console.groupEnd("EgovAdminBoardList.retrieveList()");
|
|
||||||
},[]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
retrieveList(searchCondition);
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
function editBoard(item){
|
|
||||||
handleShow();
|
|
||||||
if(item != undefined) {
|
|
||||||
item.mode = CODE.MODE_MODIFY;
|
|
||||||
}
|
|
||||||
setModalBody(<EgovAdminBoardEdit props={item} reloadFunction={retrieveList}/>)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="container">
|
|
||||||
<div className="c_wrap">
|
|
||||||
{/* <!-- Location --> */}
|
|
||||||
<div className="location">
|
|
||||||
<ul>
|
|
||||||
<li><Link to={URL.MAIN} className="home">Home</Link></li>
|
|
||||||
<li><Link to={URL.ADMIN}>사이트관리</Link></li>
|
|
||||||
<li>게시판현황</li>
|
|
||||||
<li>키워드 관리</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{/* <!--// Location --> */}
|
|
||||||
|
|
||||||
<div className="layout">
|
|
||||||
{/* <!-- Navigation --> */}
|
|
||||||
<EgovLeftNav></EgovLeftNav>
|
|
||||||
{/* <!--// Navigation --> */}
|
|
||||||
|
|
||||||
<div className="contents NOTICE_LIST" id="contents">
|
|
||||||
<div className="top_tit">
|
|
||||||
<h1 className="tit_1">사이트관리</h1>
|
|
||||||
</div>
|
|
||||||
<h2 className="tit_2">키워드 관리</h2>
|
|
||||||
{/* <!-- 검색조건 --> */}
|
|
||||||
{/*<div className="condition">
|
|
||||||
<ul>
|
|
||||||
<li className="third_1 L">
|
|
||||||
<span className="lb">검색유형선택</span>
|
|
||||||
<label className="f_select" htmlFor="searchCnd">
|
|
||||||
<select id="searchCnd" name="searchCnd" title="검색유형선택" ref={cndRef}
|
|
||||||
onChange={e => {
|
|
||||||
cndRef.current.value = e.target.value;
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<option value="0">게시판명</option>
|
|
||||||
<option value="1">게시판유형</option>
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</li>
|
|
||||||
<li className="third_2 R">
|
|
||||||
<span className="lb">검색어</span>
|
|
||||||
<span className="f_search w_400">
|
|
||||||
<input type="text" name="" defaultValue={searchCondition && searchCondition.searchWrd} placeholder="" ref={wrdRef}
|
|
||||||
onChange={e => {
|
|
||||||
wrdRef.current.value = e.target.value;
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<button type="button"
|
|
||||||
onClick={() => {
|
|
||||||
retrieveList({ ...searchCondition, pageIndex: 1, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value });
|
|
||||||
}}>조회</button>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<Link to={URL.ADMIN_BOARD_CREATE} className="btn btn_blue_h46 pd35">등록</Link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>*/}
|
|
||||||
{/* <!--// 검색조건 --> */}
|
|
||||||
|
|
||||||
{/* <!-- 게시판목록 --> */}
|
|
||||||
<div className="board_list BRD006">
|
|
||||||
<div className="head">
|
|
||||||
<span>번호</span>
|
|
||||||
<span>아이디</span>
|
|
||||||
<span>제목</span>
|
|
||||||
<span>작성자</span>
|
|
||||||
<span>작성일</span>
|
|
||||||
<span>수정일</span>
|
|
||||||
<span><button className={"btn btn_blue_h31 px-1"} onClick={()=>{editBoard(undefined)}}>추가</button></span>
|
|
||||||
</div>
|
|
||||||
<div className="result">
|
|
||||||
{listTag}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/* <!--// 게시판목록 --> */}
|
|
||||||
|
|
||||||
<div className="board_bot">
|
|
||||||
{/* <!-- Paging --> */}
|
|
||||||
{/*<EgovPaging pagination={paginationInfo} moveToPage={passedPage => {
|
|
||||||
retrieveList({ ...searchCondition, pageIndex: passedPage, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value })
|
|
||||||
}} />*/}
|
|
||||||
{/* <!--/ Paging --> */}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* <!--// 본문 --> */}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Modal show={show} onHide={handleClose} keyboard={false}>
|
|
||||||
{modalBody}
|
|
||||||
</Modal>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default StandardCodeMgt;
|
|
||||||
|
|
@ -32,7 +32,7 @@ function EgovAdminBoardList(props) {
|
||||||
handleClose();
|
handleClose();
|
||||||
console.groupCollapsed("AdminBoardList.retrieveList()");
|
console.groupCollapsed("AdminBoardList.retrieveList()");
|
||||||
|
|
||||||
const retrieveListURL = '/admin/boards/board-list';
|
const retrieveListURL = '/admin/boards/mgt/board-list';
|
||||||
|
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,11 @@ import * as EgovNet from 'api/egovFetch';
|
||||||
import URL from 'constants/url';
|
import URL from 'constants/url';
|
||||||
|
|
||||||
import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
|
import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
|
||||||
import CODE from "../../../constants/code";
|
import CODE from "constants/code";
|
||||||
import Modal from "react-bootstrap/Modal";
|
import Modal from "react-bootstrap/Modal";
|
||||||
import AboutSiteModal from "./aboutSiteMgt/AboutSiteModal";
|
import AboutSiteModal from "./aboutSiteMgt/AboutSiteModal";
|
||||||
import {Image} from "react-bootstrap";
|
import {Image} from "react-bootstrap";
|
||||||
|
import {SERVER_URL} from "config";
|
||||||
|
|
||||||
function StandardCodeMgt(props) {
|
function StandardCodeMgt(props) {
|
||||||
|
|
||||||
|
|
@ -53,7 +54,7 @@ function StandardCodeMgt(props) {
|
||||||
<div className="list_item">
|
<div className="list_item">
|
||||||
<div>{item.siteTitle}</div>
|
<div>{item.siteTitle}</div>
|
||||||
<div>{item.siteUrl}</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)} width={"150"}/></div>
|
<div><Image src={SERVER_URL+"/admin/config/about-site-mgt/get-site-image?fileGrpId=" + item.fileGrpId} alt="이미지" onClick={(e) => window.open(e.target.src)} width={"150"}/></div>
|
||||||
<div>{item.siteOrder}</div>
|
<div>{item.siteOrder}</div>
|
||||||
<div>{item.useYn}</div>
|
<div>{item.useYn}</div>
|
||||||
<div><button className={"btn btn_blue_h31 px-1"} onClick={()=>{editPartnerSite(item)}}>수정</button></div>
|
<div><button className={"btn btn_blue_h31 px-1"} onClick={()=>{editPartnerSite(item)}}>수정</button></div>
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ function AboutSiteModal({props, reloadFunction}) {
|
||||||
formData.append('fileGrpId', props.fileGrpId);
|
formData.append('fileGrpId', props.fileGrpId);
|
||||||
}
|
}
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/admin/config/about-site-mgt',
|
'/admin/config/about-site-mgt/partner-site-mgt',
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
body: formData
|
body: formData
|
||||||
|
|
@ -90,7 +90,7 @@ function AboutSiteModal({props, reloadFunction}) {
|
||||||
function deletePartnerSite(partnerSite){
|
function deletePartnerSite(partnerSite){
|
||||||
if(window.confirm("삭제하시겠습니까?")) {
|
if(window.confirm("삭제하시겠습니까?")) {
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/admin/config/about-site-mgt',
|
'/admin/config/about-site-mgt/partner-site-mgt',
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ function ApiKeys(props) {
|
||||||
|
|
||||||
const retrieveList = useCallback((srchCnd) => {
|
const retrieveList = useCallback((srchCnd) => {
|
||||||
// console.groupCollapsed("EgovAdminUsageList.retrieveList()");
|
// console.groupCollapsed("EgovAdminUsageList.retrieveList()");
|
||||||
const retrieveListURL = '/admin/standards/apikey';
|
const retrieveListURL = '/admin/standards/api-keys';
|
||||||
|
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
@ -95,7 +95,7 @@ function ApiKeys(props) {
|
||||||
|
|
||||||
const handleSwitchToggle = async (item) => {
|
const handleSwitchToggle = async (item) => {
|
||||||
try {
|
try {
|
||||||
const updateApiEndpoint = '/admin/standards/apiupdate';
|
const updateApiEndpoint = '/admin/standards/api-keys/api-update';
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -122,7 +122,7 @@ function ApiKeys(props) {
|
||||||
|
|
||||||
const handleApiKeyChart = (item) => {
|
const handleApiKeyChart = (item) => {
|
||||||
try {
|
try {
|
||||||
const updateApiEndpoint = '/admin/standards/apiDailyChart';
|
const updateApiEndpoint = '/admin/standards/api-keys/api-daily-chart';
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ function List({}) {
|
||||||
const retrieveList = useCallback((searchCondition) => {
|
const retrieveList = useCallback((searchCondition) => {
|
||||||
const params = EgovNet.convParams(searchCondition);
|
const params = EgovNet.convParams(searchCondition);
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/admin/users/list'+params,
|
'/admin/users/mgt/list'+params,
|
||||||
{
|
{
|
||||||
method: "GET"
|
method: "GET"
|
||||||
},
|
},
|
||||||
|
|
@ -80,7 +80,7 @@ function List({}) {
|
||||||
const removeUserInfo = useCallback((seq)=>{
|
const removeUserInfo = useCallback((seq)=>{
|
||||||
if(window.confirm("삭제하시겠습니까?\n복구할 수 없습니다.")){
|
if(window.confirm("삭제하시겠습니까?\n복구할 수 없습니다.")){
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/admin/users/info',
|
'/admin/users/mgt/info',
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ function UserInfoModal({savedInfo, reloadFunction}){
|
||||||
info.userRole = userRole.slice(0, -1)
|
info.userRole = userRole.slice(0, -1)
|
||||||
}
|
}
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/admin/users/info',
|
'/admin/users/mgt/info',
|
||||||
{
|
{
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -59,7 +59,7 @@ function UserInfoModal({savedInfo, reloadFunction}){
|
||||||
|
|
||||||
function modalOpen(){
|
function modalOpen(){
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/admin/users/info?userId='+savedInfo?.userId,
|
'/admin/users/mgt/info?userId='+savedInfo?.userId,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,7 @@ import AdminUsersList from 'pages/admin/users/List';
|
||||||
|
|
||||||
// 관리자 - 게시판 현황
|
// 관리자 - 게시판 현황
|
||||||
import AdminBoardsList from 'pages/admin/boards/List'; // 관리자 - 게시판 현황/게시판 관리
|
import AdminBoardsList from 'pages/admin/boards/List'; // 관리자 - 게시판 현황/게시판 관리
|
||||||
import AdminBoardsPosts from 'pages/admin/boards/Posts'; // 관리자 - 게시판 현황/게시물 관리
|
import AdminPostMgtList from "../pages/admin/board/AdminPostMgtList"; // 관리자 - 게시판 현황/게시물 관리
|
||||||
import AdminBoardsKeywords from 'pages/admin/boards/Keywords'; // 관리자 - 게시판 현황/키워드 관리
|
|
||||||
|
|
||||||
// 관리자 - 건설기준 관리
|
// 관리자 - 건설기준 관리
|
||||||
import AdminStandardsReferenceCodes from 'pages/admin/standards/ReferenceCodes'; // 관리자 - 건설기준 관리/참조코드 조회
|
import AdminStandardsReferenceCodes from 'pages/admin/standards/ReferenceCodes'; // 관리자 - 건설기준 관리/참조코드 조회
|
||||||
|
|
@ -121,7 +120,6 @@ import StandardCodeInfo from "../pages/standardCode/info/StandardCodeInfo";
|
||||||
|
|
||||||
import * as EgovNet from 'api/egovFetch'; // jwt토큰 위조 검사 때문에 추가
|
import * as EgovNet from 'api/egovFetch'; // jwt토큰 위조 검사 때문에 추가
|
||||||
import initPage from 'js/ui';
|
import initPage from 'js/ui';
|
||||||
import AdminPostMgtList from "../pages/admin/board/AdminPostMgtList";
|
|
||||||
|
|
||||||
const RootRoutes = () => {
|
const RootRoutes = () => {
|
||||||
//useLocation객체를 이용하여 정규표현식을 사용한 /admin/~ 으로 시작하는 경로와 비교에 사용(아래 1줄) */}
|
//useLocation객체를 이용하여 정규표현식을 사용한 /admin/~ 으로 시작하는 경로와 비교에 사용(아래 1줄) */}
|
||||||
|
|
@ -297,7 +295,6 @@ const SecondRoutes = () => {
|
||||||
{/* 관리자 - 게시판 현황 */}
|
{/* 관리자 - 게시판 현황 */}
|
||||||
<Route path={URL.ADMIN__BOARDS__LIST} element={<AdminBoardsList />} />
|
<Route path={URL.ADMIN__BOARDS__LIST} element={<AdminBoardsList />} />
|
||||||
<Route path={URL.ADMIN__BOARDS__POSTS} element={<AdminPostMgtList />} />
|
<Route path={URL.ADMIN__BOARDS__POSTS} element={<AdminPostMgtList />} />
|
||||||
<Route path={URL.ADMIN__BOARDS__KEYWORDS} element={<AdminBoardsKeywords />} />
|
|
||||||
|
|
||||||
{/* 관리자 - 건설기준 관리 */}
|
{/* 관리자 - 건설기준 관리 */}
|
||||||
<Route path={URL.ADMIN__STANDARDS__REFERENCE_CODES} element={<AdminStandardsReferenceCodes />} />
|
<Route path={URL.ADMIN__STANDARDS__REFERENCE_CODES} element={<AdminStandardsReferenceCodes />} />
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public class AdminBoardsController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.GET, value = "/board-list", consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(method = RequestMethod.GET, value = "/mgt/board-list", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResultVO getBoardList() throws Exception {
|
public ResultVO getBoardList() throws Exception {
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
@ -72,7 +72,7 @@ public class AdminBoardsController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.GET, value = "/get-option-list", consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(method = RequestMethod.GET, value = "/mgt/get-option-list", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResultVO getOptionList() throws Exception {
|
public ResultVO getOptionList() throws Exception {
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
@ -92,7 +92,7 @@ public class AdminBoardsController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "/board-mgt")
|
@RequestMapping(method = RequestMethod.PUT, value = "/mgt/board-mgt")
|
||||||
public ResultVO saveBoardMgt(@RequestBody @Valid TnBbs bbs, Errors errors, @AuthenticationPrincipal LoginVO user) {
|
public ResultVO saveBoardMgt(@RequestBody @Valid TnBbs bbs, Errors errors, @AuthenticationPrincipal LoginVO user) {
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
|
|
@ -124,7 +124,7 @@ public class AdminBoardsController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "삭제 성공"),
|
@ApiResponse(responseCode = "200", description = "삭제 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.DELETE, value = "/board-mgt")
|
@RequestMapping(method = RequestMethod.DELETE, value = "/mgt/board-mgt")
|
||||||
public ResultVO deleteBoardMgt(@RequestBody TnBbs bbs, @AuthenticationPrincipal LoginVO user) {
|
public ResultVO deleteBoardMgt(@RequestBody TnBbs bbs, @AuthenticationPrincipal LoginVO user) {
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
|
|
@ -151,7 +151,7 @@ public class AdminBoardsController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.GET, value = "/post-list", consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(method = RequestMethod.GET, value = "/posts/post-list", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResultVO getPostList(TnBbsContents params) throws Exception {
|
public ResultVO getPostList(TnBbsContents params) throws Exception {
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
params.setQueryInfo();
|
params.setQueryInfo();
|
||||||
|
|
@ -174,7 +174,7 @@ public class AdminBoardsController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.POST, value = "/get-category-and-file-list", consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(method = RequestMethod.POST, value = "/posts/get-category-and-file-list", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResultVO getCategoryList(@RequestBody TnBbsContents tnBbsContents) throws Exception {
|
public ResultVO getCategoryList(@RequestBody TnBbsContents tnBbsContents) throws Exception {
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
@ -210,7 +210,7 @@ public class AdminBoardsController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "/post-mgt")
|
@RequestMapping(method = RequestMethod.PUT, value = "/posts/post-mgt")
|
||||||
public ResultVO savePostMgt(
|
public ResultVO savePostMgt(
|
||||||
@Valid TnBbsContents contents,
|
@Valid TnBbsContents contents,
|
||||||
HttpServletRequest request,
|
HttpServletRequest request,
|
||||||
|
|
@ -249,7 +249,7 @@ public class AdminBoardsController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "삭제 성공"),
|
@ApiResponse(responseCode = "200", description = "삭제 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.DELETE, value = "/post-mgt")
|
@RequestMapping(method = RequestMethod.DELETE, value = "/posts/post-mgt")
|
||||||
public ResultVO deletePostMgt(@RequestBody TnBbsContents contents, HttpServletRequest request, @AuthenticationPrincipal LoginVO user) {
|
public ResultVO deletePostMgt(@RequestBody TnBbsContents contents, HttpServletRequest request, @AuthenticationPrincipal LoginVO user) {
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
|
|
|
||||||
|
|
@ -530,7 +530,7 @@ public class AdminConfigController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.GET, value = "/get-site-image")
|
@RequestMapping(method = RequestMethod.GET, value = "/about-site-mgt/get-site-image")
|
||||||
public void getSiteImage(HttpServletResponse response, @RequestParam String fileGrpId) throws Exception {
|
public void getSiteImage(HttpServletResponse response, @RequestParam String fileGrpId) throws Exception {
|
||||||
List<TnAttachFile> dbImgList = fileService.findByFileGrpId(fileGrpId);
|
List<TnAttachFile> dbImgList = fileService.findByFileGrpId(fileGrpId);
|
||||||
String realFile = dbImgList.get(0).getFilePath();
|
String realFile = dbImgList.get(0).getFilePath();
|
||||||
|
|
@ -576,7 +576,7 @@ public class AdminConfigController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "/partner-site-mgt")
|
@RequestMapping(method = RequestMethod.PUT, value = "/about-site-mgt/partner-site-mgt")
|
||||||
public ResultVO savePartnerSite(
|
public ResultVO savePartnerSite(
|
||||||
@Valid TnPartnerSite tnPartnerSite,
|
@Valid TnPartnerSite tnPartnerSite,
|
||||||
HttpServletRequest request,
|
HttpServletRequest request,
|
||||||
|
|
@ -614,7 +614,7 @@ public class AdminConfigController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "삭제 성공"),
|
@ApiResponse(responseCode = "200", description = "삭제 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.DELETE, value = "/partner-site-mgt")
|
@RequestMapping(method = RequestMethod.DELETE, value = "/about-site-mgt/partner-site-mgt")
|
||||||
public ResultVO removePartnerSite(@RequestBody TnPartnerSite tnPartnerSite, @AuthenticationPrincipal LoginVO user) {
|
public ResultVO removePartnerSite(@RequestBody TnPartnerSite tnPartnerSite, @AuthenticationPrincipal LoginVO user) {
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class AdminStandardsController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.POST, value = "/apikey", consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(method = RequestMethod.POST, value = "/api-keys", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResultVO selectApiList(@RequestBody TnApiKey tnApiKey, @AuthenticationPrincipal LoginVO user)
|
public ResultVO selectApiList(@RequestBody TnApiKey tnApiKey, @AuthenticationPrincipal LoginVO user)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
|
|
@ -66,7 +66,7 @@ public class AdminStandardsController extends BaseController {
|
||||||
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.POST, value = "/apiupdate", consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(method = RequestMethod.POST, value = "/api-keys/api-update", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResultVO modifyApi(@RequestBody TnApiKey tnApiKey, @AuthenticationPrincipal LoginVO user) throws Exception{
|
public ResultVO modifyApi(@RequestBody TnApiKey tnApiKey, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
|
|
||||||
|
|
@ -92,7 +92,7 @@ public class AdminStandardsController extends BaseController {
|
||||||
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.POST, value = "/apiDailyChart", consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(method = RequestMethod.POST, value = "/api-keys/api-daily-chart", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResultVO ApiChart(@RequestBody Map<String, String> dateRange, @AuthenticationPrincipal LoginVO user) throws Exception{
|
public ResultVO ApiChart(@RequestBody Map<String, String> dateRange, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class AdminUsersController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.GET, value = "/list")
|
@RequestMapping(method = RequestMethod.GET, value = "/mgt/list")
|
||||||
public ResultVO getUserList(UserInfo params, HttpServletRequest request, @AuthenticationPrincipal LoginVO user) throws Exception{
|
public ResultVO getUserList(UserInfo params, HttpServletRequest request, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||||
adminLogsService.insertPrivacyLog(user.getId(), ClientUtils.getRemoteIP(request), "PRV_LIST", null);
|
adminLogsService.insertPrivacyLog(user.getId(), ClientUtils.getRemoteIP(request), "PRV_LIST", null);
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
|
|
@ -72,7 +72,7 @@ public class AdminUsersController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.GET, value = "/info")
|
@RequestMapping(method = RequestMethod.GET, value = "/mgt/info")
|
||||||
public ResultVO getUserInfo(UserInfo params, HttpServletRequest request, @AuthenticationPrincipal LoginVO user) throws Exception{
|
public ResultVO getUserInfo(UserInfo params, HttpServletRequest request, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||||
adminLogsService.insertPrivacyLog(user.getId(), ClientUtils.getRemoteIP(request), "PRV_VIEW", params.getUserId());
|
adminLogsService.insertPrivacyLog(user.getId(), ClientUtils.getRemoteIP(request), "PRV_VIEW", params.getUserId());
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
|
|
@ -91,7 +91,7 @@ public class AdminUsersController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "수정 성공"),
|
@ApiResponse(responseCode = "200", description = "수정 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "/info")
|
@RequestMapping(method = RequestMethod.PUT, value = "/mgt/info")
|
||||||
public ResultVO modifyUserInfo(@RequestBody @Valid UserInfo info, Errors errors, HttpServletRequest request, @AuthenticationPrincipal LoginVO user) throws Exception{
|
public ResultVO modifyUserInfo(@RequestBody @Valid UserInfo info, Errors errors, HttpServletRequest request, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||||
adminLogsService.insertPrivacyLog(user.getId(), ClientUtils.getRemoteIP(request), "PRV_UPDT", info.getUserId());
|
adminLogsService.insertPrivacyLog(user.getId(), ClientUtils.getRemoteIP(request), "PRV_UPDT", info.getUserId());
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
|
|
@ -136,7 +136,7 @@ public class AdminUsersController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "삭제 성공"),
|
@ApiResponse(responseCode = "200", description = "삭제 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.DELETE, value = "/info", consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(method = RequestMethod.DELETE, value = "/mgt/info", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResultVO deleteUserInfo(@RequestBody UserInfo info, HttpServletRequest request, @AuthenticationPrincipal LoginVO user) throws Exception{
|
public ResultVO deleteUserInfo(@RequestBody UserInfo info, HttpServletRequest request, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||||
adminLogsService.insertPrivacyLog(user.getId(), ClientUtils.getRemoteIP(request), "PRV_DLT", info.getUserId());
|
adminLogsService.insertPrivacyLog(user.getId(), ClientUtils.getRemoteIP(request), "PRV_DLT", info.getUserId());
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import com.dbnt.kcscbackend.admin.config.service.ConfigService;
|
||||||
import com.dbnt.kcscbackend.admin.users.service.UsersService;
|
import com.dbnt.kcscbackend.admin.users.service.UsersService;
|
||||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
|
|
@ -20,9 +22,10 @@ public class AuthCheckInterceptor implements HandlerInterceptor {
|
||||||
|
|
||||||
private final UsersService usersService;
|
private final UsersService usersService;
|
||||||
private final ConfigService configService;
|
private final ConfigService configService;
|
||||||
|
private final Logger log = LoggerFactory.getLogger(this.getClass().getSimpleName());
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView mav) throws Exception {
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||||
/*관리자 메뉴 접근시 권한 체크*/
|
/*관리자 메뉴 접근시 권한 체크*/
|
||||||
String requestUri = request.getRequestURI();
|
String requestUri = request.getRequestURI();
|
||||||
String userRole = usersService.selectUserInfo(((LoginVO)((UsernamePasswordAuthenticationToken)request.getUserPrincipal()).getPrincipal()).getUserSeq()).getUserRole();
|
String userRole = usersService.selectUserInfo(((LoginVO)((UsernamePasswordAuthenticationToken)request.getUserPrincipal()).getPrincipal()).getUserSeq()).getUserRole();
|
||||||
|
|
@ -34,8 +37,7 @@ public class AuthCheckInterceptor implements HandlerInterceptor {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!requestFlag){
|
log.info("requestFlag: "+requestFlag);
|
||||||
response.sendRedirect("/");
|
return requestFlag;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
group by menu_id
|
group by menu_id
|
||||||
) b on a.menu_id = b.menu_id
|
) b on a.menu_id = b.menu_id
|
||||||
where a.use_yn = 'Y'
|
where a.use_yn = 'Y'
|
||||||
order by a.menu_id asc
|
order by a.menu_type_cd desc, a.menu_id asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMenuListToRole" resultType="TcMenu" parameterType="TcMenu">
|
<select id="selectMenuListToRole" resultType="TcMenu" parameterType="TcMenu">
|
||||||
|
|
@ -57,6 +57,6 @@
|
||||||
inner join tc_menu c on a.menu_group = c.menu_id
|
inner join tc_menu c on a.menu_group = c.menu_id
|
||||||
where a.use_yn = 'Y'
|
where a.use_yn = 'Y'
|
||||||
and a.menu_type_cd = #{menuTypeCd}
|
and a.menu_type_cd = #{menuTypeCd}
|
||||||
order by a.menu_id asc
|
order by a.menu_type_cd desc, a.menu_id asc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue