- 시스템관리 > 관리자목록조회, 관리자등록, 관리자수정, 관리자삭제, 관리자상세조회
@@ -105,6 +105,9 @@ dependencies {
|
||||
// https://mvnrepository.com/artifact/commons-dbcp/commons-dbcp
|
||||
implementation group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4'
|
||||
|
||||
// validation
|
||||
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
||||
|
||||
}
|
||||
|
||||
bootJar {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "hub-web-easy",
|
||||
"name": "mhez-admin-web",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"proxy":"http://localhost:7070",
|
||||
|
||||
@@ -31,6 +31,7 @@ footer,header,hgroup,menu,nav,section {
|
||||
display:block;
|
||||
}
|
||||
table {
|
||||
font-family: 'SpoqaHanSansNeo';
|
||||
border-collapse:collapse;
|
||||
border:0 none;
|
||||
}
|
||||
@@ -38,16 +39,28 @@ input, select, option{
|
||||
font-family: 'SpoqaHanSansNeo';
|
||||
}
|
||||
input:focus{
|
||||
outline: 1px solid #000;
|
||||
border: 1px solid #000 !important;
|
||||
}
|
||||
|
||||
input:focus + label{
|
||||
color:#000;
|
||||
}
|
||||
|
||||
input:valid + label{
|
||||
color:#000;
|
||||
}
|
||||
|
||||
|
||||
select:focus{
|
||||
outline: 1px solid #000;
|
||||
border: 1px solid #000 !important;
|
||||
}
|
||||
|
||||
|
||||
input[type="checkbox"] + label{
|
||||
cursor: pointer;
|
||||
}
|
||||
input:disabled{
|
||||
background-color: #eeeeee;
|
||||
background-color: #eeeeee; border:1px solid #e7e7e7 !important;
|
||||
}
|
||||
input[type="radio"]{
|
||||
display:none;
|
||||
|
||||
@@ -5,31 +5,58 @@ SpoqaHanSansNeo
|
||||
======================*/
|
||||
@font-face {
|
||||
font-family: 'SpoqaHanSansNeo';
|
||||
src: url('../font/SpoqaHanSansNeo-Thin.woff') format('woff');
|
||||
src: url('../font/SpoqaHanSansNeo-Thin.woff2') format('woff2');
|
||||
font-weight: 100;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'SpoqaHanSansNeo';
|
||||
src: url('../font/SpoqaHanSansNeo-Light.woff') format('woff');
|
||||
src: url('../font/SpoqaHanSansNeo-Light.woff2') format('woff2');
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'SpoqaHanSansNeo';
|
||||
src: url('../font/SpoqaHanSansNeo-Regular.woff') format('woff');
|
||||
src: url('../font/SpoqaHanSansNeo-Regular.woff2') format('woff2');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'SpoqaHanSansNeo';
|
||||
src: url('../font/SpoqaHanSansNeo-Medium.woff') format('woff');
|
||||
src: url('../font/SpoqaHanSansNeo-Medium.woff2') format('woff2');
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'SpoqaHanSansNeo';
|
||||
src: url('../font/SpoqaHanSansNeo-Bold.woff') format('woff');
|
||||
src: url('../font/SpoqaHanSansNeo-Bold.woff2') format('woff2');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
/*======================
|
||||
LGSmHa
|
||||
======================*/
|
||||
@font-face {
|
||||
font-family: 'LGSmHa';
|
||||
src: url('../font/LGSmHaL.woff2') format('woff2');
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'LGSmHa';
|
||||
src: url('../font/LGSmHaR.woff2') format('woff2');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'LGSmHa';
|
||||
src: url('../font/LGSmHaSB.woff2') format('woff2');
|
||||
font-weight: 600;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'LGSmHa';
|
||||
src: url('../font/LGSmHaB.woff2') format('woff2');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -45,6 +72,16 @@ body{
|
||||
.div-cont {width: 1200px; padding: 0 30px; box-sizing: border-box; margin: auto;}
|
||||
|
||||
|
||||
/*
|
||||
#스크롤바
|
||||
*/
|
||||
::-webkit-scrollbar {width:5px; height: 5px; border: 0px solid #fff; background: rgba(140, 140, 140, 0.0);}
|
||||
::-webkit-scrollbar-button:start:decrement, ::-webkit-scrollbar-button:end:increment {display: block; height: 4px; background:rgba(0,0,0,0)}
|
||||
::-webkit-scrollbar-track {background: rgba(140,140,140,0.0); -webkit-border-radius: 10px; border-radius:10px; -webkit-box-shadow: inset 0 0 4px rgba(0,0,0,.0)}
|
||||
::-webkit-scrollbar-thumb {height: 50px; width: 50px; background: rgba(20,20, 20, .1); -webkit-border-radius: 8px; border-radius: 8px; -webkit-box-shadow: inset 0 0 4px rgba(0,0,0,.0)}
|
||||
|
||||
|
||||
|
||||
|
||||
/*======================
|
||||
#logo
|
||||
@@ -81,9 +118,13 @@ body{
|
||||
.dimmed.open {display: block !important;}
|
||||
.popup-wrap {display: none;}
|
||||
.popup-wrap.open {display: block !important;}
|
||||
.popup {width: 390px; border-radius: 8px; background: #fff; padding: 0 30px; box-sizing: border-box; border: 1px solid rgba(197,197,197,0.36); box-shadow: 2px 2px 8px rgba(171,171,171,0.30); position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); -o-transform: translate(-50%,-50%); display: none;}
|
||||
.popup {width: 390px; border-radius: 12px; background: #fff; padding: 0 30px; box-sizing: border-box; border: 1px solid rgba(197,197,197,0.36); box-shadow: 2px 2px 8px rgba(171,171,171,0.30); position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); -o-transform: translate(-50%,-50%); display: none;
|
||||
max-height: 90vh; overflow: auto;}/*스크린 height 100%를 벗어나는 긴 팝업의 경우 추가 class*/
|
||||
|
||||
.popup.open {display: block !important;}
|
||||
.popup .pop-head {padding: 30px 0 25px;}
|
||||
.popup .pop-head {padding: 30px 0 25px;
|
||||
position: sticky; z-index: 999; top:0; left:30px; background: #fff; /*팝업 스크롤 시 타이틀 고정 */
|
||||
}
|
||||
.popup .pop-head .pop-tit {font-size: 18px; color: #222222; letter-spacing: -1px; line-height: 100%;}
|
||||
.popup .btn-close {width: 30px; height: 30px; position: absolute; top: 0; right: 0; background: url("../images/icon-close.png") no-repeat center center; background-size: 11px; border: none;}
|
||||
.popup .pop-cont {}
|
||||
@@ -91,8 +132,8 @@ body{
|
||||
.popup .pop-cont p + p {margin-top: 10px;}
|
||||
.popup .pop-btn1 {display: flex; justify-content: flex-end; align-items: center; margin: 35px 0 25px;}
|
||||
.popup .pop-btn2 {display: flex; justify-content: space-between; align-items: center; margin: 35px 0 25px;}
|
||||
.popup .pop-btn1 button {width: 49%; height: 42px; font-size: 16px; font-weight: 400; letter-spacing: -1.1px;}
|
||||
.popup .pop-btn2 button {width: 49%; height: 42px; font-size: 16px; font-weight: 400; letter-spacing: -1.1px;}
|
||||
.popup .pop-btn1 button {width: 49%; height: 40px; font-size: 16px; font-weight: 400; letter-spacing: -1.1px;}
|
||||
.popup .pop-btn2 button {width: 49%; height: 40px; font-size: 16px; font-weight: 400; letter-spacing: -1.1px;}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ header .user_wrap .user_info .logout {
|
||||
.main_menu > li.stats.is-current .menu_btn { background-image: url(../images/icon-stats-on.png); }
|
||||
.main_menu > li.system.is-current .menu_btn { background-image: url(../images/icon-system-on.png); }
|
||||
|
||||
.main_menu > li .sub_menu_wrap { padding:0 10px 10px; display:none; }
|
||||
.main_menu > li .sub_menu_wrap { padding:0 10px 10px; display:none; margin-top: 5px; }
|
||||
.main_menu > li.is-current .sub_menu_wrap { display: block; }
|
||||
|
||||
|
||||
@@ -317,7 +317,6 @@ header .user_wrap .user_info .logout {
|
||||
|
||||
|
||||
|
||||
|
||||
.contents {
|
||||
padding: 0 4.16vw;
|
||||
width: 100%;
|
||||
@@ -332,7 +331,7 @@ header .user_wrap .user_info .logout {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
border-radius: 24px;
|
||||
padding: 15px 0;
|
||||
padding: 0 0 15px 0;
|
||||
margin-bottom: 70px;
|
||||
}
|
||||
|
||||
@@ -351,8 +350,8 @@ header .user_wrap .user_info .logout {
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #d5d3e6;
|
||||
padding: 0 40px;
|
||||
margin-bottom: 27px;
|
||||
padding: 21px 0px 0 0px;
|
||||
margin: 0 40px 27px 40px;
|
||||
}
|
||||
|
||||
.contents .top_wrap .title {
|
||||
@@ -370,6 +369,33 @@ header .user_wrap .user_info .logout {
|
||||
letter-spacing: -0.025em;
|
||||
}
|
||||
|
||||
|
||||
.contents .top_tab {
|
||||
position: relative; margin: 0 40px; height: 45px; border-bottom: 1px solid #ddddeb; margin-bottom: 40px; display: flex;
|
||||
font-size: 16px; text-align: center ;
|
||||
}
|
||||
|
||||
|
||||
.contents .top_tab a.on {
|
||||
background: url("../images/tab_arrow.png") #fff no-repeat; background-position: 20px center; border: 1px solid #ddddeb; border-bottom: 1px solid #ffffff;
|
||||
color: #d82e89; font-weight: 500;
|
||||
}
|
||||
.contents .top_tab a.on:hover {
|
||||
background: url("../images/tab_arrow.png") #fff no-repeat; background-position: 20px center; border: 1px solid #ddddeb; border-bottom: 1px solid #ffffff;
|
||||
color: #d82e89; font-weight: 500;
|
||||
}
|
||||
|
||||
.contents .top_tab a {
|
||||
background: #ececf3; border: 1px solid #ececf3; border-bottom: 1px solid #ddddeb; height: 45px;padding: 10px 20px; min-width: 180px; display: inline-block; border-radius: 9px 9px 0 0 ; cursor: pointer;
|
||||
color: #a5a5bd;font-weight: 500;
|
||||
}
|
||||
|
||||
.contents .top_tab a:hover {
|
||||
background: #bdbde0; border: 1px solid #bdbde0; border-bottom: 1px solid #ddddeb;
|
||||
color: #ffffff;font-weight: 500;
|
||||
}
|
||||
|
||||
|
||||
.contents .search_wrap {
|
||||
background-color: #f6f6f8;
|
||||
display: -webkit-box;
|
||||
@@ -381,6 +407,17 @@ header .user_wrap .user_info .logout {
|
||||
align-items: flex-end;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 50px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.contents .search_wrap .group{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.contents .search_wrap .group + .group{
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.contents .search_wrap button.grey {
|
||||
@@ -410,7 +447,7 @@ header .user_wrap .user_info .logout {
|
||||
color: #a3a3a3;
|
||||
}
|
||||
|
||||
.contents .select_box select {
|
||||
.contents select {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
border: 1px solid #c9c9c9;
|
||||
@@ -430,6 +467,14 @@ header .user_wrap .user_info .logout {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.contents .NumberSe {
|
||||
float:right;
|
||||
min-width:90px;
|
||||
width:auto;
|
||||
margin-left:10px;
|
||||
margin-top:-7px;
|
||||
}
|
||||
|
||||
.contents .input_box {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
@@ -449,14 +494,19 @@ header .user_wrap .user_info .logout {
|
||||
color: #a3a3a3;
|
||||
}
|
||||
|
||||
|
||||
.contents .input_box .label:focus {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.contents .input_box input {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
border: 1px solid #c9c9c9;
|
||||
position: relative;
|
||||
background: url(../images/icon-search.png) no-repeat 6% center/14px auto;
|
||||
background-color: #fff;
|
||||
padding-left: 43px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
@@ -476,12 +526,12 @@ header .user_wrap .user_info .logout {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
||||
.contents .input_box.id {
|
||||
.contents .id {
|
||||
position: relative;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.contents .input_box.id:before {
|
||||
.contents .id:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
@@ -491,6 +541,95 @@ header .user_wrap .user_info .logout {
|
||||
background-color: #e8e8f1;
|
||||
}
|
||||
|
||||
/* input cal + search-box*/
|
||||
.w35{width:35%;}
|
||||
.contents .table.table_form.m50{margin-bottom: 50px;}
|
||||
|
||||
.contents .input_box.cal{
|
||||
display: inline-block;
|
||||
width: 27.34%;
|
||||
}
|
||||
|
||||
.contents .input_box.cal label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.contents .input_box.cal input {
|
||||
display: inline-block;
|
||||
width: 48%;
|
||||
float: left;
|
||||
background: #fff url(../images/icon-calender.png) no-repeat right 6% center;
|
||||
}
|
||||
.contents .input_box.cal input + input{
|
||||
margin-left: 4%;
|
||||
}
|
||||
|
||||
.contents .input_box.cal .description{
|
||||
position: absolute; margin: 10px 0 0 10px; color:#666; font-size: 13px; font-weight: 400;
|
||||
}
|
||||
|
||||
.contents .input_box .search-box {
|
||||
background: #fff url(../images/icon-search.png) no-repeat 6% center/14px auto;
|
||||
padding-left: 43px;
|
||||
}
|
||||
|
||||
.input-address input:nth-child(1){
|
||||
width: 98px;
|
||||
}
|
||||
|
||||
.input-address input:nth-child(2){
|
||||
width: calc(100% - 480px);
|
||||
}
|
||||
|
||||
.input-address input:nth-child(3){
|
||||
width: 344px;
|
||||
}
|
||||
|
||||
.input-bnumber input:nth-child(1){
|
||||
width: 62px;
|
||||
}
|
||||
|
||||
.input-bnumber input:nth-child(2){
|
||||
width: 52px;
|
||||
}
|
||||
|
||||
.input-bnumber input:nth-child(3){
|
||||
width: 116px;
|
||||
}
|
||||
|
||||
.input-double{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.input-memo{
|
||||
margin: 5px 0;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.input-double input, .button-double button{
|
||||
width: calc(37.5% - 5px) !important;
|
||||
}
|
||||
|
||||
.btn-a{
|
||||
width: auto !important;
|
||||
display: inline-flex !important;
|
||||
}
|
||||
|
||||
|
||||
.input-memo input{
|
||||
height: 240px !important;
|
||||
width: 86%;
|
||||
}
|
||||
|
||||
.contents .two-input{
|
||||
display: inline-flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.contents .two-input .input_box{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.contents .button {
|
||||
height: 40px;
|
||||
color: #fff;
|
||||
@@ -512,6 +651,7 @@ header .user_wrap .user_info .logout {
|
||||
.contents .button.grey {
|
||||
background-color: #35354f;
|
||||
font-size: 16px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.contents .button.grey:hover {
|
||||
@@ -539,8 +679,36 @@ header .user_wrap .user_info .logout {
|
||||
border-color: #000;
|
||||
}
|
||||
|
||||
/*icon button*/
|
||||
|
||||
.download::before {
|
||||
content:'';
|
||||
background: url(../images/icon-download.png) no-repeat 0 0;
|
||||
width:23px;
|
||||
height:23px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.add::before {
|
||||
content:'';
|
||||
background: url(../images/icon-add.png) no-repeat center center;
|
||||
width:24px;
|
||||
height:24px;
|
||||
margin-right: 5px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.del::before {
|
||||
content:'';
|
||||
background: url(../images/icon-del.png) no-repeat center center;
|
||||
width:24px;
|
||||
height:24px;
|
||||
margin-right: 5px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.contents .info {
|
||||
padding: 0 30px;
|
||||
padding: 0 40px;
|
||||
margin-bottom: 10px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
@@ -550,17 +718,23 @@ header .user_wrap .user_info .logout {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.contents .info .count {
|
||||
.info .count {
|
||||
font-size: 16px;
|
||||
position: relative;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.contents .info .count span {
|
||||
.info .count span {
|
||||
color: #eb008b;
|
||||
}
|
||||
|
||||
.contents .info .count:before {
|
||||
.info .count p{
|
||||
color: #666666;
|
||||
font-size: 14px;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.info .count:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
@@ -574,6 +748,7 @@ header .user_wrap .user_info .logout {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
margin-top: -7px;
|
||||
}
|
||||
|
||||
.contents .info .title {
|
||||
@@ -593,9 +768,129 @@ header .user_wrap .user_info .logout {
|
||||
background-color: #eb008b;
|
||||
}
|
||||
|
||||
/*pagination*/
|
||||
|
||||
.contents .pagination .arrow-btn button{
|
||||
border:none;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.btn-first, .btn-prev{
|
||||
background:url(../images/icon-pgn-l.png) no-repeat;
|
||||
width:24px;
|
||||
height:24px;
|
||||
}
|
||||
|
||||
.btn-next, .btn-last{
|
||||
background:url('../images/icon-pgn-r.png') no-repeat;
|
||||
width:24px;
|
||||
height:24px;
|
||||
}
|
||||
|
||||
.btn-first,.btn-last{background-position: 0px 0px;}
|
||||
.btn-first:hover, .btn-last:hover{background-position: 0px -48px;}
|
||||
.btn-prev, .btn-next{background-position: 0px -24px;}
|
||||
.btn-prev:hover, .btn-next:hover{background-position: 0px -72px;}
|
||||
|
||||
.contents .pagination {
|
||||
display:flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.contents .pagination ul{
|
||||
display:flex;
|
||||
align-items:center;
|
||||
}
|
||||
|
||||
.contents .pagination ul li a{
|
||||
color:#9a9a9a;
|
||||
font-size: 14px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
.contents .pagination ul li a:hover{
|
||||
color:#000;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/*contents table 추가*/
|
||||
|
||||
.contents .table table .arrow_box {
|
||||
display: none;
|
||||
background-color: #fff;
|
||||
border: #666666 solid 1px;
|
||||
border-radius: 4px;
|
||||
color: #666666;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.25px;
|
||||
margin-top: 16.8px;
|
||||
padding: 10px 20px;
|
||||
position: absolute;
|
||||
min-width: 120px;
|
||||
z-index: 100;
|
||||
left: 42px;
|
||||
}
|
||||
|
||||
.contents .table table .arrow_box:before{
|
||||
border-color: #666666 transparent;
|
||||
border-style: solid;
|
||||
border-width: 0 6px 8px 6.5px;
|
||||
content: '';
|
||||
display: block;
|
||||
left: 20px;
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
width: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.contents .table table .arrow_box:after {
|
||||
border-color: #fff transparent;
|
||||
border-style: solid;
|
||||
border-width: 0 6px 8px 6.5px;
|
||||
content: '';
|
||||
display: block;
|
||||
left: 20px;
|
||||
position: absolute;
|
||||
bottom: 99%;
|
||||
width: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.contents .table.calculate table td, .contents .table.calculate table th{
|
||||
border-left: 1px solid #dadae6;
|
||||
}
|
||||
|
||||
.contents .table.calculate table td:nth-child(1), .contents .table.calculate table tr:nth-child(1) th:nth-child(1){
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.contents .table table .total{
|
||||
background-color: #ececf3;
|
||||
}
|
||||
|
||||
.contents .table table td span {cursor: pointer;}
|
||||
|
||||
.contents .table table td .linkstyle {cursor: pointer; text-decoration: underline;}
|
||||
.contents .table table td .linkstyle:hover {color:#eb008b;}
|
||||
|
||||
|
||||
.contents .table table td span:hover + p.arrow_box {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.contents .table.table_form .tr_input td{
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.contents .table.table_form .tr_input .td_radio{
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.contents .table {
|
||||
color: #333333;
|
||||
padding: 0 30px;
|
||||
padding: 0 40px;
|
||||
margin-bottom: 65px;
|
||||
}
|
||||
|
||||
@@ -604,6 +899,7 @@ header .user_wrap .user_info .logout {
|
||||
text-align: center;
|
||||
border-top: 2px solid #69677e;
|
||||
border-bottom: 1px solid #a4a4b0;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.contents .table table thead {
|
||||
@@ -617,7 +913,7 @@ header .user_wrap .user_info .logout {
|
||||
.contents .table table th {
|
||||
font-weight: 500;
|
||||
height: 50px;
|
||||
position: relative;
|
||||
position: relative; font-size: 14px;
|
||||
}
|
||||
|
||||
.contents .table table tr {
|
||||
@@ -626,12 +922,12 @@ header .user_wrap .user_info .logout {
|
||||
border-bottom: 1px solid #dadae6;
|
||||
}
|
||||
|
||||
.contents .table table tr:hover {
|
||||
.contents .table table tbody tr:not(.table_form table tr):hover {
|
||||
background-color: #fafaff;
|
||||
}
|
||||
|
||||
.contents .table table td {
|
||||
position: relative;
|
||||
position: relative; font-size: 14px;
|
||||
}
|
||||
|
||||
.contents .table table td a {
|
||||
@@ -681,15 +977,16 @@ header .user_wrap .user_info .logout {
|
||||
}
|
||||
|
||||
.contents .table.table_form {
|
||||
font-size: 16px;
|
||||
font-size: 14px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.contents .table.table_form th {
|
||||
background-color: #f7f7f7;
|
||||
width: 9%;
|
||||
width: 11%;
|
||||
text-align: left;
|
||||
padding-left: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.contents .table.table_form th.center {
|
||||
@@ -699,6 +996,7 @@ header .user_wrap .user_info .logout {
|
||||
|
||||
.contents .table.table_form td {
|
||||
text-align: left;
|
||||
padding-left: 10px;font-size: 14px;
|
||||
}
|
||||
|
||||
.contents .table.table_form td.check {
|
||||
@@ -741,14 +1039,15 @@ header .user_wrap .user_info .logout {
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.contents .table.table_form .tr_input input[type="text"] {
|
||||
.contents .table.table_form .tr_input input[type="text"], .contents .table.table_form .tr_input select {
|
||||
border: 1px solid #c9c9c9;
|
||||
border-radius: 4px;
|
||||
height: 40px;
|
||||
margin-left: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.contents .table.table_form .tr_input.w30 input[type="text"] {
|
||||
.contents .table.table_form .tr_input.w30 input[type="text"], .contents .table.table_form .tr_input.w30 select {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
@@ -760,8 +1059,8 @@ header .user_wrap .user_info .logout {
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
.contents .table.table_form .tr_input input[type="radio"] + label:nth-child(2) {
|
||||
margin: 0 30px 0 10px;
|
||||
.contents .table.table_form input[type="radio"] + label:nth-child(2) {
|
||||
margin: 0 30px 0 0;
|
||||
}
|
||||
|
||||
.contents .pop-btn2 {
|
||||
@@ -805,10 +1104,18 @@ header .user_wrap .user_info .logout {
|
||||
background-color: #c7c7c7;
|
||||
}
|
||||
|
||||
.popup{
|
||||
font-family: 'SpoqaHanSansNeo';
|
||||
}
|
||||
|
||||
.popup.popup_form {
|
||||
width: 525px;
|
||||
}
|
||||
|
||||
.popup.popup_form .info .count {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.popup.popup_form .pop-head {
|
||||
border-bottom: 1px solid #d5d3e6;
|
||||
padding-bottom: 0;
|
||||
@@ -864,7 +1171,7 @@ header .user_wrap .user_info .logout {
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
|
||||
.popup.popup_form table td input {
|
||||
.popup input {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
border: 1px solid #c9c9c9;
|
||||
@@ -872,19 +1179,19 @@ header .user_wrap .user_info .logout {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.popup.popup_form table td input::-webkit-input-placeholder {
|
||||
.popup input::-webkit-input-placeholder {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
||||
.popup.popup_form table td input:-ms-input-placeholder {
|
||||
.popup input:-ms-input-placeholder {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
||||
.popup.popup_form table td input::-ms-input-placeholder {
|
||||
.popup input::-ms-input-placeholder {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
||||
.popup.popup_form table td input::placeholder {
|
||||
.popup input::placeholder {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
||||
@@ -907,7 +1214,7 @@ header .user_wrap .user_info .logout {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.popup.popup_form table .input_search {
|
||||
.popup .input_search {
|
||||
height: 50px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
@@ -920,7 +1227,7 @@ header .user_wrap .user_info .logout {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.popup.popup_form table .input_search input[type="text"] {
|
||||
.popup .input_search input[type="text"] {
|
||||
position: relative;
|
||||
background: url(../images/icon-search.png) no-repeat 6% center/14px auto;
|
||||
background-color: #fff;
|
||||
@@ -929,23 +1236,23 @@ header .user_wrap .user_info .logout {
|
||||
width: 72%;
|
||||
}
|
||||
|
||||
.popup.popup_form table .input_search input[type="text"]::-webkit-input-placeholder {
|
||||
.popup .input_search input[type="text"]::-webkit-input-placeholder {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
||||
.popup.popup_form table .input_search input[type="text"]:-ms-input-placeholder {
|
||||
.popup .input_search input[type="text"]:-ms-input-placeholder {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
||||
.popup.popup_form table .input_search input[type="text"]::-ms-input-placeholder {
|
||||
.popup .input_search input[type="text"]::-ms-input-placeholder {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
||||
.popup.popup_form table .input_search input[type="text"]::placeholder {
|
||||
.popup .input_search input[type="text"]::placeholder {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
||||
.popup.popup_form table .button {
|
||||
.popup .button {
|
||||
height: 40px;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
@@ -963,15 +1270,161 @@ header .user_wrap .user_info .logout {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.popup.popup_form table .button.grey {
|
||||
.popup .button.grey {
|
||||
background-color: #35354f;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.popup.popup_form table .button.grey:hover {
|
||||
.popup .button.grey:hover {
|
||||
background-color: #0a0b24;
|
||||
}
|
||||
|
||||
/*customer popup*/
|
||||
|
||||
.popup.b-popup{
|
||||
width:700px;
|
||||
}
|
||||
|
||||
.popup.price table th{
|
||||
width:20%;
|
||||
}
|
||||
|
||||
.popup label{
|
||||
font-size: 13px;
|
||||
letter-spacing: -0.025em;
|
||||
margin-bottom: 6px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.popup .number{
|
||||
color:#000000;
|
||||
font-weight: bold;
|
||||
}
|
||||
.popup .number.blue{color:#0073d4;}
|
||||
.popup .number.red{color:#ff3600;}
|
||||
|
||||
|
||||
.popup.popup_form .table-c{
|
||||
table-layout: fixed;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.popup.popup_form .table-c th, .popup.popup_form .table-c td{
|
||||
padding: 0;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.popup.b-popup tr th:nth-child(1){
|
||||
width:60%;
|
||||
}
|
||||
|
||||
.popup.b-popup tr th:nth-child(2){
|
||||
width:10%;
|
||||
}
|
||||
|
||||
.popup.b-popup tr th:nth-child(3), .popup.b-popup tr th:nth-child(4){
|
||||
width:15%;
|
||||
}
|
||||
|
||||
.popup.b-popup tr .memo{
|
||||
text-align: left;
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
|
||||
.popup.b-popup tr:nth-child(1) .memo:nth-child(1){
|
||||
height: 100px;
|
||||
display: block;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.popup .pop-cont.bottom{
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.popup.popup_form .pop-btn2 .download {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.popup.popup_form .pop-btn2.bulk{
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.popup.popup_form .pop-btn2.bulk button{
|
||||
width: 49%;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
justify-content: normal;
|
||||
}
|
||||
|
||||
.popup.popup_form .pop-btn2.bulk button:nth-child(1)::before{
|
||||
content: '';
|
||||
background: url(../images/icon-f-download.png) no-repeat 0 0;
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
margin: 2px 5px 0 15px;
|
||||
}
|
||||
|
||||
.popup.popup_form .pop-btn2.bulk button:nth-child(2)::before{
|
||||
content: '';
|
||||
background: url(../images/icon-f-upload.png) no-repeat 0 0;
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
margin: 2px 5px 0 15px;
|
||||
}
|
||||
|
||||
.popup.popup_form .btn-default{
|
||||
color: #333333;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #a1a1a1;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.popup.popup_form .file{
|
||||
color: #656565;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.popup.popup_form .file button{
|
||||
background: #e4e4e4 url(../images/icon-delete.png) no-repeat center center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
top: 6px;
|
||||
left: 5px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.popup.popup_form.b-popup .input_add{
|
||||
padding: 5px 0px 5px 0px;
|
||||
}
|
||||
|
||||
.popup.popup_form.b-popup .input_add div{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.popup.popup_form.b-popup .input_add div input:nth-child(1){
|
||||
margin-right: 5px;
|
||||
width: 95px;
|
||||
}
|
||||
|
||||
.input_add .button.add{
|
||||
min-width: 40px;
|
||||
margin-left: 2%;
|
||||
}
|
||||
|
||||
.popup.popup_form.b-popup .input_add div:nth-child(2){
|
||||
width: 89%;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style.css.map */
|
||||
BIN
frontend/src/assets/font/LGSmHaB.woff2
Normal file
BIN
frontend/src/assets/font/LGSmHaL.woff2
Normal file
BIN
frontend/src/assets/font/LGSmHaR.woff2
Normal file
BIN
frontend/src/assets/font/LGSmHaSB.woff2
Normal file
BIN
frontend/src/assets/font/SpoqaHanSansNeo-Bold.woff2
Normal file
BIN
frontend/src/assets/font/SpoqaHanSansNeo-Light.woff2
Normal file
BIN
frontend/src/assets/font/SpoqaHanSansNeo-Medium.woff2
Normal file
BIN
frontend/src/assets/font/SpoqaHanSansNeo-Regular.woff2
Normal file
BIN
frontend/src/assets/font/SpoqaHanSansNeo-Thin.woff2
Normal file
BIN
frontend/src/assets/images/icon-add.png
Normal file
|
After Width: | Height: | Size: 158 B |
BIN
frontend/src/assets/images/icon-calender.png
Normal file
|
After Width: | Height: | Size: 242 B |
BIN
frontend/src/assets/images/icon-del.png
Normal file
|
After Width: | Height: | Size: 279 B |
BIN
frontend/src/assets/images/icon-delete.png
Normal file
|
After Width: | Height: | Size: 232 B |
BIN
frontend/src/assets/images/icon-download.png
Normal file
|
After Width: | Height: | Size: 262 B |
BIN
frontend/src/assets/images/icon-f-download.png
Normal file
|
After Width: | Height: | Size: 399 B |
BIN
frontend/src/assets/images/icon-f-upload.png
Normal file
|
After Width: | Height: | Size: 347 B |
BIN
frontend/src/assets/images/icon-pgn-l.png
Normal file
|
After Width: | Height: | Size: 613 B |
BIN
frontend/src/assets/images/icon-pgn-r.png
Normal file
|
After Width: | Height: | Size: 609 B |
BIN
frontend/src/assets/images/tab_arrow.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
@@ -1,6 +1,8 @@
|
||||
|
||||
/*(function(){
|
||||
(function(){
|
||||
const menuList = document.querySelectorAll('.main_menu .is-sub');
|
||||
|
||||
|
||||
for(const menu of menuList){
|
||||
menu.addEventListener('click', (e)=> {
|
||||
if(e.target.classList.contains('menu_target') || e.target.classList.contains('menu_btn')){
|
||||
@@ -16,29 +18,18 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
})();*/
|
||||
})();
|
||||
|
||||
/*const ModalOpen = target =>{
|
||||
console.log("ModalOpen");
|
||||
|
||||
function ModalOpen(target) {
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
var obj = document.getElementsByClassName(target);
|
||||
dimmed[0].style.display = 'block';
|
||||
wrap[0].style.display = 'block';
|
||||
obj[0].style.display = 'block';
|
||||
}*/
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
/*function ModalOpen(target) {
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
var obj = document.getElementsByClassName(target);
|
||||
dimmed[0].style.display = 'block';
|
||||
wrap[0].style.display = 'block';
|
||||
obj[0].style.display = 'block';
|
||||
}*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
/*function ModalClose() {
|
||||
}
|
||||
function ModalClose() {
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
var obj = wrap[0].childElementCount
|
||||
@@ -49,7 +40,6 @@
|
||||
target[i].style.display = 'none';
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function userInfoToggle(){
|
||||
var click = "clicked";
|
||||
var userBtn = document.querySelector('.user_wrap .user');
|
||||
@@ -59,8 +49,4 @@ function userInfoToggle(){
|
||||
else{
|
||||
userBtn.classList.add(click);
|
||||
}
|
||||
}*/
|
||||
|
||||
export default{
|
||||
ModalOpen
|
||||
}
|
||||
@@ -4,7 +4,10 @@ const environment = NODE_ENV.toLowerCase();
|
||||
const testProp = VUE_APP_TEST_PROP;
|
||||
|
||||
const consts = {
|
||||
tokenPart1: 'JwtPart1'
|
||||
tokenPart1: 'JwtPart1',
|
||||
tokenPart2: 'JwtPart2',
|
||||
tokenPart3: 'JwtPart3',
|
||||
tokenPart4: 'JwtPart4'
|
||||
}
|
||||
|
||||
export { environment, testProp, consts };
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import axios from 'axios';
|
||||
import { testProp } from './config';
|
||||
import tokenSvc from '@/common/token-service';
|
||||
import { consts } from './config';
|
||||
|
||||
const config = {
|
||||
//baseURL: 'http://localhost:7070',
|
||||
@@ -25,9 +27,18 @@ const authInterceptor = config => {
|
||||
return config;
|
||||
};
|
||||
|
||||
const tokenInterceptor = config => {
|
||||
if(tokenSvc.getAuthorization(consts.tokenPart1) != null){
|
||||
config.headers.Authorization = tokenSvc.getAuthorization(consts.tokenPart1);
|
||||
//console.log("getToken : "+config.headers.Authorization);
|
||||
//config.headers.Authorization = tokenSvc.getToken();
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
const loggerInterceptor = config => {
|
||||
console.log('testProp:', testProp);
|
||||
console.log('request url:', config.url, 'params:', config.data);
|
||||
//console.log('testProp:', testProp);
|
||||
//console.log('request url:', config.url, 'params:', config.data);
|
||||
return config;
|
||||
};
|
||||
|
||||
@@ -61,6 +72,7 @@ const loadingLayer = (type, config) => {
|
||||
|
||||
/** Adding the request interceptors */
|
||||
httpClient.interceptors.request.use(authInterceptor);
|
||||
httpClient.interceptors.request.use(tokenInterceptor);
|
||||
httpClient.interceptors.request.use(loggerInterceptor);
|
||||
//httpClient.interceptors.request.use(loadingLayerInterceptor);
|
||||
|
||||
@@ -79,15 +91,19 @@ httpClient.interceptors.response.use(
|
||||
if (error.code === 'ECONNABORTED') {
|
||||
alert('서비스가 지연되고 있습니다. 잠시 후 확인하시고 다시 시도해주세요.');
|
||||
return Promise.reject(error);
|
||||
} else if (error.response.status == 401 || error.response.status == 418) {
|
||||
} else if(error.response.status == 401){
|
||||
alert('세션이 만료되었습니다.');
|
||||
tokenSvc.removeToken();
|
||||
window.top.location.href = '/login';
|
||||
} else if (error.response.status == 500) {
|
||||
} else if (error.response.status == 418) {
|
||||
|
||||
}else if (error.response.status == 500) {
|
||||
if (error.response.data != null && error.response.data.message == '511 NETWORK_AUTHENTICATION_REQUIRED') {
|
||||
alert('웹템플릿 IP가 브랜드포털에 등록이 필요합니다. 기술지원에 문의해주세요.');
|
||||
return Promise.reject(error);
|
||||
} else {
|
||||
window.top.location.href = '/view/error/500';
|
||||
tokenSvc.removeToken();
|
||||
window.top.location.href = '/login';
|
||||
}
|
||||
} else if (error.response.status == 511) {
|
||||
alert('웹템플릿 IP가 브랜드포털에 등록이 필요합니다. 기술지원에 문의해주세요.');
|
||||
@@ -96,6 +112,7 @@ httpClient.interceptors.response.use(
|
||||
alert('네트워크 오류가 발생했습니다. 잠시 후 다시 시도해주세요.');
|
||||
return Promise.reject(error);
|
||||
} else {
|
||||
alert("else");
|
||||
console.log('response error:', error);
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import * as utils from './utils';
|
||||
import { consts } from './config';
|
||||
|
||||
|
||||
// const KEY_TOKEN = 'access_token';
|
||||
|
||||
const tokenSvc = {
|
||||
@@ -14,9 +15,23 @@ const tokenSvc = {
|
||||
return JSON.parse(payload);
|
||||
},
|
||||
removeToken() {
|
||||
var name = consts.tokenPart1;
|
||||
document.cookie = name + '=; expires=Thu, 01 Jan 1999 00:00:10 GMT;';
|
||||
var tokenNm1 = consts.tokenPart1;
|
||||
var tokenNm2 = consts.tokenPart2;
|
||||
var tokenNm3 = consts.tokenPart3;
|
||||
var tokenNm4 = consts.tokenPart4;
|
||||
|
||||
document.cookie = tokenNm1+'=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
|
||||
document.cookie = tokenNm2+'=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
|
||||
document.cookie = tokenNm3+'=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
|
||||
document.cookie = tokenNm4+'=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
|
||||
},
|
||||
getAuthorization(tokenKey){
|
||||
var jwtPart = utils.getCookie(tokenKey);
|
||||
if(!jwtPart){
|
||||
return null;
|
||||
}
|
||||
return jwtPart;
|
||||
},
|
||||
|
||||
// saveToken(jwtPart1) {
|
||||
// if (!jwtPart1)
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<script>
|
||||
import httpClient from '@/common/http-client';
|
||||
import VRuntimeTemplate from 'v-runtime-template';
|
||||
import '@/assets/js/script.js';
|
||||
|
||||
export default {
|
||||
name: 'customGrid',
|
||||
@@ -22,7 +23,7 @@ export default {
|
||||
'url', // 연동 url
|
||||
'initialRequest', // false일 시 초기 렌더링 시 백엔드에 요청 하지 않음. 이 경우 readData를 호출하여 그리드 데이터를 할당해 줘야 함
|
||||
'pagination', // 페이지 네비게이션 사용 여부
|
||||
'perPage', // 페이지 당 개수
|
||||
'pagePerRows', // 페이지 당 개수
|
||||
'header', // 사용자정의 header가 있을 경우
|
||||
'columns', // 컬럼 정보
|
||||
'noDataStr', // 데이터가 없을 때
|
||||
@@ -66,9 +67,9 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
perPage() {
|
||||
pagePerRows() {
|
||||
this.currentIndex = 1;
|
||||
this.curPerPage = this.perPage;
|
||||
this.curPerPage = this.pagePerRows;
|
||||
this.readData();
|
||||
}
|
||||
},
|
||||
@@ -77,10 +78,10 @@ export default {
|
||||
return this.bodyList;
|
||||
},
|
||||
cleanData() {
|
||||
if (typeof this.perPage == undefined || this.perPage == null) {
|
||||
this.curPerPage = 5;
|
||||
if (typeof this.pagePerRows == undefined || this.pagePerRows == null) {
|
||||
this.curPerPage = 20;
|
||||
} else {
|
||||
this.curPerPage = this.perPage;
|
||||
this.curPerPage = this.pagePerRows;
|
||||
}
|
||||
|
||||
if (typeof this.addTableStyle == undefined || this.addTableStyle == null) {
|
||||
@@ -111,10 +112,10 @@ export default {
|
||||
// nothing
|
||||
} else {
|
||||
if (this.pagination == true) {
|
||||
this.getParams['perPage'] = this.curPerPage;
|
||||
this.getParams['pagePerRows'] = this.curPerPage;
|
||||
this.getParams['page'] = this.currentIndex;
|
||||
} else {
|
||||
delete this.getParams['perPage'];
|
||||
delete this.getParams['pagePerRows'];
|
||||
delete this.getParams['page'];
|
||||
}
|
||||
}
|
||||
@@ -125,7 +126,7 @@ export default {
|
||||
let pageStr = '';
|
||||
|
||||
var vm = this;
|
||||
console.log(this.url);
|
||||
console.log("grid url >> " + this.url);
|
||||
httpClient
|
||||
//.get(this.url, { params: this.getParams, headers: { 'Show-Layer': 'Yes' }})
|
||||
.post(this.url, this.getParams, {headers: { 'Show-Layer': 'Yes' }})
|
||||
@@ -149,10 +150,19 @@ export default {
|
||||
pageStr = vm.makePagingView();
|
||||
}*/
|
||||
if (vm.pagination == true) {
|
||||
vm.currentIndex = data.paging.currentPage == 0 ? 1 : data.paging.currentPage;
|
||||
vm.currentIndex = data.paging.page == 0 ? 1 : data.paging.page;
|
||||
vm.totalCount = data.paging.totalCnt;
|
||||
pageStr = vm.makePagingView();
|
||||
}
|
||||
// 조회결과 없음.
|
||||
}else if(resp != null && resp.retCode == '1004'){
|
||||
let data = resp.data;
|
||||
//let conts = data.contents;
|
||||
let conts = data.list;
|
||||
vm.bodyList = conts;
|
||||
|
||||
bodyStr = vm.makeBodyView();
|
||||
this.$parent[this.totalItems] = 0;
|
||||
}
|
||||
|
||||
vm.setTableView(colStr, headerStr, bodyStr, pageStr);
|
||||
@@ -526,6 +536,7 @@ export default {
|
||||
}
|
||||
return str;
|
||||
},
|
||||
/*
|
||||
makePagingView() {
|
||||
let pData = '<div class="paging">';
|
||||
|
||||
@@ -571,6 +582,56 @@ export default {
|
||||
pData += '</div>';
|
||||
return pData;
|
||||
},
|
||||
*/
|
||||
makePagingView() {
|
||||
let pData = '<div class="pagination">';
|
||||
|
||||
let totalPage = Math.ceil(this.totalCount / this.curPerPage);
|
||||
if (totalPage < 1) {
|
||||
totalPage = 1;
|
||||
}
|
||||
let pageGroup = Math.ceil(this.currentIndex / this.pageCount);
|
||||
|
||||
let last = pageGroup * this.pageCount;
|
||||
if (last > totalPage) {
|
||||
last = totalPage;
|
||||
}
|
||||
|
||||
let first = last - (this.pageCount - 1);
|
||||
if (first < 1) {
|
||||
first = 1;
|
||||
}
|
||||
let prev = first - 1;
|
||||
if (prev < 1) {
|
||||
prev = 1;
|
||||
}
|
||||
let next = last + 1;
|
||||
if (next > totalPage) {
|
||||
next = totalPage;
|
||||
}
|
||||
|
||||
pData += '<div class="arrow-btn">'
|
||||
pData += '<button href="javascript:void(0);" @click="movePage(1)" class="btn-first"></button>';
|
||||
pData += '<button href="javascript:void(0);" @click="movePage(' + prev + ')" class="btn-prev"></button>';
|
||||
pData += '</div>'
|
||||
pData += '<ul>'
|
||||
|
||||
for (var i = first; i <= last; i++) {
|
||||
let actCls = '';
|
||||
if (i == this.currentIndex) {
|
||||
actCls = 'v:class="active"';
|
||||
}
|
||||
pData += '<li><a href="javascript:void(0);" @click="movePage(' + i + ')" ' + actCls + '>' + i + '</a></li>';
|
||||
}
|
||||
pData += '</ul>'
|
||||
pData += '<div class="arrow-btn">'
|
||||
pData += '<button @click="movePage(' + next + ')" class="btn-next"></button>';
|
||||
pData +=
|
||||
'<button @click="movePage(' + totalPage + ')" class="btn-last"></button>';
|
||||
pData += '</div>'
|
||||
pData += '</div>';
|
||||
return pData;
|
||||
},
|
||||
movePage(idx, refresh) {
|
||||
if (refresh == undefined || refresh == null) {
|
||||
refresh = false;
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<p>이용 부탁드립니다.</p>
|
||||
</div>
|
||||
<div class="pop-btn1">
|
||||
<button class="btn-pcolor" @click="ModalClose();">비밀번호 변경하기</button>
|
||||
<button class="btn-pcolor" @click="$router.push({ path: '/view/login/updatePassword' })">비밀번호 변경하기</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
<p>로그아웃되어 다시 로그인해주세요.</p>
|
||||
</div>
|
||||
<div class="pop-btn1">
|
||||
<button class="btn-pcolor" @click="ModalClose();">확인</button>
|
||||
<button class="btn-pcolor" @click="$router.go(-1)">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
<p>변경된 비밀번호로 다시 로그인 해주세요</p>
|
||||
</div>
|
||||
<div class="pop-btn1">
|
||||
<button class="btn-pcolor" @click="ModalClose();">확인</button>
|
||||
<button class="btn-pcolor" @click="$router.go(-1)">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -264,6 +264,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- 선택한 메뉴 li.is-current -->
|
||||
<li v-for="child in menuList" :key="child.menuNo" :class="child.classNm">
|
||||
<div class="menu_btn" ></div>
|
||||
<a class="menu_target" @click="clickTest" :data-menu-no="child.menuNo">{{child.menuNm}}</a>
|
||||
<a class="menu_target" @click="actionMenu" :data-menu-no="child.menuNo">{{child.menuNm}}</a>
|
||||
<div class="sub_menu_wrap">
|
||||
<ul class="sub_menu" v-if="child.children.length > 0">
|
||||
<li v-for="child2 in child.children" :key="child2.menuNo">
|
||||
@@ -30,8 +30,8 @@ export default {
|
||||
return {
|
||||
isLogin : false,
|
||||
isAuthChk : false,
|
||||
menuList: null,
|
||||
tempList: null
|
||||
menuList: [],
|
||||
tempList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -79,17 +79,8 @@ export default {
|
||||
//this.$store.commit("login/isLogin", true);
|
||||
//this.$store.commit("login/isAuthChk", true);
|
||||
} else {
|
||||
this.$store.commit("login/isLogin", false);
|
||||
this.$store.commit("login/isAuthChk", false);
|
||||
this.menuList = null;
|
||||
this.$router.push({ path: '/login' });
|
||||
window.top.location.href = '/';
|
||||
}
|
||||
}).catch(response => {
|
||||
this.$store.commit("login/isLogin", false);
|
||||
this.$store.commit("login/isAuthChk", false);
|
||||
this.menuList = null;
|
||||
this.$router.push({ path: '/login' });
|
||||
console.log(response);
|
||||
});
|
||||
},
|
||||
clickMenu(link){
|
||||
@@ -100,11 +91,9 @@ export default {
|
||||
},
|
||||
|
||||
|
||||
clickTest(e){
|
||||
actionMenu(e){
|
||||
const menuList = document.querySelectorAll('.main_menu .is-current');
|
||||
|
||||
|
||||
|
||||
if(e.target.classList.contains('menu_target') || e.target.classList.contains('menu_btn')){
|
||||
const menuListCheck = e.target.parentNode;
|
||||
if(menuListCheck.classList.contains('is-current')){
|
||||
|
||||
@@ -3,91 +3,79 @@
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">청약고객정보목록조회</h3>
|
||||
<p class="breadcrumb">시스템관리 > 관리자/유치채널 관리</p>
|
||||
<h3 class="title">청약고객관리</h3>
|
||||
<p class="breadcrumb">고객관리 > 청약고객관리 > 회원관리</p>
|
||||
</div>
|
||||
<!-- <form autocomplete="off" class="search_form"> -->
|
||||
|
||||
<div class="top_tab">
|
||||
<a href="customer_01_list.html" class="on">청약고객관리</a><a href="customer_02_list.html">회원관리</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search_form">
|
||||
<div class="search_wrap">
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">권한</label>
|
||||
<select name="" id="right" v-model="grid.params.searchType1">
|
||||
<option value="">전체</option>
|
||||
<option value="대리점">대리점</option>
|
||||
<option value="운영자">운영자</option>
|
||||
</select>
|
||||
<div class="group">
|
||||
<div class="input_box cal">
|
||||
<label for="right" class="label">조회기간</label>
|
||||
<input class="" type="text" id="" v-model="grid.params.startDt"/>
|
||||
<input class="" type="text" id="" v-model="grid.params.endDt"/>
|
||||
</div>
|
||||
<div class="select_box">
|
||||
<div class="select_box id">
|
||||
<label for="right" class="label">상태</label>
|
||||
<select name="" id="right" v-model="grid.params.searchType2">
|
||||
<select name="" id="" v-model="grid.params.searchType1">
|
||||
<option value="">전체</option>
|
||||
<option value="사용">사용</option>
|
||||
<option value="중지">중지</option>
|
||||
<option value="정지">정지</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box id">
|
||||
<label for="id1" class="label">ID</label>
|
||||
<input type="text" id="id1" placeholder="검색어 입력" v-model="grid.params.searchText1"/>
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">구분</label>
|
||||
<select name="" id="" v-model="grid.params.searchType2">
|
||||
<option value="">전체</option>
|
||||
<option value="관리자">관리자</option>
|
||||
<option value="사용자">사용자</option>
|
||||
<option value="테스트">테스트</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">상세검색</label>
|
||||
<select name="" id="" v-model="grid.params.searchType3">
|
||||
<option value="">전체</option>
|
||||
<option value="ID">ID</option>
|
||||
<option value="이름">이름</option>
|
||||
<option value="관리자ID">관리자ID</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box">
|
||||
<label for="name" class="label">이름(대리점명)</label>
|
||||
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.searchText2"/>
|
||||
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText1"/>
|
||||
</div>
|
||||
<button type="button" class="button grey" v-on:click="search">조회</button>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
<div class="info">
|
||||
<!-- <div class="count">총 <span>100</span>건</div> -->
|
||||
<div class="count">총 <span>{{ totalItems }}</span>건</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue admin" @click="ModalOpen('modal20')">관리자 등록</button>
|
||||
<button type="button" class="button blue channel" @click="ModalOpen('modal23')">유지채널 등록</button>
|
||||
<button type="button" class="button white delete" @click="deleteRow()">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="table">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="5%"/>
|
||||
<col width="15%"/>
|
||||
<col width="15%"/>
|
||||
<col width="20%"/>
|
||||
<col width="20%"/>
|
||||
<col width="5%"/>
|
||||
<col width="20%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" id="admin_check1"><label for="admin_check1"></label></th>
|
||||
<th>NO</th>
|
||||
<th>권한</th>
|
||||
<th>이름(대리점명)</th>
|
||||
<th>ID</th>
|
||||
<th>상태</th>
|
||||
<th>등록일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input type="checkbox" checked id="admin_check2"><label for="admin_check2"></label></td>
|
||||
<td>10</td>
|
||||
<td>대리점</td>
|
||||
<td>유플러스</td>
|
||||
<td><a href="javascript:void(0)">uplus1</a></td>
|
||||
<td>사용</td>
|
||||
<td>2022-03-10</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> -->
|
||||
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{ totalItems }}</span>건
|
||||
<div class="select_box NumberSe">
|
||||
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
|
||||
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue">테스트 ID 생성</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table">
|
||||
<custom-grid
|
||||
ref="table"
|
||||
:totalItems="'totalItems'"
|
||||
:url="grid.url"
|
||||
:perPage="grid.perPage"
|
||||
:pagePerRows="grid.pagePerRows"
|
||||
:initialRequest="grid.initialRequest"
|
||||
:pagination="grid.pagination"
|
||||
:isCheckbox="grid.isCheckbox"
|
||||
@@ -97,55 +85,78 @@
|
||||
:header="grid.headder"
|
||||
></custom-grid>
|
||||
</div>
|
||||
<system-popup ref="systemModal"></system-popup>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
import SystemPopup from '@/components/SystemPopup.vue';
|
||||
|
||||
import moment from 'moment';
|
||||
//import api from '../service/api';
|
||||
|
||||
export default {
|
||||
name: 'custList',
|
||||
data() {
|
||||
return {
|
||||
// 달력 데이터
|
||||
sDateDiv: 'day',
|
||||
eDateDiv: 'year',
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
disabledSDate: { from: new Date()},
|
||||
disabledEDate: { to: new Date()},
|
||||
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 20,
|
||||
options: [
|
||||
{ text: '20', value: 20},
|
||||
{ text: '50', value: 50},
|
||||
{ text: '100', value: 100}
|
||||
],
|
||||
totalItems: 0,
|
||||
grid: {
|
||||
url: '/api/v1/bo/sysMgt/adminList',
|
||||
perPage: 20,
|
||||
url: '/api/v1/bo/custMgt/subsList',
|
||||
pagePerRows: 20,
|
||||
pagination: true,
|
||||
isCheckbox: true,
|
||||
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
|
||||
/*
|
||||
header: [
|
||||
[
|
||||
{ header: 'NO', childNames: [] },
|
||||
{ header: '권한', childNames: [] },
|
||||
{ header: '이름(대리점명)', childNames: [] },
|
||||
{ header: 'ID', childNames: [] },
|
||||
{ header: '서비스 ID\n(관리자 ID)', childNames: [] },
|
||||
{ header: '고객사명', childNames: [] },
|
||||
{ header: '가입번호', childNames: [] },
|
||||
{ header: '가입일', childNames: [] },
|
||||
{ header: '상태', childNames: [] },
|
||||
{ header: '등록일', childNames: [] }
|
||||
{ header: '유치채널', childNames: [] },
|
||||
{ header: '요금제', childNames: [] },
|
||||
{ header: '이월누적금액', childNames: [] }
|
||||
]
|
||||
],
|
||||
*/
|
||||
|
||||
columns: [
|
||||
{ name: 'no', header: 'NO', align: 'center', width: 60},
|
||||
{ name: 'auth', header: '권한', align: 'center', width: 160 },
|
||||
{ name: 'name', header: '이름(대리점명)', align: 'center', width: 130},
|
||||
{ name: 'adminId', header: 'ID', align: 'center', width: 130},
|
||||
{ name: 'adminStat', header: '상태', align: 'center', width: 130},
|
||||
{ name: 'regDt', header: '등록일', width: 90, cls: 'td_line' }
|
||||
{ name: 'no', header: 'No', align: 'center', width: 60},
|
||||
{ name: 'serviceId', header: '서비스 ID\n(관리자 ID)', align: 'center', width: 160 },
|
||||
{ name: 'custNm', header: '고객사명', align: 'center', width: 130},
|
||||
{ name: 'regNo', header: '가입번호', align: 'center', width: 130},
|
||||
{ name: 'regDt', header: '가입일', align: 'center', width: 130, cls: 'td_line'},
|
||||
{ name: 'stat', header: '상태', align: 'center', width: 130},
|
||||
{ name: 'channel', header: '유치채널', align: 'center', width: 130},
|
||||
{ name: 'plan', header: '요금제', align: 'center', width: 130},
|
||||
{ name: 'carryOver', header: '이월누적금액', align: 'center', width: 130}
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchType3: '',
|
||||
searchText1: '',
|
||||
searchText2: ''
|
||||
startDt: '',
|
||||
endDt: ''
|
||||
},
|
||||
excelHeader: []
|
||||
}
|
||||
@@ -153,7 +164,6 @@ export default {
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid,
|
||||
SystemPopup
|
||||
},
|
||||
created(){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
@@ -165,16 +175,20 @@ export default {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
// 달력 세팅
|
||||
this.grid.params.startDt = this.customFormatter(new Date());
|
||||
this.grid.params.endDt = this.customFormatter(new Date());
|
||||
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition : '+getCondition);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
if (getCondition) {
|
||||
this.grid.perPage = getCondition.perPage;
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
if (getCondition.sort != undefined && getCondition.sort != null) {
|
||||
this.grid.params.sort = getCondition.sort;
|
||||
}
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
@@ -182,8 +196,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
search: function(isKeep) {
|
||||
console.log(this.grid.params);
|
||||
console.log('this.perPageCnt'+this.perPageCnt);
|
||||
//console.log(this.grid.params);
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
ModalOpen: function(target){
|
||||
this.$refs.systemModal.ModalOpen(target);
|
||||
@@ -204,8 +220,66 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
changePerPage: function(){ // 페이지당 조회할 개수
|
||||
this.grid.pagePerRows = this.perPageCnt;
|
||||
this.search(true);
|
||||
},
|
||||
sendStoreData: function() {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log("getCondition : "+ getCondition.perPage);
|
||||
},
|
||||
|
||||
customFormatter: function(date) {
|
||||
// 달력 관련
|
||||
if (this.sDateDiv == 'month') {
|
||||
return moment(date).format('YYYY-MM');
|
||||
} else if (this.sDateDiv == 'year') {
|
||||
return moment(date).format('YYYY');
|
||||
} else {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
}
|
||||
},
|
||||
selectedStartDate(day) {
|
||||
if (this.startDate > this.endDate) {
|
||||
this.startDate = this.endDate;
|
||||
}
|
||||
},
|
||||
selectedEndDate(day) {
|
||||
if (day != undefined && day != null) {
|
||||
this.periodDay = day;
|
||||
}
|
||||
},
|
||||
closeDate(type) {
|
||||
if (type != undefined && type != null) {
|
||||
if (type == 'start') {
|
||||
this.disabledSDate = { from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate, from: this.endDate };
|
||||
} else if (type == 'end') {
|
||||
this.disabledSDate = { from: this.endDate };
|
||||
this.disabledEDate = { to: this.startDate, from: new Date() };
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,6 +1,7 @@
|
||||
import LoginMain from '../views/LoginMain'
|
||||
import LoginAuth from '../views/LoginAuth'
|
||||
import ResetPassword from '../views/ResetPassword'
|
||||
import UpdatePassword from '../views/UpdatePassword'
|
||||
|
||||
export default [
|
||||
{
|
||||
@@ -21,4 +22,10 @@ export default [
|
||||
component: ResetPassword,
|
||||
meta: { public: true }
|
||||
},
|
||||
{
|
||||
path: '/view/login/updatePassword',
|
||||
name: 'updatePassword',
|
||||
component: UpdatePassword,
|
||||
meta: { public: true }
|
||||
},
|
||||
]
|
||||
@@ -30,6 +30,14 @@ const confirmNum = (params) => {
|
||||
return httpClient.post('/api/v1/bo/login/confirmNum', params);
|
||||
};
|
||||
|
||||
const resetPassword = (params) => {
|
||||
return httpClient.post('/api/v1/bo/login/resetPassword', params);
|
||||
};
|
||||
|
||||
const updatePassword = (params) => {
|
||||
return httpClient.post('/api/v1/bo/login/updatePassword', params);
|
||||
};
|
||||
|
||||
|
||||
const newpwd = (params) => {
|
||||
return httpClient.post('/api/public/auth/newpwd', params);
|
||||
@@ -49,5 +57,7 @@ export default {
|
||||
reqnum,
|
||||
confirmNum,
|
||||
newpwd,
|
||||
authNum
|
||||
authNum,
|
||||
resetPassword,
|
||||
updatePassword
|
||||
};
|
||||
@@ -3,26 +3,27 @@ var commonPwdView = {
|
||||
return {
|
||||
err_msg: null,
|
||||
message: {
|
||||
curPwd: '', newPwd: '', cfmPwd: ''
|
||||
oldPw: '', newPw: '',
|
||||
},
|
||||
param: {
|
||||
userId: null, phone: null
|
||||
userId: null,
|
||||
},
|
||||
curPwd: '', newPwd: '', cfmPwd: ''
|
||||
oldPw: '', newPw: '',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
verifyNewPwd: function (evt) {
|
||||
verifyNewPw: function (evt) {
|
||||
var valid = this.checkPassword(evt.target.value);
|
||||
if (valid) {
|
||||
this.err_msg = '';
|
||||
}
|
||||
this.message.newPwd = this.err_msg;
|
||||
this.message.newPw = this.err_msg;
|
||||
},
|
||||
|
||||
verifyCfmPwd: function() {
|
||||
this.message.cfmPwd = '';
|
||||
if (this.newPwd != this.cfmPwd) {
|
||||
this.message.cfmPwd = this.cfmPwdFailMsg();
|
||||
this.message.cfmPw = '';
|
||||
if (this.newPw != this.cfmPw) {
|
||||
this.message.cfmPw = this.cfmPwdFailMsg();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -37,7 +38,7 @@ var validation = {
|
||||
this.err_msg = "아이디를 입력해 주세요.";
|
||||
return false;
|
||||
}
|
||||
if (id.length < 4 || id.length > 15) {
|
||||
if (id.length < 8 || id.length > 16) {
|
||||
this.err_msg = "아이디는 영문, 숫자를 이용하여 4자리 이상 15자리 이하이어야 합니다.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
v-model="mdn"
|
||||
:maxlength="11"
|
||||
oninput="javascript: this.value = this.value.replace(/[^0-9]/g, '');"
|
||||
>
|
||||
@keyup.enter="authNum">
|
||||
<button class="btn-p2color" v-on:click="authNum">인증번호 받기</button></li>
|
||||
</div>
|
||||
<div>
|
||||
@@ -24,8 +24,8 @@
|
||||
v-model="confirmNum"
|
||||
:maxlength="6"
|
||||
oninput="javascript: this.value = this.value.replace(/[^0-9]/g, '');"
|
||||
>
|
||||
<span class="time"> {{ TimerStr }}</span></li>
|
||||
@keyup.enter="ajaxAuth">
|
||||
<span class="time"> {{ timerStr }}</span></li>
|
||||
</div>
|
||||
<li>
|
||||
<button class="btn-default" @click="clickMenu('/login')">취소</button>
|
||||
@@ -52,7 +52,7 @@
|
||||
data: function() {
|
||||
return {
|
||||
errors: [],
|
||||
mdn: '',
|
||||
mdn: '01012341234',
|
||||
confirmNum: '',
|
||||
userId: '',
|
||||
isAuthNum: false,
|
||||
@@ -60,9 +60,9 @@
|
||||
pwd: '',
|
||||
text: '',
|
||||
number: '',
|
||||
Timer: null,
|
||||
TimeCounter: 180,
|
||||
TimerStr: "03:00"
|
||||
timer: null,
|
||||
timeCounter: 180,
|
||||
timerStr: "03:00"
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@@ -117,17 +117,14 @@
|
||||
authNum(){
|
||||
var vm = this;
|
||||
if(!this.isLogin){
|
||||
var vm = this;
|
||||
vm.$store.commit("login/isLogin", false);
|
||||
vm.$store.commit("login/isAuthChk", false);
|
||||
vm.$router.push({ path: '/'});
|
||||
return;
|
||||
}
|
||||
if (vm.mdn == null || vm.mdn.trim() == ""){
|
||||
vm.ModalOpen('modal08');
|
||||
return false;
|
||||
} else if (vm.mdn.length < 11 || !vm.mdn) {
|
||||
if (vm.mdn == null || vm.mdn.trim() == "" || vm.mdn.length < 11 || !vm.mdn){
|
||||
vm.ModalOpen('modal06');
|
||||
return false;
|
||||
}
|
||||
var params = {
|
||||
"oprtrId": this.userId,
|
||||
@@ -138,13 +135,15 @@
|
||||
console.log(response);
|
||||
var rsp = response.data;
|
||||
if(rsp.retCode == '0000'){
|
||||
this.Timer = this.timerStart();
|
||||
this.timerStop(this.timer);
|
||||
this.timer = this.timerStart();
|
||||
vm.ModalOpen('modal07');
|
||||
// console.log('시간 3:00 카운트 하기');
|
||||
this.isAuthNum = true;
|
||||
}else if (!this.Timer) {
|
||||
this.timerStop(this.Timer);
|
||||
this.Timer = null;
|
||||
}else if (!this.timer) {
|
||||
this.timerStop(this.timer);
|
||||
this.timer = null;
|
||||
vm.ModalOpen('modal06');
|
||||
// 실패 -> 실패 코드에 따라 실패 팝업 보여주기
|
||||
//인증시간 초과 후 “시간초과!” 문구로 변경
|
||||
}
|
||||
@@ -157,16 +156,17 @@
|
||||
// 2차 인증 확인
|
||||
ajaxAuth: function(){
|
||||
var vm = this;
|
||||
|
||||
if (!vm.formCheck()){
|
||||
alert(vm.errors[0]);
|
||||
return false;
|
||||
}
|
||||
if(vm.TimeCounter==0){
|
||||
alert("시간초과");
|
||||
|
||||
if(this.timeCounter == 0){
|
||||
this.ModalOpen('modal10');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var params = {
|
||||
"oprtrId": this.userId,
|
||||
"hpNo": this.mdn,
|
||||
@@ -186,30 +186,36 @@
|
||||
vm.$router.push({ path: '/'});
|
||||
}else if(rsp.retCode == '4008') { //휴대폰번호 확인
|
||||
vm.ModalOpen('modal06');
|
||||
} else if(rsp.retCode == '404') { //인증번호: 입력
|
||||
vm.ModalOpen('modal08');
|
||||
} else if(rsp.retCode == '4009') { //인증실패: 시간초과
|
||||
vm.ModalOpen('modal10');
|
||||
} else if(rsp.retCode == '4010') { //인증실패: 인증번호
|
||||
vm.ModalOpen('modal09');
|
||||
} else if(rsp.retCode == '4011') { //인증실패: 5회
|
||||
vm.ModalOpen('modal11');
|
||||
} else{
|
||||
return;
|
||||
|
||||
}
|
||||
// else if(rsp.retCode == '4009') { //인증실패: 시간초과
|
||||
// vm.ModalOpen('modal10');
|
||||
// }
|
||||
else{
|
||||
if(rsp.retCode == '4010') { //인증실패: 인증번호
|
||||
vm.ModalOpen('modal09');
|
||||
}
|
||||
else if(rsp.retCode == '4011') { //인증실패: 5회
|
||||
vm.ModalOpen('modal11');
|
||||
// vm.$router.go(-1)
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
// else{
|
||||
// }
|
||||
});
|
||||
},
|
||||
formCheck: function() {
|
||||
this.errors = [];
|
||||
if(!this.isAuthNum){
|
||||
this.errors.push('인증요청을 먼저 해주세요.');
|
||||
}
|
||||
if(!this.mdn){
|
||||
this.errors.push('휴대폰 번호를 확인해주세요.');
|
||||
}
|
||||
if(!this.confirmNum){
|
||||
this.errors.push('인증번호를 입력하세요.');
|
||||
this.ModalOpen('modal06');
|
||||
} else if(!this.isAuthNum){
|
||||
this.errors.push('인증요청을 먼저 해주세요.');
|
||||
}else if(!this.confirmNum){
|
||||
this.ModalOpen('modal08');
|
||||
}
|
||||
|
||||
return this.errors.length == 0;
|
||||
},
|
||||
|
||||
@@ -224,17 +230,16 @@
|
||||
},
|
||||
timerStart: function() {
|
||||
// 1초에 한번씩 start 호출
|
||||
this.TimeCounter = 180;
|
||||
this.timeCounter = 180;
|
||||
var interval = setInterval(() => {
|
||||
this.TimeCounter--;
|
||||
this.timeCounter--;
|
||||
//1초씩 감소
|
||||
this.TimerStr = this.prettyTime();
|
||||
if (this.TimeCounter <= 0)
|
||||
this.timerStr = this.prettyTime();
|
||||
if (this.timeCounter <= 0)
|
||||
{
|
||||
this.timerStop(interval);
|
||||
// this.ModalOpen('modal10');
|
||||
}
|
||||
}, 100);
|
||||
}, 1000);
|
||||
|
||||
return interval;
|
||||
},
|
||||
@@ -242,12 +247,12 @@
|
||||
timerStop: function(Timer)
|
||||
{
|
||||
clearInterval(Timer);
|
||||
this.TimeCounter = 0;
|
||||
this.timeCounter = 0;
|
||||
},
|
||||
|
||||
prettyTime: function() {
|
||||
// 시간 형식으로 변환 리턴
|
||||
let time = this.TimeCounter / 60;
|
||||
let time = this.timeCounter / 60;
|
||||
let minutes = parseInt(time);
|
||||
let secondes = Math.round((time - minutes) * 60);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<!-- <form action=""> -->
|
||||
<div class="login-form">
|
||||
<li><input type="text" placeholder="아이디" v-model="userId"></li>
|
||||
<li><input type="password" placeholder="비밀번호" v-model="userPwd"></li>
|
||||
<li><input type="password" placeholder="비밀번호" v-model="userPwd" @keyup.enter="ajaxlogin"></li>
|
||||
<li>
|
||||
<span class="lcont"><input type="checkbox" id="id-remember" ref="chkSaveId" checked><label for="id-remember">아이디 저장</label></span>
|
||||
<span class="rcont"><button class="btn-pwreset" @click="clickMenu('/view/login/resetPassword')">비밀번호 초기화</button></span>
|
||||
@@ -124,6 +124,7 @@
|
||||
vm.ModalOpen('modal02');
|
||||
} else if(rsp.retCode == '4006') {
|
||||
// msg = '비밀번호를 변경하신지 90일이 지났습니다.\n비밀번호 변경 화면으로 이동합니다.';
|
||||
vm.chgChkUserId();
|
||||
vm.ModalOpen('modal04');
|
||||
} else if(rsp.retCode == '4007') {
|
||||
// msg = '관리자 승인 후 이용할 수 있습니다.';
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
<div class="login-form">
|
||||
<div>
|
||||
|
||||
<input type="text" placeholder="아이디를 입력하세요"></div>
|
||||
<input type="text" placeholder="아이디를 입력하세요" v-model="userId"></div>
|
||||
<div class="button_group">
|
||||
<button class="btn-pcolor" @click="ajaxReset">비밀번호 초기화 문자 발송하기</button>
|
||||
<button class="btn-default" @click="clickMenu('/login')">취소</button>
|
||||
<button class="btn-pcolor">비밀번호 초기화 문자 발송하기</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
@@ -39,13 +39,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import api from '../service/api';
|
||||
import api from '../service/api';
|
||||
import LoginPopup from '@/components/LoginPopup.vue';
|
||||
|
||||
export default {
|
||||
name: 'resetPassword',
|
||||
data() {
|
||||
return {}
|
||||
data: function() {
|
||||
return {
|
||||
errors: [],
|
||||
userId: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$store.commit("login/isLogin", false);
|
||||
@@ -55,31 +57,44 @@ export default {
|
||||
LoginPopup
|
||||
},
|
||||
methods: {
|
||||
// ajaxReset: function(){
|
||||
// var vm = this;
|
||||
// vm.errmsg = null;
|
||||
// // if (!vm.formCheck()) return false;
|
||||
formCheck: function()
|
||||
{
|
||||
this.errors = [];
|
||||
if (!this.userId) {
|
||||
this.errors.push('아이디를 입력해 주세요.');
|
||||
}
|
||||
|
||||
// var params = {
|
||||
// //"corpId": this.corpId,
|
||||
// // "userPwd": this.userPwd,
|
||||
return this.errors.length == 0;
|
||||
},
|
||||
|
||||
// } // 주석으로 인한
|
||||
// api.newpwd(params).then(function(response){
|
||||
// var rsp = response.data;
|
||||
// console.log("RESULT_CODE : "+rsp.retCode);
|
||||
// if(rsp.retCode == '000'){
|
||||
// // vm.$store.commit("login/isLogin", true);
|
||||
// //vm.$store.commit("login/isAuthChk", true);
|
||||
ajaxReset: function(){
|
||||
var vm = this;
|
||||
//vm.errmsg = null;
|
||||
if (!vm.formCheck()) return false;
|
||||
|
||||
// vm.ModalOpen('modal12');
|
||||
// // vm.$router.push({ path : 'view/login'});
|
||||
// } else {
|
||||
// return;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// ,
|
||||
var params =
|
||||
{
|
||||
"userId": this.userId,
|
||||
//"userPwd": this.userPwd,
|
||||
}
|
||||
api.resetPassword(params).then(function(response){
|
||||
var rsp = response.data;
|
||||
console.log("RESULT_CODE : "+rsp.retCode);
|
||||
|
||||
if(rsp.retCode == '0000'){
|
||||
// vm.$store.commit("login/isLogin", true);
|
||||
//vm.$store.commit("login/isAuthChk", true);
|
||||
|
||||
vm.ModalOpen('modal12');
|
||||
// vm.$router.push({ path : 'view/login'});
|
||||
} else if(rsp.retCode == '4003') {
|
||||
vm.ModalOpen('modal13');
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
,
|
||||
clickMenu(link) {
|
||||
|
||||
this
|
||||
|
||||
163
frontend/src/modules/login/views/UpdatePassword.vue
Normal file
@@ -0,0 +1,163 @@
|
||||
<template>
|
||||
<div class="wrap bg-wrap">
|
||||
<!-- s: 비밀번호변경 -->
|
||||
<div id="cpf" class="login-box pw-change">
|
||||
<div class="logo"></div>
|
||||
<div class="wbox">
|
||||
<h3 class="title">비밀번호 변경</h3>
|
||||
<p class="desc">임시비밀번호로 로그인할 경우 비밀번호를 변경 후<br>서비스 이용이 가능합니다.</p>
|
||||
<form @submit.prevent="changedPwd">
|
||||
<ul class="pw-form">
|
||||
<div><input id="oldPw" type="text" placeholder="기존 비밀번호를 입력하세요" v-model="oldPw" ref="oldPw"></div>
|
||||
<div>
|
||||
<input id="newPw" type="text" placeholder="새로운 비밀번호를 입력하세요" v-model="newPw" ref="newPw" maxlength="16">
|
||||
</div>
|
||||
<div><input type="text" placeholder="새로운 비밀번호를 다시 한 번 입력하세요" ></div>
|
||||
<div><button class="btn-pcolor" @click="changedPwd()">비밀번호 변경하기</button></div>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<login-popup ref="LoginPopup"> </login-popup>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from '../service/api';
|
||||
import { mapGetters } from 'vuex';
|
||||
import LoginPopup from '@/components/LoginPopup.vue';
|
||||
import tokenSvc from '@/common/token-service';
|
||||
import { commonPwdView, validation } from '../service/mixins';
|
||||
// import { chkPattern } from '@/common/vue-mixins';
|
||||
// import * as utils from '@/common/utils';
|
||||
export default {
|
||||
mixins: [commonPwdView, validation],
|
||||
data: function() {
|
||||
return {
|
||||
userId: '',
|
||||
oldPw: '',
|
||||
newPw: '',
|
||||
passwordValidFlag: true,
|
||||
};
|
||||
},
|
||||
|
||||
created: function() {
|
||||
if(!!tokenSvc.getToken()){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
this.$router.push({ path: '/' });
|
||||
}else{
|
||||
// if(!this.getLogin){
|
||||
// this.$router.push({ path: '/login' });
|
||||
// }
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.$refs.chkSaveId.checked = true;
|
||||
|
||||
if (localStorage.hubwebUserId) {
|
||||
this.userId = localStorage.hubwebUserId;
|
||||
}
|
||||
this.isLogin = this.getLogin;
|
||||
this.oldPw = this.getPwd;
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters({
|
||||
getLogin: 'login/isLogin',
|
||||
getPwd: 'login/getPwd'
|
||||
}),
|
||||
},
|
||||
|
||||
watch: {
|
||||
getLogin(data) {
|
||||
if (data != null && data != '' && data == true) {
|
||||
this.isLogin = true;
|
||||
} else {
|
||||
this.isLogin = false;
|
||||
}
|
||||
},
|
||||
getPwd(data) {
|
||||
if(data != null && data != ''){
|
||||
this.pwd = data;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
LoginPopup : LoginPopup
|
||||
},
|
||||
|
||||
methods: {
|
||||
verifyNewPw: function() {
|
||||
this.message.newPw = '';
|
||||
},
|
||||
|
||||
formCheck: function() {
|
||||
this.errors = [];
|
||||
|
||||
|
||||
if (!this.oldPw) this.errors.push('기존비밀번호');
|
||||
if (!this.newPw) this.errors.push('새로운비밀번호');
|
||||
|
||||
return this.errors.length == 0;
|
||||
},
|
||||
|
||||
|
||||
changedPwd: function() {
|
||||
|
||||
var vm = this;
|
||||
|
||||
var params = {
|
||||
|
||||
"userId": this.userId,
|
||||
"oldPw": this.oldPw,
|
||||
"newPw": this.newPw
|
||||
}
|
||||
|
||||
api.updatePassword(params).then(function(response) {
|
||||
var rsp = response.data;
|
||||
// var pofo = document.getElementById('oldPw');
|
||||
|
||||
if(rsp.retCode == '0000') {
|
||||
// vm.chgChkUserId();
|
||||
|
||||
if(vm.ModalOpen('modal16')){
|
||||
vm.$router.push({ path: '/login' });
|
||||
}
|
||||
} else if(rsp.retCode == '4016') {
|
||||
vm.ModalOpen('modal14')
|
||||
} else if(rsp.retCode == '4017') {
|
||||
vm.ModalOpen('modal15')
|
||||
} else if(rsp.retCode == '4003') {
|
||||
if(vm.ModalOpen('modal14')) {
|
||||
//수정사항 : 모달오픈 -> 기존비밀번호 포커스
|
||||
alert('1');
|
||||
}
|
||||
|
||||
// //this.$refs.oldPw.focus();
|
||||
// alert('비밀번호 유효성체크');
|
||||
// vm.$refs.oldPw.focus();
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
ModalOpen: function(target){
|
||||
this.$refs.LoginPopup.ModalOpen(target);
|
||||
// this.$refs.oldPw.focus(target);
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
273
frontend/src/modules/sysMgt/AdminList.vue
Normal file
@@ -0,0 +1,273 @@
|
||||
<template>
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">관리자/유치채널 관리</h3>
|
||||
<p class="breadcrumb">시스템관리 > 관리자/유치채널 관리</p>
|
||||
</div>
|
||||
<form autocomplete="off" class="search_form">
|
||||
<div class="search_wrap">
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">권한</label>
|
||||
<select name="" id="right" v-model="grid.params.searchType1" @keyup.enter="search">
|
||||
<option value="">전체</option>
|
||||
<option v-for="(option, i) in authType" v-bind:value="option.autCd" v-bind:key="i">
|
||||
{{ option.autNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">상태</label>
|
||||
<select name="" id="" v-model="grid.params.searchType2" @keyup.enter="search">
|
||||
<option value="" selected>전체</option>
|
||||
<option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i">
|
||||
{{ option.codeNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box id">
|
||||
<label for="id1" class="label">ID</label>
|
||||
<input type="text" id="id1" placeholder="검색어 입력" v-model="grid.params.searchText1" @keyup.enter="search"/>
|
||||
</div>
|
||||
<div class="input_box">
|
||||
<label for="name" class="label">이름(대리점명)</label>
|
||||
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.searchText2" @keyup.enter="search"/>
|
||||
</div>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{ totalItems }}</span>건</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue admin add" @click="adminRegPopOpen();">관리자 등록</button>
|
||||
<button type="button" class="button blue channel add" @click="adminReg2PopOpen();">유치채널 등록</button>
|
||||
<button type="button" class="button white delete del" @click="deleteRow();">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<custom-grid
|
||||
ref="table"
|
||||
:totalItems="'totalItems'"
|
||||
:url="grid.url"
|
||||
:pagePerRows="grid.pagePerRows"
|
||||
:initialRequest="grid.initialRequest"
|
||||
:pagination="grid.pagination"
|
||||
:isCheckbox="grid.isCheckbox"
|
||||
:columns="grid.columns"
|
||||
:noDataStr="grid.noDataStr"
|
||||
:addCls="grid.addCls"
|
||||
:header="grid.headder"
|
||||
></custom-grid>
|
||||
</div>
|
||||
<admin-reg-pop ref="adminRegModal"> </admin-reg-pop>
|
||||
<!-- <admin-reg2-pop ref="adminReg2Modal"> </admin-reg2-pop> -->
|
||||
<admin-detail-pop ref="adminDetailModal"> </admin-detail-pop>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
import AdminRegPop from '../components/AdminRegPop';
|
||||
//import AdminReg2Pop from '../components/AdminReg2Pop';
|
||||
import AdminDetailPop from '../components/AdminDetailPop';
|
||||
import api from '@/service/api.js';
|
||||
import sysMgtApi from "../service/sysMgtApi.js";
|
||||
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('a');
|
||||
el.href = 'javascript:void(0);';
|
||||
el.className = 'btn_text';
|
||||
el.innerText= String(props.colValue)
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
selEl.addEventListener("click", () => {
|
||||
const { callback } = this.props["cgrido" + this.props.colName].options;
|
||||
callback(this.props);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'adminList',
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
authType: [],
|
||||
statType: [],
|
||||
cate2Code: "",
|
||||
totalItems: 0,
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 20,
|
||||
grid: {
|
||||
url: '/api/v1/bo/sysMgt/adminList',
|
||||
pagePerRows: 20,
|
||||
pagination: true,
|
||||
isCheckbox: true, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
columns: [
|
||||
{ name: 'no', header: 'No', align: 'center', width: 60},
|
||||
{ name: 'auth', header: '권한', align: 'center', width: 160 },
|
||||
{ name: 'name', header: '이름(대리점명)', align: 'center', width: 130, renderer: {
|
||||
type: CustomATagRenderer
|
||||
, options: {
|
||||
callback: this.detailPop,
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'adminId', header: 'ID', align: 'center', width: 130},
|
||||
{ name: 'adminStat', header: '상태', align: 'center', width: 130, cls: 'td_line'},
|
||||
{ name: 'regDt', header: '등록일', align: 'center', width: 130}
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchText1: '',
|
||||
searchText2: ''
|
||||
},
|
||||
excelHeader: []
|
||||
}
|
||||
};
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid,
|
||||
// SystemPopup,
|
||||
AdminRegPop,
|
||||
//AdminReg2Pop,
|
||||
AdminDetailPop
|
||||
},
|
||||
created(){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
this.setCodeData();
|
||||
//let cont = document.querySelector(".wrap");
|
||||
//cont.classList.add("main_wrap");
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition : '+getCondition);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
if (getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
this.search(isKeep);
|
||||
},
|
||||
methods: {
|
||||
search: function(isKeep) {
|
||||
console.log('this.perPageCnt'+this.perPageCnt);
|
||||
//console.log(this.grid.params);
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
detailPop(props) {
|
||||
// this.getMainSlot().popupView(4);
|
||||
// this.setDtlPpPrm(props);
|
||||
this.$refs.adminDetailModal.adminDetailModalOpen(props);
|
||||
},
|
||||
ModalOpen: function(target){
|
||||
//this.$refs.systemModal.ModalOpen(target);
|
||||
},
|
||||
adminRegPopOpen: function(){
|
||||
this.$refs.adminRegModal.ModalOpen(1);
|
||||
},
|
||||
adminReg2PopOpen: function(){
|
||||
this.$refs.adminRegModal.ModalOpen(2);
|
||||
//this.$refs.adminReg2Modal.adminReg2ModalOpen();//
|
||||
},
|
||||
doValidate(){ //로우데이터 삭제하도록 수정
|
||||
|
||||
console.log("totalItems >> " + this.totalItems);
|
||||
if(this.totalItems == 0){
|
||||
alert('검색 결과가 없습니다.');
|
||||
return false;
|
||||
}
|
||||
var chkList = this.$refs.table.checkedElementDatas();
|
||||
if(chkList.length == 0){
|
||||
alert('체크박스에 체크를 해주세요.');
|
||||
return false;
|
||||
}
|
||||
// for(var i = 0; i < chkList.length; i++){
|
||||
// alert(chkList[i].adminId);
|
||||
// }
|
||||
const param = chkList.map((row)=>({adminId:row.adminId}));
|
||||
this.row.list = param;
|
||||
console.log(this.row);
|
||||
return true;
|
||||
},
|
||||
sendStoreData: function() {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
//console.log("getCondition : "+ getCondition.perPage);
|
||||
},
|
||||
setCodeData() {
|
||||
|
||||
// 상태 옵션 셋팅.
|
||||
api.commCode({'grpCd' : 'ADM_STTUS_CD'}).then(response => {
|
||||
this.statType = response.data.data.list;
|
||||
});
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
async deleteRow(){
|
||||
if(this.doValidate() && window.confirm('삭제 하시겠습니까?')){
|
||||
try {
|
||||
let response = await sysMgtApi.deleteAdmin(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('삭제 하였습니다.');
|
||||
// grid.reloadData();
|
||||
this.$refs.table.reloadData();
|
||||
return;
|
||||
}
|
||||
alert("실패 하였습니다.");
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
107
frontend/src/modules/sysMgt/AuthList.vue
Normal file
@@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">권한 관리</h3>
|
||||
<p class="breadcrumb">시스템관리 > 권한 관리</p>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>4</span>건</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue add" onclick="location.href='system_right_add.html';">권한 추가</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="10%"/>
|
||||
<col width="20%"/>
|
||||
<col width="20%"/>
|
||||
<col width="15%"/>
|
||||
<col width="20%"/>
|
||||
<col width="15%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>NO</th>
|
||||
<th>코드</th>
|
||||
<th>권한명</th>
|
||||
<th>상태</th>
|
||||
<th>등록일</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>Admin_01</td>
|
||||
<td>슈퍼관리자</td>
|
||||
<td>사용</td>
|
||||
<td>2022-03-10</td>
|
||||
<td class="two_btn_group">
|
||||
<button type="button" class="button grey" onclick="location.href='system_right_modify.html';">수정</button>
|
||||
<button type="button" class="button white delete">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>Admin_01</td>
|
||||
<td>슈퍼관리자</td>
|
||||
<td>사용</td>
|
||||
<td>2022-03-10</td>
|
||||
<td class="two_btn_group">
|
||||
<button type="button" class="button grey">수정</button>
|
||||
<button type="button" class="button white delete">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Admin_01</td>
|
||||
<td>슈퍼관리자</td>
|
||||
<td>사용</td>
|
||||
<td>2022-03-10</td>
|
||||
<td class="two_btn_group">
|
||||
<button type="button" class="button grey">수정</button>
|
||||
<button type="button" class="button white delete">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Admin_01</td>
|
||||
<td>슈퍼관리자</td>
|
||||
<td>사용</td>
|
||||
<td>2022-03-10</td>
|
||||
<td class="two_btn_group">
|
||||
<button type="button" class="button grey">수정</button>
|
||||
<button type="button" class="button white delete">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'authList',
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
components: {
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
237
frontend/src/modules/sysMgt/components/AdminDetailPop.vue
Normal file
@@ -0,0 +1,237 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<div class="dimmed modal21" @click="adminDetailModalClose();"></div>
|
||||
<div class="popup-wrap modal21">
|
||||
<!-- 관리자/유치채널 상세정보 -->
|
||||
<div class="popup modal21 popup_form">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit" v-if="code === null || code === ''">관리자 상세정보</h3>
|
||||
<h3 class="pop-tit" v-else>유치채널 상세정보</h3>
|
||||
</div>
|
||||
<form autocomplete="off" ref="adminDetailForm">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td><input type="text" disabled v-model.trim="madangId" ref="_madangId2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd1" v-model.trim="userPwd1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호 확인</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd2" v-model.trim="userPwd2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이름</th>
|
||||
<td><input type="text" disabled v-model.trim="userNm" ref="_userNm"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>휴대폰번호</th>
|
||||
<td><input type="number" disabled v-model.trim="mdn" ref="_phone"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td><input type="email" disabled v-model.trim="email" ref="_email"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>권한</th>
|
||||
<td v-if="code === null || code === ''">
|
||||
<div v:class="select_box">
|
||||
<select name="" id="right" v-model="auth" ref="_auth">
|
||||
<option value="">선택</option>
|
||||
<option
|
||||
v-for="(option, i) in authType"
|
||||
v-bind:value="option.autCd"
|
||||
v-bind:key="i"
|
||||
:selected="auth === option.autCd">
|
||||
{{ option.autNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<td v-else><input type="text" disabled value="대리점"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="center">상태</th>
|
||||
<td>
|
||||
<input type="radio" name="state" value="01" id="popup_radio1"
|
||||
v-model="stat"
|
||||
:checked="stat == '1'">
|
||||
<label for="popup_radio1">사용</label>
|
||||
<input type="radio" name="state" value="02" id="popup_radio2"
|
||||
v-model="stat"
|
||||
:checked="stat == '02'">
|
||||
<label for="popup_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" @click="adminDetailModalClose();">취소</button>
|
||||
<button class="btn-pcolor" @click="doInsert">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 관리자 상세정보 팝업 끝-->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import api from '@/service/api';
|
||||
import sysMgtApi from "../service/sysMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import lodash from "lodash";
|
||||
|
||||
export default {
|
||||
name: "adminDetailPop",
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
watch:{
|
||||
stat(){
|
||||
console.log('watch : ', this.stat)
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
row: {},
|
||||
authType: [],
|
||||
|
||||
madangId:'',
|
||||
name:'',
|
||||
mdn:'',
|
||||
email:'',
|
||||
auth:'',
|
||||
stat: '',
|
||||
userNm:"",
|
||||
userPwd1:"",
|
||||
userPwd2:"",
|
||||
code:"",
|
||||
}
|
||||
},
|
||||
model: {
|
||||
prop: 'sendData',
|
||||
event: 'event-data'
|
||||
},
|
||||
props: ['sendData'],
|
||||
created(){
|
||||
//this.formReset();
|
||||
this.setAuthData();
|
||||
},
|
||||
methods :{
|
||||
doPwdValidate(){
|
||||
if(this.isNull(this.userPwd2)){
|
||||
alert("비밀번호 확인을 입력해 주세요.");
|
||||
this.$refs._pwd2.focus();
|
||||
return false;
|
||||
}
|
||||
if(!lodash.isEqual(this.userPwd1, this.userPwd2)){
|
||||
alert("비밀번호가 일치하지 않습니다.");
|
||||
this.$refs._pwd2.focus();
|
||||
return false;
|
||||
}
|
||||
const pwdLen = this.bytes(this.userPwd1);
|
||||
if(!(pwdLen >= 8 && pwdLen <= 16)){
|
||||
alert("비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.");
|
||||
this.$refs._pwd1.focus();
|
||||
return false;
|
||||
}
|
||||
const pEng = /[A-Za-z]/g; // 영문자
|
||||
const pNum = /[0-9]/g; // 숫자
|
||||
const pSpc = /[!@$%^&*]/g; // 특수문자
|
||||
if(!(pEng.test(this.userPwd1) && pNum.test(this.userPwd1) && pSpc.test(this.userPwd1))) {
|
||||
alert("비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.");
|
||||
this.$refs._pwd1.focus();
|
||||
return;
|
||||
}
|
||||
this.row.adminPw=this.userPwd1;
|
||||
return true;
|
||||
},
|
||||
doValidate(){
|
||||
if(!this.isNull(this.userPwd1)){
|
||||
if(!this.doPwdValidate()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(!this.isNull(this.auth)){
|
||||
if(this.code == ''){
|
||||
this.row.auth = this.auth;
|
||||
}else{
|
||||
this.row.auth=this.auth;
|
||||
}
|
||||
}
|
||||
if(!this.isNull(this.stat)){
|
||||
this.row.stat=this.stat;
|
||||
}
|
||||
this.row.adminId=this.madangId;
|
||||
return true;
|
||||
},
|
||||
// 모달 띄우기
|
||||
async adminDetailModalOpen(props){
|
||||
this.row.adminId = props.adminId;
|
||||
try {
|
||||
const response = await sysMgtApi.adminDetail(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.madangId = result.data.adminId;
|
||||
this.auth = result.data.auth;
|
||||
this.userNm = result.data.name;
|
||||
this.email = result.data.email;
|
||||
this.mdn = result.data.mdn;
|
||||
this.stat = result.data.stat;
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
var dimmed = document.getElementsByClassName('modal21');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
// 모달 끄기
|
||||
adminDetailModalClose(){
|
||||
this.formReset();
|
||||
var dimmed = document.getElementsByClassName('modal21');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
toComplete(){
|
||||
this.getParent('adminList').$refs.table.reloadData();
|
||||
this.adminDetailModalClose();
|
||||
},
|
||||
async doInsert(){
|
||||
if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
|
||||
try {
|
||||
const response = await sysMgtApi.updateAdmin(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('저장 하였습니다.');
|
||||
this.toComplete();
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
},
|
||||
setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
formReset(){
|
||||
this.$refs.adminDetailForm.reset();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
|
||||
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
|
||||
.popup-btn-wrap button:hover {background: #000; color: #fff;}
|
||||
</style>
|
||||
265
frontend/src/modules/sysMgt/components/AdminRegPop.vue
Normal file
@@ -0,0 +1,265 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed" @click="ModalClose();"></div>
|
||||
<div class="popup-wrap">
|
||||
<!-- 관리자/유치채널 등록 -->
|
||||
<div class="popup modal20 popup_form">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit" v-if="insertType === 1">관리자 등록</h3>
|
||||
<h3 class="pop-tit" v-else>유치채널 사용자 등록</h3>
|
||||
</div>
|
||||
<form autocomplete="off" ref="adminRegForm">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>마당 ID</th>
|
||||
<td class="input_search">
|
||||
<input type="text" placeholder="아이디 입력" v-model.trim="madangId" ref="madangId">
|
||||
<button type="button" class="button grey" >조회</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd1" v-model.trim="userPwd1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호 확인</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd2" v-model.trim="userPwd2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이름</th>
|
||||
<td><input type="text" @keypress="onlyName" @input="onlyName" v-model.trim="userNm" ref="_userNm" required maxlength="40"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>휴대폰번호</th>
|
||||
<td><input type="number" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" v-on:keyup="onlyNum" @input="onlyNum" minlength="10" maxlength="11" ref="_phone"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td><input type="email" v-model.trim="email" @keypress="onlyEmail" @input="onlyEmail" maxlength="20" ref="_email"></td>
|
||||
</tr>
|
||||
<tr v-if="insertType === 2">
|
||||
<th>코드</th>
|
||||
<td><input type="text" disabled ref="_code" v-model.trim="code"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>권한</th>
|
||||
<td v-if="insertType === 1">
|
||||
<div v:class="select_box">
|
||||
<select name="" id="right" v-model="auth" ref="_auth">
|
||||
<option value="">선택</option>
|
||||
<option v-for="(option, i) in authType" v-bind:value="option.autCd" v-bind:key="i">
|
||||
{{ option.autNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<td v-else><input type="text" disabled value="대리점"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="center">상태</th>
|
||||
<td>
|
||||
<input type="radio" name="state" value="01" id="popup_radio1" v-model="stat">
|
||||
<label for="popup_radio1">사용</label>
|
||||
<input type="radio" name="state" value="02" id="popup_radio2" v-model="stat">
|
||||
<label for="popup_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
<button class="btn-pcolor" @click="doInsert">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from '@/service/api';
|
||||
import sysMgtApi from "../service/sysMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import lodash from "lodash";
|
||||
|
||||
export default {
|
||||
name: "adminRegPop",
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
watch:{
|
||||
stat(){
|
||||
console.log('watch : ', this.stat)
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
row: {},
|
||||
authType: [],
|
||||
insertType:0,
|
||||
madangId:'',
|
||||
name:'',
|
||||
mdn:'',
|
||||
email:'',
|
||||
auth:'',
|
||||
stat: '',
|
||||
userNm:"",
|
||||
userPwd1:"",
|
||||
userPwd2:"",
|
||||
code:"",
|
||||
}
|
||||
},
|
||||
model: {
|
||||
prop: 'sendData',
|
||||
event: 'event-data'
|
||||
},
|
||||
props: ['sendData'],
|
||||
created(){
|
||||
this.formReset();
|
||||
this.setAuthData();
|
||||
},
|
||||
methods :{
|
||||
doPwdValidate(){
|
||||
if(this.isNull(this.userPwd1)){
|
||||
alert("비밀번호를 입력해 주세요.");
|
||||
this.$refs._pwd1.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.userPwd2)){
|
||||
alert("비밀번호 확인을 입력해 주세요.");
|
||||
this.$refs._pwd2.focus();
|
||||
return false;
|
||||
}
|
||||
if(!lodash.isEqual(this.userPwd1, this.userPwd2)){
|
||||
alert("비밀번호가 일치하지 않습니다.");
|
||||
this.$refs._pwd2.focus();
|
||||
return false;
|
||||
}
|
||||
const pwdLen = this.bytes(this.userPwd1);
|
||||
if(!(pwdLen >= 8 && pwdLen <= 16)){
|
||||
alert("비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.");
|
||||
this.$refs._pwd1.focus();
|
||||
return false;
|
||||
}
|
||||
const pEng = /[A-Za-z]/g; // 영문자
|
||||
const pNum = /[0-9]/g; // 숫자
|
||||
const pSpc = /[!@$%^&*]/g; // 특수문자
|
||||
if(!(pEng.test(this.userPwd1) && pNum.test(this.userPwd1) && pSpc.test(this.userPwd1))) {
|
||||
alert("비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.");
|
||||
this.$refs._pwd1.focus();
|
||||
return;
|
||||
}
|
||||
this.row.adminPw=this.userPwd1;
|
||||
return true;
|
||||
},
|
||||
doValidate(){
|
||||
if(!this.doPwdValidate()){
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.userNm)){
|
||||
alert("이름을 입력해 주세요");
|
||||
this.$refs._userNm.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.mdn)){
|
||||
alert('휴대폰번호를 입력해주세요.');
|
||||
this.$refs._phone.focus();
|
||||
return false;
|
||||
}
|
||||
const hp = this.mdn;
|
||||
if(!this.isNull(hp) && !this.isMobile(hp)){
|
||||
alert("휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요");
|
||||
this.$refs._phone.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.email)){
|
||||
alert('이메일을 입력해주세요.');
|
||||
this.$refs._email.focus();
|
||||
return false;
|
||||
}
|
||||
const email = this.email;
|
||||
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
|
||||
alert("이메일 형식이 잘못되었습니다. 확인해 주세요");
|
||||
this.$refs._email.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.auth)){
|
||||
alert('권한을 선택 해주세요.');
|
||||
this.$refs._auth.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.stat)){
|
||||
alert('상태를 선택 해주세요.');
|
||||
// this.$refs._auth.focus();
|
||||
return false;
|
||||
}
|
||||
this.row.madangId=this.madangId;
|
||||
this.row.name=this.userNm;
|
||||
this.row.mdn=hp;
|
||||
this.row.email=email;
|
||||
if(this.insertType == 2){
|
||||
this.row.auth='1003';
|
||||
}else{
|
||||
this.row.auth=this.auth;
|
||||
}
|
||||
this.row.stat=this.stat;
|
||||
return true;
|
||||
},
|
||||
// 모달 띄우기
|
||||
ModalOpen(insertType){
|
||||
this.insertType=insertType;
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
dimmed[0].style.display = 'block';
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
wrap[0].style.display = 'block';
|
||||
var obj = document.getElementsByClassName('modal20');
|
||||
obj[0].style.display = 'block';
|
||||
},
|
||||
// 모달 끄기
|
||||
ModalClose(){
|
||||
this.formReset();
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
dimmed[0].style.display = 'none';
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
wrap[0].style.display = 'none';
|
||||
var popup = document.getElementsByClassName('modal20');
|
||||
popup[0].style.display = 'none';
|
||||
|
||||
},
|
||||
// 저장 후 부모창 호출.
|
||||
toComplete(){
|
||||
this.getParent('adminList').$refs.table.reloadData();
|
||||
this.ModalClose();
|
||||
},
|
||||
async doInsert(){
|
||||
if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
|
||||
try {
|
||||
const response = await sysMgtApi.insertAdmin(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('저장 하였습니다.');
|
||||
this.toComplete();
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
},
|
||||
setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
formReset(){
|
||||
this.$refs.adminRegForm.reset();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
|
||||
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
|
||||
.popup-btn-wrap button:hover {background: #000; color: #fff;}
|
||||
</style>
|
||||
353
frontend/src/modules/sysMgt/service/mixins.js
Normal file
@@ -0,0 +1,353 @@
|
||||
import lodash from "lodash";
|
||||
|
||||
const utils_mixin = {
|
||||
methods:{
|
||||
/** * 이메일 형식 체크 * * @param 데이터 */
|
||||
emailCheck(email,rtnArrYn) {
|
||||
if(this.isNull(rtnArrYn)){
|
||||
rtnArrYn='N';
|
||||
}
|
||||
// var regExp = /(^[A-Za-z0-9_\.\-]+)@([A-Za-z0-9\-]+\.[A-Za-z0-9\-]+)/;
|
||||
var regExp = /^([0-9a-zA-Z_\.\-]([-_.]?[0-9a-zA-Z_\.\-])*)@([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$)/i;//이메일 정규식
|
||||
|
||||
if(regExp.test(email) == false) {
|
||||
// 이메일 형식이 알파벳+숫자@알파벳+숫자.알파벳+숫자 형식이 아닐경우
|
||||
if(rtnArrYn == 'Y'){
|
||||
return email;
|
||||
}
|
||||
return false;
|
||||
}else{
|
||||
var myArray = regExp.exec(email);
|
||||
if(rtnArrYn == 'Y'){
|
||||
return myArray;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
},
|
||||
/** * 전화번호 포맷으로 변환 * * @param 데이터 */
|
||||
formatPhone(phoneNum,fmt,rtnArrYn) {
|
||||
if(this.isNull(fmt)){
|
||||
fmt='';
|
||||
}
|
||||
if(this.isNull(rtnArrYn)){
|
||||
fmt='N';
|
||||
}
|
||||
if(this.isPhone(phoneNum)) {
|
||||
var rtnNum;
|
||||
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/;
|
||||
var myArray;
|
||||
if(regExp.test(phoneNum)){
|
||||
myArray = regExp.exec(phoneNum);
|
||||
rtnNum = myArray[1]+fmt + myArray[2]+fmt+myArray[3];
|
||||
if(rtnArrYn == 'Y'){
|
||||
return myArray;
|
||||
}
|
||||
return rtnNum;
|
||||
} else {
|
||||
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
|
||||
if(regExp.test(phoneNum)){
|
||||
myArray = regExp.exec(phoneNum);
|
||||
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3];
|
||||
if(rtnArrYn == 'Y'){
|
||||
return myArray;
|
||||
}
|
||||
return rtnNum;
|
||||
} else {
|
||||
return phoneNum;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return phoneNum;
|
||||
}
|
||||
},
|
||||
/** * 핸드폰번호 포맷으로 변환 * * @param 데이터 */
|
||||
formatMobile(phoneNum,fmt,rtnArrYn) {
|
||||
|
||||
if(this.isNull(fmt)){
|
||||
fmt='';
|
||||
}
|
||||
if(this.isNull(rtnArrYn)){
|
||||
fmt='N';
|
||||
}
|
||||
if(this.isMobile(phoneNum)) {
|
||||
|
||||
var rtnNum;
|
||||
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/;
|
||||
var myArray;
|
||||
|
||||
if(regExp.test(phoneNum)){
|
||||
|
||||
myArray = regExp.exec(phoneNum);
|
||||
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3];
|
||||
if(rtnArrYn == 'Y'){
|
||||
return myArray;
|
||||
}
|
||||
return rtnNum;
|
||||
} else {
|
||||
return phoneNum;
|
||||
}
|
||||
} else {
|
||||
return phoneNum;
|
||||
}
|
||||
},
|
||||
|
||||
/** * 전화번호 형식 체크 * * @param 데이터 */
|
||||
isPhone(phoneNum) {
|
||||
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/;
|
||||
if(regExp.test(phoneNum)){
|
||||
return true;
|
||||
} else {
|
||||
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
|
||||
if(regExp.test(phoneNum)){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/** * 핸드폰번호 형식 체크 * * @param 데이터 */
|
||||
isMobile(phoneNum) {
|
||||
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/;
|
||||
var myArray;
|
||||
if(regExp.test(phoneNum)){
|
||||
myArray = regExp.exec(phoneNum);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
isMobile2(phoneNum) {
|
||||
var regExp =/(1[016789])([0-9]{3,4})([0-9]{4})$/;
|
||||
var myArray;
|
||||
if(regExp.test(phoneNum)){
|
||||
myArray = regExp.exec(phoneNum);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
isNull(obj){
|
||||
if(lodash.isNil(obj) || lodash.trim(obj) == ''){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getParent(name){
|
||||
let p = this.$parent;
|
||||
while(typeof p !== 'undefined'){
|
||||
if(p.$options.name == name) {
|
||||
return p;
|
||||
}else {
|
||||
p = p.$parent;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getJsonObj(str){
|
||||
return JSON.parse(JSON.stringify(str));
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var chkPattern2 = {
|
||||
data: function () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selSesStorage(keyLike){
|
||||
if(this.isNull(keyLike)){
|
||||
return null;
|
||||
}
|
||||
if(sessionStorage.length > 0){
|
||||
let keyList = [];
|
||||
for(let i=0;i<sessionStorage.length;i++){
|
||||
const keyNm = sessionStorage.key(i);
|
||||
if(keyNm.indexOf(keyLike) > -1){
|
||||
keyList.push({name : keyNm, value : sessionStorage.getItem(keyNm)});
|
||||
}
|
||||
}
|
||||
if(keyList.length > 0){
|
||||
return keyList;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
delSesStorage(keyList){
|
||||
if(this.isNull(keyList)){
|
||||
return null;
|
||||
}
|
||||
if(keyList.length > 0){
|
||||
keyList.map((o) => (sessionStorage.removeItem(o.name)));
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
setGridMouseDownActive(){
|
||||
const ele = document.querySelector(`div.tui-grid-container.tui-grid-show-lside-area`);
|
||||
if(window.getEventListeners(ele).mousedown){
|
||||
ele.removeEventListener('mousedown',window.getEventListeners(ele).mousedown[0].listener);
|
||||
}
|
||||
},
|
||||
restrictChars : function($event,regExp,hanYn){
|
||||
|
||||
if(this.isNull(hanYn)){
|
||||
hanYn='N';
|
||||
}
|
||||
if(hanYn === 'N' && $event.type === 'keydown'){
|
||||
if($event.keyCode === 229){
|
||||
$event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if($event.type === 'keypress'){
|
||||
//한글 처리 불가
|
||||
if(regExp.test(String.fromCharCode($event.charCode))) {
|
||||
return true;
|
||||
}else{
|
||||
$event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(hanYn === 'N' && ( $event.type === 'keyup' || $event.type === 'input' || $event.type === 'change' || $event.type === 'blur')){
|
||||
$event.target.value = $event.target.value.replace(/[ㄱ-ㅎㅏ-ㅣ가-힣]/g,'');
|
||||
$event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
setLenth: function (e, len) {
|
||||
this.cut(e, len);
|
||||
},
|
||||
onlyCustom: function (e,strRegExp,hanYn) {
|
||||
var regExp_g = new RegExp(strRegExp,'g');
|
||||
this.cut(e);
|
||||
return this.restrictChars(e,regExp_g,hanYn);
|
||||
},
|
||||
onlyCommon: function(strRegExp, e, len, isEventCall, hanYn) {
|
||||
var regExp_g = new RegExp(strRegExp,'g');
|
||||
if(isEventCall === 'N'){
|
||||
if(!this.cut(e, len, isEventCall)){
|
||||
return false;
|
||||
}
|
||||
if(!regExp_g.test(e.value)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
this.cut(e, len);
|
||||
return this.restrictChars(e,regExp_g,hanYn);
|
||||
},
|
||||
onlyNum: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[0-9]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyEng: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Za-z]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyLowerEng: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[a-z]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyUpperEng: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Z]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyEmail: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[a-zA-Z0-9_\.\-@._-]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyName: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyTitle: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyText: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyPassword: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Za-z0-9!@#$%^&*]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyId: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Za-z0-9_\.\-]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyIp: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[0-9,.*]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyRoleNm_Space: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyRoleId_UnderBar: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[a-zA-Z0-9_]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
cut: function (ele, len, isValidChk) {
|
||||
let e=ele;
|
||||
if (typeof ele.target != "undefined") {
|
||||
e=ele.target;
|
||||
}
|
||||
let max = this.isNull(len) ? e.attributes.maxlength.value : len;
|
||||
let str = e.value;
|
||||
|
||||
if (this.bytes(str) > max) {
|
||||
if(this.isNull(isValidChk)){
|
||||
e.value = this.cutBytes(str, max);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
cutBytes: function (str, len) {
|
||||
while(1 === 1){
|
||||
if(this.bytes(str) <= len){
|
||||
return str;
|
||||
}
|
||||
str = str.slice(0,-1);
|
||||
}
|
||||
},
|
||||
bytes: function (str) {
|
||||
var length = ((s,b,i,c) => {
|
||||
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); // 한글 3바이트
|
||||
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?1:1); //한글 2바이트
|
||||
b=0,i=0;
|
||||
while(1 === 1){
|
||||
c = s.charCodeAt(i++);
|
||||
if (isNaN(c)) {
|
||||
break;
|
||||
}
|
||||
b += c >> 11 ? 2 : c >> 7 ? 1 : 1;
|
||||
}
|
||||
return b
|
||||
})(str);
|
||||
return length;
|
||||
},
|
||||
checkPhone: function(str) {
|
||||
str = str.replace(/[-\s]+/g, '');
|
||||
if (str.charAt(0)!="0"){
|
||||
str = "0"+str;
|
||||
}
|
||||
if (str.length<10||str.length>12){return "";}
|
||||
if (isNaN(str)){return ""; }
|
||||
if (str.substr(0,2)!="01" && str.substr(0,3)!="070" && str.substr(0,4)!="0505" && str.substr(0,4)!="0503"){return ""; }
|
||||
return str;
|
||||
|
||||
},
|
||||
}
|
||||
};
|
||||
export { utils_mixin, chkPattern2 };
|
||||
28
frontend/src/modules/sysMgt/service/sysMgtApi.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import httpClient from '@/common/http-client';
|
||||
|
||||
// HUBEZ_BO_API_4003 - 관리자 등록.
|
||||
const insertAdmin = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/insertAdmin', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
// HUBEZ_BO_API_4004 - 관리자 수정.
|
||||
const updateAdmin = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/updateAdmin', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
// HUBEZ_BO_API_4005 - 관리자 삭제
|
||||
const deleteAdmin = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/deleteAdmin', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
// HUBEZ_BO_API_4006 - 관리자 정보 상세 조회.
|
||||
const adminDetail = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/adminDetail', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
export default {
|
||||
insertAdmin,
|
||||
updateAdmin,
|
||||
deleteAdmin,
|
||||
adminDetail
|
||||
}
|
||||
373
frontend/src/modules/sysMgt/service/utils_mixin.js
Normal file
@@ -0,0 +1,373 @@
|
||||
import lodash from "lodash";
|
||||
import moment from "moment";
|
||||
import '@/modules/mgt/components/eventlisteners.js';
|
||||
|
||||
const filter_mixin = {
|
||||
filters: {
|
||||
_yyyy_mm_dd(val){
|
||||
if(lodash.isNil(val) || lodash.trim(val) == '') return '';
|
||||
const orgin = val;
|
||||
if(orgin.length < 8) {
|
||||
return orgin;
|
||||
}
|
||||
if(!Number(orgin)) return orgin;
|
||||
const date = orgin.substring(0,8);
|
||||
if(moment(date).isValid()){
|
||||
return moment(date).format('YYYY[-]MM[-]DD');
|
||||
}
|
||||
return orgin;
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
const utils_mixin = {
|
||||
methods:{
|
||||
/** * 이메일 형식 체크 * * @param 데이터 */
|
||||
emailCheck(email,rtnArrYn) {
|
||||
if(this.isNull(rtnArrYn)){
|
||||
rtnArrYn='N';
|
||||
}
|
||||
// var regExp = /(^[A-Za-z0-9_\.\-]+)@([A-Za-z0-9\-]+\.[A-Za-z0-9\-]+)/;
|
||||
var regExp = /^([0-9a-zA-Z_\.\-]([-_.]?[0-9a-zA-Z_\.\-])*)@([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$)/i;//이메일 정규식
|
||||
|
||||
if(regExp.test(email) == false) {
|
||||
// 이메일 형식이 알파벳+숫자@알파벳+숫자.알파벳+숫자 형식이 아닐경우
|
||||
if(rtnArrYn == 'Y'){
|
||||
return email;
|
||||
}
|
||||
return false;
|
||||
}else{
|
||||
var myArray = regExp.exec(email);
|
||||
if(rtnArrYn == 'Y'){
|
||||
return myArray;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
},
|
||||
/** * 전화번호 포맷으로 변환 * * @param 데이터 */
|
||||
formatPhone(phoneNum,fmt,rtnArrYn) {
|
||||
if(this.isNull(fmt)){
|
||||
fmt='';
|
||||
}
|
||||
if(this.isNull(rtnArrYn)){
|
||||
fmt='N';
|
||||
}
|
||||
if(this.isPhone(phoneNum)) {
|
||||
var rtnNum;
|
||||
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/;
|
||||
var myArray;
|
||||
if(regExp.test(phoneNum)){
|
||||
myArray = regExp.exec(phoneNum);
|
||||
rtnNum = myArray[1]+fmt + myArray[2]+fmt+myArray[3];
|
||||
if(rtnArrYn == 'Y'){
|
||||
return myArray;
|
||||
}
|
||||
return rtnNum;
|
||||
} else {
|
||||
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
|
||||
if(regExp.test(phoneNum)){
|
||||
myArray = regExp.exec(phoneNum);
|
||||
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3];
|
||||
if(rtnArrYn == 'Y'){
|
||||
return myArray;
|
||||
}
|
||||
return rtnNum;
|
||||
} else {
|
||||
return phoneNum;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return phoneNum;
|
||||
}
|
||||
},
|
||||
/** * 핸드폰번호 포맷으로 변환 * * @param 데이터 */
|
||||
formatMobile(phoneNum,fmt,rtnArrYn) {
|
||||
|
||||
if(this.isNull(fmt)){
|
||||
fmt='';
|
||||
}
|
||||
if(this.isNull(rtnArrYn)){
|
||||
fmt='N';
|
||||
}
|
||||
if(this.isMobile(phoneNum)) {
|
||||
|
||||
var rtnNum;
|
||||
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/;
|
||||
var myArray;
|
||||
|
||||
if(regExp.test(phoneNum)){
|
||||
|
||||
myArray = regExp.exec(phoneNum);
|
||||
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3];
|
||||
if(rtnArrYn == 'Y'){
|
||||
return myArray;
|
||||
}
|
||||
return rtnNum;
|
||||
} else {
|
||||
return phoneNum;
|
||||
}
|
||||
} else {
|
||||
return phoneNum;
|
||||
}
|
||||
},
|
||||
|
||||
/** * 전화번호 형식 체크 * * @param 데이터 */
|
||||
isPhone(phoneNum) {
|
||||
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/;
|
||||
if(regExp.test(phoneNum)){
|
||||
return true;
|
||||
} else {
|
||||
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
|
||||
if(regExp.test(phoneNum)){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/** * 핸드폰번호 형식 체크 * * @param 데이터 */
|
||||
isMobile(phoneNum) {
|
||||
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/;
|
||||
var myArray;
|
||||
if(regExp.test(phoneNum)){
|
||||
myArray = regExp.exec(phoneNum);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
isMobile2(phoneNum) {
|
||||
var regExp =/(1[016789])([0-9]{3,4})([0-9]{4})$/;
|
||||
var myArray;
|
||||
if(regExp.test(phoneNum)){
|
||||
myArray = regExp.exec(phoneNum);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
isNull(obj){
|
||||
if(lodash.isNil(obj) || lodash.trim(obj) == ''){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getParent(name){
|
||||
let p = this.$parent;
|
||||
while(typeof p !== 'undefined'){
|
||||
if(p.$options.name == name) {
|
||||
return p;
|
||||
}else {
|
||||
p = p.$parent;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getJsonObj(str){
|
||||
return JSON.parse(JSON.stringify(str));
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var chkPattern2 = {
|
||||
data: function () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selSesStorage(keyLike){
|
||||
if(this.isNull(keyLike)){
|
||||
return null;
|
||||
}
|
||||
if(sessionStorage.length > 0){
|
||||
let keyList = [];
|
||||
for(let i=0;i<sessionStorage.length;i++){
|
||||
const keyNm = sessionStorage.key(i);
|
||||
if(keyNm.indexOf(keyLike) > -1){
|
||||
keyList.push({name : keyNm, value : sessionStorage.getItem(keyNm)});
|
||||
}
|
||||
}
|
||||
if(keyList.length > 0){
|
||||
return keyList;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
delSesStorage(keyList){
|
||||
if(this.isNull(keyList)){
|
||||
return null;
|
||||
}
|
||||
if(keyList.length > 0){
|
||||
keyList.map((o) => (sessionStorage.removeItem(o.name)));
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
setGridMouseDownActive(){
|
||||
const ele = document.querySelector(`div.tui-grid-container.tui-grid-show-lside-area`);
|
||||
if(window.getEventListeners(ele).mousedown){
|
||||
ele.removeEventListener('mousedown',window.getEventListeners(ele).mousedown[0].listener);
|
||||
}
|
||||
},
|
||||
restrictChars : function($event,regExp,hanYn){
|
||||
|
||||
if(this.isNull(hanYn)){
|
||||
hanYn='N';
|
||||
}
|
||||
if(hanYn === 'N' && $event.type === 'keydown'){
|
||||
if($event.keyCode === 229){
|
||||
$event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if($event.type === 'keypress'){
|
||||
//한글 처리 불가
|
||||
if(regExp.test(String.fromCharCode($event.charCode))) {
|
||||
return true;
|
||||
}else{
|
||||
$event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(hanYn === 'N' && ( $event.type === 'keyup' || $event.type === 'input' || $event.type === 'change' || $event.type === 'blur')){
|
||||
$event.target.value = $event.target.value.replace(/[ㄱ-ㅎㅏ-ㅣ가-힣]/g,'');
|
||||
$event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
setLenth: function (e, len) {
|
||||
this.cut(e, len);
|
||||
},
|
||||
onlyCustom: function (e,strRegExp,hanYn) {
|
||||
var regExp_g = new RegExp(strRegExp,'g');
|
||||
this.cut(e);
|
||||
return this.restrictChars(e,regExp_g,hanYn);
|
||||
},
|
||||
onlyCommon: function(strRegExp, e, len, isEventCall, hanYn) {
|
||||
var regExp_g = new RegExp(strRegExp,'g');
|
||||
if(isEventCall === 'N'){
|
||||
if(!this.cut(e, len, isEventCall)){
|
||||
return false;
|
||||
}
|
||||
if(!regExp_g.test(e.value)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
this.cut(e, len);
|
||||
return this.restrictChars(e,regExp_g,hanYn);
|
||||
},
|
||||
onlyNum: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[0-9]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyEng: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Za-z]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyLowerEng: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[a-z]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyUpperEng: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Z]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyEmail: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[a-zA-Z0-9_\.\-@._-]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyName: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyTitle: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyText: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyPassword: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Za-z0-9!@#$%^&*]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyId: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Za-z0-9_\.\-]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyIp: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[0-9,.*]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyRoleNm_Space: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyRoleId_UnderBar: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[a-zA-Z0-9_]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
cut: function (ele, len, isValidChk) {
|
||||
let e=ele;
|
||||
if (typeof ele.target != "undefined") {
|
||||
e=ele.target;
|
||||
}
|
||||
let max = this.isNull(len) ? e.attributes.maxlength.value : len;
|
||||
let str = e.value;
|
||||
|
||||
if (this.bytes(str) > max) {
|
||||
if(this.isNull(isValidChk)){
|
||||
e.value = this.cutBytes(str, max);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
cutBytes: function (str, len) {
|
||||
while(1 === 1){
|
||||
if(this.bytes(str) <= len){
|
||||
return str;
|
||||
}
|
||||
str = str.slice(0,-1);
|
||||
}
|
||||
},
|
||||
bytes: function (str) {
|
||||
var length = ((s,b,i,c) => {
|
||||
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); // 한글 3바이트
|
||||
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?1:1); //한글 2바이트
|
||||
b=0,i=0;
|
||||
while(1 === 1){
|
||||
c = s.charCodeAt(i++);
|
||||
if (isNaN(c)) {
|
||||
break;
|
||||
}
|
||||
b += c >> 11 ? 2 : c >> 7 ? 1 : 1;
|
||||
}
|
||||
return b
|
||||
})(str);
|
||||
return length;
|
||||
},
|
||||
checkPhone: function(str) {
|
||||
str = str.replace(/[-\s]+/g, '');
|
||||
if (str.charAt(0)!="0"){
|
||||
str = "0"+str;
|
||||
}
|
||||
if (str.length<10||str.length>12){return "";}
|
||||
if (isNaN(str)){return ""; }
|
||||
if (str.substr(0,2)!="01" && str.substr(0,3)!="070" && str.substr(0,4)!="0505" && str.substr(0,4)!="0503"){return ""; }
|
||||
return str;
|
||||
|
||||
},
|
||||
}
|
||||
};
|
||||
export { utils_mixin, chkPattern2, filter_mixin };
|
||||
@@ -2,106 +2,272 @@
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">관리자 목록 조회</h3>
|
||||
<p class="breadcrumb">시스템관리 > 권한 관리</p>
|
||||
<h3 class="title">관리자/유치채널 관리</h3>
|
||||
<p class="breadcrumb">시스템관리 > 관리자/유치채널 관리</p>
|
||||
</div>
|
||||
<form autocomplete="off" class="search_form">
|
||||
<div class="search_wrap">
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">권한</label>
|
||||
<select name="" id="right" v-model="grid.params.searchType1" @keyup.enter="search">
|
||||
<option value="">전체</option>
|
||||
<option v-for="(option, i) in authType" v-bind:value="option.autCd" v-bind:key="i">
|
||||
{{ option.autNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">상태</label>
|
||||
<select name="" id="" v-model="grid.params.searchType2" @keyup.enter="search">
|
||||
<option value="" selected>전체</option>
|
||||
<option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i">
|
||||
{{ option.codeNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box id">
|
||||
<label for="id1" class="label">ID</label>
|
||||
<input type="text" id="id1" placeholder="검색어 입력" v-model="grid.params.searchText1" @keyup.enter="search"/>
|
||||
</div>
|
||||
<div class="input_box">
|
||||
<label for="name" class="label">이름(대리점명)</label>
|
||||
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.searchText2" @keyup.enter="search"/>
|
||||
</div>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>4</span>건</div>
|
||||
<div class="count">총 <span>{{ totalItems }}</span>건</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue add" onclick="location.href='system_right_add.html';">권한 추가</button>
|
||||
<button type="button" class="button blue admin add" @click="adminRegPopOpen();">관리자 등록</button>
|
||||
<button type="button" class="button blue channel add" @click="adminReg2PopOpen();">유치채널 등록</button>
|
||||
<button type="button" class="button white delete del" @click="deleteRow();">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="10%"/>
|
||||
<col width="20%"/>
|
||||
<col width="20%"/>
|
||||
<col width="15%"/>
|
||||
<col width="20%"/>
|
||||
<col width="15%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>NO</th>
|
||||
<th>코드</th>
|
||||
<th>권한명</th>
|
||||
<th>상태</th>
|
||||
<th>등록일</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>Admin_01</td>
|
||||
<td>슈퍼관리자</td>
|
||||
<td>사용</td>
|
||||
<td>2022-03-10</td>
|
||||
<td class="two_btn_group">
|
||||
<button type="button" class="button grey" onclick="location.href='system_right_modify.html';">수정</button>
|
||||
<button type="button" class="button white delete">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>Admin_01</td>
|
||||
<td>슈퍼관리자</td>
|
||||
<td>사용</td>
|
||||
<td>2022-03-10</td>
|
||||
<td class="two_btn_group">
|
||||
<button type="button" class="button grey">수정</button>
|
||||
<button type="button" class="button white delete">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Admin_01</td>
|
||||
<td>슈퍼관리자</td>
|
||||
<td>사용</td>
|
||||
<td>2022-03-10</td>
|
||||
<td class="two_btn_group">
|
||||
<button type="button" class="button grey">수정</button>
|
||||
<button type="button" class="button white delete">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Admin_01</td>
|
||||
<td>슈퍼관리자</td>
|
||||
<td>사용</td>
|
||||
<td>2022-03-10</td>
|
||||
<td class="two_btn_group">
|
||||
<button type="button" class="button grey">수정</button>
|
||||
<button type="button" class="button white delete">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<custom-grid
|
||||
ref="table"
|
||||
:totalItems="'totalItems'"
|
||||
:url="grid.url"
|
||||
:pagePerRows="grid.pagePerRows"
|
||||
:initialRequest="grid.initialRequest"
|
||||
:pagination="grid.pagination"
|
||||
:isCheckbox="grid.isCheckbox"
|
||||
:columns="grid.columns"
|
||||
:noDataStr="grid.noDataStr"
|
||||
:addCls="grid.addCls"
|
||||
:header="grid.headder"
|
||||
></custom-grid>
|
||||
</div>
|
||||
<admin-reg-pop ref="adminRegModal"> </admin-reg-pop>
|
||||
<!-- <admin-reg2-pop ref="adminReg2Modal"> </admin-reg2-pop> -->
|
||||
<admin-detail-pop ref="adminDetailModal"> </admin-detail-pop>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
import AdminRegPop from '../components/AdminRegPop';
|
||||
//import AdminReg2Pop from '../components/AdminReg2Pop';
|
||||
import AdminDetailPop from '../components/AdminDetailPop';
|
||||
import api from '@/service/api.js';
|
||||
import sysMgtApi from "../service/sysMgtApi.js";
|
||||
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('a');
|
||||
el.href = 'javascript:void(0);';
|
||||
el.className = 'btn_text';
|
||||
el.innerText= String(props.colValue)
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
selEl.addEventListener("click", () => {
|
||||
const { callback } = this.props["cgrido" + this.props.colName].options;
|
||||
callback(this.props);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'authList',
|
||||
name: 'adminList',
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
authType: [],
|
||||
statType: [],
|
||||
cate2Code: "",
|
||||
totalItems: 0,
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 20,
|
||||
grid: {
|
||||
url: '/api/v1/bo/sysMgt/adminList',
|
||||
pagePerRows: 20,
|
||||
pagination: true,
|
||||
isCheckbox: true, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
columns: [
|
||||
{ name: 'no', header: 'No', align: 'center', width: 60},
|
||||
{ name: 'auth', header: '권한', align: 'center', width: 160 },
|
||||
{ name: 'name', header: '이름(대리점명)', align: 'center', width: 130, renderer: {
|
||||
type: CustomATagRenderer
|
||||
, options: {
|
||||
callback: this.detailPop,
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'adminId', header: 'ID', align: 'center', width: 130},
|
||||
{ name: 'adminStat', header: '상태', align: 'center', width: 130, cls: 'td_line'},
|
||||
{ name: 'regDt', header: '등록일', align: 'center', width: 130}
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchText1: '',
|
||||
searchText2: ''
|
||||
},
|
||||
excelHeader: []
|
||||
}
|
||||
};
|
||||
},
|
||||
components: {
|
||||
|
||||
customGrid: customGrid,
|
||||
// SystemPopup,
|
||||
AdminRegPop,
|
||||
//AdminReg2Pop,
|
||||
AdminDetailPop
|
||||
},
|
||||
created(){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
this.setCodeData();
|
||||
//let cont = document.querySelector(".wrap");
|
||||
//cont.classList.add("main_wrap");
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition : '+getCondition);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
if (getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
this.search(isKeep);
|
||||
},
|
||||
methods: {
|
||||
search: function(isKeep) {
|
||||
console.log('this.perPageCnt'+this.perPageCnt);
|
||||
//console.log(this.grid.params);
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
detailPop(props) {
|
||||
// this.getMainSlot().popupView(4);
|
||||
// this.setDtlPpPrm(props);
|
||||
this.$refs.adminDetailModal.adminDetailModalOpen(props);
|
||||
},
|
||||
ModalOpen: function(target){
|
||||
//this.$refs.systemModal.ModalOpen(target);
|
||||
},
|
||||
adminRegPopOpen: function(){
|
||||
this.$refs.adminRegModal.ModalOpen(1);
|
||||
},
|
||||
adminReg2PopOpen: function(){
|
||||
this.$refs.adminRegModal.ModalOpen(2);
|
||||
//this.$refs.adminReg2Modal.adminReg2ModalOpen();//
|
||||
},
|
||||
doValidate(){ //로우데이터 삭제하도록 수정
|
||||
|
||||
console.log("totalItems >> " + this.totalItems);
|
||||
if(this.totalItems == 0){
|
||||
alert('검색 결과가 없습니다.');
|
||||
return false;
|
||||
}
|
||||
var chkList = this.$refs.table.checkedElementDatas();
|
||||
if(chkList.length == 0){
|
||||
alert('체크박스에 체크를 해주세요.');
|
||||
return false;
|
||||
}
|
||||
// for(var i = 0; i < chkList.length; i++){
|
||||
// alert(chkList[i].adminId);
|
||||
// }
|
||||
const param = chkList.map((row)=>({adminId:row.adminId}));
|
||||
this.row.list = param;
|
||||
console.log(this.row);
|
||||
return true;
|
||||
},
|
||||
sendStoreData: function() {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
//console.log("getCondition : "+ getCondition.perPage);
|
||||
},
|
||||
setCodeData() {
|
||||
|
||||
// 상태 옵션 셋팅.
|
||||
api.commCode({'grpCd' : 'ADM_STTUS_CD'}).then(response => {
|
||||
this.statType = response.data.data.list;
|
||||
});
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
async deleteRow(){
|
||||
if(this.doValidate() && window.confirm('삭제 하시겠습니까?')){
|
||||
try {
|
||||
let response = await sysMgtApi.deleteAdmin(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('삭제 하였습니다.');
|
||||
// grid.reloadData();
|
||||
this.$refs.table.reloadData();
|
||||
return;
|
||||
}
|
||||
alert("실패 하였습니다.");
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -7,7 +7,15 @@ const menus = () => {
|
||||
*/
|
||||
// new
|
||||
const menus = () => {
|
||||
return httpClient.post('/api/v1/bo/comm/getMenu',{ withCredentials: false });
|
||||
return httpClient.post('/api/v1/bo/comm/getMenu', { withCredentials: false });
|
||||
};
|
||||
|
||||
const commCode = (params) => {
|
||||
return httpClient.post('/api/v1/bo/comm/getCode', params, { withCredentials: false });
|
||||
};
|
||||
|
||||
const commAuth = () => {
|
||||
return httpClient.post('/api/v1/bo/comm/getAuth', { withCredentials: false });
|
||||
};
|
||||
|
||||
const generateStr = (length) => {
|
||||
@@ -42,5 +50,7 @@ const downloadBlob = (response) => {
|
||||
export default {
|
||||
menus,
|
||||
generateStr,
|
||||
downloadBlob
|
||||
downloadBlob,
|
||||
commCode,
|
||||
commAuth
|
||||
};
|
||||
@@ -14,6 +14,7 @@ import NavBar from "../components/NavBar.vue";
|
||||
//import vuejsDatepicker from "../components/vuejs-datepicker";
|
||||
import HubWebHeader from "../components/HubWebHeader.vue";
|
||||
import HubWebFooter from "../components/HubWebFooter.vue";
|
||||
|
||||
import "../common/ko.js";
|
||||
|
||||
import "../assets/css/layout.css";
|
||||
|
||||
10596
frontend/yarn.lock
@@ -19,6 +19,7 @@ import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
@RestController
|
||||
@RequestMapping(value = "api/v1/bo/attractMgt")
|
||||
public class AttractMgtController {
|
||||
|
||||
@Autowired
|
||||
AttractMgtService attractService;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
package kr.co.uplus.ez.api.comm;
|
||||
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -14,8 +14,22 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import kr.co.uplus.ez.api.comm.dto.AuthResDto;
|
||||
import kr.co.uplus.ez.api.comm.dto.CodeReqDto;
|
||||
import kr.co.uplus.ez.api.comm.dto.CodeResDto;
|
||||
import kr.co.uplus.ez.api.comm.dto.MenuResDto;
|
||||
import kr.co.uplus.ez.api.comm.dto.RefreshTokenReqDto;
|
||||
import kr.co.uplus.ez.api.comm.dto.RefreshTokenResDto;
|
||||
|
||||
/**
|
||||
* 공통관리 Controller.
|
||||
*
|
||||
* @author rejoice
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "api/v1/bo/comm")
|
||||
public class CommController {
|
||||
@@ -27,12 +41,16 @@ public class CommController {
|
||||
* date : 2022. 4. 26.
|
||||
* auth : ckr
|
||||
* desc : 메뉴 목록 조회
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
*
|
||||
* @return MenuResDto
|
||||
*/
|
||||
@ApiOperation(value = "getMenu", notes = "메뉴 목록 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value = "/getMenu" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage getMenu() throws Exception{
|
||||
public MenuResDto getMenu() {
|
||||
return commService.getMenu();
|
||||
}
|
||||
|
||||
@@ -40,39 +58,50 @@ public class CommController {
|
||||
* date : 2022. 4. 26.
|
||||
* auth : ckr
|
||||
* desc : 공통 코드 조회
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
*
|
||||
* @param codeReqDto
|
||||
* @return CodeResDto
|
||||
*/
|
||||
@ApiOperation(value = "getCode", notes = "공통 코드 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value = "/getCode" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage getCode(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return commService.getCode(paramMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 26.
|
||||
* auth : ckr
|
||||
* desc : 토큰요청
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getToken" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage getToken(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return commService.getToken(paramMap);
|
||||
public CodeResDto getCode(@RequestBody CodeReqDto codeReqDto) {
|
||||
return commService.getCode(codeReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 26.
|
||||
* auth : ckr
|
||||
* desc : 토큰연장
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
*
|
||||
* @param refreshTokenReqDto
|
||||
* @return RefreshTokenResDto
|
||||
*/
|
||||
@ApiOperation(value = "refreshToken", notes = "토큰연장")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value = "/refreshToken" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage refreshToken(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return commService.refreshToken(paramMap);
|
||||
public RefreshTokenResDto refreshToken(@RequestBody RefreshTokenReqDto refreshTokenReqDto) {
|
||||
return commService.refreshToken(refreshTokenReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 코드 조회.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "getAuth", notes = "권한 코드 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value = "/getAuth" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public AuthResDto getAuth() {
|
||||
return commService.getAuth();
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,16 @@ import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import kr.co.uplus.ez.api.comm.dto.Auth;
|
||||
import kr.co.uplus.ez.api.comm.dto.Code;
|
||||
import kr.co.uplus.ez.api.comm.dto.CodeReqDto;
|
||||
import kr.co.uplus.ez.api.comm.dto.Menu;
|
||||
|
||||
@Mapper
|
||||
public interface CommMapper {
|
||||
public List<Menu> getMenuByRole(String role) throws Exception;
|
||||
public List<Menu> getMenuByRole(String role);
|
||||
|
||||
public List<Code> getCommCode(CodeReqDto codeReqDto);
|
||||
|
||||
public List<Auth> getAuthCode();
|
||||
}
|
||||
|
||||
@@ -5,30 +5,51 @@ import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import kr.co.uplus.ez.api.comm.dto.Auth;
|
||||
import kr.co.uplus.ez.api.comm.dto.AuthRes;
|
||||
import kr.co.uplus.ez.api.comm.dto.AuthResDto;
|
||||
import kr.co.uplus.ez.api.comm.dto.Code;
|
||||
import kr.co.uplus.ez.api.comm.dto.CodeReqDto;
|
||||
import kr.co.uplus.ez.api.comm.dto.CodeRes;
|
||||
import kr.co.uplus.ez.api.comm.dto.CodeResDto;
|
||||
import kr.co.uplus.ez.api.comm.dto.Menu;
|
||||
import kr.co.uplus.ez.api.comm.dto.MenuResDto;
|
||||
import kr.co.uplus.ez.api.comm.dto.RefreshTokenReqDto;
|
||||
import kr.co.uplus.ez.api.comm.dto.RefreshTokenResDto;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
import kr.co.uplus.ez.common.utils.SpringUtils;
|
||||
|
||||
@Service
|
||||
public class CommService {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Autowired
|
||||
CommMapper commMapper;
|
||||
@Qualifier("sqlSessionTemplateDb1")
|
||||
private SqlSessionTemplate sqlSessionMaster;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 26.
|
||||
* auth : ckr
|
||||
* desc : 메뉴 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
*
|
||||
* @return MenuResDto
|
||||
*/
|
||||
public ApiResponseMessage getMenu() throws Exception{
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
public MenuResDto getMenu() {
|
||||
|
||||
CommMapper commMapper = sqlSessionSlave.getMapper(CommMapper.class);
|
||||
|
||||
String currUserRole = SpringUtils.getCurrentUserRole();
|
||||
log.debug("currUserRole : {}", currUserRole);
|
||||
List<Menu> menuList = commMapper.getMenuByRole(currUserRole);
|
||||
@@ -46,8 +67,7 @@ public class CommService {
|
||||
map.get(prntId).addChild(menu);
|
||||
}
|
||||
}
|
||||
|
||||
result.setData(root);
|
||||
MenuResDto result = new MenuResDto(ApiResponseCode.SUCCESS, root);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -55,23 +75,26 @@ public class CommService {
|
||||
* date : 2022. 4. 26.
|
||||
* auth : ckr
|
||||
* desc : 공통 코드 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @param codeReqDto
|
||||
* @return CodeResDto
|
||||
*/
|
||||
public ApiResponseMessage getCode(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
return result;
|
||||
}
|
||||
public CodeResDto getCode(CodeReqDto codeReqDto) {
|
||||
// 1.디비 메퍼 정하기
|
||||
CommMapper commMapper = sqlSessionSlave.getMapper(CommMapper.class);
|
||||
|
||||
// 2. request 파라미터 벨리데이션 체크 필수값, 데이터 타입
|
||||
|
||||
// 3. 쿼리 조회 메퍼를 통해서 메퍼.xml 데이터 들고오기
|
||||
List<Code> codeList = commMapper.getCommCode(codeReqDto);
|
||||
|
||||
// 응답 파라이터
|
||||
CodeRes codRes = new CodeRes();
|
||||
codRes.setList(codeList);
|
||||
|
||||
// 응답 메시지
|
||||
CodeResDto result = new CodeResDto();
|
||||
result.setData(codRes);
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 26.
|
||||
* auth : ckr
|
||||
* desc : 토큰요청
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage getToken(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -79,12 +102,42 @@ public class CommService {
|
||||
* date : 2022. 4. 26.
|
||||
* auth : ckr
|
||||
* desc : 토큰연장
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @param refreshTokenReqDto
|
||||
* @return RefreshTokenResDto
|
||||
*/
|
||||
public ApiResponseMessage refreshToken(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
public RefreshTokenResDto refreshToken(RefreshTokenReqDto refreshTokenReqDto) {
|
||||
|
||||
// 1. 리프레시 토큰 조회.
|
||||
|
||||
// 2. AuthToken 생성.
|
||||
|
||||
// 3. 응답.
|
||||
|
||||
|
||||
|
||||
RefreshTokenResDto result = new RefreshTokenResDto(ApiResponseCode.SUCCESS);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 권한 코드 조회.
|
||||
*
|
||||
* @return AuthResDto
|
||||
*/
|
||||
public AuthResDto getAuth(){
|
||||
// 1.디비 메퍼 정하기
|
||||
CommMapper commMapper = sqlSessionSlave.getMapper(CommMapper.class);
|
||||
|
||||
List<Auth> auths = commMapper.getAuthCode();
|
||||
|
||||
// 응답 파라이터
|
||||
AuthRes authRes = new AuthRes();
|
||||
authRes.setList(auths);
|
||||
|
||||
// 응답 메시지
|
||||
AuthResDto result = new AuthResDto();
|
||||
result.setData(authRes);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
14
src/main/java/kr/co/uplus/ez/api/comm/dto/Auth.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class Auth implements Serializable{
|
||||
|
||||
private String autCd;
|
||||
private String autNm;
|
||||
private String useYn;
|
||||
}
|
||||
16
src/main/java/kr/co/uplus/ez/api/comm/dto/AuthRes.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class AuthRes implements Serializable {
|
||||
|
||||
@ApiModelProperty(name = "권한리스트", example = "권한리스트", dataType = "List<Auth>")
|
||||
private List<Auth> list;
|
||||
|
||||
}
|
||||
33
src/main/java/kr/co/uplus/ez/api/comm/dto/AuthResDto.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class AuthResDto extends ResponseMessage implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private AuthRes data;
|
||||
|
||||
public AuthResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public AuthResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public AuthResDto(ApiResponseCode returnStr, AuthRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
23
src/main/java/kr/co/uplus/ez/api/comm/dto/Code.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class Code implements Serializable {
|
||||
|
||||
@ApiModelProperty(name = "그룹코드", example = "그룹코드", dataType = "String")
|
||||
private String grpCd;
|
||||
@ApiModelProperty(name = "상세코드", example = "상세코드", dataType = "String")
|
||||
private String code;
|
||||
@ApiModelProperty(name = "상세코드명", example = "상세코드명", dataType = "String")
|
||||
private String codeNm;
|
||||
@ApiModelProperty(name = "정렬순서", example = "정렬순서", dataType = "Integer")
|
||||
private Integer sortOrder;
|
||||
@ApiModelProperty(name = "사용여부", example = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
|
||||
}
|
||||
15
src/main/java/kr/co/uplus/ez/api/comm/dto/CodeReqDto.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CodeReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "그룹코드", name = "그룹코드", dataType = "String")
|
||||
private String grpCd;
|
||||
|
||||
}
|
||||
16
src/main/java/kr/co/uplus/ez/api/comm/dto/CodeRes.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CodeRes implements Serializable {
|
||||
|
||||
@ApiModelProperty(name = "코드리스트", example = "코드리스트", dataType = "List<Code>")
|
||||
private List<Code> list;
|
||||
|
||||
}
|
||||
32
src/main/java/kr/co/uplus/ez/api/comm/dto/CodeResDto.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CodeResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private CodeRes data;
|
||||
|
||||
public CodeResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public CodeResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public CodeResDto(ApiResponseCode returnStr, CodeRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
45
src/main/java/kr/co/uplus/ez/api/comm/dto/Menu.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class Menu implements Serializable{
|
||||
|
||||
@ApiModelProperty(name = "메뉴 번호", example = "메뉴 번호", dataType = "Integer")
|
||||
private Integer menuNo;
|
||||
@ApiModelProperty(name = "부모 메뉴 번호", example = "부모 메뉴 번호", dataType = "Integer")
|
||||
private Integer prntsMenuNo;
|
||||
@ApiModelProperty(name = "메뉴 명", example = "메뉴 명")
|
||||
private String menuNm;
|
||||
@ApiModelProperty(name = "메뉴 순서", example = "메뉴 순서", dataType = "Integer")
|
||||
private Integer menuOdrg;
|
||||
@ApiModelProperty(name = "사용 여부", example = "사용 여부")
|
||||
private String useYn;
|
||||
@ApiModelProperty(name = "권한체크 그룹번호", example = "권한체크 그룹번호", dataType = "Integer")
|
||||
private Integer autchkGrpno;
|
||||
@ApiModelProperty(name = "메뉴 레벨", example = "메뉴 레벨", dataType = "Integer")
|
||||
private Integer menuLvl;
|
||||
@ApiModelProperty(name = "메뉴 URL", example = "메뉴 URL")
|
||||
private String menuUrl;
|
||||
@ApiModelProperty(name = "등록 ID", example = "등록 ID")
|
||||
private String regId;
|
||||
@ApiModelProperty(name = "등록 일시", example = "등록 일시")
|
||||
private String regDt;
|
||||
@ApiModelProperty(name = "변경 ID", example = "변경 ID")
|
||||
private String chgId;
|
||||
@ApiModelProperty(name = "변경 일시", example = "변경 일시")
|
||||
private String chgDt;
|
||||
@ApiModelProperty(name = "하위 메뉴 정보", example = "하위 메뉴 정보", dataType = "List<Menu>")
|
||||
private List<Menu> children = new ArrayList<>();
|
||||
|
||||
public void addChild(Menu menu) {
|
||||
children.add(menu);
|
||||
}
|
||||
|
||||
}
|
||||
33
src/main/java/kr/co/uplus/ez/api/comm/dto/MenuResDto.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class MenuResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private Menu data;
|
||||
|
||||
public MenuResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public MenuResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public MenuResDto(ApiResponseCode returnStr, Menu data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
17
src/main/java/kr/co/uplus/ez/api/comm/dto/RefreshToken.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class RefreshToken implements Serializable{
|
||||
|
||||
@ApiModelProperty(name = "인증토큰", example = "인증토큰", dataType = "String")
|
||||
private String accessToken;
|
||||
@ApiModelProperty(name = "토큰 만료시간", example = "토큰 만료시간", dataType = "String")
|
||||
private String expireTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class RefreshTokenReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "사용자 ID", name = "사용자 ID", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "Refresh 토큰", name = "Refresh 토큰", dataType = "String")
|
||||
private String refreshToken;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package kr.co.uplus.ez.api.comm.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class RefreshTokenResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private RefreshToken data;
|
||||
|
||||
public RefreshTokenResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public RefreshTokenResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public RefreshTokenResDto(ApiResponseCode returnStr, RefreshToken data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@ package kr.co.uplus.ez.api.custMgt;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -14,10 +16,30 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.AdminInfoReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.AdminInfoResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.CarryOverListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.CarryOverListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.MemberDetailReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.MemberListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.MemberListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsDetailReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsDetailResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListExcelReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListExcelResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListResDto;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 고객관리 Controller.
|
||||
*
|
||||
* @author rejoice.
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "api/v1/bo/custMgt")
|
||||
public class CustMgtController {
|
||||
@@ -29,84 +51,92 @@ public class CustMgtController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 고객 정보 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
*
|
||||
* @param subsListReqDto
|
||||
* @return SubsListResDto
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "subsList", notes = "청약 고객 정보 목록 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value = "/subsList" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage subsList(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return custService.subsList(paramMap);
|
||||
public SubsListResDto subsList(@RequestBody SubsListReqDto subsListReqDto) throws Exception{
|
||||
return custService.subsList(subsListReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 고객 정보 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @return
|
||||
*
|
||||
* @param subsListExcelReqDto
|
||||
* @return SubsListExcelResDto
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/subsListExcel" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage subsListExcel(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return custService.subsListExcel(paramMap);
|
||||
public SubsListExcelResDto subsListExcel(@RequestBody SubsListExcelReqDto subsListExcelReqDto) throws Exception{
|
||||
return custService.subsListExcel(subsListExcelReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 정보 상세 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
*
|
||||
* @param subsDetailReqDto
|
||||
* @return SubsDetailResDto
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/subsDetail" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage subsDetail(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return custService.subsDetail(paramMap);
|
||||
public SubsDetailResDto subsDetail(@RequestBody SubsDetailReqDto subsDetailReqDto) throws Exception{
|
||||
return custService.subsDetail(subsDetailReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자명 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @param adminInfoReqDto
|
||||
* @return AdminInfoResDto
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/adminInfo" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage adminInfo(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return custService.adminInfo(paramMap);
|
||||
public AdminInfoResDto adminInfo(@RequestBody AdminInfoReqDto adminInfoReqDto) throws Exception{
|
||||
return custService.adminInfo(adminInfoReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 이월금액 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
*
|
||||
* @param carryOverListReqDto
|
||||
* @return CarryOverListResDto
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/carryOverList" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage carryOverList(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return custService.carryOverList(paramMap);
|
||||
public CarryOverListResDto carryOverList(@RequestBody CarryOverListReqDto carryOverListReqDto) throws Exception{
|
||||
return custService.carryOverList(carryOverListReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 회원목록조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @param memberListReqDto
|
||||
* @return MemberListResDto
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/memberList" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage memberList(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return custService.memberList(paramMap);
|
||||
public MemberListResDto memberList(@RequestBody MemberListReqDto memberListReqDto) throws Exception{
|
||||
return custService.memberList(memberListReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,8 +149,8 @@ public class CustMgtController {
|
||||
*/
|
||||
@RequestMapping(value = "/memberDetail" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage memberDetail(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return custService.memberDetail(paramMap);
|
||||
public ApiResponseMessage memberDetail(@RequestBody MemberDetailReqDto memberDetailReqDto) throws Exception{
|
||||
return custService.memberDetail(memberDetailReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
package kr.co.uplus.ez.api.custMgt;
|
||||
|
||||
public class CustMgtMapper {
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsList;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto;
|
||||
|
||||
@Mapper
|
||||
public interface CustMgtMapper {
|
||||
|
||||
int selectSubsListTotalCnt(SubsListReqDto subsListReqDto);
|
||||
|
||||
List<SubsList> selectSubsLists(SubsListReqDto subsListReqDto);
|
||||
}
|
||||
|
||||
@@ -6,74 +6,102 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import kr.co.uplus.ez.api.custMgt.dto.AdminInfoReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.AdminInfoResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.CarryOverListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.CarryOverListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.MemberDetailReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.MemberListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.MemberListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsDetailReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsDetailResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsList;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListExcelReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListExcelResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListRes;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListResDto;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
import kr.co.uplus.ez.common.data.Const;
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import kr.co.uplus.ez.common.utils.DateUtils;
|
||||
|
||||
@Service
|
||||
public class CustMgtService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(CustMgtService.class);
|
||||
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb1")
|
||||
private SqlSessionTemplate sqlSessionMaster;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 고객 정보 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @param subsListReqDto
|
||||
* @return subsListResDto
|
||||
*/
|
||||
public ApiResponseMessage subsList(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
public SubsListResDto subsList(SubsListReqDto subsListReqDto) {
|
||||
|
||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
Map<String, Object> paging = new HashMap<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
CustMgtMapper custMgtMapper = sqlSessionSlave.getMapper(CustMgtMapper.class);
|
||||
|
||||
paging.put(Const.getTotalCnt(), "5");
|
||||
paging.put(Const.getCurrentPage(), "1");
|
||||
dataObj.put("paging", paging);
|
||||
int totalCnt = custMgtMapper.selectSubsListTotalCnt(subsListReqDto);
|
||||
|
||||
Date now = new Date();
|
||||
String nowStr = DateUtils.dateToStr(now, "YYYY-MM-dd");
|
||||
|
||||
for(int i=1; i<=20; i++) {
|
||||
data.put("no", ""+i);
|
||||
data.put("serviceId", "Uplus01");
|
||||
data.put("custNm", "유플러스");
|
||||
data.put("regNo", "1234"+i);
|
||||
data.put("regDt", nowStr);
|
||||
data.put("stat", "사용중");
|
||||
data.put("channel", "유플러스");
|
||||
data.put("plan", "요금제3");
|
||||
data.put("carryOver", ""+(100000*i));
|
||||
dataList.add(data);
|
||||
if(totalCnt == 0) {
|
||||
return new SubsListResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
String nowPage = String.valueOf(subsListReqDto.getPage());
|
||||
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
int page = subsListReqDto.getPage();
|
||||
int pagePerRows = subsListReqDto.getPagePerRows();
|
||||
page = (page -1) * pagePerRows;
|
||||
subsListReqDto.setPage(page);
|
||||
|
||||
return result;
|
||||
List<SubsList> subsLists = custMgtMapper.selectSubsLists(subsListReqDto);
|
||||
|
||||
|
||||
SubsListRes subsListRes = new SubsListRes();
|
||||
subsListRes.setList(subsLists);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
subsListRes.setPaging(paging);
|
||||
|
||||
return new SubsListResDto(ApiResponseCode.SUCCESS, subsListRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 고객 정보 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @param subsListExcelReqDto
|
||||
* @return subsListExcelResDto
|
||||
*/
|
||||
public ApiResponseMessage subsListExcel(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
public SubsListExcelResDto subsListExcel(SubsListExcelReqDto subsListExcelReqDto) {
|
||||
SubsListExcelResDto subsListExcelResDto = new SubsListExcelResDto(ApiResponseCode.SUCCESS);
|
||||
|
||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
Map<String, Object> paging = new HashMap<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
paging.put(Const.getTotalCnt(), "5");
|
||||
paging.put(Const.getCurrentPage(), "1");
|
||||
paging.put(Const.TOTAL_CNT, "5");
|
||||
paging.put(Const.CURRENT_PAGE, "1");
|
||||
dataObj.put("paging", paging);
|
||||
|
||||
Date now = new Date();
|
||||
@@ -94,20 +122,20 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
// subsListExcelResDto.setData(dataObj);
|
||||
|
||||
return result;
|
||||
return subsListExcelResDto;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 정보 상세 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @param subsDetailReqDto
|
||||
* @return subsDetailResDto
|
||||
*/
|
||||
public ApiResponseMessage subsDetail(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
public SubsDetailResDto subsDetail(SubsDetailReqDto subsDetailReqDto) {
|
||||
SubsDetailResDto subsDetailResDto = new SubsDetailResDto(ApiResponseCode.SUCCESS);
|
||||
|
||||
Date now = new Date();
|
||||
String nowStr = DateUtils.dateToStr(now, "YYYY-MM-dd");
|
||||
@@ -136,40 +164,40 @@ public class CustMgtService {
|
||||
data.put("carryOver", "100000");
|
||||
data.put("userCnt", "10");
|
||||
|
||||
result.setData(data);
|
||||
// subsDetailResDto.setData(data);
|
||||
|
||||
return result;
|
||||
return subsDetailResDto;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자명 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @param adminInfoReqDto
|
||||
* @return adminInfoResDto
|
||||
*/
|
||||
public ApiResponseMessage adminInfo(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
public AdminInfoResDto adminInfo(AdminInfoReqDto adminInfoReqDto) {
|
||||
AdminInfoResDto adminInfoResDto = new AdminInfoResDto(ApiResponseCode.SUCCESS);
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("adminId", "uplus01");
|
||||
data.put("adminCd", "U00001");
|
||||
data.put("adminNm", "홍길동");
|
||||
data.put("agencyNm", "lg대리점");
|
||||
result.setData(data);
|
||||
// result.setData(data);
|
||||
|
||||
return result;
|
||||
return adminInfoResDto;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 이월금액 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @param carryOverListReqDto
|
||||
* @return carryOverListResDto
|
||||
*/
|
||||
public ApiResponseMessage carryOverList(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
public CarryOverListResDto carryOverList(CarryOverListReqDto carryOverListReqDto) {
|
||||
CarryOverListResDto carryOverListResDto = new CarryOverListResDto(ApiResponseCode.SUCCESS);
|
||||
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||
@@ -208,28 +236,28 @@ public class CustMgtService {
|
||||
|
||||
dataObj.put("list", dataList);
|
||||
|
||||
result.setData(dataObj);
|
||||
// carryOverListResDto.setData(dataObj);
|
||||
|
||||
return result;
|
||||
return carryOverListResDto;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 회원목록조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @param memberListReqDto
|
||||
* @return memberListResDto
|
||||
*/
|
||||
public ApiResponseMessage memberList(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
public MemberListResDto memberList(MemberListReqDto memberListReqDto) {
|
||||
MemberListResDto memberListResDto = new MemberListResDto(ApiResponseCode.SUCCESS);
|
||||
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> paging = new HashMap<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
paging.put(Const.getTotalCnt(), "5");
|
||||
paging.put(Const.getCurrentPage(), "1");
|
||||
paging.put(Const.TOTAL_CNT, "5");
|
||||
paging.put(Const.CURRENT_PAGE, "1");
|
||||
dataObj.put("paging", paging);
|
||||
|
||||
Date now = new Date();
|
||||
@@ -248,9 +276,9 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
// memberListResDto.setData(dataObj);
|
||||
|
||||
return result;
|
||||
return memberListResDto;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -260,7 +288,7 @@ public class CustMgtService {
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage memberDetail(Map<String, Object> paramMap) {
|
||||
public ApiResponseMessage memberDetail(MemberDetailReqDto memberDetailReqDto) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||
|
||||
21
src/main/java/kr/co/uplus/ez/api/custMgt/dto/AdminInfo.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class AdminInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
|
||||
private String adminId;
|
||||
@ApiModelProperty(example = "관리자코드", name = "관리자코드", dataType = "String")
|
||||
private String adminCd;
|
||||
@ApiModelProperty(example = "관리자명", name = "관리자명", dataType = "String")
|
||||
private String adminNm;
|
||||
@ApiModelProperty(example = "대리점명", name = "대리점명", dataType = "String")
|
||||
private String agencyNm;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class AdminInfoReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
|
||||
private String adminId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class AdminInfoResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private AdminInfo data;
|
||||
|
||||
public AdminInfoResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public AdminInfoResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public AdminInfoResDto(ApiResponseCode returnStr, AdminInfo data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CarryOverList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "리스트 번호", name = "리스트 번호", dataType = "String")
|
||||
private String no;
|
||||
@ApiModelProperty(example = "서비스ID", name = "서비스ID", dataType = "String")
|
||||
private String serviceId;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "가입번호", name = "가입번호", dataType = "String")
|
||||
private String regNo;
|
||||
@ApiModelProperty(example = "가입일", name = "가입일", dataType = "String")
|
||||
private String regDt;
|
||||
@ApiModelProperty(example = "상태", name = "상태", dataType = "String")
|
||||
private String stat;
|
||||
@ApiModelProperty(example = "유치채널", name = "유치채널", dataType = "String")
|
||||
private String channel;
|
||||
@ApiModelProperty(example = "요금제", name = "요금제", dataType = "String")
|
||||
private String plan;
|
||||
@ApiModelProperty(example = "이월누적금액", name = "이월누적금액", dataType = "String")
|
||||
private String carryOver;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CarryOverListReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "서비스ID", name = "서비스ID", dataType = "String")
|
||||
private String serviceId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CarryOverListRes implements Serializable{
|
||||
|
||||
private List<CarryOverList> list;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CarryOverListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private CarryOverListRes data;
|
||||
|
||||
public CarryOverListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public CarryOverListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public CarryOverListResDto(ApiResponseCode returnStr, CarryOverListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class MemberDetail implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
|
||||
private String adminId;
|
||||
@ApiModelProperty(example = "관리자코드", name = "관리자코드", dataType = "String")
|
||||
private String adminCd;
|
||||
@ApiModelProperty(example = "관리자명", name = "관리자명", dataType = "String")
|
||||
private String adminNm;
|
||||
@ApiModelProperty(example = "대리점명", name = "대리점명", dataType = "String")
|
||||
private String agencyNm;
|
||||
|
||||
// no
|
||||
// userId
|
||||
// userNm
|
||||
// mdn
|
||||
// userStat
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class MemberDetailReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "사용자 ID", name = "사용자 ID", dataType = "String")
|
||||
private String userId;
|
||||
|
||||
}
|
||||
27
src/main/java/kr/co/uplus/ez/api/custMgt/dto/MemberList.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class MemberList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "리스트 번호", name = "리스트 번호", dataType = "String")
|
||||
private String no;
|
||||
@ApiModelProperty(example = "사용자 이름", name = "사용자 이름", dataType = "String")
|
||||
private String userNm;
|
||||
@ApiModelProperty(example = "사용자 구분", name = "사용자 구분", dataType = "String")
|
||||
private String userType;
|
||||
@ApiModelProperty(example = "사용자 관리자ID", name = "사용자 관리자ID", dataType = "String")
|
||||
private String adminId;
|
||||
@ApiModelProperty(example = "사용자 ID", name = "사용자 ID", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "사용자 등록일", name = "사용자 등록일", dataType = "String")
|
||||
private String regDt;
|
||||
@ApiModelProperty(example = "사용자 상태", name = "사용자 상태", dataType = "String")
|
||||
private String userStat;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class MemberListReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String startDt;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String endDt;
|
||||
@ApiModelProperty(example = "청약 상태", name = "청약 상태", notes = "항목 : 전체(Default)/사용(01)/미납중지(02)/일시중지(03)/해지(04)", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "유치채널", name = "유치채널", notes = "항목 : 전체(Default)/고객 셀프가입(01)/대리점(02)/고객센터(03)/직접영업(04)", dataType = "String")
|
||||
private String searchType2;
|
||||
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 고객사명(01)/가입번호(02)/서비스ID(03)", dataType = "String")
|
||||
private String searchType3;
|
||||
@ApiModelProperty(example = "검색어 (입력항목)", name = "검색어 (입력항목)", dataType = "String")
|
||||
private String searchText1;
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private String pagePerRows;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class MemberListRes implements Serializable{
|
||||
|
||||
private Paging paging;
|
||||
private List<MemberList> list;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class MemberListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private MemberListRes data;
|
||||
|
||||
public MemberListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public MemberListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public MemberListResDto(ApiResponseCode returnStr, MemberListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
59
src/main/java/kr/co/uplus/ez/api/custMgt/dto/SubsDetail.java
Normal file
@@ -0,0 +1,59 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SubsDetail implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "대표자명", name = "대표자명", dataType = "String")
|
||||
private String reprNm;
|
||||
@ApiModelProperty(example = "사용자구분", name = "사용자구분", dataType = "String")
|
||||
private String custType;
|
||||
@ApiModelProperty(example = "사업장주소1", name = "사업장주소1", dataType = "String")
|
||||
private String adr1;
|
||||
@ApiModelProperty(example = "사업장주소2", name = "사업장주소2", dataType = "String")
|
||||
private String adr2;
|
||||
@ApiModelProperty(example = "사업장주소3", name = "사업장주소3", dataType = "String")
|
||||
private String adr3;
|
||||
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
|
||||
private String bRegNo;
|
||||
@ApiModelProperty(example = "법인등록번호", name = "법인등록번호", dataType = "String")
|
||||
private String cprRegNo;
|
||||
@ApiModelProperty(example = "생년월일", name = "생년월일", dataType = "String")
|
||||
private String birth;
|
||||
@ApiModelProperty(example = "청약가입일", name = "청약가입일", dataType = "String")
|
||||
private String subsDt;
|
||||
@ApiModelProperty(example = "청약상태", name = "청약상태", dataType = "String")
|
||||
private String stat;
|
||||
@ApiModelProperty(example = "청약요금제명", name = "청약요금제명", dataType = "String")
|
||||
private String plan;
|
||||
@ApiModelProperty(example = "청약가입번호", name = "청약가입번호", dataType = "String")
|
||||
private String subsNo;
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
|
||||
private String adminId;
|
||||
@ApiModelProperty(example = "관리자명", name = "관리자명", dataType = "String")
|
||||
private String adminNm;
|
||||
@ApiModelProperty(example = "유치자ID", name = "유치자ID", dataType = "String")
|
||||
private String channelId;
|
||||
@ApiModelProperty(example = "유치자명", name = "유치자명", dataType = "String")
|
||||
private String channelNm;
|
||||
@ApiModelProperty(example = "서비스ID", name = "서비스ID", dataType = "String")
|
||||
private String serviceId;
|
||||
@ApiModelProperty(example = "이용권한", name = "이용권한", dataType = "String")
|
||||
private String useAuth;
|
||||
@ApiModelProperty(example = "사용자명", name = "사용자명", dataType = "String")
|
||||
private String userNm;
|
||||
@ApiModelProperty(example = "휴대폰번호", name = "휴대폰번호", dataType = "String")
|
||||
private String mdn;
|
||||
@ApiModelProperty(example = "이월누적금액", name = "이월누적금액", dataType = "String")
|
||||
private String carryOver;
|
||||
@ApiModelProperty(example = "사용자ID개수", name = "사용자ID개수", dataType = "String")
|
||||
private String userCnt;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SubsDetailReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "서비스ID", name = "서비스ID", dataType = "String")
|
||||
private String serviceId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SubsDetailResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private SubsDetail data;
|
||||
|
||||
public SubsDetailResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public SubsDetailResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public SubsDetailResDto(ApiResponseCode returnStr, SubsDetail data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
31
src/main/java/kr/co/uplus/ez/api/custMgt/dto/SubsList.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SubsList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "리스트 번호", name = "리스트 번호", dataType = "String")
|
||||
private String no;
|
||||
@ApiModelProperty(example = "서비스ID", name = "서비스ID", dataType = "String")
|
||||
private String serviceId;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "가입번호", name = "가입번호", dataType = "String")
|
||||
private String regNo;
|
||||
@ApiModelProperty(example = "가입일", name = "가입일", dataType = "String")
|
||||
private String regDt;
|
||||
@ApiModelProperty(example = "상태", name = "상태", dataType = "String")
|
||||
private String stat;
|
||||
@ApiModelProperty(example = "유치채널", name = "유치채널", dataType = "String")
|
||||
private String channel;
|
||||
@ApiModelProperty(example = "요금제", name = "요금제", dataType = "String")
|
||||
private String plan;
|
||||
@ApiModelProperty(example = "이월누적금액", name = "이월누적금액", dataType = "String")
|
||||
private String carryOver;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SubsListExcelReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String startDt;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String endDt;
|
||||
@ApiModelProperty(example = "청약 상태", name = "청약 상태", notes = "항목 : 전체(Default)/사용(01)/미납중지(02)/일시중지(03)/해지(04)", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "유치채널", name = "유치채널", notes = "항목 : 전체(Default)/고객 셀프가입(01)/대리점(02)/고객센터(03)/직접영업(04)", dataType = "String")
|
||||
private String searchType2;
|
||||
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 고객사명(01)/가입번호(02)/서비스ID(03)", dataType = "String")
|
||||
private String searchType3;
|
||||
@ApiModelProperty(example = "검색어 (입력항목)", name = "검색어 (입력항목)", dataType = "String")
|
||||
private String searchText1;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SubsListExcelResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private SubsListRes data;
|
||||
|
||||
public SubsListExcelResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public SubsListExcelResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public SubsListExcelResDto(ApiResponseCode returnStr, SubsListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SubsListReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String startDt;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String endDt;
|
||||
@ApiModelProperty(example = "청약 상태", name = "청약 상태", notes = "항목 : 전체(Default)/사용(01)/미납중지(02)/일시중지(03)/해지(04)", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "유치채널", name = "유치채널", notes = "항목 : 전체(Default)/고객 셀프가입(01)/대리점(02)/고객센터(03)/직접영업(04)", dataType = "String")
|
||||
private String searchType2;
|
||||
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 고객사명(01)/가입번호(02)/서비스ID(03)", dataType = "String")
|
||||
private String searchType3;
|
||||
@ApiModelProperty(example = "검색어 (입력항목)", name = "검색어 (입력항목)", dataType = "String")
|
||||
private String searchText1;
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "String")
|
||||
private int page;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SubsListRes implements Serializable{
|
||||
|
||||
private Paging paging;
|
||||
private List<SubsList> list;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SubsListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private SubsListRes data;
|
||||
|
||||
public SubsListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public SubsListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public SubsListResDto(ApiResponseCode returnStr, SubsListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -1,118 +1,248 @@
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 로그인
|
||||
*/
|
||||
|
||||
package kr.co.uplus.ez.api.login;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
|
||||
import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
|
||||
import org.springframework.security.web.savedrequest.RequestCache;
|
||||
import org.springframework.security.web.savedrequest.SavedRequest;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthNumReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthNumResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthUser;
|
||||
import kr.co.uplus.ez.api.login.dto.ChkAuthNumReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.ChkAuthNumResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.LoginReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.LoginRes;
|
||||
import kr.co.uplus.ez.api.login.dto.LoginResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.LogoutReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.LogoutResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.ResetPasswordReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.ResetPasswordResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.UpdatePasswordReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.UpdatePasswordResDto;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.Const;
|
||||
import kr.co.uplus.ez.common.jwt.JwtService;
|
||||
import kr.co.uplus.ez.config.SecurityConfig;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "api/v1/bo/login")
|
||||
@RequestMapping(value = "/api/v1/bo/login")
|
||||
public class LoginController {
|
||||
|
||||
@Autowired
|
||||
LoginService2 loginService;
|
||||
private static final Logger logger = LoggerFactory.getLogger(LoginController.class);
|
||||
|
||||
@Autowired
|
||||
private AuthenticationManager authManager;
|
||||
@Autowired
|
||||
private LoginSuccessHandler loginSuccessHandler;
|
||||
@Autowired
|
||||
private LoginFailureHandler loginFailureHandler;
|
||||
@Autowired
|
||||
private LoginService loginService;
|
||||
@Autowired
|
||||
private JwtService jwtSvc;
|
||||
|
||||
// 2차인증 제외 ID
|
||||
@Value("#{'${authentication.without.id}'.split(',')}")
|
||||
private List<String> authenticationWithoutId;
|
||||
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* date : 2022. 5. 3.
|
||||
* auth : ckr
|
||||
* desc : 사용자 로그인
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
* desc : HUBEZ_BO_API_2001 - 로그인.
|
||||
* @param loginReqDto
|
||||
* @return LoginResDto
|
||||
* @
|
||||
*/
|
||||
/*@RequestMapping(value = "/login" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage login(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
|
||||
return loginService.login(paramMap);
|
||||
}*/
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 인증번호 요청
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
/* 삭제 예정
|
||||
@RequestMapping(value = "/authNum" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage authNum(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return loginService.authNum(paramMap);
|
||||
@ApiOperation(value = "login", notes = "로그인")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@PostMapping("login")
|
||||
public LoginResDto login(@RequestBody LoginReqDto loginReqDto) {
|
||||
return loginService.firstLoginChk(loginReqDto);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 인증번호 확인
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
* 로그인 전에 요청했던 URL 반환
|
||||
*/
|
||||
/*@RequestMapping(value = "/confirmNum" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage confirmNum(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return loginService.confirmNum(paramMap);
|
||||
}*/
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 비밀번호 초기화 요청
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/resetPassword" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage resetPassword(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return loginService.resetPassword(paramMap);
|
||||
private String getReturnUrl(HttpServletRequest request, HttpServletResponse response) {
|
||||
RequestCache requestCache = new HttpSessionRequestCache();
|
||||
SavedRequest savedRequest = requestCache.getRequest(request, response);
|
||||
if (savedRequest == null) {
|
||||
AuthUser user = (AuthUser) request.getAttribute(Const.KEY_LOAD_USER);
|
||||
return SecurityConfig.LOGIN_SUCC_URL;
|
||||
}
|
||||
return savedRequest.getRedirectUrl();
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* date : 2022. 5. 17.
|
||||
* auth : ckr
|
||||
* desc : 비밀번호 변경
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
* desc : HUBEZ_BO_API_2002 - 인증번호 요청.
|
||||
* @param reqAuthNumDto
|
||||
* @return AuthNumResDto
|
||||
* @
|
||||
*/
|
||||
@RequestMapping(value = "/updatePassword" , method = {RequestMethod.POST})
|
||||
@ApiOperation(value = "authNum", notes = "인증번호 요청")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@PostMapping("authNum")
|
||||
@ResponseBody
|
||||
public ApiResponseMessage updatePassword(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return loginService.updatePassword(paramMap);
|
||||
public AuthNumResDto authNum(@RequestBody AuthNumReqDto authNumReqDto) {
|
||||
return loginService.sendAuthNum(authNumReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 26.
|
||||
* date : 2022. 5. 17.
|
||||
* auth : ckr
|
||||
* desc : 로그아웃
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
* desc : HUBEZ_BO_API_2003 - 인증번호 확인.
|
||||
* 2차인증번호 인증 Spring security
|
||||
*
|
||||
* @param authNumDto
|
||||
* @param request
|
||||
* @param response
|
||||
* @return ChkAuthNumResDto
|
||||
*/
|
||||
// @RequestMapping(value = "/logout" , method = {RequestMethod.POST})
|
||||
// @ResponseBody
|
||||
// public ApiResponseMessage logout(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
// return loginService.logout(paramMap);
|
||||
// }
|
||||
@ApiOperation(value = "confirmNum", notes = "인증번호 확인")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@PostMapping("confirmNum")
|
||||
@ResponseBody
|
||||
public ChkAuthNumResDto confirmNum(@RequestBody ChkAuthNumReqDto authNumDto, HttpServletRequest request, HttpServletResponse response) {
|
||||
AuthUser user = new AuthUser();
|
||||
user.setOprtrId(authNumDto.getOprtrId());
|
||||
user.setInputPwd(authNumDto.getOprtrPw());
|
||||
|
||||
// 시큐리티 인증
|
||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(user.getUsername(), user.getPassword());
|
||||
Authentication authentication = null;
|
||||
|
||||
try {
|
||||
authentication = authManager.authenticate(token);
|
||||
}
|
||||
catch (AuthenticationException e) {
|
||||
request.setAttribute(SecurityConfig.LOGIN_ID_PARAM, user.getOprtrId());
|
||||
ApiResponseCode resultCode = loginFailureHandler.process(request, response, e);
|
||||
return new ChkAuthNumResDto(resultCode);
|
||||
}
|
||||
|
||||
// 2차인증 패스..
|
||||
for (int i = 0; i < authenticationWithoutId.size(); i++) {
|
||||
if (authNumDto.getOprtrId().contains(authenticationWithoutId.get(i).trim())) {
|
||||
loginSuccessHandler.process(request, response, authentication);
|
||||
|
||||
// access 토큰 생성
|
||||
jwtSvc.generatePrivateToken(response, authentication, true);
|
||||
|
||||
String nextUrl = getReturnUrl(request, response);
|
||||
logger.debug("login SUCCESS - nextUrl = [{}]", nextUrl);
|
||||
ChkAuthNumResDto result = new ChkAuthNumResDto(ApiResponseCode.SUCCESS, new LoginRes(SecurityConfig.LOGIN_SUCC_URL));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
ApiResponseCode rCode = loginService.confirmNum(authNumDto);
|
||||
|
||||
if(rCode.equals(ApiResponseCode.SUCCESS)) {
|
||||
|
||||
// 2차인증후 시큐리티 성공핸들러
|
||||
rCode = loginSuccessHandler.process(request, response, authentication);
|
||||
|
||||
// access 토큰 생성
|
||||
jwtSvc.generatePrivateToken(response, authentication, true);
|
||||
|
||||
String nextUrl = getReturnUrl(request, response);
|
||||
logger.debug("login SUCCESS - nextUrl = [{}]", nextUrl);
|
||||
ChkAuthNumResDto result = new ChkAuthNumResDto(rCode, new LoginRes(SecurityConfig.LOGIN_SUCC_URL));
|
||||
return result;
|
||||
}else {
|
||||
ChkAuthNumResDto result = new ChkAuthNumResDto(rCode);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* HUBEZ_BO_API_2004 - 비밀번호 초기화 요청.
|
||||
*
|
||||
* @param resetPasswordReqDto
|
||||
* @return ResetPasswordResDto
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value = "resetPassword", notes = "비밀번호 초기화 요청")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@PostMapping("resetPassword")
|
||||
@ResponseBody
|
||||
public ResetPasswordResDto resetPassword(@RequestBody ResetPasswordReqDto resetPasswordReqDto) {
|
||||
return loginService.resetPassword(resetPasswordReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* HUBEZ_BO_API_2005 - 비밀번호 변경.
|
||||
*
|
||||
* @param updatePasswordReqDto
|
||||
* @return UpdatePasswordResDto
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value = "updatePassword", notes = "비밀번호 변경")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@PostMapping("updatePassword")
|
||||
@ResponseBody
|
||||
public UpdatePasswordResDto updatePassword(@RequestBody UpdatePasswordReqDto updatePasswordReqDto) {
|
||||
return loginService.updatePassword(updatePasswordReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* HUBEZ_BO_API_2006 - 로그아웃.
|
||||
*
|
||||
* @param logoutReqDto
|
||||
* @param request
|
||||
* @param response
|
||||
* @return LogoutResDto
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value = "logout", notes = "로그아웃")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@PostMapping("logout")
|
||||
@ResponseBody
|
||||
public LogoutResDto logout(@RequestBody LogoutReqDto logoutReqDto, HttpServletRequest request, HttpServletResponse response) {
|
||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||
if (auth != null){
|
||||
new SecurityContextLogoutHandler().logout(request, response, auth);
|
||||
}
|
||||
jwtSvc.destroyPrivateToken(request, response);
|
||||
|
||||
return new LogoutResDto();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package kr.co.uplus.ez.common.auth;
|
||||
package kr.co.uplus.ez.api.login;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -15,10 +15,9 @@ import org.springframework.security.authentication.LockedException;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
|
||||
|
||||
import kr.co.uplus.ez.common.consts.Const;
|
||||
import kr.co.uplus.ez.common.consts.ResultCode;
|
||||
import kr.co.uplus.ez.common.consts.UserStatus;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthUser;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.Const;
|
||||
import kr.co.uplus.ez.config.SecurityConfig;
|
||||
|
||||
/**
|
||||
@@ -1,8 +1,33 @@
|
||||
package kr.co.uplus.ez.api.login;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public class LoginMapper {
|
||||
import kr.co.uplus.ez.api.login.dto.AuthNum;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthUser;
|
||||
import kr.co.uplus.ez.api.login.dto.SmsAuthNum;
|
||||
|
||||
@Mapper
|
||||
public interface LoginMapper {
|
||||
|
||||
public AuthUser getByUsername(String username);
|
||||
|
||||
public int increaseFailCount(String username);
|
||||
|
||||
public int increaseAuthFailCnt(String userId);
|
||||
public int setUserStatus(AuthUser user);
|
||||
public void setLoginInfo(String userId);
|
||||
public int addAuthNum(AuthNum authNum);
|
||||
|
||||
public AuthUser getUser(AuthUser authUser);
|
||||
|
||||
public AuthNum getAuthNum(AuthNum authNum);
|
||||
public int setAuthUserInfo(AuthNum authNum);
|
||||
public int setAuthNum(AuthNum authNum);
|
||||
public List<SmsAuthNum> getSmsAuthNumByNum(String issNum);
|
||||
public String getSmsAuthPhone(SmsAuthNum num);
|
||||
|
||||
// 관리자 정보 수정.
|
||||
int updateAdmUser(AuthUser authUser);
|
||||
}
|
||||
|
||||
351
src/main/java/kr/co/uplus/ez/api/login/LoginService.java
Normal file
@@ -0,0 +1,351 @@
|
||||
package kr.co.uplus.ez.api.login;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.codec.binary.StringUtils;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import kr.co.uplus.ez.api.login.dto.AuthNum;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthNumReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthNumResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthUser;
|
||||
import kr.co.uplus.ez.api.login.dto.ChkAuthNumReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.LoginReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.LoginRes;
|
||||
import kr.co.uplus.ez.api.login.dto.LoginResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.ResetPasswordReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.ResetPasswordResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.UpdatePasswordReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.UpdatePasswordResDto;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.Const;
|
||||
import kr.co.uplus.ez.common.utils.EncryptionUtil;
|
||||
import kr.co.uplus.ez.common.utils.TextUtils;
|
||||
import kr.co.uplus.ez.config.SecurityConfig;
|
||||
|
||||
@Service
|
||||
public class LoginService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(LoginService.class);
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb1")
|
||||
private SqlSessionTemplate sqlSessionMaster;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
// 2차인증 제외 ID
|
||||
@Value("#{'${authentication.without.id}'.split(',')}")
|
||||
private List<String> authenticationWithoutId;
|
||||
|
||||
/**
|
||||
* 1차 로그인 인증
|
||||
*
|
||||
* @param loginInfo
|
||||
* @return LoginResDto
|
||||
*/
|
||||
public LoginResDto firstLoginChk(LoginReqDto loginInfo) {
|
||||
|
||||
LoginMapper loginMapper = sqlSessionMaster.getMapper(LoginMapper.class);
|
||||
|
||||
String userId = loginInfo.getOprtrId();
|
||||
AuthUser dbUserParam = new AuthUser();
|
||||
dbUserParam.setOprtrId(userId);
|
||||
|
||||
AuthUser user = loginMapper.getUser(dbUserParam);
|
||||
|
||||
if (user == null) {
|
||||
// 사용자 여부
|
||||
return new LoginResDto(ApiResponseCode.CE_ID_NOT_FOUND);
|
||||
}
|
||||
|
||||
if (user.getLoginFailCnt() >= Const.MAX_LOGIN_FAIL) {
|
||||
// 5회 로그인 실패 체크
|
||||
return new LoginResDto(ApiResponseCode.CE_TO_LOCK);
|
||||
}
|
||||
|
||||
if (user.getSttusCd().equals(Const.CODE_VALUE_02)) {
|
||||
// 사용자 상태 체크
|
||||
return new LoginResDto(ApiResponseCode.SS_NOT_USE);
|
||||
}
|
||||
|
||||
// 비밀번호 체크
|
||||
String userPw = loginInfo.getOprtrPw();
|
||||
String encPwd = EncryptionUtil.getCustomSHA512(userId, userPw);
|
||||
if (!user.getPwd().equals(encPwd)) {
|
||||
// 로그인 실패 카운트 증가
|
||||
loginMapper.increaseFailCount(userId);
|
||||
|
||||
return new LoginResDto(ApiResponseCode.CE_ID_PWD);
|
||||
} else {
|
||||
|
||||
// 비밀번호 만료 일시 체크.
|
||||
if(StringUtils.equals(Const.COMM_YES, user.getPwChangeCheck())) {
|
||||
return new LoginResDto(ApiResponseCode.CE_PWD_EXPIRE);
|
||||
}
|
||||
|
||||
// 로그인 실패카운트 초기화
|
||||
loginMapper.setLoginInfo(user.getOprtrId());
|
||||
}
|
||||
|
||||
return new LoginResDto(ApiResponseCode.SUCCESS, new LoginRes(SecurityConfig.LOGIN_SUCC_URL));
|
||||
}
|
||||
|
||||
/**
|
||||
* 인증번호 요청
|
||||
*
|
||||
* @param reqAuthNumDto
|
||||
* @return AuthNumResDto
|
||||
*/
|
||||
public AuthNumResDto sendAuthNum(AuthNumReqDto reqAuthNumDto) {
|
||||
|
||||
LoginMapper loginMapper = sqlSessionMaster.getMapper(LoginMapper.class);
|
||||
|
||||
// 1차 로그인 체크
|
||||
if (reqAuthNumDto.getIsLogin() != null && reqAuthNumDto.getIsLogin()) {
|
||||
// return 1차로그인 인증 실패 코드
|
||||
}
|
||||
|
||||
String userId = reqAuthNumDto.getOprtrId(); // 인증 받고자 하는 userId
|
||||
|
||||
|
||||
// 2차인증 패스..
|
||||
for (int i = 0; i < authenticationWithoutId.size(); i++) {
|
||||
if (userId.contains(authenticationWithoutId.get(i).trim())) {
|
||||
return new AuthNumResDto();
|
||||
}
|
||||
}
|
||||
|
||||
AuthUser dbUserParam = new AuthUser();
|
||||
dbUserParam.setOprtrId(userId);
|
||||
|
||||
AuthUser user = loginMapper.getUser(dbUserParam);
|
||||
|
||||
// 인증 요청 계정의 정보 체크(ID, HP)
|
||||
if (user != null) {
|
||||
if (!user.getOprtrId().equals(userId)) {
|
||||
return new AuthNumResDto(ApiResponseCode.CE_ID_HP);
|
||||
}
|
||||
if (!user.getHpNo().equals(reqAuthNumDto.getHpNo())) {
|
||||
return new AuthNumResDto(ApiResponseCode.CE_ID_HP);
|
||||
}
|
||||
} else {
|
||||
return new AuthNumResDto(ApiResponseCode.CE_ID_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 2차 인증 실패 카운트 체크
|
||||
int autchrFailCnt = user.getAuthchrFailCnt();
|
||||
if (autchrFailCnt >= Const.MAX_AUTHNUM_FAIL) {
|
||||
return new AuthNumResDto(ApiResponseCode.CE_AUTHNUM_LOCK);
|
||||
}
|
||||
|
||||
String authNum = TextUtils.randNumStr(6);
|
||||
|
||||
// 발행한 인증번호 DB에 저장
|
||||
AuthNum anum = new AuthNum();
|
||||
anum.setAuthTpCd(Const.AUTH_TP_CD);
|
||||
anum.setSttusCd(Const.AUTH_STTUS_CD_01);
|
||||
anum.setHpNo(user.getHpNo());
|
||||
anum.setChrVal(authNum);
|
||||
anum.setRegId(user.getOprtrId());
|
||||
loginMapper.addAuthNum(anum);
|
||||
|
||||
// 문자발송
|
||||
// TODO -> hubez_send.EZ_MSG_REAL 등록 필요.
|
||||
|
||||
return new AuthNumResDto();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 인증 번호 확인
|
||||
*
|
||||
* @param authNumDto
|
||||
* @return ApiResponseCode
|
||||
*/
|
||||
public ApiResponseCode confirmNum(ChkAuthNumReqDto authNumDto) {
|
||||
|
||||
LoginMapper loginMapper = sqlSessionMaster.getMapper(LoginMapper.class);
|
||||
|
||||
AuthNum anum = new AuthNum();
|
||||
anum.setOprtrId(authNumDto.getOprtrId());
|
||||
anum.setAuthTpCd(Const.AUTH_TP_CD);
|
||||
anum.setSttusCd(Const.AUTH_STTUS_CD_01); // 사용중
|
||||
anum.setHpNo(authNumDto.getHpNo());
|
||||
|
||||
AuthNum curr = loginMapper.getAuthNum(anum);
|
||||
|
||||
if (curr == null) {
|
||||
return ApiResponseCode.CE_WRONG_AUTHNUM;
|
||||
}
|
||||
|
||||
if (curr.getAuthchrFailCnt() >= Const.MAX_AUTHNUM_FAIL) {
|
||||
return ApiResponseCode.CE_AUTHNUM_LOCK;
|
||||
}
|
||||
|
||||
|
||||
if (!curr.getChrVal().equals(authNumDto.getChrVal())) {
|
||||
// 실패 카운트 증가
|
||||
String oprtrId = curr.getOprtrId();
|
||||
loginMapper.increaseAuthFailCnt(oprtrId);
|
||||
|
||||
return ApiResponseCode.CE_WRONG_AUTHNUM;
|
||||
}
|
||||
|
||||
AuthNum authNum = new AuthNum();
|
||||
authNum.setOprtrId(curr.getOprtrId());
|
||||
authNum.setAuthchrFailCnt(0);
|
||||
loginMapper.setAuthUserInfo(authNum);
|
||||
|
||||
// 인증요청
|
||||
authNum = new AuthNum();
|
||||
authNum.setSeqNo(curr.getSeqNo());
|
||||
authNum.setSttusCd(Const.AUTH_STTUS_CD_02);
|
||||
loginMapper.setAuthNum(authNum);
|
||||
|
||||
return ApiResponseCode.SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* 비밀번호 초기화.
|
||||
*
|
||||
* @param resetPasswordReqDto
|
||||
* @return ResetPasswordResDto
|
||||
*/
|
||||
public ResetPasswordResDto resetPassword(ResetPasswordReqDto resetPasswordReqDto) {
|
||||
|
||||
LoginMapper loginMapper = sqlSessionMaster.getMapper(LoginMapper.class);
|
||||
|
||||
AuthUser dbUserParam = new AuthUser();
|
||||
dbUserParam.setOprtrId(resetPasswordReqDto.getUserId());
|
||||
|
||||
// 1. 사용자 ID 조회
|
||||
AuthUser user = loginMapper.getUser(dbUserParam);
|
||||
|
||||
if (user == null) {
|
||||
// 사용자 여부
|
||||
return new ResetPasswordResDto(ApiResponseCode.CE_ID_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 2. 임시비밀번호 생성
|
||||
String randomPw = RandomStringUtils.randomAlphanumeric(10);
|
||||
|
||||
// 3. update EZ_ADM_USER (비밀번호, 임시비밀번호여부, 비밀번호변경일시)
|
||||
AuthUser authUser = new AuthUser();
|
||||
authUser.setOprtrId(resetPasswordReqDto.getUserId());
|
||||
authUser.setTmpPwdYn(Const.COMM_YES);
|
||||
authUser.setPwd(EncryptionUtil.getCustomSHA512(resetPasswordReqDto.getUserId(), randomPw));
|
||||
authUser.setPwdChgDt(Const.COMM_YES);
|
||||
|
||||
int reslut = loginMapper.updateAdmUser(authUser);
|
||||
|
||||
if(reslut < 1) {
|
||||
// 업데이트 실패.
|
||||
return new ResetPasswordResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
// 4. 임시 비밀번호 문자발송
|
||||
// TODO -> hubez_send.EZ_MSG_REAL 등록 필요.
|
||||
|
||||
return new ResetPasswordResDto();
|
||||
}
|
||||
|
||||
/**
|
||||
* 비밀번호 변경.
|
||||
*
|
||||
* @param updatePasswordReqDto
|
||||
* @return UpdatePasswordResDto
|
||||
*/
|
||||
public UpdatePasswordResDto updatePassword(UpdatePasswordReqDto updatePasswordReqDto) {
|
||||
|
||||
LoginMapper loginMapper = sqlSessionMaster.getMapper(LoginMapper.class);
|
||||
|
||||
AuthUser dbUserParam = new AuthUser();
|
||||
dbUserParam.setOprtrId(updatePasswordReqDto.getUserId());
|
||||
dbUserParam.setPwd(EncryptionUtil.getCustomSHA512(updatePasswordReqDto.getUserId(), updatePasswordReqDto.getOldPw()));
|
||||
// 1. 사용자 ID 조회
|
||||
AuthUser user = loginMapper.getUser(dbUserParam);
|
||||
|
||||
if (user == null) {
|
||||
// 사용자 여부
|
||||
return new UpdatePasswordResDto(ApiResponseCode.CE_ID_NOT_FOUND);
|
||||
}
|
||||
|
||||
String newPw = EncryptionUtil.getCustomSHA512(updatePasswordReqDto.getUserId(), updatePasswordReqDto.getNewPw());
|
||||
|
||||
// 2. 비밀번호 변경 - update EZ_ADM_USER (비밀번호, 비밀번호변경일시)
|
||||
AuthUser authUser = new AuthUser();
|
||||
authUser.setOprtrId(updatePasswordReqDto.getUserId());
|
||||
authUser.setPwd(newPw);
|
||||
authUser.setPwdChgDt(Const.COMM_YES);
|
||||
|
||||
int reslut = loginMapper.updateAdmUser(authUser);
|
||||
|
||||
if(reslut < 1) {
|
||||
// 업데이트 실패.
|
||||
return new UpdatePasswordResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
return new UpdatePasswordResDto();
|
||||
}
|
||||
|
||||
/**
|
||||
* 로그인 성공시 초기화.
|
||||
*
|
||||
* @param userId
|
||||
*/
|
||||
public void setLoginInfo(String userId) {
|
||||
LoginMapper authUserMapper = sqlSessionMaster.getMapper(LoginMapper.class);
|
||||
authUserMapper.setLoginInfo(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 로그인 실패 카운트 증가.
|
||||
*
|
||||
* @param userId
|
||||
* @return FailCnt
|
||||
*/
|
||||
public int increaseFailCount(String userId) {
|
||||
LoginMapper authUserMapper = sqlSessionMaster.getMapper(LoginMapper.class);
|
||||
authUserMapper.increaseFailCount(userId);
|
||||
AuthUser user = authUserMapper.getByUsername(userId);
|
||||
return user.getLoginFailCnt();
|
||||
}
|
||||
|
||||
/**
|
||||
* 사용자 상태 변경.
|
||||
*
|
||||
* @param userId
|
||||
* @param status
|
||||
*/
|
||||
public void setUserStatus(String userId, String status) {
|
||||
LoginMapper authUserMapper = sqlSessionMaster.getMapper(LoginMapper.class);
|
||||
AuthUser user = new AuthUser();
|
||||
user.setOprtrId(userId);
|
||||
user.setSttusCd(status);
|
||||
authUserMapper.setUserStatus(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 사용자 정보 조회.
|
||||
*
|
||||
* @param userId
|
||||
* @return AuthUser
|
||||
*/
|
||||
public AuthUser getUser(String userId) {
|
||||
LoginMapper authUserMapper = sqlSessionSlave.getMapper(LoginMapper.class);
|
||||
AuthUser dbUserParam = new AuthUser();
|
||||
dbUserParam.setOprtrId(userId);
|
||||
return authUserMapper.getUser(dbUserParam);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
package kr.co.uplus.ez.api.login;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
|
||||
@Service
|
||||
public class LoginService2 {
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사용자 로그인
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public ApiResponseMessage login(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 인증번호 요청
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public ApiResponseMessage authNum(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 인증번호 확인
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public ApiResponseMessage confirmNum(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
|
||||
// 2차 인증 후 메뉴 URL
|
||||
dataObj.put("nextUrl", "/custMgt/subsList");
|
||||
|
||||
result.setData(dataObj);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 비밀번호 초기화 요청
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public ApiResponseMessage resetPassword(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 비밀번호 변경
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public ApiResponseMessage updatePassword(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 26.
|
||||
* auth : ckr
|
||||
* desc : 로그아웃
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage logout(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package kr.co.uplus.ez.common.auth;
|
||||
package kr.co.uplus.ez.api.login;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -8,13 +8,11 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
|
||||
|
||||
import kr.co.uplus.ez.common.consts.Const;
|
||||
import kr.co.uplus.ez.common.consts.ResultCode;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthUser;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
import kr.co.uplus.ez.common.data.Const;
|
||||
|
||||
/**
|
||||
* 로그인에 성공하면 호출되는 기본 핸들러는 SavedRequestAwareAuthenticationSuccessHandler 클래스이다.
|
||||
@@ -1,12 +1,14 @@
|
||||
package kr.co.uplus.ez.common.auth;
|
||||
package kr.co.uplus.ez.api.login;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.authority.AuthorityUtils;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
@@ -14,7 +16,8 @@ import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import kr.co.uplus.ez.common.consts.Const;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthUser;
|
||||
import kr.co.uplus.ez.common.data.Const;
|
||||
import kr.co.uplus.ez.common.utils.SpringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@@ -24,10 +27,18 @@ public class UserDetailsServiceImpl implements UserDetailsService {
|
||||
private static final Logger logger = LoggerFactory.getLogger(UserDetailsServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private AuthUserDao dao;
|
||||
@Qualifier("sqlSessionTemplateDb1")
|
||||
private SqlSessionTemplate sqlSessionMaster;
|
||||
|
||||
/* ckr
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
|
||||
|
||||
LoginMapper authUserMapper = sqlSessionMaster.getMapper(LoginMapper.class);
|
||||
|
||||
logger.debug("username = [{}]", username);
|
||||
String corpId = null;
|
||||
if (username.indexOf(".") > -1) {
|
||||
@@ -35,43 +46,7 @@ public class UserDetailsServiceImpl implements UserDetailsService {
|
||||
corpId = splts[0];
|
||||
username = splts[1];
|
||||
}
|
||||
AuthUser user = dao.getByUsername(username);
|
||||
|
||||
if (corpId != null) {
|
||||
user.setCorpId(corpId);
|
||||
}
|
||||
|
||||
HttpServletRequest request = SpringUtils.getCurrentRequest();
|
||||
request.setAttribute(Const.KEY_LOAD_USER, user);
|
||||
|
||||
logger.debug("user = [{}]", user);
|
||||
if (user == null) {
|
||||
throw new UsernameNotFoundException(username);
|
||||
}
|
||||
|
||||
List<GrantedAuthority> roles = AuthorityUtils.createAuthorityList(dao.getRoles(username));
|
||||
logger.debug("roles = [{}]", roles);
|
||||
if (roles.isEmpty()) {
|
||||
roles = AuthorityUtils.createAuthorityList("ROLE_USER");
|
||||
// throw new UsernameNotFoundException(username);
|
||||
}
|
||||
|
||||
user.setAuthorities(roles);
|
||||
logger.debug("user = [{}]", user);
|
||||
|
||||
return user;
|
||||
}
|
||||
*/
|
||||
|
||||
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
|
||||
logger.debug("username = [{}]", username);
|
||||
String corpId = null;
|
||||
if (username.indexOf(".") > -1) {
|
||||
String[] splts = username.split("\\.");
|
||||
corpId = splts[0];
|
||||
username = splts[1];
|
||||
}
|
||||
AuthUser user = dao.getByUsername(username);
|
||||
AuthUser user = authUserMapper.getByUsername(username);
|
||||
log.info("userPWD = {}",user.getPwd());
|
||||
if (corpId != null) {
|
||||
user.setCorpId(corpId);
|
||||