Merge branch 'master' of http://118.219.150.34:50501/DBNT/kcscDev into thkim
commit
7549c0bcd7
|
|
@ -1,2 +0,0 @@
|
||||||
**/.idea
|
|
||||||
**/.vscode
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
.github/
|
.github/
|
||||||
.Docs/
|
.Docs/
|
||||||
.idea/
|
.idea/
|
||||||
|
**/.idea
|
||||||
|
**/.vscode
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
/node_modules
|
/node_modules
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -75,7 +75,7 @@ function EgovHeader({ loginUser, onChangeLogin }) {
|
||||||
<li><NavLink to={URL.INTRO} className={({ isActive }) => (isActive ? "cur" : "")}>정보마당</NavLink></li>
|
<li><NavLink to={URL.INTRO} className={({ isActive }) => (isActive ? "cur" : "")}>정보마당</NavLink></li>
|
||||||
<li><NavLink to={URL.SUPPORT} className={({ isActive }) => (isActive ? "cur" : "")}>고객지원</NavLink></li>
|
<li><NavLink to={URL.SUPPORT} className={({ isActive }) => (isActive ? "cur" : "")}>고객지원</NavLink></li>
|
||||||
<li><NavLink to={URL.INFORM} className={({ isActive }) => (isActive ? "cur" : "")}>알림마당</NavLink></li>
|
<li><NavLink to={URL.INFORM} className={({ isActive }) => (isActive ? "cur" : "")}>알림마당</NavLink></li>
|
||||||
{sessionUserSe ==='ADM' &&
|
{sessionUserSe ==='ACC_TP01' &&
|
||||||
<li><NavLink to={URL.ADMIN} className={({ isActive }) => (isActive ? "cur" : "")}>사이트관리</NavLink></li>
|
<li><NavLink to={URL.ADMIN} className={({ isActive }) => (isActive ? "cur" : "")}>사이트관리</NavLink></li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -86,7 +86,7 @@ function EgovHeader({ loginUser, onChangeLogin }) {
|
||||||
{/* 로그아웃 : 로그인 정보 있을때 */}
|
{/* 로그아웃 : 로그인 정보 있을때 */}
|
||||||
{sessionUserId &&
|
{sessionUserId &&
|
||||||
<>
|
<>
|
||||||
<span className="person">{sessionUserId} </span> 님이, {sessionUserSe==='ADM'?'관리자':'사용자'}로 로그인하셨습니다.
|
<span className="person">{sessionUserId} </span> 님이, {sessionUserSe==='ACC_TP01'?'관리자':'사용자'}로 로그인하셨습니다.
|
||||||
<button onClick={logOutHandler} className="btn">로그아웃</button>
|
<button onClick={logOutHandler} className="btn">로그아웃</button>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|
@ -141,7 +141,7 @@ function EgovHeader({ loginUser, onChangeLogin }) {
|
||||||
<li><NavLink to={URL.INFORM_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트 갤러리</NavLink></li>
|
<li><NavLink to={URL.INFORM_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트 갤러리</NavLink></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{sessionUserSe ==='ADM' &&
|
{sessionUserSe ==='ACC_TP01' &&
|
||||||
<div className="col">
|
<div className="col">
|
||||||
<h3>사이트관리</h3>
|
<h3>사이트관리</h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -207,7 +207,7 @@ function EgovHeader({ loginUser, onChangeLogin }) {
|
||||||
<li><NavLink to={URL.INFORM_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트 갤러리</NavLink></li>
|
<li><NavLink to={URL.INFORM_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트 갤러리</NavLink></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{sessionUserSe ==='ADM' &&
|
{sessionUserSe ==='ACC_TP01' &&
|
||||||
<>
|
<>
|
||||||
<h3><Link to={URL.ADMIN}>사이트관리</Link></h3>
|
<h3><Link to={URL.ADMIN}>사이트관리</Link></h3>
|
||||||
<div className="submenu closed">
|
<div className="submenu closed">
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,10 @@ function EgovLeftNavAdmin({activeKey}) {
|
||||||
</Accordion.Item>
|
</Accordion.Item>
|
||||||
|
|
||||||
<Accordion.Item eventKey={"1"}>
|
<Accordion.Item eventKey={"1"}>
|
||||||
<Accordion.Header>사용자현황</Accordion.Header>
|
<Accordion.Header>사용자 관리</Accordion.Header>
|
||||||
<Accordion.Body>
|
<Accordion.Body>
|
||||||
<ul className="menu4">
|
<ul className="menu4">
|
||||||
<li><NavLink to={URL.ADMIN__USERS__LIST} className={({ isActive }) => (isActive ? "cur" : "")}>사용자 현황</NavLink></li>
|
<li><NavLink to={URL.ADMIN__USERS__LIST} className={({ isActive }) => (isActive ? "cur" : "")}>사용자 목록</NavLink></li>
|
||||||
</ul>
|
</ul>
|
||||||
</Accordion.Body>
|
</Accordion.Body>
|
||||||
</Accordion.Item>
|
</Accordion.Item>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
const CODE = {
|
const CODE = {
|
||||||
RCV_SUCCESS : "200", // 성공
|
RCV_SUCCESS : "200", // 성공
|
||||||
|
TOKEN_EXPIRED : "303", // 만료된 토큰
|
||||||
RCV_ERROR_AUTH : "403", // 인증 오류
|
RCV_ERROR_AUTH : "403", // 인증 오류
|
||||||
RCV_ERROR_DELETE : "700", // 삭제 오류
|
RCV_ERROR_DELETE : "700", // 삭제 오류
|
||||||
RCV_ERROR_SAVE : "800", // 저장 오류
|
RCV_ERROR_SAVE : "800", // 저장 오류
|
||||||
|
|
|
||||||
|
|
@ -76,12 +76,12 @@ const URL = {
|
||||||
|
|
||||||
ADMIN_MANAGER : "/admin/manager/", // 사이트관리/사이트관리자 암호변경 기능 추가 2023.04.15(토) 김일국
|
ADMIN_MANAGER : "/admin/manager/", // 사이트관리/사이트관리자 암호변경 기능 추가 2023.04.15(토) 김일국
|
||||||
|
|
||||||
ADMIN_BASE_CODE : "/admin/config/baseCodeMgt", // 사이트관리/환경설정/기본코드관리
|
ADMIN_BASE_CODE : "/admin/config/base-code-mgt", // 사이트관리/환경설정/기본코드관리
|
||||||
ADMIN_STANDARD_CODE : "/admin/config/standardCodeMgt", // 사이트관리/환경설정/건설기준코드관리
|
ADMIN_STANDARD_CODE : "/admin/config/standard-code-mgt", // 사이트관리/환경설정/건설기준코드관리
|
||||||
ADMIN_COMMITTEE_CODE : "/admin/config/committeeCodeMgt", // 사이트관리/환경설정/위원회코드관리
|
ADMIN_COMMITTEE_CODE : "/admin/config/committee-code-mgt", // 사이트관리/환경설정/위원회코드관리
|
||||||
ADMIN_MENU : "/admin/config/menuMgt", // 사이트관리/환경설정/메뉴 관리
|
ADMIN_MENU : "/admin/config/menu-mgt", // 사이트관리/환경설정/메뉴 관리
|
||||||
ADMIN_MENU_AUTH : "/admin/config/menuAuthMgt", // 사이트관리/환경설정/메뉴권한 관리
|
ADMIN_MENU_AUTH : "/admin/config/menu-auth-mgt", // 사이트관리/환경설정/메뉴권한 관리
|
||||||
ADMIN_ABOUT_SITE : "/admin/config/aboutSiteMgt", // 사이트관리/환경설정/관련사이트 관리
|
ADMIN_ABOUT_SITE : "/admin/config/about-site-mgt", // 사이트관리/환경설정/관련사이트 관리
|
||||||
|
|
||||||
// 관리자 - 사용자 현황
|
// 관리자 - 사용자 현황
|
||||||
ADMIN__USERS__LIST : "/admin/users/list", // 사용자 현황
|
ADMIN__USERS__LIST : "/admin/users/list", // 사용자 현황
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,11 @@
|
||||||
/* Board */
|
/* Board */
|
||||||
.board_list {border-top: 2px solid #222;}
|
.board_list {border-top: 2px solid #222;}
|
||||||
.board_list .head {display: table; table-layout: fixed; width: 100%;}
|
.board_list .head {display: table; table-layout: fixed; width: 100%;}
|
||||||
.board_list .head > span {display: table-cell; padding: 25px 0 27px 0; border-bottom: 1px solid #888; font-size: 16px; font-weight: 500px; text-align: center;}
|
/* changed by lim padding: 25px 0 27px 0; */
|
||||||
|
.board_list .head > span {display: table-cell; padding: 10px 0 10px 0; border-bottom: 1px solid #888; font-size: 16px; font-weight: 500px; text-align: center;}
|
||||||
.board_list .result .list_item {display: table; width: 100%; table-layout: fixed;}
|
.board_list .result .list_item {display: table; width: 100%; table-layout: fixed;}
|
||||||
.board_list .result .list_item > div {display: table-cell; padding: 18px 0 20px 0; border-bottom: 1px solid #dde2e5; color: #666; font-size: 16px; text-align: center; vertical-align: middle;}
|
/* changed by lim padding: 18px 0 20px 0; */
|
||||||
|
.board_list .result .list_item > div {display: table-cell; padding: 7px 0 7px 0; border-bottom: 1px solid #dde2e5; color: #666; font-size: 16px; text-align: center; vertical-align: middle;}
|
||||||
.board_list .result .list_item > div.al {padding: 18px 30px 20px 30px; text-align: left;}
|
.board_list .result .list_item > div.al {padding: 18px 30px 20px 30px; text-align: left;}
|
||||||
.board_list .result .list_item > div.reply {position: relative; padding: 18px 30px 20px 52px;}
|
.board_list .result .list_item > div.reply {position: relative; padding: 18px 30px 20px 52px;}
|
||||||
.board_list .result .list_item > div.reply::before {content: ""; display: block; position: absolute; left: 27px; top: 24px; width: 22px; height: 14px; background: url(css/images/ico_reply.png) no-repeat;}
|
.board_list .result .list_item > div.reply::before {content: ""; display: block; position: absolute; left: 27px; top: 24px; width: 22px; height: 14px; background: url(css/images/ico_reply.png) no-repeat;}
|
||||||
|
|
@ -245,7 +247,7 @@ select::-ms-expand {display:none;}
|
||||||
|
|
||||||
|
|
||||||
/* Title */
|
/* Title */
|
||||||
.tit_1 {position: relative; padding-bottom: 50px; color: #222; font-size: 48px; font-weight: 500; letter-spacing: -2px; line-height: 48px;}
|
.tit_1 {position: relative; padding-bottom: 20px; color: #222; font-size: 38px; font-weight: 500; letter-spacing: -2px; line-height: 48px;} /* changed by lim padding-bottom: 50px; font-size: 48px;*/
|
||||||
.tit_1::after {content: ""; display: block; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background: #0465be;}
|
.tit_1::after {content: ""; display: block; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background: #0465be;}
|
||||||
|
|
||||||
.tit_2 {font-size: 30px; font-weight: 700;}
|
.tit_2 {font-size: 30px; font-weight: 700;}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import React, {useRef} from 'react';
|
import React, {useRef} from 'react';
|
||||||
import CODE from "../../../constants/code";
|
|
||||||
import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
|
import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
|
||||||
import {Link} from "react-router-dom";
|
import {Link} from "react-router-dom";
|
||||||
import URL from "../../../constants/url";
|
import URL from "../../../constants/url";
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import Row from "react-bootstrap/Row";
|
||||||
import Col from "react-bootstrap/Col";
|
import Col from "react-bootstrap/Col";
|
||||||
import Form from 'react-bootstrap/Form'
|
import Form from 'react-bootstrap/Form'
|
||||||
import Button from "react-bootstrap/Button";
|
import Button from "react-bootstrap/Button";
|
||||||
|
import CODE from "../../../../constants/code";
|
||||||
|
|
||||||
function ChildCodeDiv({}, ref){
|
function ChildCodeDiv({}, ref){
|
||||||
|
|
||||||
|
|
@ -14,6 +15,7 @@ function ChildCodeDiv({}, ref){
|
||||||
useImperativeHandle(ref, ()=>({
|
useImperativeHandle(ref, ()=>({
|
||||||
getCodeItemList
|
getCodeItemList
|
||||||
}))
|
}))
|
||||||
|
|
||||||
async function getCodeItemList(parentCd){
|
async function getCodeItemList(parentCd){
|
||||||
setCodeItemRow([]);
|
setCodeItemRow([]);
|
||||||
setGrpCd(parentCd)
|
setGrpCd(parentCd)
|
||||||
|
|
@ -28,10 +30,11 @@ function ChildCodeDiv({}, ref){
|
||||||
codeItemList.forEach(function (item, index){
|
codeItemList.forEach(function (item, index){
|
||||||
itemTag.push(
|
itemTag.push(
|
||||||
<Row className={"py-2 border-bottom"}>
|
<Row className={"py-2 border-bottom"}>
|
||||||
<Col xs={3}><Form.Control type={"text"} size={"sm"} defaultValue={item.itemCd}/></Col>
|
<Col xs={3}><Form.Control type={"text"} size={"sm"} className={"itemCd"} defaultValue={item.itemCd}/></Col>
|
||||||
<Col xs={5}><Form.Control type={"text"} size={"sm"} defaultValue={item.itemNm}/></Col>
|
<Col xs={4}><Form.Control type={"text"} size={"sm"} className={"itemNm"} defaultValue={item.itemNm}/></Col>
|
||||||
<Col xs={2}><Button variant={"danger"} size={"sm"}>삭제</Button></Col>
|
<Col xs={2}><Form.Control type={"text"} size={"sm"} className={"grpOrder"} defaultValue={item.grpOrder}/></Col>
|
||||||
<Col xs={2}><Button variant={"primary"} size={"sm"}>수정</Button></Col>
|
<Col xs={1}><Button variant={"danger"} size={"sm"} onClick={(e)=>{modifyCodeItem(e, "delete")}}>삭제</Button></Col>
|
||||||
|
<Col xs={1}><Button variant={"primary"} size={"sm"} onClick={(e)=>{modifyCodeItem(e, "modify")}}>수정</Button></Col>
|
||||||
</Row>
|
</Row>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
@ -43,24 +46,106 @@ function ChildCodeDiv({}, ref){
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addCodeItem(){
|
||||||
|
const itemCd = document.querySelector("#itemCd");
|
||||||
|
const itemNm = document.querySelector("#itemNm");
|
||||||
|
const grpOrder = document.querySelector("#grpOrder");
|
||||||
|
if(!itemCd.value || !itemNm.value){
|
||||||
|
alert("코드와 코드명을 입력해주세요.")
|
||||||
|
}else{
|
||||||
|
EgovNet.requestFetch(
|
||||||
|
'/admin/config/code-item',
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'Content-type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
itemCd: itemCd.value,
|
||||||
|
grpCd: document.querySelector("#codeItemDiv").querySelector("#grpCd").value,
|
||||||
|
itemNm: itemNm.value,
|
||||||
|
grpOrder: grpOrder.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
(resp) => {
|
||||||
|
switch (resp.resultCode) {
|
||||||
|
case Number(CODE.RCV_SUCCESS):
|
||||||
|
itemCd.value = "";
|
||||||
|
itemNm.value = "";
|
||||||
|
grpOrder.value = "";
|
||||||
|
getCodeItemList(grpCd);
|
||||||
|
break;
|
||||||
|
case Number(CODE.RCV_ERROR_SAVE)||Number(CODE.RCV_ERROR_AUTH):
|
||||||
|
alert(resp.resultMessage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function (resp) {
|
||||||
|
console.log("err response : ", resp);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function modifyCodeItem(e, action){
|
||||||
|
const row = e.target.parentElement.parentElement;
|
||||||
|
const selectedGrpCd = document.querySelector("#codeItemDiv").querySelector("#grpCd").value;
|
||||||
|
const codeItem = {
|
||||||
|
grpCd: selectedGrpCd,
|
||||||
|
itemCd: row.querySelector(".itemCd").value,
|
||||||
|
itemNm: row.querySelector(".itemNm").value,
|
||||||
|
grpOrder: row.querySelector(".grpOrder").value,
|
||||||
|
useYn: action==="modify"?'Y':'N'
|
||||||
|
}
|
||||||
|
EgovNet.requestFetch(
|
||||||
|
'/admin/config/code-item',
|
||||||
|
{
|
||||||
|
method: "PUT",
|
||||||
|
headers: {
|
||||||
|
'Content-type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify(codeItem)
|
||||||
|
},
|
||||||
|
(resp) => {
|
||||||
|
switch (resp.resultCode) {
|
||||||
|
case Number(CODE.RCV_SUCCESS):
|
||||||
|
getCodeItemList(selectedGrpCd);
|
||||||
|
break;
|
||||||
|
case Number(CODE.RCV_ERROR_SAVE)||Number(CODE.RCV_ERROR_AUTH):
|
||||||
|
alert(resp.resultMessage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function (resp) {
|
||||||
|
console.log("err response : ", resp);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container className={"pt-3"}>
|
<Container className={"pt-3"} id={"codeItemDiv"}>
|
||||||
|
<input type={"hidden"} id={"grpCd"} value={grpCd}/>
|
||||||
<Row className={"py-2 bg-light border-bottom"}>
|
<Row className={"py-2 bg-light border-bottom"}>
|
||||||
<Col xs={3}>코드</Col>
|
<Col xs={3}>코드</Col>
|
||||||
<Col xs={5}>코드명</Col>
|
<Col xs={4}>코드명</Col>
|
||||||
<Col xs={2}>삭제</Col>
|
<Col xs={2}>순번</Col>
|
||||||
<Col xs={2}>수정</Col>
|
<Col xs={3}>삭제 수정</Col>
|
||||||
</Row>
|
</Row>
|
||||||
{codeItemRow}
|
{codeItemRow}
|
||||||
{grpCd!=null?(
|
{grpCd!=null?(
|
||||||
<Row className={"py-1"}>
|
<Row className={"py-1"}>
|
||||||
<Col xs={3}>
|
<Col xs={3}>
|
||||||
<Form.Control type={"text"} placeholder={"코드"} size={"sm"}/>
|
<Form.Control type={"text"} placeholder={"코드"} size={"sm"} id={"itemCd"}/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xs={5}>
|
<Col xs={4}>
|
||||||
<Form.Control type={"text"} placeholder={"코드명"} size={"sm"}/>
|
<Form.Control type={"text"} placeholder={"코드명"} size={"sm"} id={"itemNm"}/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xs={{span:2, offset:2}}><Button type={"button"} variant={"primary"} size={"sm"}>등록</Button></Col>
|
<Col xs={2}>
|
||||||
|
<Form.Control type={"text"} placeholder={"순번"} size={"sm"} id={"grpOrder"}/>
|
||||||
|
</Col>
|
||||||
|
<Col xs={2}><Button type={"button"} variant={"primary"} size={"sm"} onClick={addCodeItem}>등록</Button></Col>
|
||||||
</Row>
|
</Row>
|
||||||
):(
|
):(
|
||||||
<Row className={"py-1"}>
|
<Row className={"py-1"}>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import Col from "react-bootstrap/Col";
|
||||||
import Form from 'react-bootstrap/Form'
|
import Form from 'react-bootstrap/Form'
|
||||||
import Button from "react-bootstrap/Button";
|
import Button from "react-bootstrap/Button";
|
||||||
import { FaRegHandPointRight } from "react-icons/fa";
|
import { FaRegHandPointRight } from "react-icons/fa";
|
||||||
|
import CODE from "../../../../constants/code";
|
||||||
|
|
||||||
function ParentCodeDiv({getCodeItem}){
|
function ParentCodeDiv({getCodeItem}){
|
||||||
|
|
||||||
|
|
@ -23,13 +24,14 @@ function ParentCodeDiv({getCodeItem}){
|
||||||
codeGrpList.forEach(function (item, index){
|
codeGrpList.forEach(function (item, index){
|
||||||
grpTag.push(
|
grpTag.push(
|
||||||
<Row className={"py-2 border-bottom"}>
|
<Row className={"py-2 border-bottom"}>
|
||||||
|
<Form.Control type={"hidden"} className={"grpCd"} defaultValue={item.grpCd}/>
|
||||||
<Col xs={3}>
|
<Col xs={3}>
|
||||||
<FaRegHandPointRight className={"selectIcon d-none"}/>
|
<FaRegHandPointRight className={"selectIcon d-none"}/>
|
||||||
<a href={"#"} onClick={(e)=>{codeGrpChoose(e, item.grpCd)}} data-grpcd={item.grpCd}>{item.grpCd}</a>
|
<a href={"#"} onClick={(e)=>{codeGrpChoose(e, item.grpCd)}} data-grpcd={item.grpCd}>{item.grpCd}</a>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xs={5}><Form.Control type={"text"} size={"sm"} defaultValue={item.grpCdNm}/></Col>
|
<Col xs={5}><Form.Control type={"text"} size={"sm"} className={"grpCdNm"} defaultValue={item.grpCdNm}/></Col>
|
||||||
<Col xs={2}><Button variant={"danger"} size={"sm"}>삭제</Button></Col>
|
<Col xs={2}><Button variant={"danger"} size={"sm"} onClick={(e)=>{modifyCodeGrp(e, "remove")}}>삭제</Button></Col>
|
||||||
<Col xs={2}><Button variant={"primary"} size={"sm"}>수정</Button></Col>
|
<Col xs={2}><Button variant={"primary"} size={"sm"} onClick={(e)=>{modifyCodeGrp(e, "modify")}}>수정</Button></Col>
|
||||||
</Row>
|
</Row>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
@ -56,22 +58,68 @@ function ParentCodeDiv({getCodeItem}){
|
||||||
function addCodeGrp(){
|
function addCodeGrp(){
|
||||||
const grpCd = document.querySelector("#grpCd");
|
const grpCd = document.querySelector("#grpCd");
|
||||||
const grpCdNm = document.querySelector("#grpCdNm");
|
const grpCdNm = document.querySelector("#grpCdNm");
|
||||||
|
if(!grpCd.value){
|
||||||
|
alert("코드 그룹을 입력해주세요.")
|
||||||
|
}else{
|
||||||
|
EgovNet.requestFetch(
|
||||||
|
'/admin/config/code-grp',
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'Content-type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
grpCd: grpCd.value,
|
||||||
|
grpCdNm: grpCdNm.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
(resp) => {
|
||||||
|
switch (resp.resultCode) {
|
||||||
|
case Number(CODE.RCV_SUCCESS):
|
||||||
|
grpCd.value = "";
|
||||||
|
grpCdNm.value = "";
|
||||||
|
getCodeGrp();
|
||||||
|
getCodeItem();
|
||||||
|
break;
|
||||||
|
case Number(CODE.RCV_ERROR_SAVE)||Number(CODE.RCV_ERROR_AUTH):
|
||||||
|
alert(resp.resultMessage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function (resp) {
|
||||||
|
console.log("err response : ", resp);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function modifyCodeGrp(e, action){
|
||||||
|
const row = e.target.parentElement.parentElement;
|
||||||
|
const codeGrp = {
|
||||||
|
grpCd: row.querySelector(".grpCd").value,
|
||||||
|
grpCdNm: row.querySelector(".grpCdNm").value,
|
||||||
|
useYn: action==="modify"?'Y':'N'
|
||||||
|
}
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/admin/config/code-grp',
|
'/admin/config/code-grp',
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-type': 'application/json'
|
'Content-type': 'application/json'
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify(codeGrp)
|
||||||
grpCd: grpCd.value,
|
|
||||||
grpCdNm: grpCdNm.value
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
(resp) => {
|
(resp) => {
|
||||||
grpCd.value = "";
|
switch (resp.resultCode) {
|
||||||
grpCdNm.value = "";
|
case Number(CODE.RCV_SUCCESS):
|
||||||
getCodeGrp();
|
getCodeGrp();
|
||||||
|
getCodeItem();
|
||||||
|
break;
|
||||||
|
case Number(CODE.RCV_ERROR_SAVE)||Number(CODE.RCV_ERROR_AUTH):
|
||||||
|
alert(resp.resultMessage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
function (resp) {
|
function (resp) {
|
||||||
console.log("err response : ", resp);
|
console.log("err response : ", resp);
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,147 @@
|
||||||
import React from 'react';
|
import React, { useState, useEffect, useCallback, useRef } from 'react';
|
||||||
|
import { Link, useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
|
import * as EgovNet from 'api/egovFetch';
|
||||||
|
import URL from 'constants/url';
|
||||||
|
|
||||||
function UserConnections(props) {
|
import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
|
||||||
|
import EgovPaging from 'components/EgovPaging';
|
||||||
|
|
||||||
|
import { itemIdxByPage } from 'utils/calc';
|
||||||
|
|
||||||
|
function PrivacyConnections(props) {
|
||||||
|
// console.group("EgovAdminPrivacyList");
|
||||||
|
// console.log("[Start] EgovAdminPrivacyList ------------------------------");
|
||||||
|
// console.log("EgovAdminPrivacyList [props] : ", props);
|
||||||
|
|
||||||
|
const location = useLocation();
|
||||||
|
// console.log("EgovAdminPrivacyList [location] : ", location);
|
||||||
|
|
||||||
|
// const cndRef = useRef();
|
||||||
|
// const wrdRef = useRef();
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { pageIndex: 1, searchCnd: '0', searchWrd: '' });// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시
|
||||||
|
const [paginationInfo, setPaginationInfo] = useState({});
|
||||||
|
|
||||||
|
const [listTag, setListTag] = useState([]);
|
||||||
|
|
||||||
|
const retrieveList = useCallback((srchCnd) => {
|
||||||
|
// console.groupCollapsed("EgovAdminUsageList.retrieveList()");
|
||||||
|
|
||||||
|
const retrieveListURL = '/admin/logs/privacy';
|
||||||
|
|
||||||
|
const requestOptions = {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'Content-type': 'application/json',
|
||||||
|
},
|
||||||
|
body: JSON.stringify(srchCnd)
|
||||||
|
}
|
||||||
|
|
||||||
|
EgovNet.requestFetch(retrieveListURL,
|
||||||
|
requestOptions,
|
||||||
|
(resp) => {
|
||||||
|
setPaginationInfo(resp.result.paginationInfo);
|
||||||
|
|
||||||
|
let mutListTag = [];
|
||||||
|
listTag.push(<p className="no_data" key="0">데이터가 없습니다.</p>); // 게시판 목록 초기값
|
||||||
|
|
||||||
|
const resultCnt = parseInt(resp.result.resultCnt);
|
||||||
|
const currentPageNo = resp.result.paginationInfo.currentPageNo;
|
||||||
|
const pageSize = resp.result.paginationInfo.pageSize;
|
||||||
|
|
||||||
|
const startIndex = (currentPageNo - 1) * pageSize;
|
||||||
|
const endIndex = Math.min(startIndex + pageSize, resultCnt);
|
||||||
|
|
||||||
|
// 리스트 항목 구성
|
||||||
|
for (let index = startIndex; index < endIndex; index++) {
|
||||||
|
const listIdx = itemIdxByPage(resultCnt, currentPageNo, 0, index); // pageSize 로 넣으면 listIdx값이 2배씩 줄어서 0으로 수정
|
||||||
|
const item = resp.result.resultList[index];
|
||||||
|
|
||||||
|
mutListTag.push(
|
||||||
|
<div key={listIdx} className="list_item">
|
||||||
|
<div>{listIdx}</div>
|
||||||
|
<div>{item.userId}</div>
|
||||||
|
<div>{item.targetUserId}</div>
|
||||||
|
<div>{item.accessType === "PRV_LIST" ? "사용자현황 조회" : item.accessType === "PRV_VIEW" ? "User 상세조회" : "User 수정"}</div>
|
||||||
|
<div>{item.ipAddress}</div>
|
||||||
|
<div>{item.accessDt}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
setListTag(mutListTag);
|
||||||
|
},
|
||||||
|
function (resp) {
|
||||||
|
console.log("err response : ", resp);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// console.groupEnd("EgovAdminPrivacyList.retrieveList()");
|
||||||
|
},[listTag]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
retrieveList(searchCondition);
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// console.log("------------------------------EgovAdminPrivacyList [End]");
|
||||||
|
// console.groupEnd("EgovAdminPrivacyList");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container">
|
<div className="container">
|
||||||
UserConnections
|
<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>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
{/* <!-- 게시판목록 --> */}
|
||||||
|
<div className="board_list BRD009">
|
||||||
|
<div className="head">
|
||||||
|
<span>번호</span>
|
||||||
|
<span>관리자 ID</span>
|
||||||
|
<span>수정 ID</span>
|
||||||
|
<span>타입</span>
|
||||||
|
<span>접속IP</span>
|
||||||
|
<span>변경일자</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>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default UserConnections;
|
export default PrivacyConnections;
|
||||||
|
|
@ -1,11 +1,179 @@
|
||||||
import React from 'react';
|
import React, {useCallback, useEffect, useRef, useState} from 'react';
|
||||||
|
import {Link, useLocation} from "react-router-dom";
|
||||||
|
import URL from "../../../constants/url";
|
||||||
|
import Row from "react-bootstrap/Row";
|
||||||
|
import Col from "react-bootstrap/Col";
|
||||||
|
|
||||||
|
import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
|
||||||
|
import CODE from "../../../constants/code";
|
||||||
|
import EgovPaging from "../../../components/EgovPaging";
|
||||||
|
import * as EgovNet from "../../../api/egovFetch";
|
||||||
|
import {itemIdxByPage} from "../../../utils/calc";
|
||||||
|
import {NOTICE_BBS_ID} from "../../../config";
|
||||||
|
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
|
|
||||||
|
const location = useLocation();
|
||||||
|
|
||||||
|
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { pageIndex: 1, searchCnd: '0', searchWrd: '' });// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시
|
||||||
|
const [listTag, setListTag] = useState([]);
|
||||||
|
const [paginationInfo, setPaginationInfo] = useState({});
|
||||||
|
|
||||||
|
const cndRef = useRef();
|
||||||
|
const wrdRef = useRef();
|
||||||
|
|
||||||
|
const retrieveList = useCallback((searchCondition) => {
|
||||||
|
/*
|
||||||
|
EgovNet.requestFetch(
|
||||||
|
'/cop/bbs/selectBoardListAPI.do',
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'Content-type': 'application/json',
|
||||||
|
},
|
||||||
|
body: JSON.stringify(searchCondition)
|
||||||
|
},
|
||||||
|
(resp) => {
|
||||||
|
|
||||||
|
setPaginationInfo(resp.result.paginationInfo);
|
||||||
|
|
||||||
|
let mutListTag = [];
|
||||||
|
|
||||||
|
const resultCnt = parseInt(resp.result.resultCnt);
|
||||||
|
const currentPageNo = resp.result.paginationInfo.currentPageNo;
|
||||||
|
const pageSize = resp.result.paginationInfo.pageSize;
|
||||||
|
|
||||||
|
// 리스트 항목 구성
|
||||||
|
resp.result.resultList.forEach(function (item, index) {
|
||||||
|
if (index === 0) mutListTag = []; // 목록 초기화
|
||||||
|
const listIdx = itemIdxByPage(resultCnt , currentPageNo, pageSize, index);
|
||||||
|
|
||||||
|
mutListTag.push(
|
||||||
|
<Link to={{pathname: URL.ADMIN_NOTICE_DETAIL}}
|
||||||
|
state={{
|
||||||
|
nttId: item.nttId,
|
||||||
|
searchCondition: searchCondition
|
||||||
|
}}
|
||||||
|
key={listIdx} className="list_item" >
|
||||||
|
<div>{listIdx}</div>
|
||||||
|
{(item.replyLc * 1 ? true : false) &&
|
||||||
|
<><div className="al reply">
|
||||||
|
{item.nttSj}
|
||||||
|
</div></>}
|
||||||
|
{(item.replyLc * 1 ? false : true) &&
|
||||||
|
<><div className="al">
|
||||||
|
{item.nttSj}
|
||||||
|
</div></>}
|
||||||
|
<div>{item.frstRegisterNm}</div>
|
||||||
|
<div>{item.frstRegisterPnttm}</div>
|
||||||
|
<div>{item.inqireCo}</div>
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
if(!mutListTag.length) mutListTag.push(<p className="no_data" key="0">검색된 결과가 없습니다.</p>); // 게시판 목록 초기값
|
||||||
|
setListTag(mutListTag);
|
||||||
|
},
|
||||||
|
function (resp) {
|
||||||
|
console.log("err response : ", resp);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
*/
|
||||||
|
},[]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
retrieveList(searchCondition);
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container">
|
<div className="container">
|
||||||
List
|
<div className="c_wrap">
|
||||||
|
<div className="location">
|
||||||
|
<ul>
|
||||||
|
<li><Link to={URL.MAIN} className="home">Home</Link></li>
|
||||||
|
<li>사이트관리</li>
|
||||||
|
<li>사용자 관리</li>
|
||||||
|
<li><Link to={URL.ADMIN__USERS__LIST}>사용자 목록</Link></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div className="layout">
|
||||||
|
{/* <!-- Navigation --> */}
|
||||||
|
<EgovLeftNav activeKey={"1"}></EgovLeftNav>
|
||||||
|
<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">
|
||||||
|
<label className="f_select" htmlFor="sel1">
|
||||||
|
<select id="sel1" title="조건" defaultValue={searchCondition.searchCnd} ref={cndRef}
|
||||||
|
onChange={e => {cndRef.current.value = e.target.value;}}>
|
||||||
|
<option value="0">전체</option>
|
||||||
|
<option value="1">일반사용자</option>
|
||||||
|
<option value="2">관리자</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li className="third_1 L">
|
||||||
|
<label className="f_select" htmlFor="sel1">
|
||||||
|
<select id="sel1" title="조건" defaultValue={searchCondition.searchCnd} ref={cndRef}
|
||||||
|
onChange={e => {cndRef.current.value = e.target.value;}}>
|
||||||
|
<option value="0">아이디</option>
|
||||||
|
<option value="1">이름</option>
|
||||||
|
<option value="2">이메일</option>
|
||||||
|
<option value="3">전화번호</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li className="third_2 R">
|
||||||
|
<span className="f_search w_500">
|
||||||
|
<input type="text" name="" defaultValue={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>
|
||||||
|
{/*{masterBoard.bbsUseFlag === 'Y' &&
|
||||||
|
<li>
|
||||||
|
<Link to={URL.ADMIN_NOTICE_CREATE} state={{bbsId: bbsId}} className="btn btn_blue_h46 pd35">등록</Link>
|
||||||
|
</li>
|
||||||
|
}*/}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="board_list BRD002">
|
||||||
|
<div className="head">
|
||||||
|
<span>구분</span>
|
||||||
|
<span>아이디</span>
|
||||||
|
<span>이름</span>
|
||||||
|
<span>이메일</span>
|
||||||
|
<span>전화번호</span>
|
||||||
|
<span>상태</span>
|
||||||
|
<span>삭제</span>
|
||||||
|
</div>
|
||||||
|
<div className="result">
|
||||||
|
{listTag}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="board_bot">
|
||||||
|
<EgovPaging pagination={paginationInfo} moveToPage={passedPage => {
|
||||||
|
retrieveList({ ...searchCondition, pageIndex: passedPage, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value })
|
||||||
|
}} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ function EgovLoginContent(props) {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
console.log("EgovLoginContent [location] : ", location);
|
console.log("EgovLoginContent [location] : ", location);
|
||||||
|
|
||||||
const [userInfo, setUserInfo] = useState({ username: '', password: 'default', email: '', userSe: 'USR'});
|
const [userInfo, setUserInfo] = useState({ username: '', password: 'default', email: '', userSe: 'ACC_TP02'});
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
|
||||||
const [saveIDFlag, setSaveIDFlag] = useState(false);
|
const [saveIDFlag, setSaveIDFlag] = useState(false);
|
||||||
|
|
@ -64,7 +64,7 @@ function EgovLoginContent(props) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let data = getLocalItem(KEY_ID);
|
let data = getLocalItem(KEY_ID);
|
||||||
if (data !== null) {
|
if (data !== null) {
|
||||||
setUserInfo({ username: data, password: 'default', email: '', userSe: 'USR' });
|
setUserInfo({ username: data, password: 'default', email: '', userSe: 'ACC_TP02' });
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,7 @@ function CodeViewer(props) {
|
||||||
item.full_content = item.full_content.replace('<table ', '<table class="table table-bordered "')
|
item.full_content = item.full_content.replace('<table ', '<table class="table table-bordered "')
|
||||||
}
|
}
|
||||||
if(item.error_cd !== null){
|
if(item.error_cd !== null){
|
||||||
if(sessionUserSe === "ADM"){
|
if(sessionUserSe === "ACC_TP01"){
|
||||||
item.full_content = "<p class='errorText' id='error"+item.doc_cont_seq+"'>"+item.error_cd+"</p><br>"+
|
item.full_content = "<p class='errorText' id='error"+item.doc_cont_seq+"'>"+item.error_cd+"</p><br>"+
|
||||||
"<div class='input-group w-25 d-none errorEditDiv'>" +
|
"<div class='input-group w-25 d-none errorEditDiv'>" +
|
||||||
"<input type='hidden' class='docContSeq' value='"+item.doc_cont_seq+"' />"+
|
"<input type='hidden' class='docContSeq' value='"+item.doc_cont_seq+"' />"+
|
||||||
|
|
@ -315,7 +315,7 @@ function CodeViewer(props) {
|
||||||
docLinkActionAppend(el)
|
docLinkActionAppend(el)
|
||||||
bookmarkBtnActionAppend(el)
|
bookmarkBtnActionAppend(el)
|
||||||
checkboxActionAppend(el)
|
checkboxActionAppend(el)
|
||||||
if(sessionUserSe === "ADM"){
|
if(sessionUserSe === "ACC_TP01"){
|
||||||
errorTextActionAppend(el)
|
errorTextActionAppend(el)
|
||||||
errorEditSaveBtnActionAppend(el)
|
errorEditSaveBtnActionAppend(el)
|
||||||
errorEditCancelBtnActionAppend(el)
|
errorEditCancelBtnActionAppend(el)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
package com.dbnt.kcscbackend.admin.config;
|
package com.dbnt.kcscbackend.admin.config;
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TcCodeGrp;
|
import com.dbnt.kcscbackend.admin.config.entity.TcCodeGrp;
|
||||||
|
import com.dbnt.kcscbackend.admin.config.entity.TcCodeItem;
|
||||||
import com.dbnt.kcscbackend.admin.config.service.AdminConfigService;
|
import com.dbnt.kcscbackend.admin.config.service.AdminConfigService;
|
||||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
import com.dbnt.kcscbackend.config.common.BaseController;
|
import com.dbnt.kcscbackend.config.common.BaseController;
|
||||||
|
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
||||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
|
|
@ -17,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
@ -46,6 +49,80 @@ public class AdminConfigController extends BaseController {
|
||||||
return resultVO;
|
return resultVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "기본코드 그룹 저장",
|
||||||
|
description = "기본코드 그룹 저장",
|
||||||
|
tags = {"AdminConfigController"}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "저장 성공"),
|
||||||
|
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||||
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
|
})
|
||||||
|
@RequestMapping(method = RequestMethod.POST, value = "/code-grp", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
public ResultVO addCodeGrp(@RequestBody TcCodeGrp codeGrp, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||||
|
ResultVO resultVO = new ResultVO();
|
||||||
|
if(user == null){
|
||||||
|
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||||
|
}else{
|
||||||
|
if(!user.getUserSe().equals("ACC_TP01")){
|
||||||
|
resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage());
|
||||||
|
}else if(codeGrp.getGrpCd().isEmpty()){
|
||||||
|
resultVO.setResultCode(ResponseCode.INPUT_CHECK_ERROR.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.INPUT_CHECK_ERROR.getMessage());
|
||||||
|
}else{
|
||||||
|
codeGrp.setFrstCrtDt(LocalDateTime.now());
|
||||||
|
codeGrp.setFrstCrtId(user.getId());
|
||||||
|
codeGrp.setUseYn("Y");
|
||||||
|
String result = adminConfigService.addCodeGrp(codeGrp);
|
||||||
|
if(result.equals("isSaved")){
|
||||||
|
resultVO.setResultCode(ResponseCode.SAVE_ERROR.getCode());
|
||||||
|
resultVO.setResultMessage("중복되는 코드그룹이 있습니다.");
|
||||||
|
}else{
|
||||||
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "기본코드 그룹 수정",
|
||||||
|
description = "기본코드 그룹 수정",
|
||||||
|
tags = {"AdminConfigController"}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "수정 성공"),
|
||||||
|
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||||
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
|
})
|
||||||
|
@RequestMapping(method = RequestMethod.PUT, value = "/code-grp", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
public ResultVO modifyCodeGrp(@RequestBody TcCodeGrp codeGrp, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||||
|
ResultVO resultVO = new ResultVO();
|
||||||
|
if(user == null){
|
||||||
|
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||||
|
}else{
|
||||||
|
if(!user.getUserSe().equals("ACC_TP01")){
|
||||||
|
resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage());
|
||||||
|
}else if(codeGrp.getGrpCd().isEmpty()){
|
||||||
|
resultVO.setResultCode(ResponseCode.INPUT_CHECK_ERROR.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.INPUT_CHECK_ERROR.getMessage());
|
||||||
|
}else{
|
||||||
|
codeGrp.setLastChgDt(LocalDateTime.now());
|
||||||
|
codeGrp.setLastChgId(user.getId());
|
||||||
|
String result = adminConfigService.modifyCodeGrp(codeGrp);
|
||||||
|
if(result.equals("modified")){
|
||||||
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
}else{
|
||||||
|
resultVO.setResultCode(ResponseCode.SAVE_ERROR.getCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultVO;
|
||||||
|
}
|
||||||
|
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "기본코드 아이템 조회",
|
summary = "기본코드 아이템 조회",
|
||||||
description = "기본코드 아이템 조회",
|
description = "기본코드 아이템 조회",
|
||||||
|
|
@ -65,8 +142,8 @@ public class AdminConfigController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "기본코드 그룹 저장",
|
summary = "기본코드 아이템 저장",
|
||||||
description = "기본코드 그룹 저장",
|
description = "기본코드 아이템 저장",
|
||||||
tags = {"AdminConfigController"}
|
tags = {"AdminConfigController"}
|
||||||
)
|
)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
|
|
@ -74,22 +151,68 @@ public class AdminConfigController extends BaseController {
|
||||||
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@RequestMapping(method = RequestMethod.POST, value = "/code-grp", consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(method = RequestMethod.POST, value = "/code-item", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResultVO addCodeGrp(@RequestBody TcCodeGrp codeGrp, @AuthenticationPrincipal LoginVO user) throws Exception{
|
public ResultVO addCodeItem(@RequestBody TcCodeItem codeItem, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
if(user == null){
|
if(user == null){
|
||||||
resultVO.setResultCode(303);
|
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||||
}else{
|
}else{
|
||||||
if(!user.getUserSe().equals("ADM")){
|
if(!user.getUserSe().equals("ACC_TP01")){
|
||||||
resultVO.setResultCode(403);
|
resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage());
|
||||||
|
}else if(codeItem.getGrpCd()==null || codeItem.getGrpCd().isEmpty()){
|
||||||
|
resultVO.setResultCode(ResponseCode.INPUT_CHECK_ERROR.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.INPUT_CHECK_ERROR.getMessage());
|
||||||
}else{
|
}else{
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
codeItem.setFrstCrtDt(LocalDateTime.now());
|
||||||
adminConfigService.addCodeGrp(codeGrp);
|
codeItem.setFrstCrtId(user.getId());
|
||||||
//resultMap.put("codeGrpList", );
|
codeItem.setUseYn("Y");
|
||||||
resultVO.setResult(resultMap);
|
String result = adminConfigService.addCodeItem(codeItem);
|
||||||
resultVO.setResultCode(200);
|
if(result.equals("isSaved")){
|
||||||
|
resultVO.setResultCode(ResponseCode.SAVE_ERROR.getCode());
|
||||||
|
resultVO.setResultMessage("중복되는 코드가 있습니다.");
|
||||||
|
}else{
|
||||||
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return resultVO;
|
return resultVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "기본코드 아이템 수정",
|
||||||
|
description = "기본코드 아이템 수정",
|
||||||
|
tags = {"AdminConfigController"}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "수정 성공"),
|
||||||
|
@ApiResponse(responseCode = "303", description = "만료된 토큰"),
|
||||||
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
|
})
|
||||||
|
@RequestMapping(method = RequestMethod.PUT, value = "/code-item", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
public ResultVO modifyCodeItem(@RequestBody TcCodeItem codeItem, @AuthenticationPrincipal LoginVO user) throws Exception{
|
||||||
|
ResultVO resultVO = new ResultVO();
|
||||||
|
if(user == null){
|
||||||
|
resultVO.setResultCode(ResponseCode.TOKEN_EXPIRED.getCode());
|
||||||
|
}else{
|
||||||
|
if(!user.getUserSe().equals("ACC_TP01")){
|
||||||
|
resultVO.setResultCode(ResponseCode.AUTH_ERROR.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.AUTH_ERROR.getMessage());
|
||||||
|
}else if(codeItem.getGrpCd().isEmpty()){
|
||||||
|
resultVO.setResultCode(ResponseCode.INPUT_CHECK_ERROR.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.INPUT_CHECK_ERROR.getMessage());
|
||||||
|
}else{
|
||||||
|
codeItem.setLastChgDt(LocalDateTime.now());
|
||||||
|
codeItem.setLastChgId(user.getId());
|
||||||
|
String result = adminConfigService.modifyCodeItem(codeItem);
|
||||||
|
if(result.equals("modified")){
|
||||||
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
}else{
|
||||||
|
resultVO.setResultCode(ResponseCode.SAVE_ERROR.getCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultVO;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
package com.dbnt.kcscbackend.admin.config.mapper;
|
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface AdminConfigMapper {
|
|
||||||
}
|
|
||||||
|
|
@ -3,5 +3,8 @@ package com.dbnt.kcscbackend.admin.config.repository;
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TcCodeGrp;
|
import com.dbnt.kcscbackend.admin.config.entity.TcCodeGrp;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface TcCodeGrpRepository extends JpaRepository<TcCodeGrp, String> {
|
public interface TcCodeGrpRepository extends JpaRepository<TcCodeGrp, String> {
|
||||||
|
List<TcCodeGrp> findByUseYn(String useYn);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface TcCodeItemRepository extends JpaRepository<TcCodeItem, TcCodeItem.TcCodeItemId> {
|
public interface TcCodeItemRepository extends JpaRepository<TcCodeItem, TcCodeItem.TcCodeItemId> {
|
||||||
List<TcCodeItem> findByGrpCdOrderByGrpOrder(String grpCd);
|
List<TcCodeItem> findByGrpCdAndUseYnOrderByGrpOrder(String grpCd, String useYn);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ package com.dbnt.kcscbackend.admin.config.service;
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TcCodeGrp;
|
import com.dbnt.kcscbackend.admin.config.entity.TcCodeGrp;
|
||||||
import com.dbnt.kcscbackend.admin.config.entity.TcCodeItem;
|
import com.dbnt.kcscbackend.admin.config.entity.TcCodeItem;
|
||||||
import com.dbnt.kcscbackend.admin.config.mapper.AdminConfigMapper;
|
|
||||||
import com.dbnt.kcscbackend.admin.config.repository.TcCodeGrpRepository;
|
import com.dbnt.kcscbackend.admin.config.repository.TcCodeGrpRepository;
|
||||||
import com.dbnt.kcscbackend.admin.config.repository.TcCodeItemRepository;
|
import com.dbnt.kcscbackend.admin.config.repository.TcCodeItemRepository;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
@ -18,18 +17,82 @@ public class AdminConfigService extends EgovAbstractServiceImpl {
|
||||||
|
|
||||||
private final TcCodeGrpRepository codeGrpRepository;
|
private final TcCodeGrpRepository codeGrpRepository;
|
||||||
private final TcCodeItemRepository codeItemRepository;
|
private final TcCodeItemRepository codeItemRepository;
|
||||||
private final AdminConfigMapper adminConfigMapper;
|
|
||||||
|
|
||||||
public List<TcCodeGrp> selectCodeGrpList(){
|
public List<TcCodeGrp> selectCodeGrpList(){
|
||||||
return codeGrpRepository.findAll();
|
return codeGrpRepository.findByUseYn("Y");
|
||||||
}
|
|
||||||
|
|
||||||
public List<TcCodeItem> selectCodeItemList(String grpCd){
|
|
||||||
return codeItemRepository.findByGrpCdOrderByGrpOrder(grpCd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void addCodeGrp(TcCodeGrp codeGrp) {
|
public String addCodeGrp(TcCodeGrp codeGrp) {
|
||||||
codeGrpRepository.save(codeGrp);
|
TcCodeGrp savedGrp = codeGrpRepository.findById(codeGrp.getGrpCd()).orElse(null);
|
||||||
|
if(savedGrp!=null){
|
||||||
|
if(savedGrp.getUseYn().equals("Y")){
|
||||||
|
return "isSaved";
|
||||||
|
}else{
|
||||||
|
savedGrp.setGrpCdNm(codeGrp.getGrpCdNm());
|
||||||
|
savedGrp.setUseYn("Y");
|
||||||
|
codeGrpRepository.save(savedGrp);
|
||||||
|
return savedGrp.getGrpCd();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
codeGrpRepository.save(codeGrp);
|
||||||
|
return codeGrp.getGrpCd();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public String modifyCodeGrp(TcCodeGrp codeGrp) {
|
||||||
|
TcCodeGrp savedGrp = codeGrpRepository.findById(codeGrp.getGrpCd()).orElse(null);
|
||||||
|
if (savedGrp != null) {
|
||||||
|
savedGrp.setGrpCdNm(codeGrp.getGrpCdNm());
|
||||||
|
savedGrp.setLastChgId(codeGrp.getLastChgId());
|
||||||
|
savedGrp.setLastChgDt(codeGrp.getLastChgDt());
|
||||||
|
savedGrp.setUseYn(codeGrp.getUseYn());
|
||||||
|
codeGrpRepository.save(savedGrp);
|
||||||
|
return "modified";
|
||||||
|
}else{
|
||||||
|
return "validGrpCd";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TcCodeItem> selectCodeItemList(String grpCd){
|
||||||
|
return codeItemRepository.findByGrpCdAndUseYnOrderByGrpOrder(grpCd, "Y");
|
||||||
|
}
|
||||||
|
@Transactional
|
||||||
|
public String addCodeItem(TcCodeItem codeItem) {
|
||||||
|
TcCodeItem savedItem = codeItemRepository.findById(
|
||||||
|
new TcCodeItem.TcCodeItemId(codeItem.getItemCd(), codeItem.getGrpCd())
|
||||||
|
).orElse(null);
|
||||||
|
if(savedItem!=null){
|
||||||
|
if(savedItem.getUseYn().equals("Y")){
|
||||||
|
return "isSaved";
|
||||||
|
}else{
|
||||||
|
savedItem.setItemNm(savedItem.getItemNm());
|
||||||
|
savedItem.setUseYn("Y");
|
||||||
|
codeItemRepository.save(savedItem);
|
||||||
|
return savedItem.getGrpCd();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
codeItemRepository.save(codeItem);
|
||||||
|
return codeItem.getItemCd();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public String modifyCodeItem(TcCodeItem codeItem) {
|
||||||
|
TcCodeItem savedItem = codeItemRepository.findById(
|
||||||
|
new TcCodeItem.TcCodeItemId(codeItem.getItemCd(), codeItem.getGrpCd())
|
||||||
|
).orElse(null);
|
||||||
|
if (savedItem != null) {
|
||||||
|
savedItem.setItemNm(codeItem.getItemNm());
|
||||||
|
savedItem.setLastChgId(codeItem.getLastChgId());
|
||||||
|
savedItem.setLastChgDt(codeItem.getLastChgDt());
|
||||||
|
savedItem.setGrpOrder(codeItem.getGrpOrder());
|
||||||
|
savedItem.setUseYn(codeItem.getUseYn());
|
||||||
|
codeItemRepository.save(savedItem);
|
||||||
|
return "modified";
|
||||||
|
}else{
|
||||||
|
return "validGrpCd";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
package com.dbnt.kcscbackend.admin.logs;
|
||||||
|
|
||||||
|
import com.dbnt.kcscbackend.admin.logs.entity.ThPrivacyLog;
|
||||||
|
import com.dbnt.kcscbackend.admin.logs.service.AdminLogsService;
|
||||||
|
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
|
import com.dbnt.kcscbackend.config.common.BaseController;
|
||||||
|
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
||||||
|
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.egovframe.rte.fdl.property.EgovPropertyService;
|
||||||
|
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/admin/logs")
|
||||||
|
@Tag(name="AdminLogsController", description = "사이트관리 로그현황 메뉴 컨트롤러")
|
||||||
|
public class AdminLogsController extends BaseController {
|
||||||
|
|
||||||
|
@Resource(name = "propertiesService")
|
||||||
|
protected EgovPropertyService propertyService;
|
||||||
|
|
||||||
|
private final AdminLogsService adminLogsService;
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "로그현황 - 개인정보 로그",
|
||||||
|
description = "개인정보 로그현황",
|
||||||
|
tags = {"AdminLogsController"}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||||
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
|
})
|
||||||
|
@RequestMapping(method = RequestMethod.POST, value = "/privacy", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
public ResultVO selectPrivacyLogsList(@RequestBody ThPrivacyLog thPrivacyLog, @AuthenticationPrincipal LoginVO user)
|
||||||
|
throws Exception {
|
||||||
|
|
||||||
|
ResultVO resultVO = new ResultVO();
|
||||||
|
Map<String, Object> resultMap = adminLogsService.selectPrivacyList();
|
||||||
|
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
|
||||||
|
paginationInfo.setCurrentPageNo(thPrivacyLog.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(propertyService.getInt("Globals.pageUnit"));
|
||||||
|
paginationInfo.setPageSize(propertyService.getInt("Globals.pageSize"));
|
||||||
|
|
||||||
|
thPrivacyLog.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
thPrivacyLog.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
thPrivacyLog.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
int totCnt = Integer.parseInt((String)resultMap.get("resultCnt"));
|
||||||
|
paginationInfo.setTotalRecordCount(totCnt);
|
||||||
|
|
||||||
|
// resultMap.put("resultList", adminLogsService.selectPrivacyList());
|
||||||
|
// resultMap.put("resultList", resultMap.get("resultList"));
|
||||||
|
// resultMap.put("resultCnt", totCnt);
|
||||||
|
resultMap.put("paginationInfo", paginationInfo);
|
||||||
|
|
||||||
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||||
|
resultVO.setResult(resultMap);
|
||||||
|
return resultVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
package com.dbnt.kcscbackend.admin.logs.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.hibernate.annotations.DynamicInsert;
|
||||||
|
import org.hibernate.annotations.DynamicUpdate;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Entity
|
||||||
|
@NoArgsConstructor
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@Table(name = "th_user_privacy_log")
|
||||||
|
public class ThPrivacyLog implements Serializable {
|
||||||
|
private static final long serialVersionUID = -3779821913760046011L;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "검색시작일")
|
||||||
|
private String searchBgnDe = "";
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "검색조건")
|
||||||
|
private String searchCnd = "";
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "검색종료일")
|
||||||
|
private String searchEndDe = "";
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "검색단어")
|
||||||
|
private String searchWrd = "";
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "정렬순서(DESC,ASC)")
|
||||||
|
private long sortOrdr = 0L;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "검색사용여부")
|
||||||
|
private String searchUseYn = "";
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "현재페이지")
|
||||||
|
private int pageIndex = 1;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "페이지갯수")
|
||||||
|
private int pageUnit = 10;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "페이지사이즈")
|
||||||
|
private int pageSize = 10;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "첫페이지 인덱스")
|
||||||
|
private int firstIndex = 1;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "마지막페이지 인덱스")
|
||||||
|
private int lastIndex = 1;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "페이지당 레코드 개수")
|
||||||
|
private int recordCountPerPage = 10;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@Schema(description = "레코드 번호")
|
||||||
|
private int rowNo = 0;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "upl_seq")
|
||||||
|
private Long uplSeq;
|
||||||
|
|
||||||
|
@Column(name = "user_id")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Column(name = "target_user_id")
|
||||||
|
private String targetUserId;
|
||||||
|
|
||||||
|
@Column(name = "access_type")
|
||||||
|
private String accessType;
|
||||||
|
|
||||||
|
@Column(name = "ip_address")
|
||||||
|
private String ipAddress;
|
||||||
|
|
||||||
|
@Column(name = "access_dt")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate accessDt;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.dbnt.kcscbackend.admin.logs.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AdminLogsMapper {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.dbnt.kcscbackend.admin.logs.repository;
|
||||||
|
|
||||||
|
import com.dbnt.kcscbackend.admin.logs.entity.ThPrivacyLog;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PrivacyLogsRepository extends JpaRepository<ThPrivacyLog, String> {
|
||||||
|
long count(); // 전체 레코드 수를 반환하는 메서드
|
||||||
|
|
||||||
|
List<ThPrivacyLog> findAllByOrderByUplSeqDesc();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.dbnt.kcscbackend.admin.logs.service;
|
||||||
|
|
||||||
|
import com.dbnt.kcscbackend.admin.logs.entity.ThPrivacyLog;
|
||||||
|
import com.dbnt.kcscbackend.admin.logs.repository.PrivacyLogsRepository;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AdminLogsService extends EgovAbstractServiceImpl {
|
||||||
|
|
||||||
|
private final PrivacyLogsRepository privacyLogsRepository;
|
||||||
|
|
||||||
|
// public List<ThPrivacyLog> selectPrivacyList(){
|
||||||
|
// return privacyLogsRepository.findAll();
|
||||||
|
// }
|
||||||
|
public Map<String, Object> selectPrivacyList() {
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
||||||
|
// 전체 레코드 수 가져오기
|
||||||
|
long totalRecordCount = privacyLogsRepository.count();
|
||||||
|
|
||||||
|
// 개수를 resultMap에 추가
|
||||||
|
resultMap.put("resultCnt", String.valueOf(totalRecordCount));
|
||||||
|
|
||||||
|
// 개인 정보 로그 리스트 가져오기
|
||||||
|
List<ThPrivacyLog> privacyLogList = privacyLogsRepository.findAllByOrderByUplSeqDesc();
|
||||||
|
|
||||||
|
// 결과를 resultMap에 추가
|
||||||
|
resultMap.put("resultList", privacyLogList);
|
||||||
|
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.dbnt.kcscbackend.admin.users;
|
||||||
|
|
||||||
|
|
||||||
|
import com.dbnt.kcscbackend.admin.users.service.AdminUsersService;
|
||||||
|
import com.dbnt.kcscbackend.config.common.BaseController;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/admin/users")
|
||||||
|
@Tag(name="AdminConfigController", description = "사이트관리 사용자관리 메뉴 컨트롤러")
|
||||||
|
public class AdminUsersController extends BaseController {
|
||||||
|
|
||||||
|
private final AdminUsersService adminUsersService;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.dbnt.kcscbackend.admin.users.mapper;
|
||||||
|
|
||||||
|
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일반 로그인을 처리하는 비즈니스 구현 클래스
|
||||||
|
* @author 공통서비스 개발팀 박지욱
|
||||||
|
* @since 2009.03.06
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.03.06 박지욱 최초 생성
|
||||||
|
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface AdminUsersMapper {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.dbnt.kcscbackend.admin.users.service;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AdminUsersService {
|
||||||
|
}
|
||||||
|
|
@ -88,7 +88,7 @@ public class EgovLoginApiController extends BaseController {
|
||||||
msg.append(error.getDefaultMessage());
|
msg.append(error.getDefaultMessage());
|
||||||
msg.append("\n");
|
msg.append("\n");
|
||||||
}
|
}
|
||||||
resultMap.put("resultCode", ResponseCode.SAVE_ERROR.getCode());
|
resultMap.put("resultCode", ResponseCode.INPUT_CHECK_ERROR.getCode());
|
||||||
resultMap.put("resultMessage", msg.toString());
|
resultMap.put("resultMessage", msg.toString());
|
||||||
}else if(!loginVO.getPassword().equals(loginVO.getPasswordChk())){
|
}else if(!loginVO.getPassword().equals(loginVO.getPasswordChk())){
|
||||||
resultMap.put("resultCode", ResponseCode.SAVE_ERROR.getCode());
|
resultMap.put("resultCode", ResponseCode.SAVE_ERROR.getCode());
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public class LoginVO implements Serializable{
|
||||||
@NotBlank(message = "비밀번호확인을 입력해주세요.")
|
@NotBlank(message = "비밀번호확인을 입력해주세요.")
|
||||||
private String passwordChk;
|
private String passwordChk;
|
||||||
|
|
||||||
@Schema(description = "사용자 구분", allowableValues = {"ADM", "USR"}, defaultValue = "USR")
|
@Schema(description = "사용자 구분", allowableValues = {"ACC_TP01", "ACC_TP02"}, defaultValue = "ACC_TP02")
|
||||||
private String userSe;
|
private String userSe;
|
||||||
|
|
||||||
@Schema(description = "이름")
|
@Schema(description = "이름")
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ package com.dbnt.kcscbackend.config.common;
|
||||||
public enum ResponseCode {
|
public enum ResponseCode {
|
||||||
|
|
||||||
SUCCESS(200, "성공했습니다."),
|
SUCCESS(200, "성공했습니다."),
|
||||||
|
FAILED(300, "실패하였습니다."),
|
||||||
|
TOKEN_EXPIRED(303, "만료된 토큰입니다."),
|
||||||
AUTH_ERROR(403, "인가된 사용자가 아닙니다."),
|
AUTH_ERROR(403, "인가된 사용자가 아닙니다."),
|
||||||
DELETE_ERROR(700, "삭제 중 내부 오류가 발생했습니다."),
|
DELETE_ERROR(700, "삭제 중 내부 오류가 발생했습니다."),
|
||||||
SAVE_ERROR(800, "저장시 내부 오류가 발생했습니다."),
|
SAVE_ERROR(800, "저장시 내부 오류가 발생했습니다."),
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ public class StandardCodeController extends BaseController {
|
||||||
if(user == null){
|
if(user == null){
|
||||||
resultVO.setResultCode(303);
|
resultVO.setResultCode(303);
|
||||||
}else{
|
}else{
|
||||||
if(!user.getUserSe().equals("ADM")){
|
if(!user.getUserSe().equals("ACC_TP01")){
|
||||||
resultVO.setResultCode(403);
|
resultVO.setResultCode(403);
|
||||||
}else{
|
}else{
|
||||||
standardCodeService.saveErrorCd(content);
|
standardCodeService.saveErrorCd(content);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.dbnt.kcscbackend.admin.config.mapper.AdminConfigMapper">
|
<mapper namespace="com.dbnt.kcscbackend.admin.users.mapper.AdminUsersMapper">
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue