mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 19:39:19 +09:00
고객관리 > 청약고갹관리/회원관리 기능 추가
This commit is contained in:
34
frontend/src/modules/channelMgt/service/channelMgtApi.js
Normal file
34
frontend/src/modules/channelMgt/service/channelMgtApi.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import httpClient from '@/common/http-client';
|
||||
import channelListExcelHeader from './mock/channelListExcelHeader.json';
|
||||
|
||||
// 공통 코드.
|
||||
const getCommCode = (params) => {
|
||||
return httpClient.post('/api/v1/bo/comm/getCode', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
// 청약정보 엑셀다운로드 목록 조회
|
||||
const tmpltListExcel = (params) => {
|
||||
return httpClient.post('/api/v1/bo/channelMgt/tmpltListExcel', params);
|
||||
}
|
||||
|
||||
const getExcelHeader = category => {
|
||||
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
|
||||
return new Promise(function(resolve, reject) {
|
||||
let header = [];
|
||||
switch (category) {
|
||||
case 'CHANN':
|
||||
header = channelListExcelHeader.header;
|
||||
break;
|
||||
default:
|
||||
header = '';
|
||||
break;
|
||||
}
|
||||
resolve(header);
|
||||
});
|
||||
};
|
||||
|
||||
export default {
|
||||
getCommCode,
|
||||
tmpltListExcel,
|
||||
getExcelHeader,
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"header": [
|
||||
[
|
||||
{
|
||||
"key": "no",
|
||||
"name": "NO"
|
||||
},
|
||||
{
|
||||
"key": "bregNo",
|
||||
"name": "사업자번호"
|
||||
},
|
||||
{
|
||||
"key": "tmpltCd",
|
||||
"name": "템플릿코드"
|
||||
},
|
||||
{
|
||||
"key": "tmpltNm",
|
||||
"name": "템플릿명"
|
||||
},
|
||||
{
|
||||
"key": "tmpltType",
|
||||
"name": "템플릿유형"
|
||||
},
|
||||
{
|
||||
"key": "stat",
|
||||
"name": "상태"
|
||||
},
|
||||
{
|
||||
"key": "sendProfile",
|
||||
"name": "발신프로필"
|
||||
},
|
||||
{
|
||||
"key": "lastChgDt",
|
||||
"name": "최종수정일"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,93 +4,60 @@
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">알림톡 템플릿 목록 조회</h3>
|
||||
<p class="breadcrumb">시스템관리 > 관리자/유치채널 관리</p>
|
||||
<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">
|
||||
<option value="전체">전체</option>
|
||||
<option value="대리점">대리점</option>
|
||||
<option value="운영자">운영자</option>
|
||||
<label for="stat" class="label">상태</label>
|
||||
<select name="" id="stat" v-model="grid.params.searchType1" @keyup.enter="search">
|
||||
<option value="">전체</option>
|
||||
<option value="Y">사용</option>
|
||||
<option value="N">폐기</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">상태</label>
|
||||
<select name="" id="right">
|
||||
<option value="전체">전체</option>
|
||||
<option value="사용">사용</option>
|
||||
<option value="중지">중지</option>
|
||||
<label for="searchType" class="label">상세검색</label>
|
||||
<select name="" id="searchType" v-model="grid.params.searchType2" @keyup.enter="search">
|
||||
<option value="custNm" selected="selected">고객사명</option>
|
||||
<option value="bizNo">사업자번호</option>
|
||||
<option value="tmpltNm">템플릿명</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box id">
|
||||
<label for="id1" class="label">ID</label>
|
||||
<input type="text" id="id1" placeholder="검색어 입력"/>
|
||||
<label for="search" class="label">검색어</label>
|
||||
<input type="text" id="id1" placeholder="검색어 입력" v-model="grid.params.searchText1" v-on:keydown.enter.prevent="search"/>
|
||||
</div>
|
||||
<div class="input_box">
|
||||
<label for="name" class="label">이름(대리점명)</label>
|
||||
<input type="text" id="name" placeholder="검색어 입력"/>
|
||||
</div>
|
||||
<button type="button" class="button grey">조회</button>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>100</span>건</div>
|
||||
<div class="count">총 <span>{{ totalItems }}</span>건
|
||||
<div class="select_box NumberSe">
|
||||
<select name="" id="perPage" v-model="grid.pagePerRows" @keyup.enter="search">
|
||||
<option value="20">20</option>
|
||||
<option value="50" selected>50</option>
|
||||
<option value="100">100</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue admin">관리자 등록</button>
|
||||
<button type="button" class="button blue channel">유지채널 등록</button>
|
||||
<button type="button" class="button white delete">삭제</button>
|
||||
<button type="button" class="button blue admin" @click="excelDown();">엑셀다운로드</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="table">
|
||||
<custom-grid
|
||||
ref="table"
|
||||
:totalItems="'totalItems'"
|
||||
:url="testList.url"
|
||||
:perPage="testList.perPage"
|
||||
:initialRequest="testList.initialRequest"
|
||||
:pagination="testList.pagination"
|
||||
:isCheckbox="testList.isCheckbox"
|
||||
:columns="testList.columns"
|
||||
:noDataStr="testList.noDataStr"
|
||||
:addCls="testList.addCls"
|
||||
:header="testList.header"
|
||||
: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>
|
||||
</div>
|
||||
@@ -99,16 +66,116 @@
|
||||
|
||||
<script>
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
//import api from '../service/api';
|
||||
import channelMgtApi from '../service/channelMgtApi';
|
||||
import xlsx from '@/common/excel';
|
||||
import moment from 'moment';
|
||||
|
||||
class customBRegNo {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('td');
|
||||
var bregNo = String(props.colValue);
|
||||
el.innerText= bregNo;
|
||||
if(bregNo.length == 10){
|
||||
el.innerText= bregNo.substring(0,3)+'-'+bregNo.substring(3,5)+'-'+bregNo.substring(5,10)
|
||||
}
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
}
|
||||
}
|
||||
class customTmpltType {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('td');
|
||||
var tmpltType = String(props.colValue);
|
||||
el.innerText= "";
|
||||
switch(tmpltType){
|
||||
case '01' :
|
||||
el.innerText= "기본형";
|
||||
break;
|
||||
case '02' :
|
||||
el.innerText= "부가정보형";
|
||||
break;
|
||||
case '03' :
|
||||
el.innerText= "광고추가형";
|
||||
break;
|
||||
case '04' :
|
||||
el.innerText= "복잡형";
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
}
|
||||
}
|
||||
|
||||
class customStat {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('td');
|
||||
var stat = String(props.colValue);
|
||||
el.innerText= "";
|
||||
switch(stat){
|
||||
case 'T' :
|
||||
el.innerText= "신청완료";
|
||||
break;
|
||||
case 'R' :
|
||||
el.innerText= "검수요청완료";
|
||||
break;
|
||||
case 'Q' :
|
||||
el.innerText= "카카오 검수중";
|
||||
break;
|
||||
case 'A' :
|
||||
el.innerText= "템플릿승인";
|
||||
break;
|
||||
case 'S' :
|
||||
el.innerText= "반려(" + props.returnReason + ")";
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'temltList',
|
||||
data() {
|
||||
return {
|
||||
testList: {
|
||||
url: '/api/v1/bo/sysMgt/adminList',
|
||||
perPage: 20,
|
||||
row: {},
|
||||
authType: [],
|
||||
statType: [],
|
||||
cate2Code: "",
|
||||
totalItems: 0,
|
||||
pageType: 'CHANN',
|
||||
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 50,
|
||||
grid: {
|
||||
url: '/api/v1/bo/channelMgt/tmpltList',
|
||||
perPage: 50,
|
||||
pagination: true,
|
||||
isCheckbox: true,
|
||||
isCheckbox: false,
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
@@ -116,50 +183,154 @@ export default {
|
||||
header: [
|
||||
[
|
||||
{ header: 'NO', childNames: [] },
|
||||
{ header: '권한', childNames: [] },
|
||||
{ header: '이름(대리점명)', childNames: [] },
|
||||
{ header: 'ID', childNames: [] },
|
||||
{ header: '상태', childNames: [] },
|
||||
{ header: '등록일', 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: 'left', 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: 40 },
|
||||
{ name: 'custNm', header: '고객사명', align: 'left', width: 120 },
|
||||
{ name: 'bregNo', header: '사업자번호', align: 'center', width: 120,renderer: {type: customBRegNo}},
|
||||
{ name: 'tmpltCd', header: '템플릿코드', align: 'center', width: 120},
|
||||
{ name: 'tmpltNm', header: '템플릿명', align: 'center', width: 120},
|
||||
{ name: 'tmpltType', header: '템플릿 유형', align: 'center', width: 120,renderer: {type: customTmpltType}},
|
||||
{ name: 'stat', header: '상태(반려사유)', align: 'center', width: 120,renderer: {type: customStat}},
|
||||
{ name: 'sendProfile', header: '발신프로필', align: 'center', width: 120},
|
||||
{ name: 'lastChgDt', header: '최종수정일', width: 120, cls: 'td_line' }
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
// params: {
|
||||
// apprResult: '',
|
||||
// searchType: '',
|
||||
// searchText: '',
|
||||
// startDate: '',
|
||||
// endDate: ''
|
||||
// },
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchText1: ''
|
||||
},
|
||||
excelHeader: []
|
||||
}
|
||||
};
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid
|
||||
customGrid: customGrid,
|
||||
channelMgtApi
|
||||
},
|
||||
created(){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
this.getExcelHeader();
|
||||
},
|
||||
destroyed() {
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchText1: ''}
|
||||
});
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
|
||||
// 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.testList.params);
|
||||
this.$refs.table.search(this.testList.params, isKeep);
|
||||
console.log(this.grid.params);
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
sendStoreData: function() {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchText1: ''
|
||||
}
|
||||
});
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
//console.log("getCondition : "+ getCondition.perPage);
|
||||
},
|
||||
async getExcelDataDown() {
|
||||
try {
|
||||
let response;
|
||||
const params = {
|
||||
searchType1: this.grid.params.searchType1,
|
||||
searchType2: this.grid.params.searchType2,
|
||||
searchText1: this.grid.params.searchText1
|
||||
};
|
||||
|
||||
response = await channelMgtApi.tmpltListExcel(params);
|
||||
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
return result.data;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
}, // end of getExcelDataDown
|
||||
async excelDown() {
|
||||
if (this.$refs.table.getData().length <= 0) {
|
||||
alert('조회된 데이터가 없습니다.');
|
||||
return false;
|
||||
}
|
||||
|
||||
let today = moment().format('YYYYMMDDHHmmss');
|
||||
const saveFileName = `알림톡템플릿목록_${today}.xlsx`;
|
||||
|
||||
const data = await this.getExcelDataDown();
|
||||
let options = {
|
||||
header: this.excelHeader,
|
||||
dataOrder: 'header'
|
||||
};
|
||||
// console.log(data);
|
||||
xlsx.export(data.list, saveFileName, options).then(() => {});
|
||||
},
|
||||
getExcelHeader() {
|
||||
// 헤더를 mockup으로 관리한다.
|
||||
channelMgtApi.getExcelHeader(this.pageType).then(res => {
|
||||
this.excelHeader = res;
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
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,5 +1,5 @@
|
||||
<template>
|
||||
<div class="wrap bg-wrap">
|
||||
<div>
|
||||
<div class="dimmed modal26" @click="ModalClose();"></div>
|
||||
<div class="popup-wrap modal26">
|
||||
<div class="popup modal26">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-pcolor">저장</button>
|
||||
<button class="btn-pcolor" @click="saveExcel">저장</button>
|
||||
<button class="btn-default" @click="excelPopClose">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,6 +58,7 @@ export default {
|
||||
varList2 : ["이름","기타1","기타2","기타3","기타4"],
|
||||
nData : [],
|
||||
oData : [],
|
||||
totalItems: 0,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -66,8 +67,10 @@ export default {
|
||||
},
|
||||
methods :{
|
||||
// 모달 띄우기
|
||||
excelPopOpen(adminId){
|
||||
excelPopOpen(adminId, totalItems){
|
||||
this.adminId = adminId;
|
||||
this.totalItems = totalItems;
|
||||
console.log(totalItems)
|
||||
var excelPop = document.getElementsByClassName('modal33');
|
||||
for(var i = 0; i < excelPop.length; i++){
|
||||
excelPop[i].style.display = 'block';
|
||||
@@ -85,7 +88,7 @@ export default {
|
||||
// 저장 후 부모창 호출.
|
||||
toComplete(){
|
||||
this.getParent('custList').$refs.table.reloadData();
|
||||
this.ModalClose();
|
||||
this.excelPopClose();
|
||||
},
|
||||
async doInsert(){
|
||||
if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
|
||||
@@ -118,6 +121,10 @@ export default {
|
||||
});
|
||||
},
|
||||
readFile(event) {
|
||||
|
||||
this.nData = []
|
||||
this.oData = []
|
||||
|
||||
const file = event.target.files[0];
|
||||
console.log(file.name);
|
||||
|
||||
@@ -148,20 +155,14 @@ export default {
|
||||
let data = reader.result;
|
||||
let workbook = XLSX.read(data, {type: 'binary'});
|
||||
workbook.SheetNames.forEach(sheetName => {
|
||||
workbook.Sheets[sheetName].A1.w = "id";
|
||||
workbook.Sheets[sheetName].B1.w = "name";
|
||||
workbook.Sheets[sheetName].C1.w = "mdn";
|
||||
workbook.Sheets[sheetName].D1.w = "email";
|
||||
workbook.Sheets[sheetName].E1.w = "stat";
|
||||
|
||||
// console.log(workbook.Sheets[sheetName].A1);
|
||||
const rowObj = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]);
|
||||
// const rowObj = XLSX.utils.sheet_to_json(wb.Sheets[sheetName],{raw:true});
|
||||
const rowObj = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName],{raw:true});
|
||||
tmpResult = rowObj;
|
||||
const limitCnt = 101;
|
||||
const limitCnt = 100;
|
||||
|
||||
const totalCnt = Number(this.totalItems) + rowObj.length;
|
||||
|
||||
if(rowObj.length > limitCnt){
|
||||
if(totalCnt > limitCnt){
|
||||
alert('100건이상은 등록되지 않습니다.');
|
||||
return false;
|
||||
}
|
||||
@@ -183,28 +184,33 @@ export default {
|
||||
휴대폰번호='0'+휴대폰번호;
|
||||
}
|
||||
}
|
||||
let {retVal,msg } = vm.validXlxs({이름,휴대폰번호});
|
||||
|
||||
let {retVal,msg } = vm.validXlxs({ID,이름,휴대폰번호,이메일,ID잠금});
|
||||
if(retVal){
|
||||
const pVal = [{ name:'이름',val:이름, len:20,},
|
||||
{ name:'ID잠금',val:ID잠금, len:4,},];
|
||||
|
||||
const rVal = vm.isTitle(pVal);
|
||||
|
||||
if(rVal.retVal){
|
||||
vm.nData.push({name:이름,mdn:휴대폰번호,msg});
|
||||
vm.nData.push({userId:ID,userNm:이름,mdn:휴대폰번호,email:이메일,stat:ID잠금,msg});
|
||||
}else{
|
||||
vm.oData.push({이름,휴대폰번호,오류내용:rVal.msg});
|
||||
vm.oData.push({ID,이름,휴대폰번호,이메일,ID잠금,오류내용:rVal.msg});
|
||||
}
|
||||
|
||||
}else{
|
||||
vm.oData.push({이름,휴대폰번호,오류내용:msg});
|
||||
vm.oData.push({ID,이름,휴대폰번호,이메일,ID잠금,오류내용:msg});
|
||||
}
|
||||
}
|
||||
});
|
||||
console.log(vm.nData);
|
||||
// this.excelJsonData=tmpResult;
|
||||
console.log(vm.nData.length);
|
||||
console.log(vm.oData);
|
||||
console.log(vm.oData.length);
|
||||
};
|
||||
reader.readAsBinaryString(file);
|
||||
},
|
||||
validXlxs({이름,휴대폰번호}){
|
||||
validXlxs({이름,휴대폰번호,이메일}){
|
||||
if(this.isNull(이름)){
|
||||
return {retVal:false,msg:'이름 누락'};
|
||||
}
|
||||
@@ -216,7 +222,9 @@ export default {
|
||||
return {retVal:false,msg:'휴대폰번호 형식 오류'};
|
||||
}
|
||||
}
|
||||
|
||||
if(!this.emailCheck(이메일)){
|
||||
return {retVal:false,msg:'이메일 형식 오류'};
|
||||
}
|
||||
return {retVal:true,msg:'정상'};
|
||||
},
|
||||
isTitle(pVal) {
|
||||
@@ -243,7 +251,32 @@ export default {
|
||||
element.removeChild(element.firstChild);
|
||||
}
|
||||
// uploadFile
|
||||
},
|
||||
async saveExcel(){
|
||||
//
|
||||
this.row.adminId = this.adminId;
|
||||
this.row.list = this.nData;
|
||||
|
||||
try {
|
||||
const response = await custMgtApi.insertMassUser(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
|
||||
// this.totalCnt = result.data.totalCnt;
|
||||
// this.successCnt = result.data.successCnt;
|
||||
// this.failCnt = result.data.failCnt;
|
||||
// this.toComplete();/
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
|
||||
// 오류건수.
|
||||
console.log(this.oData.length);
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
267
frontend/src/modules/custMgt/components/MemberModifyPop.vue
Normal file
267
frontend/src/modules/custMgt/components/MemberModifyPop.vue
Normal file
@@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed memberUpdate" @click="memberUpdateModalClose();"></div>
|
||||
<div class="popup-wrap memberUpdate">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup memberUpdate popup_form">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 ID 수정</h3>
|
||||
</div>
|
||||
<form autocomplete="off">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>관리자 ID</th>
|
||||
<td>{{adminId}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td>{{userId}}</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" v-model.trim="userNm" ref="_userNm"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>휴대폰번호</th>
|
||||
<td><input type="text" v-model.trim="mdn" ref="_phone"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td><input type="email" v-model.trim="email" ref="_email"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="center">상태</th>
|
||||
<td>
|
||||
<input type="radio" name="userStateUpdate" value="01" id="user_popup_update_radio1" v-model="userStat">
|
||||
<label for="user_popup_update_radio1">사용</label>
|
||||
<input type="radio" name="userStateUpdate" value="02" id="user_popup_update_radio2" v-model="userStat">
|
||||
<label for="user_popup_update_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-pcolor" @click="memberUpdateConfirm();">저장</button>
|
||||
<button class="btn-default" @click="memberUpdateModalClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<validation-confirm-pop ref="validationConfirmPopModal"> </validation-confirm-pop>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from '@/service/api';
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import ValidationConfirmPop from '../components/ValidationConfirmPop.vue';
|
||||
import lodash from "lodash";
|
||||
|
||||
export default {
|
||||
name: "memberModifyPop",
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
watch:{
|
||||
stat(){
|
||||
console.log('watch : ', this.stat)
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ValidationConfirmPop,
|
||||
},
|
||||
model: {
|
||||
//prop: 'sendData',
|
||||
//event: 'event-data'
|
||||
},
|
||||
//props: ['sendData'],
|
||||
created(){
|
||||
// this.setAuthData();
|
||||
// this.formReset();
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
row:{},
|
||||
madangId:'',
|
||||
name:'',
|
||||
mdn:'',
|
||||
email:'',
|
||||
auth:'',
|
||||
stat: "",
|
||||
userId: "",
|
||||
adminId: "",
|
||||
userNm:"",
|
||||
userPwd1:"",
|
||||
userPwd2:"",
|
||||
code:"",
|
||||
userStat:"",
|
||||
}
|
||||
},
|
||||
methods :{
|
||||
//사용자ID 수정 모달 Open
|
||||
async memberUpdateModalOpen(props){
|
||||
this.row.userId = props.userId;
|
||||
this.adminId = props.adminId;
|
||||
try {
|
||||
const response = await custMgtApi.memberDetail(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.userId = result.data.userId;
|
||||
this.userNm = result.data.userNm;
|
||||
this.email = result.data.email;
|
||||
this.mdn = result.data.mdn;
|
||||
this.userStat = result.data.userStat;
|
||||
} else {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
// 모달 오픈
|
||||
var dimmed = document.getElementsByClassName('memberUpdate');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 Confirm
|
||||
memberUpdateConfirm(){
|
||||
// confirm 팝업 노출
|
||||
if(this.doValidate()){
|
||||
this.$refs.validationConfirmPopModal.confirmUpdateOpen();
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 처리
|
||||
async memberUpdate(){
|
||||
this.row.userId = this.userId;
|
||||
this.row.userPw = this.userPwd1;
|
||||
this.row.userNm = this.userNm;
|
||||
this.row.userEmail = this.email;
|
||||
this.row.mdn = this.mdn;
|
||||
this.row.userStat = this.userStat;
|
||||
try {
|
||||
const response = await custMgtApi.updateUser(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('수정 완료하였습니다.');
|
||||
this.toComplete();
|
||||
|
||||
} else {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 모달 Close
|
||||
memberUpdateModalClose(){
|
||||
var dimmed = document.getElementsByClassName('memberUpdate');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
toComplete(){
|
||||
this.row.serviceId = this.adminId;
|
||||
this.memberUpdateModalClose();
|
||||
this.$parent.memberDetail(this.adminId);
|
||||
},
|
||||
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 false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
doValidate(){
|
||||
if(!this.isNull(this.userPwd1)){
|
||||
if(!this.doPwdValidate()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.isNull(this.userNm)){
|
||||
alert("이름을 입력해 주세요");
|
||||
this.$refs._userNm.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();
|
||||
this.$refs.validationConfirmPopModal.validationEmailOpen();
|
||||
|
||||
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();
|
||||
this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.userStat)){
|
||||
alert('상태를 선택 해주세요.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
checkPhoneFocus(){
|
||||
//this.mdn = '';
|
||||
this.$refs._phone.focus();
|
||||
},
|
||||
checkEmailFocus(){
|
||||
//this.email = '';
|
||||
this.$refs._email.focus();
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
296
frontend/src/modules/custMgt/components/MemberRegPop.vue
Normal file
296
frontend/src/modules/custMgt/components/MemberRegPop.vue
Normal file
@@ -0,0 +1,296 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed memberInsert" @click="memberInsertModalClose();"></div>
|
||||
<div class="popup-wrap memberInsert">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup memberInsert popup_form">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 ID 생성</h3>
|
||||
</div>
|
||||
<form autocomplete="off">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>관리자 ID</th>
|
||||
<td>{{adminId}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td><input type="text" v-model.trim="userId" ref="_userId"></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" v-model.trim="userNm" ref="_userNm"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>휴대폰번호</th>
|
||||
<td><input type="text" v-model.trim="mdn" ref="_phone"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td><input type="email" v-model.trim="email" ref="_email"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="center">상태</th>
|
||||
<td>
|
||||
<input type="radio" name="userStateInsert" value="01" id="user_popup_insert_radio1" v-model="stat">
|
||||
<label for="user_popup_insert_radio1">사용</label>
|
||||
<input type="radio" name="userStateInsert" value="02" id="user_popup_insert_radio2" v-model="stat">
|
||||
<label for="user_popup_insert_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-pcolor" @click="memberInsertConfirm();">저장</button>
|
||||
<button class="btn-default" @click="memberInsertModalClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<validation-confirm-pop ref="validationConfirmPopModal"> </validation-confirm-pop>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from '@/service/api';
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import ValidationConfirmPop from '../components/ValidationConfirmPop.vue';
|
||||
import lodash from "lodash";
|
||||
|
||||
export default {
|
||||
name: "memberRegPop",
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
watch:{
|
||||
stat(){
|
||||
console.log('watch : ', this.stat)
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ValidationConfirmPop,
|
||||
},
|
||||
model: {
|
||||
//prop: 'sendData',
|
||||
//event: 'event-data'
|
||||
},
|
||||
//props: ['sendData'],
|
||||
created(){
|
||||
// this.setAuthData();
|
||||
// this.formReset();
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
row:{},
|
||||
madangId:'',
|
||||
adminId:'',
|
||||
name:'',
|
||||
mdn:'',
|
||||
email:'',
|
||||
auth:'',
|
||||
stat: "",
|
||||
userId:"",
|
||||
userNm:"",
|
||||
userPwd1:"",
|
||||
userPwd2:"",
|
||||
code:"",
|
||||
userTotalCnt:0,
|
||||
}
|
||||
},
|
||||
methods :{
|
||||
//사용자ID 생성 모달 Open
|
||||
async memberInsertModalOpen(props){
|
||||
this.adminId = props.adminId;
|
||||
this.userTotalCnt = props.userTotalCnt;
|
||||
|
||||
// 모달 오픈
|
||||
var dimmed = document.getElementsByClassName('memberInsert');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//사용자ID 생성 Confirm
|
||||
memberInsertConfirm(){
|
||||
// confirm 팝업 노출
|
||||
if(this.doValidate()){
|
||||
this.$refs.validationConfirmPopModal.confirmInsertOpen();
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 처리
|
||||
async memberInsert(){
|
||||
this.row.adminId = this.adminId;
|
||||
this.row.userId = this.userId;
|
||||
this.row.userPw = this.userPwd1;
|
||||
this.row.userNm = this.userNm;
|
||||
this.row.userEmail = this.email;
|
||||
this.row.mdn = this.mdn;
|
||||
this.row.userStat = this.stat;
|
||||
try {
|
||||
const response = await custMgtApi.insertUser(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('사용자 생성 완료하였습니다.');
|
||||
this.toComplete();
|
||||
} else if(result != null && result.retCode == "4018"){
|
||||
// 이미 사용중인 ID
|
||||
this.$refs.validationConfirmPopModal.validationIdDuplicateOpen();
|
||||
} else {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
},
|
||||
//사용자ID 생성 모달 Close
|
||||
memberInsertModalClose(){
|
||||
var dimmed = document.getElementsByClassName('memberInsert');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
//this.formReset();
|
||||
},
|
||||
toComplete(){
|
||||
this.row.serviceId = this.adminId;
|
||||
this.memberInsertModalClose();
|
||||
this.$parent.memberDetail(this.adminId);
|
||||
},
|
||||
setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
// formReset(){
|
||||
// var targetAdminId = this.adminId;
|
||||
// Object.assign(this.$data, this.$options.data());
|
||||
// this.adminId = targetAdminId;
|
||||
// },
|
||||
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 false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
doValidate(){
|
||||
if(this.userTotalCnt >= 100){
|
||||
// 사용자등록제한_최대100개까지
|
||||
this.$refs.validationConfirmPopModal.validationMaxlimitOpen();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.userId)){
|
||||
alert("ID를 입력해 주세요");
|
||||
this.$refs._userId.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
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(!this.isNull(this.userPwd1)){
|
||||
if(!this.doPwdValidate()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.isNull(this.userNm)){
|
||||
alert("이름을 입력해 주세요");
|
||||
this.$refs._userNm.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();
|
||||
this.$refs.validationConfirmPopModal.validationEmailOpen();
|
||||
|
||||
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();
|
||||
this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.stat)){
|
||||
alert('상태를 선택 해주세요.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
checkPhoneFocus(){
|
||||
//this.mdn = '';
|
||||
this.$refs._phone.focus();
|
||||
},
|
||||
checkEmailFocus(){
|
||||
//this.email = '';
|
||||
this.$refs._email.focus();
|
||||
},
|
||||
checkIdDupFocus(){
|
||||
//this.email = '';
|
||||
this.$refs._userId.focus();
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
268
frontend/src/modules/custMgt/components/MemoTotalPop.vue
Normal file
268
frontend/src/modules/custMgt/components/MemoTotalPop.vue
Normal file
@@ -0,0 +1,268 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed memoTotal" @click="memoTotalModalClose();"></div>
|
||||
<div class="popup-wrap memoTotal">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup memoTotal popup_form b-popup">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">전체 메모보기</h3>
|
||||
</div>
|
||||
<table class="table-c">
|
||||
<!--
|
||||
<thead>
|
||||
<tr>
|
||||
<th>내용</th>
|
||||
<th>작성자</th>
|
||||
<th>작성일</th>
|
||||
<th>삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="memo">작성한 메모 내용이 노출됩니다. <br/>
|
||||
해당영역은 최대 5줄까지 노출되며 이후 우측 스크롤이 생성됩니다.<br/>
|
||||
작성한 메모 내용이 노출됩니다. <br/>
|
||||
해당영역은 최대 5줄까지 노출되며 이후 우측 스크롤이 생성됩니다.<br/>
|
||||
작성한 메모 내용이 노출됩니다.</td>
|
||||
<td>관리자</td>
|
||||
<td>2022-03-10</td>
|
||||
<td><button type="button" class="button white btn-a">삭제</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
-->
|
||||
|
||||
<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>
|
||||
|
||||
</table>
|
||||
<div class="pop-btn2">
|
||||
|
||||
<button class="btn-default" @click="memoTotalModalClose();">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import customGrid from "@/components/CustomGrid";
|
||||
import api from '@/service/api';
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
// const el = document.createElement('a');
|
||||
const el = document.createElement('button');
|
||||
el.href = 'javascript:void(0);';
|
||||
//el.className = 'btn_text';
|
||||
el.className = 'button white btn-a';
|
||||
//el.innerText= String(props.colValue)
|
||||
el.innerText= String('삭제')
|
||||
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: "memoTatalListPop",
|
||||
model: {
|
||||
//prop: 'sendData',
|
||||
//event: 'event-data'
|
||||
},
|
||||
//props: ['sendData'],
|
||||
// props: [],
|
||||
created(){
|
||||
// this.setAuthData();
|
||||
// this.formReset();
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
memorow: {},
|
||||
totalItems: 0,
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 10,
|
||||
userId: '',
|
||||
grid: {
|
||||
url: '/api/v1/bo/custMgt/allMemoList',
|
||||
pagePerRows: 10,
|
||||
pagination: true,
|
||||
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
columns: [
|
||||
{ name: 'memo', header: '내용', align: 'center', cls:'memo'},
|
||||
{ name: 'register', header: '작성자', align: 'center'},
|
||||
{ name: 'regDt', header: '작성일', align: 'center'},
|
||||
{ name: 'delete', header: '삭제', align: 'center', renderer: {
|
||||
type: CustomATagRenderer
|
||||
,options: {
|
||||
callback: this.deleteMemo,
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'seqNo', header: '내용일련번호', align: 'center', hidden: true},
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
userId: '',
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
components:{
|
||||
customGrid: customGrid,
|
||||
},
|
||||
created(){
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let pageMemo = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition_memo = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition_memo : '+getCondition_memo);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeepMemo = false;
|
||||
if (getCondition_memo) {
|
||||
this.grid.pagePerRows = getCondition_memo.perPage;
|
||||
this.grid.params = getCondition_memo.params;
|
||||
pageMemo = getCondition_memo.page;
|
||||
isKeepMemo = 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();
|
||||
},
|
||||
sendStoreData: function() {
|
||||
const getP_memo = this.$refs.table.getPagination();
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP_memo._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: {
|
||||
userId : this.userId,
|
||||
}
|
||||
});
|
||||
|
||||
const getCondition_memo = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log("getCondition_memo : "+ getCondition_memo.perPage);
|
||||
},
|
||||
//메모전체 모달 Open
|
||||
async memoTotalModalOpen(props){
|
||||
this.grid.params.userId = props.adminId;
|
||||
this.userId = props.adminId;
|
||||
|
||||
console.log(props.adminId);
|
||||
|
||||
// 메모 모달팝업 오픈
|
||||
var dimmed = document.getElementsByClassName('memoTotal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
// 리스트 그리드 오픈
|
||||
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);
|
||||
|
||||
},
|
||||
//메모전체 모달 Close
|
||||
memoTotalModalClose(){
|
||||
var dimmed = document.getElementsByClassName('memoTotal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
//this.formReset();
|
||||
},
|
||||
toComplete(){
|
||||
this.row.serviceId = this.adminId;
|
||||
this.memoTotalModalClose();
|
||||
this.$parent.memberDetail(this.adminId);
|
||||
},
|
||||
deleteMemo: function(props) {
|
||||
console.log(props);
|
||||
var param = {};
|
||||
param.seqNo = props.seqNo;
|
||||
param.userId = this.userId;
|
||||
this.deleteMemoConfirm(param);
|
||||
},
|
||||
async deleteMemoConfirm(target){
|
||||
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
try {
|
||||
const response = await custMgtApi.deleteMemo(target);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
// alert('삭제 성공');
|
||||
// 그리드 reload
|
||||
// 리스트 그리드 오픈
|
||||
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);
|
||||
} else {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -89,7 +89,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 사용자 등록 - 휴대폰번호 형식 체크 -->
|
||||
<div class="dimmed valication-phonenumber" @click="valicationPhonenumberClose();"></div>
|
||||
<div class="dimmed valication-phonenumber" @click="validationPhonenumberClose();"></div>
|
||||
<div class="popup-wrap valication-phonenumber">
|
||||
<div class="popup valication-phonenumber">
|
||||
<div class="pop-head">
|
||||
@@ -99,7 +99,7 @@
|
||||
<p>휴대폰번호를 확인해 주세요.</p>
|
||||
</div>
|
||||
<div class="pop-btn1">
|
||||
<button class="btn-pcolor" @click="valicationPhonenumberClose();">확인</button>
|
||||
<button class="btn-pcolor" @click="validationPhonenumberClose();">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,6 +138,23 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용자 수정(청약고객:sub) 확인 -->
|
||||
<div class="dimmed confirm-update-sub" @click="confirmUpdateSubClose();"></div>
|
||||
<div class="popup-wrap confirm-update-sub">
|
||||
<div class="popup confirm-update-sub">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자(청약고객) 수정 확인</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>변경된 내용을 저장하시겠습니까?</p>
|
||||
</div>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-pcolor" @click="confirmUpdateSub();">확인</button>
|
||||
<button class="btn-default" @click="confirmUpdateSubClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용자 ID 생성 파일 업로드 - 성공 -->
|
||||
<div class="dimmed success-fileupload" @click="successFileuploadClose();"></div>
|
||||
<div class="popup-wrap success-fileupload">
|
||||
@@ -177,8 +194,6 @@ export default {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
//this.$parent.
|
||||
|
||||
},
|
||||
//사용자등록 - 최초등록
|
||||
confirmInsert(){
|
||||
@@ -187,7 +202,7 @@ export default {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
//this.$parent.
|
||||
this.$parent.memberInsert();
|
||||
|
||||
},
|
||||
//사용자등록 - 최초등록 Close
|
||||
@@ -237,7 +252,7 @@ export default {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.$parent.updateAdminInfo();
|
||||
this.$parent.memberUpdate();
|
||||
|
||||
},
|
||||
// 사용자 수정 Close
|
||||
@@ -247,7 +262,31 @@ export default {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.toComplete();
|
||||
},
|
||||
//사용자 수정(청약고객-sub) 확인 Open
|
||||
confirmUpdateSubOpen(){
|
||||
var dimmed = document.getElementsByClassName('confirm-update-sub');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
},
|
||||
//사용자 수정(청약고객-sub) 확인
|
||||
confirmUpdateSub(){
|
||||
var dimmed = document.getElementsByClassName('confirm-update-sub');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.$parent.updateAdminInfo();
|
||||
|
||||
},
|
||||
// 사용자 수정(청약고객-sub) Close
|
||||
confirmUpdateSubClose(){
|
||||
var dimmed = document.getElementsByClassName('confirm-update-sub');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
},
|
||||
// 이메일 형식 체크 Open
|
||||
@@ -265,6 +304,8 @@ export default {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.$parent.checkEmailFocus();
|
||||
|
||||
},
|
||||
// 아이디 중복 체크 Open
|
||||
validationIdDuplicateOpen(){
|
||||
@@ -281,6 +322,8 @@ export default {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.$parent.checkIdDupFocus();
|
||||
|
||||
},
|
||||
// 최대 등록 제한 Open
|
||||
validationMaxlimitOpen(){
|
||||
@@ -297,9 +340,11 @@ export default {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
this.$parent.toComplete();
|
||||
|
||||
},
|
||||
// 휴대폰번호 형식 체크 Open
|
||||
valicationPhonenumberOpen(){
|
||||
validationPhonenumberOpen(){
|
||||
var dimmed = document.getElementsByClassName('valication-phonenumber');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
@@ -307,11 +352,12 @@ export default {
|
||||
|
||||
},
|
||||
// 휴대폰번호 형식 체크 Close
|
||||
valicationPhonenumberClose(){
|
||||
validationPhonenumberClose(){
|
||||
var dimmed = document.getElementsByClassName('valication-phonenumber');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.checkPhoneFocus();
|
||||
|
||||
},
|
||||
// 사용자 ID 생성 파일 업로드 - 성공 Open
|
||||
|
||||
@@ -43,6 +43,35 @@ const updateAdminInfo = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/updateAdminInfo', params);
|
||||
}
|
||||
|
||||
// 사용자 ID 생성
|
||||
const insertUser = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/insertUser', params);
|
||||
}
|
||||
|
||||
// 사용자 ID 수정
|
||||
const updateUser = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/updateUser', params);
|
||||
}
|
||||
|
||||
// 사용자 ID 대량등록
|
||||
const insertMassUser = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/insertMassUser', params);
|
||||
}
|
||||
|
||||
// 사용자 ID (리스트) 삭제
|
||||
const deleteUser = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/deleteUser', params);
|
||||
}
|
||||
|
||||
// 관리자정보 종합(사용자정보, 메모, 발송한도) 수정
|
||||
const updateAdminInfoTotal = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/updateAdminInfoTotal', params);
|
||||
}
|
||||
|
||||
// 메모삭제
|
||||
const deleteMemo = (params) => {
|
||||
return httpClient.post('/api/v1/bo/custMgt/deleteMemo', params);
|
||||
}
|
||||
|
||||
const getExcelHeader = category => {
|
||||
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
|
||||
@@ -76,4 +105,10 @@ export default {
|
||||
memberAdminDetail,
|
||||
selectSearchMadangId,
|
||||
updateAdminInfo,
|
||||
insertUser,
|
||||
updateUser,
|
||||
insertMassUser,
|
||||
deleteUser,
|
||||
updateAdminInfoTotal,
|
||||
deleteMemo,
|
||||
}
|
||||
|
||||
@@ -22,29 +22,5 @@
|
||||
"name": "ID잠금"
|
||||
}
|
||||
]
|
||||
],
|
||||
"body": [
|
||||
[
|
||||
{
|
||||
"key": "id",
|
||||
"name": ""
|
||||
},
|
||||
{
|
||||
"key": "userNm",
|
||||
"name": ""
|
||||
},
|
||||
{
|
||||
"key": "mdn",
|
||||
"name": ""
|
||||
},
|
||||
{
|
||||
"key": "email",
|
||||
"name": ""
|
||||
},
|
||||
{
|
||||
"key": "stat",
|
||||
"name": ""
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
<th class="center">라인타입</th>
|
||||
<td colspan="2">
|
||||
<select name="" id="" v-model="lineType">
|
||||
<option value="ID">일반</option>
|
||||
<option value="이름">실시간</option>
|
||||
<option value="관리자ID">배치</option>
|
||||
<option value="NORMAL">일반</option>
|
||||
<option value="BATCH">배치</option>
|
||||
<option value="REAL">실시간</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -66,12 +66,16 @@
|
||||
<th>메모</th>
|
||||
<td colspan="5">
|
||||
<div class="input-memo">
|
||||
<textarea class="memo_text" cols="160" rows="10" placeholder="메모 입력란입니다. 작성글은 저장 버튼으로 저장되고 마지막 저장 내용은 남아 있습니다" v-model="memo"></textarea>
|
||||
<textarea class="memo_text" placeholder="메모 입력란입니다. 작성글은 저장 버튼으로 저장되고 마지막 저장 내용은 남아 있습니다" v-model="memo"></textarea>
|
||||
<!--
|
||||
<textarea class="memo_text" cols="160" rows="10" placeholder="메모 입력란입니다. 작성글은 저장 버튼으로 저장되고 마지막 저장 내용은 남아 있습니다" v-model="memo"></textarea>
|
||||
-->
|
||||
<!--
|
||||
|
||||
textarea 구글 검색하셔서 태그 옵션 더 확인해보면 좋아요
|
||||
<textarea name="" id="" cols="30" rows="10" placeholder="메모 입력란입니다. 작성글은 저장 버튼으로 저장되고 마지막 저장 내용은 남아 있습니다"></textarea>
|
||||
-->
|
||||
<button type="button" class="button grey btn-a">전체 메모보기</button>
|
||||
<button type="button" class="button grey btn-a" @click="memoTotalPopOpen();">전체 메모보기</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -86,9 +90,9 @@
|
||||
<p>( 최대 100개까지 등록 가능 )</p>
|
||||
</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue add">사용자 ID 생성</button>
|
||||
<button type="button" class="button blue add" @click="memberInsertPopOpen();">사용자 ID 생성</button>
|
||||
<button type="button" class="button blue add" @click="excelPopOpen();">사용자 ID 대량생성</button>
|
||||
<button type="button" class="button white del">삭제</button>
|
||||
<button type="button" class="button white del" @click="memberDelete">삭제</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -105,7 +109,7 @@
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" id="admin_check1"><label for="admin_check1"></label></th>
|
||||
<th><input type="checkbox" id="admin_check1" v-model="selectAll"><label for="admin_check1"></label></th>
|
||||
<th>NO</th>
|
||||
<th>ID</th>
|
||||
<th>이름</th>
|
||||
@@ -116,13 +120,16 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||
<td><input type="checkbox" checked="" id="admin_check2"><label for="admin_check2"></label></td>
|
||||
<td><input type="checkbox" :id="'chk'+option.userId" v-model="selected" :value="option.userId"><label :for="'chk'+option.userId"></label></td>
|
||||
<td>{{ option.no }}</td>
|
||||
<td>{{ option.userId }}</td>
|
||||
<td>{{ option.userNm }}</td>
|
||||
<td>{{ option.mdn }}</td>
|
||||
<td><input type="checkbox" id="user_id_status01" name="user_id_status"><label class="toggle_switch" for="user_id_status01"></label></td>
|
||||
<td><button type="button" class="button white btn-a">수정</button></td>
|
||||
<td>
|
||||
<input type="checkbox" id="user_id_status01" name="user_id_status" v-model="option.userStat" true-value='정상' false-value='사용중지' disabled/>
|
||||
<label class="toggle_switch" for="user_id_status01"></label>
|
||||
</td>
|
||||
<td><button type="button" class="button white btn-a" @click="memberUpdatePopOpen(option.userId);">수정</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -130,11 +137,14 @@
|
||||
</div>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" type="button" @click="toComplete();">취소</button>
|
||||
<button class="btn-pcolor" type="button">저장</button>
|
||||
<button class="btn-pcolor" type="button" @click="updateAdminInfoTotal();">저장</button>
|
||||
</div>
|
||||
|
||||
|
||||
<member-bulk-reg-pop ref="memberBulkRegPop"> </member-bulk-reg-pop>
|
||||
<member-reg-pop ref="memberRegPop"> </member-reg-pop>
|
||||
<member-modify-pop ref="memberModifyPop"> </member-modify-pop>
|
||||
<memo-total-pop ref="memoTatalListPop"> </memo-total-pop>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,9 +154,17 @@
|
||||
<script>
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
import MemberBulkRegPop from '../components/MemberBulkRegPop';
|
||||
import MemberRegPop from '../components/MemberRegPop';
|
||||
import MemberModifyPop from '../components/MemberModifyPop';
|
||||
import MemoTotalPop from '../components/MemoTotalPop';
|
||||
|
||||
export default {
|
||||
name: 'memberAdminDetail',
|
||||
watch:{
|
||||
stat(){
|
||||
console.log('watch : ', this.stat)
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
row:{},
|
||||
@@ -166,6 +184,8 @@ export default {
|
||||
memo: '',
|
||||
mdn : '',
|
||||
email: '',
|
||||
userTotalCnt:0,
|
||||
selected: [],
|
||||
|
||||
}
|
||||
},
|
||||
@@ -177,6 +197,9 @@ export default {
|
||||
},
|
||||
components: {
|
||||
MemberBulkRegPop,
|
||||
MemberRegPop,
|
||||
MemberModifyPop,
|
||||
MemoTotalPop,
|
||||
},
|
||||
created(){
|
||||
this.memberDetail(this.$route.params.serviceId);
|
||||
@@ -184,10 +207,36 @@ export default {
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
},
|
||||
destroyed() {
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchText1: ''}
|
||||
});
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
computed:{
|
||||
selectAll: {
|
||||
get() {
|
||||
return this.list ? (this.selected ? (this.selected.length === this.list.length) : false) : false;
|
||||
},
|
||||
set(value) {
|
||||
const selected = [];
|
||||
|
||||
if (value) {
|
||||
this.list.forEach((com) => {
|
||||
selected.push(com.userId);
|
||||
});
|
||||
}
|
||||
|
||||
this.selected = selected;
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async memberDetail(serviceId){
|
||||
@@ -196,6 +245,7 @@ export default {
|
||||
const response = await custMgtApi.memberAdminDetail(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.formReset();
|
||||
this.userNm = result.data.userNm;
|
||||
this.userId = result.data.userId;
|
||||
this.regDt = result.data.regDt;
|
||||
@@ -210,6 +260,38 @@ export default {
|
||||
this.mdn = result.data.mdn;
|
||||
this.email = result.data.email;
|
||||
this.list = result.data.list;
|
||||
this.userTotalCnt = result.data.list.length;
|
||||
console.log('userTotalCnt:'+result.data.list.length);
|
||||
this.totalItems = result.data.paging.totalCnt;
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
|
||||
},
|
||||
async updateAdminInfoTotal(){
|
||||
|
||||
this.row.userId = this.adminId;
|
||||
this.row.sendingLimit = this.sendingLimit;
|
||||
this.row.lineType = this.lineType;
|
||||
this.row.userStat = this.userStat;
|
||||
this.row.memo = this.memo;
|
||||
|
||||
console.log(this.row);
|
||||
|
||||
try {
|
||||
const response = await custMgtApi.updateAdminInfoTotal(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
|
||||
alert("저장 완료하였습니다.");
|
||||
|
||||
}else if(result != null && result.retCode == "4019"){
|
||||
alert("발송한도금액이 정액한도금액보다 작습니다.");
|
||||
|
||||
}else {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
@@ -223,8 +305,52 @@ export default {
|
||||
},
|
||||
excelPopOpen() {
|
||||
console.log(this.adminId);
|
||||
this.$refs.memberBulkRegPop.excelPopOpen(this.adminId);
|
||||
this.$refs.memberBulkRegPop.excelPopOpen(this.adminId, this.totalItems);
|
||||
},
|
||||
memberUpdatePopOpen(target) {
|
||||
this.row.userId = target;
|
||||
this.row.adminId = this.adminId;
|
||||
this.$refs.memberModifyPop.memberUpdateModalOpen(this.row);
|
||||
},
|
||||
memberInsertPopOpen() {
|
||||
this.row.adminId = this.adminId;
|
||||
this.row.userTotalCnt = this.userTotalCnt;
|
||||
this.$refs.memberRegPop.memberInsertModalOpen(this.row);
|
||||
},
|
||||
memoTotalPopOpen(){
|
||||
this.row.adminId = this.adminId;
|
||||
this.$refs.memoTatalListPop.memoTotalModalOpen(this.row);
|
||||
},
|
||||
async memberDelete(){
|
||||
// console.log(this.selected)
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
this.row.list = this.selected;
|
||||
console.log(this.row);
|
||||
try {
|
||||
const response = await custMgtApi.deleteUser(this.row);
|
||||
const result = response.data;
|
||||
|
||||
if (result != null && result.retCode == "0000") {
|
||||
|
||||
//alert("저장 완료하였습니다.");
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
},
|
||||
setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
formReset(){
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<tr class="tr_input">
|
||||
<th>이름</th>
|
||||
<td colspan="2">
|
||||
<input type="text" v-model="userNm">
|
||||
<input type="text" v-model="userNm" ref="_userNm">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -42,19 +42,19 @@
|
||||
<tr class="tr_input">
|
||||
<th>휴대폰번호</th>
|
||||
<td colspan="2">
|
||||
<input type="text" v-model="mdn">
|
||||
<input type="text" v-model="mdn" ref="_phone">
|
||||
</td>
|
||||
<th class="center">이메일</th>
|
||||
<td colspan="2">
|
||||
<input type="text" v-model="email">
|
||||
<input type="text" v-model="email" ref="_email">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="w30">
|
||||
<th>잠금</th>
|
||||
<td colspan="2">
|
||||
<input type="radio" name="userStat" value="01" id="right_radio1" v-model="userStat">
|
||||
<input type="radio" name="userStat" value="01" id="right_radio1" v-model="stat">
|
||||
<label for="right_radio1">사용</label>
|
||||
<input type="radio" name="userStat" value="02" id="right_radio2" v-model="userStat">
|
||||
<input type="radio" name="userStat" value="02" id="right_radio2" v-model="stat">
|
||||
<label for="right_radio2">정지</label>
|
||||
</td>
|
||||
<th class="center">최종접속일</th>
|
||||
@@ -67,24 +67,34 @@
|
||||
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" type="button" @click="toComplete();">취소</button>
|
||||
<button class="btn-pcolor" type="button">저장</button>
|
||||
<button class="btn-pcolor" type="button" @click="memberUpdate();">저장</button>
|
||||
</div>
|
||||
|
||||
<validation-confirm-pop ref="validationConfirmPopModal"> </validation-confirm-pop>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import ValidationConfirmPop from '../components/ValidationConfirmPop.vue';
|
||||
import lodash from "lodash";
|
||||
|
||||
export default {
|
||||
name: 'memberDetail',
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
watch:{
|
||||
stat(){
|
||||
console.log('watch : ', this.stat)
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ValidationConfirmPop,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
row:{},
|
||||
@@ -102,6 +112,7 @@ export default {
|
||||
memo: '',
|
||||
mdn : '',
|
||||
email: '',
|
||||
stat:'',
|
||||
|
||||
}
|
||||
},
|
||||
@@ -141,7 +152,7 @@ export default {
|
||||
this.adminNm = result.data.adminNm;
|
||||
this.sendingLimit = result.data.sendingLimit;
|
||||
this.lineType = result.data.lineType;
|
||||
this.userStat = result.data.userStat;
|
||||
this.stat = result.data.userStat;
|
||||
this.lastLoginDt = result.data.lastLoginDt;
|
||||
this.memo = result.data.memo;
|
||||
this.mdn = result.data.mdn;
|
||||
@@ -153,11 +164,87 @@ export default {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
|
||||
},
|
||||
async memberUpdate(){
|
||||
if(!this.doValidate()){
|
||||
return false;
|
||||
}
|
||||
|
||||
this.row.userId = this.userId;
|
||||
this.row.userNm = this.userNm;
|
||||
this.row.userEmail = this.email;
|
||||
this.row.mdn = this.mdn;
|
||||
this.row.userStat = this.stat;
|
||||
try {
|
||||
const response = await custMgtApi.updateUser(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('저장 완료하였습니다.');
|
||||
this.toComplete();
|
||||
|
||||
} else {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
},
|
||||
// 저장 후 부모창 호출.
|
||||
toComplete(){
|
||||
this.$router.push({ name: 'memberList', params: this.row });
|
||||
},
|
||||
doValidate(){
|
||||
|
||||
if(this.isNull(this.userNm)){
|
||||
alert("이름을 입력해 주세요");
|
||||
this.$refs._userNm.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();
|
||||
//this.$refs.validationConfirmPopModal.validationEmailOpen();
|
||||
|
||||
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();
|
||||
//this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.stat)){
|
||||
alert('상태를 선택 해주세요.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
checkPhoneFocus(){
|
||||
//this.mdn = '';
|
||||
this.$refs._phone.focus();
|
||||
},
|
||||
checkEmailFocus(){
|
||||
//this.email = '';
|
||||
this.$refs._email.focus();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -354,7 +354,7 @@ export default {
|
||||
// this.row.msg = '변경된 내용을 저장하시겠습니까?';
|
||||
// console.log(this.row);
|
||||
// this.$refs.confirmPop.confirmModalOpen(this.row);
|
||||
this.$refs.validationConfirmPop.confirmUpdateOpen();
|
||||
this.$refs.validationConfirmPop.confirmUpdateSubOpen();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -5,23 +5,37 @@
|
||||
*/
|
||||
package kr.co.uplus.ez.api.channelMgt;
|
||||
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
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.channelMgt.dto.TmpltListExcelReqDto;
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListExcelResDto;
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto;
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListResDto;
|
||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "api/v1/bo/channelMgt")
|
||||
public class ChannelMgtController {
|
||||
|
||||
@Autowired
|
||||
ChannelMgtService channelService;
|
||||
|
||||
@Autowired
|
||||
ValidComponents validComponents;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
@@ -30,9 +44,37 @@ public class ChannelMgtController {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/tmpltList" , method = {RequestMethod.POST})
|
||||
@ApiOperation(value = "tmpltList", notes = "알림톡 템플릿 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "tmpltList", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public ApiResponseMessage tmpltList(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return channelService.tmpltList(paramMap);
|
||||
public TmpltListResDto tmpltList(@RequestBody @Valid TmpltListReqDto tmpltListReqDto, BindingResult bindingResult) throws Exception{
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new TmpltListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return channelService.tmpltList(tmpltListReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 알림톡 템플릿 엑셀 다운로드 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "tmpltListExcel", notes = "알림톡 템플릿 엑셀 다운로드 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "tmpltListExcel", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public TmpltListExcelResDto tmpltListExcel(@RequestBody @Valid TmpltListExcelReqDto tmpltListExcelReqDto, BindingResult bindingResult) throws Exception{
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new TmpltListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return channelService.tmpltListExcel(tmpltListExcelReqDto);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
package kr.co.uplus.ez.api.channelMgt;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListExcelReqDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public class ChannelMgtMapper {
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo;
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto;
|
||||
|
||||
@Mapper
|
||||
public interface ChannelMgtMapper {
|
||||
|
||||
int selectTmpltTotalCnt(TmpltListReqDto tmpltListReqDto);
|
||||
|
||||
List<TmpltInfo> selectTmpltList(TmpltListReqDto tmpltListReqDto);
|
||||
|
||||
List<TmpltInfo> selectTmpltListExcel(TmpltListExcelReqDto tmpltListExcelReqDto);
|
||||
}
|
||||
|
||||
@@ -5,14 +5,31 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.*;
|
||||
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.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
|
||||
@Service
|
||||
public class ChannelMgtService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ChannelMgtService.class);
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb1")
|
||||
private SqlSessionTemplate sqlSessionMaster;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
@@ -20,32 +37,72 @@ public class ChannelMgtService {
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage tmpltList(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("totalCnt","999");
|
||||
data.put("currentPage","1");
|
||||
dataObj.put("paging", data);
|
||||
public TmpltListResDto tmpltList(TmpltListReqDto tmpltListReqDto) {
|
||||
ChannelMgtMapper channelMgtMapper = sqlSessionSlave.getMapper(ChannelMgtMapper.class);
|
||||
String nowPage = String.valueOf(tmpltListReqDto.getPage());
|
||||
int totalCnt = channelMgtMapper.selectTmpltTotalCnt(tmpltListReqDto);
|
||||
|
||||
for(int i=0; i<10; i++) {
|
||||
data = new HashMap<>();
|
||||
data.put("no", ""+(i+1));
|
||||
data.put("custNm", "유플러스");
|
||||
data.put("bRegNo", "229-81-39938");
|
||||
data.put("tmpltCd", "Abc");
|
||||
data.put("tmpltNm", "부가정보형");
|
||||
data.put("stat", "승인");
|
||||
data.put("returnReason", "");
|
||||
data.put("sendProfile", "@유플러스");
|
||||
data.put("lastChgDt", "2022-03-10");
|
||||
|
||||
dataList.add(data);
|
||||
if(totalCnt == 0) {
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
TmpltListRes tmpltListRes = new TmpltListRes();
|
||||
tmpltListRes.setList(new ArrayList<>());
|
||||
tmpltListRes.setPaging(paging);
|
||||
return new TmpltListResDto(ApiResponseCode.CM_NOT_FOUND, tmpltListRes);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
return result;
|
||||
logger.info("perPage : "+tmpltListReqDto.getPagePerRows());
|
||||
int page = tmpltListReqDto.getPage();
|
||||
int pagePerRows = tmpltListReqDto.getPagePerRows();
|
||||
page = (page -1) * pagePerRows;
|
||||
tmpltListReqDto.setPage(page);
|
||||
|
||||
List<TmpltInfo> tmpltInfos = channelMgtMapper.selectTmpltList(tmpltListReqDto);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
|
||||
TmpltListRes tmpltListRes = new TmpltListRes();
|
||||
tmpltListRes.setList(tmpltInfos);
|
||||
tmpltListRes.setPaging(paging);
|
||||
|
||||
return new TmpltListResDto(ApiResponseCode.SUCCESS, tmpltListRes);
|
||||
}
|
||||
|
||||
//
|
||||
public TmpltListExcelResDto tmpltListExcel(TmpltListExcelReqDto tmpltListExcelReqDto) {
|
||||
ChannelMgtMapper channelMgtMapper = sqlSessionSlave.getMapper(ChannelMgtMapper.class);
|
||||
//String nowPage = String.valueOf(tmpltListReqDto.getPage());
|
||||
// int totalCnt = channelMgtMapper.selectTmpltTotalCnt(tmpltListReqDto);
|
||||
//
|
||||
//
|
||||
// if(totalCnt == 0) {
|
||||
// Paging paging = new Paging();
|
||||
// paging.setPage(nowPage);
|
||||
// paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
// TmpltListRes tmpltListRes = new TmpltListRes();
|
||||
// tmpltListRes.setList(new ArrayList<>());
|
||||
// tmpltListRes.setPaging(paging);
|
||||
// return new TmpltListResDto(ApiResponseCode.CM_NOT_FOUND, tmpltListRes);
|
||||
// }
|
||||
// logger.info("perPage : "+tmpltListReqDto.getPagePerRows());
|
||||
// int page = tmpltListReqDto.getPage();
|
||||
// int pagePerRows = tmpltListReqDto.getPagePerRows();
|
||||
// page = (page -1) * pagePerRows;
|
||||
// tmpltListReqDto.setPage(page);
|
||||
|
||||
List<TmpltInfo> tmpltInfos = channelMgtMapper.selectTmpltListExcel(tmpltListExcelReqDto);
|
||||
|
||||
// Paging paging = new Paging();
|
||||
// paging.setPage(nowPage);
|
||||
// paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
//
|
||||
TmpltListRes tmpltListRes = new TmpltListRes();
|
||||
tmpltListRes.setList(tmpltInfos);
|
||||
// tmpltListRes.setPaging(paging);
|
||||
|
||||
return new TmpltListExcelResDto(ApiResponseCode.SUCCESS, tmpltListRes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.api.servMgt.dto.RejectRecvInfo;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class TmpltInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "String")
|
||||
private String no;
|
||||
@ApiModelProperty(example = "고객사명(이름)", name = "고객사명(이름)", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "사업자번호(생년월일)", name = "사업자번호(생년월일)", dataType = "String")
|
||||
private String bRegNo;
|
||||
@ApiModelProperty(example = "템플릿 코드", name = "템플릿 코드", dataType = "String")
|
||||
private String tmpltCd;
|
||||
@ApiModelProperty(example = "템플릿명", name = "템플릿명", dataType = "String")
|
||||
private String tmpltNm;
|
||||
@ApiModelProperty(example = "템플릿 유형", name = "템플릿 유형", notes = "항목 : (01: 기본형(Default), 02:부가정보형, 03:광고추가형, 04:복합형)", dataType = "String")
|
||||
private String tmpltType;
|
||||
@ApiModelProperty(example = "상태", name = "상태" , notes = "항목 : (T:신청완료, R:검수요청완료, Q:카카오 검수중, A:템플릿승인, S:반려)" , dataType = "String")
|
||||
private String stat;
|
||||
@ApiModelProperty(example = "반려사유", name = "반려사유", dataType = "String")
|
||||
private String returnReason;
|
||||
@ApiModelProperty(example = "발신프로필", name = "발신프로필", dataType = "String")
|
||||
private String sendProfile;
|
||||
@ApiModelProperty(example = "최종수정일자", name = "최종수정일자", dataType = "String")
|
||||
private String lastChgDt;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class TmpltListExcelReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
|
||||
private String searchType2;
|
||||
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String")
|
||||
private String searchText1;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.dto;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class TmpltListExcelResDto extends ResponseMessage implements Serializable {
|
||||
|
||||
// 데이터.
|
||||
private TmpltListRes data;
|
||||
|
||||
public TmpltListExcelResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public TmpltListExcelResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public TmpltListExcelResDto(ApiResponseCode returnStr, TmpltListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class TmpltListReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
|
||||
private String searchType2;
|
||||
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String")
|
||||
private String searchText1;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수",notes = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "int")
|
||||
private int pagePerRows;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
|
||||
private int page;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.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 TmpltListRes implements Serializable {
|
||||
|
||||
private Paging paging;
|
||||
private List<TmpltInfo> list;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.api.servMgt.dto.RejectRecvInfo;
|
||||
import kr.co.uplus.ez.api.servMgt.dto.RejectRecvListRes;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class TmpltListResDto extends ResponseMessage implements Serializable {
|
||||
|
||||
// 데이터.
|
||||
private TmpltListRes data;
|
||||
|
||||
public TmpltListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public TmpltListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public TmpltListResDto(ApiResponseCode returnStr, TmpltListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,8 @@ import kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserResDto;
|
||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||
@@ -251,6 +253,7 @@ public class CustMgtController {
|
||||
|
||||
|
||||
/**
|
||||
* 관리자 회원 상세 보기.
|
||||
* @param memberDetailListReqDto
|
||||
* @param bindingResult
|
||||
* @return MemberDetailListResDto
|
||||
@@ -429,4 +432,25 @@ public class CustMgtController {
|
||||
return custService.updateMember(paramMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자 정보(종합) 수정
|
||||
* @param UpdateAdminInfoTotalReqDto
|
||||
* @return UpdateAdminInfoTotalResDto
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value = "updateAdminInfoTotal", notes = "관리자 정보(종합) 수정")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value = "/updateAdminInfoTotal" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public UpdateAdminInfoTotalResDto updateAdminInfoTotal(@RequestBody @Valid UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new UpdateAdminInfoTotalResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.updateAdminInfoTotal(updateAdminInfoTotalReqDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ 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.SubsListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SvcUserInfo;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto;
|
||||
import kr.co.uplus.ez.common.data.ImUser;
|
||||
|
||||
@@ -90,5 +91,15 @@ public interface CustMgtMapper {
|
||||
/** 사용자 정보 삭제*/
|
||||
int deleteUserList(DeleteUserReqDto deleteUserReqDto);
|
||||
/** 관리자아이디 조회*/
|
||||
int selectAdminId(String adminId);
|
||||
String selectAdminId(String adminId);
|
||||
|
||||
int updateAdminInfoTotal(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto);
|
||||
|
||||
int insertMemo(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto);
|
||||
|
||||
int updateAdminSendingLimit(Map<String, Object> paramMap);
|
||||
|
||||
Map<String, Object> selectAdminSendingLimt(Map<String, Object> paramMap);
|
||||
|
||||
SvcUserInfo selectSvcUserInfo(String userId);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package kr.co.uplus.ez.api.custMgt;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.slf4j.Logger;
|
||||
@@ -30,7 +33,9 @@ import kr.co.uplus.ez.api.custMgt.dto.DeleteMemoReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteMemoResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteUserResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUser;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserRes;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertTestIdReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertTestIdResDto;
|
||||
@@ -60,6 +65,8 @@ import kr.co.uplus.ez.api.custMgt.dto.SubsListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SvcUserInfo;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserResDto;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
@@ -74,7 +81,6 @@ public class CustMgtService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(CustMgtService.class);
|
||||
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb1")
|
||||
private SqlSessionTemplate sqlSessionMaster;
|
||||
@@ -115,9 +121,8 @@ public class CustMgtService {
|
||||
private String custTyCd;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 고객 정보 목록 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 청약 고객 정보 목록 조회
|
||||
*
|
||||
* @param subsListReqDto
|
||||
* @return subsListResDto
|
||||
*/
|
||||
@@ -128,8 +133,7 @@ public class CustMgtService {
|
||||
String nowPage = String.valueOf(subsListReqDto.getPage());
|
||||
int totalCnt = custMgtMapper.selectSubsListTotalCnt(subsListReqDto);
|
||||
|
||||
|
||||
if(totalCnt == 0) {
|
||||
if (totalCnt == 0) {
|
||||
|
||||
SubsListRes subsListRes = new SubsListRes();
|
||||
subsListRes.setList(new ArrayList<>());
|
||||
@@ -142,15 +146,13 @@ public class CustMgtService {
|
||||
return new SubsListResDto(ApiResponseCode.CM_NOT_FOUND, subsListRes);
|
||||
}
|
||||
|
||||
|
||||
int page = subsListReqDto.getPage();
|
||||
int pagePerRows = subsListReqDto.getPagePerRows();
|
||||
page = (page -1) * pagePerRows;
|
||||
page = (page - 1) * pagePerRows;
|
||||
subsListReqDto.setPage(page);
|
||||
|
||||
List<SubsList> subsLists = custMgtMapper.selectSubsLists(subsListReqDto);
|
||||
|
||||
|
||||
SubsListRes subsListRes = new SubsListRes();
|
||||
subsListRes.setList(subsLists);
|
||||
|
||||
@@ -163,9 +165,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 고객 정보 목록 엑셀 다운로드
|
||||
* date : 2022. 4. 25. auth : ckr desc : 청약 고객 정보 목록 엑셀 다운로드
|
||||
*
|
||||
* @param subsListExcelReqDto
|
||||
* @return subsListExcelResDto
|
||||
*/
|
||||
@@ -188,9 +189,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 정보 상세 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 청약 정보 상세 조회
|
||||
*
|
||||
* @param subsDetailReqDto
|
||||
* @return subsDetailResDto
|
||||
*/
|
||||
@@ -202,7 +202,7 @@ public class CustMgtService {
|
||||
SubsDetail subsDetail = custMgtMapper.selectSubsDetailInfo(subsDetailReqDto);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(subsDetail == null) {
|
||||
if (subsDetail == null) {
|
||||
return new SubsDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -211,9 +211,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자명 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 관리자명 조회
|
||||
*
|
||||
* @param adminInfoReqDto
|
||||
* @return adminInfoResDto
|
||||
*/
|
||||
@@ -227,7 +226,7 @@ public class CustMgtService {
|
||||
ImUser imUser = custMgtMapper.selectImUser(param);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(imUser == null) {
|
||||
if (imUser == null) {
|
||||
return new AdminInfoResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -243,9 +242,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자ID,관리자명 수정
|
||||
* date : 2022. 4. 25. auth : ckr desc : 관리자ID,관리자명 수정
|
||||
*
|
||||
* @param updateAdminInfoReqDto
|
||||
* @return updateAdminInfoResDto
|
||||
*/
|
||||
@@ -270,9 +268,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 이월금액 목록 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 이월금액 목록 조회
|
||||
*
|
||||
* @param carryOverListReqDto
|
||||
* @return carryOverListResDto
|
||||
*/
|
||||
@@ -284,18 +281,18 @@ public class CustMgtService {
|
||||
List<CarryOver> carryOvers = custMgtMapper.selectCarryOverList(carryOverListReqDto);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(carryOvers == null) {
|
||||
if (carryOvers == null) {
|
||||
return new CarryOverListResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 성공 응답.
|
||||
return new CarryOverListResDto(ApiResponseCode.SUCCESS, new CarryOverListRes(carryOvers, String.valueOf(carryOvers.size())));
|
||||
return new CarryOverListResDto(ApiResponseCode.SUCCESS,
|
||||
new CarryOverListRes(carryOvers, String.valueOf(carryOvers.size())));
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 회원목록조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 회원목록조회
|
||||
*
|
||||
* @param memberListReqDto
|
||||
* @return memberListResDto
|
||||
*/
|
||||
@@ -306,8 +303,7 @@ public class CustMgtService {
|
||||
String nowPage = String.valueOf(memberListReqDto.getPage());
|
||||
int totalCnt = custMgtMapper.selectSvcUserListTotalCnt(memberListReqDto);
|
||||
|
||||
|
||||
if(totalCnt == 0) {
|
||||
if (totalCnt == 0) {
|
||||
|
||||
MemberListRes memberListRes = new MemberListRes();
|
||||
memberListRes.setList(new ArrayList<>());
|
||||
@@ -320,10 +316,9 @@ public class CustMgtService {
|
||||
return new MemberListResDto(ApiResponseCode.CM_NOT_FOUND, memberListRes);
|
||||
}
|
||||
|
||||
|
||||
int page = memberListReqDto.getPage();
|
||||
int pagePerRows = memberListReqDto.getPagePerRows();
|
||||
page = (page -1) * pagePerRows;
|
||||
page = (page - 1) * pagePerRows;
|
||||
memberListReqDto.setPage(page);
|
||||
|
||||
List<MemberList> members = custMgtMapper.selectSvcUserList(memberListReqDto);
|
||||
@@ -340,9 +335,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 회원 정보 상세 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 회원 정보 상세 조회
|
||||
*
|
||||
* @param memberDetailReqDto
|
||||
* @return MemberDetailResDto
|
||||
*/
|
||||
@@ -353,7 +347,7 @@ public class CustMgtService {
|
||||
MemberDetailRes memberDetailRes = custMgtMapper.selectMemberDetail(memberDetailReqDto);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(memberDetailRes == null) {
|
||||
if (memberDetailRes == null) {
|
||||
return new MemberDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -373,7 +367,7 @@ public class CustMgtService {
|
||||
MemberAdminDetailRes memberAdminDetailRes = custMgtMapper.selectMemberAdminDetail(memberAdminDetailReqDto);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(memberAdminDetailRes == null) {
|
||||
if (memberAdminDetailRes == null) {
|
||||
return new MemberAdminDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -381,7 +375,7 @@ public class CustMgtService {
|
||||
|
||||
int totalCnt = custMgtMapper.selectMemberDetailListTotalCnt(memberAdminDetailReqDto);
|
||||
|
||||
if(totalCnt == 0) {
|
||||
if (totalCnt == 0) {
|
||||
memberAdminDetailRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
@@ -389,10 +383,10 @@ public class CustMgtService {
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
memberAdminDetailRes.setPaging(paging);
|
||||
|
||||
}else {
|
||||
} else {
|
||||
int page = memberAdminDetailReqDto.getPage();
|
||||
int pagePerRows = memberAdminDetailReqDto.getPagePerRows();
|
||||
page = (page -1) * pagePerRows;
|
||||
page = (page - 1) * pagePerRows;
|
||||
memberAdminDetailReqDto.setPage(page);
|
||||
|
||||
Paging paging = new Paging();
|
||||
@@ -408,9 +402,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 테스트ID 등록
|
||||
* date : 2022. 4. 25. auth : ckr desc : 테스트ID 등록
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@@ -421,7 +414,7 @@ public class CustMgtService {
|
||||
int getUserIdCount = custMgtMapper.getUserIdCount(insertTestIdReqDto.getUserId());
|
||||
|
||||
// 이미 존재하는 아이디.
|
||||
if(getUserIdCount > 0) {
|
||||
if (getUserIdCount > 0) {
|
||||
return new InsertTestIdResDto(ApiResponseCode.CE_DUPLICATE_ID);
|
||||
}
|
||||
|
||||
@@ -429,7 +422,7 @@ public class CustMgtService {
|
||||
int checkCustInfo = custMgtMapper.selectCustInfoCount(brno);
|
||||
String custSeq = custMgtMapper.getCustSeq(brno);
|
||||
|
||||
if(checkCustInfo < 1) {
|
||||
if (checkCustInfo < 1) {
|
||||
// 1-2. 사업자 번호로 미존재시 : 고객정보 등록.
|
||||
CustInfo custInfo = new CustInfo();
|
||||
custInfo.setCustSeq(custSeq);
|
||||
@@ -457,7 +450,8 @@ public class CustMgtService {
|
||||
svcUserInfo.setUserSttusCd(Const.USER_STTUS_CD_NOMAL);
|
||||
svcUserInfo.setCustSeq(custSeq);
|
||||
svcUserInfo.setUserTpCd(Const.USER_TP_CD_TEST);
|
||||
svcUserInfo.setPwd(EncryptionUtil.getCustomSHA512(insertTestIdReqDto.getUserId(), insertTestIdReqDto.getUserPw()));
|
||||
svcUserInfo
|
||||
.setPwd(EncryptionUtil.getCustomSHA512(insertTestIdReqDto.getUserId(), insertTestIdReqDto.getUserPw()));
|
||||
svcUserInfo.setBizrAuthYn(Const.COMM_NO);
|
||||
svcUserInfo.setLineTpCd(Const.LINE_TP_CD_NORMAL);
|
||||
svcUserInfo.setHpNo(insertTestIdReqDto.getMdn());
|
||||
@@ -491,9 +485,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 전체 메모 목록 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 전체 메모 목록 조회
|
||||
*
|
||||
* @param allMemoListReqDto
|
||||
* @return AllMemoListResDto
|
||||
*/
|
||||
@@ -504,7 +497,7 @@ public class CustMgtService {
|
||||
List<AllMemoList> allMemoLists = custMgtMapper.selectMemoList(allMemoListReqDto);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(allMemoLists == null) {
|
||||
if (allMemoLists == null) {
|
||||
return new AllMemoListResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -512,27 +505,26 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 메모 삭제
|
||||
* date : 2022. 4. 25. auth : ckr desc : 메모 삭제
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
// 1. 회원정보 조회.
|
||||
|
||||
//user_seq 이용자일련번호
|
||||
int checkUserSeq = custMgtMapper.selectUserSeq(deleteMemoReqDto.getRegister());
|
||||
// user_seq 이용자일련번호
|
||||
int checkUserSeq = custMgtMapper.selectUserSeq(deleteMemoReqDto.getUserId());
|
||||
|
||||
if(checkUserSeq < 1) {
|
||||
if (checkUserSeq < 1) {
|
||||
return new DeleteMemoResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 2. 메모 삭제.
|
||||
//seqNo, userSeq를 담음.
|
||||
// seqNo, userSeq를 담음.
|
||||
Map<String, Object> MemoParamMap = new HashMap<String, Object>();
|
||||
MemoParamMap.put("seqNo", deleteMemoReqDto.getSeqNo());
|
||||
MemoParamMap.put("userSeq", checkUserSeq);
|
||||
@@ -541,7 +533,7 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
// 삭제한 건수가 나옴.
|
||||
int result = custMgtMapper.deleteMemo(MemoParamMap);
|
||||
// 한건이 나오지 않을경우
|
||||
if(result < 1) {
|
||||
if (result < 1) {
|
||||
return new DeleteMemoResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -552,9 +544,8 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사용자 정보 등록
|
||||
* date : 2022. 4. 25. auth : ckr desc : 사용자 정보 등록
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@@ -566,8 +557,14 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
|
||||
String userId = insertUserReqDto.getUserId();
|
||||
String encPwd = "";
|
||||
int userCnt = 0;
|
||||
|
||||
try {
|
||||
userCnt = custMgtMapper.getUserIdCount(userId);
|
||||
if(userCnt > 0) {
|
||||
return new InsertUserResDto(ApiResponseCode.CE_DUPLICATE_ID);
|
||||
}
|
||||
|
||||
// 패스워드 암호화
|
||||
encPwd = EncryptionUtil.getCustomSHA512(userId, imsiPw);
|
||||
insertUserReqDto.setUserPw(encPwd);
|
||||
@@ -578,7 +575,6 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
// 임시패스워드(평문) 이메일 발송처리
|
||||
// TODO: 임시패스워드(평문) 이메일 발송처리
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
return new InsertUserResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
@@ -587,9 +583,8 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사용자 정보 수정
|
||||
* date : 2022. 4. 25. auth : ckr desc : 사용자 정보 수정
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@@ -611,72 +606,134 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
// 임시패스워드(평문) 이메일 발송처리
|
||||
// TODO: 임시패스워드(평문) 이메일 발송처리
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
return new UpdateUserResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
|
||||
return new UpdateUserResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사용자ID 대량등록
|
||||
* date : 2022. 4. 25. auth : ckr desc : 사용자ID 대량등록
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public InsertMassUserResDto insertMassUser(InsertMassUserReqDto insertMassUserReqDto) {
|
||||
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
// 1. 관리자 ID 존재 여부 체크.
|
||||
SvcUserInfo svcUserInfo = custMgtMapper.selectSvcUserInfo(insertMassUserReqDto.getAdminId());
|
||||
|
||||
if (svcUserInfo == null) {
|
||||
return new InsertMassUserResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 1. ID 중복 체크.
|
||||
List<InsertMassUser> orgInsertMassUsers = insertMassUserReqDto.getList();
|
||||
List<InsertMassUser> errInsertMassUsers = new ArrayList<InsertMassUser>();
|
||||
List<InsertMassUser> insertMassUsers = new ArrayList<InsertMassUser>();
|
||||
|
||||
for (int i = 0; i < orgInsertMassUsers.size(); i++) {
|
||||
|
||||
InsertMassUser insertMassUser = orgInsertMassUsers.get(i);
|
||||
|
||||
InsertUserReqDto insertUserReqDto = new InsertUserReqDto();
|
||||
insertUserReqDto.setUserId(insertMassUser.getUserId());
|
||||
int flag = custMgtMapper.selectUserInfoCnt(insertUserReqDto);
|
||||
|
||||
InsertMassUserResDto result = new InsertMassUserResDto(ApiResponseCode.SUCCESS);
|
||||
if (flag == 0) {
|
||||
insertMassUsers.add(insertMassUser);
|
||||
} else {
|
||||
errInsertMassUsers.add(insertMassUser);
|
||||
}
|
||||
}
|
||||
|
||||
InsertMassUserRes insertMassUserRes = new InsertMassUserRes();
|
||||
int successCnt = 0;
|
||||
for (int j = 0; j < insertMassUsers.size(); j++) {
|
||||
try {
|
||||
// DB 처리.
|
||||
String userId = insertMassUsers.get(j).getUserId();
|
||||
String imsiPw = RandomStringUtils.randomAlphanumeric(10);
|
||||
// String encPwd = EncryptionUtil.getCustomSHA512(userId, imsiPw);
|
||||
|
||||
SvcUserInfo svcUserInfo2 = new SvcUserInfo();
|
||||
String userSeq = custMgtMapper.getUserSeq();
|
||||
|
||||
svcUserInfo2.setUserSeq(userSeq);
|
||||
svcUserInfo2.setUserId(userId);
|
||||
svcUserInfo2.setUserNm(insertMassUsers.get(j).getUserNm());
|
||||
svcUserInfo2.setPwd(imsiPw);
|
||||
svcUserInfo2.setPwdInit(Const.COMM_YES);
|
||||
svcUserInfo2.setHpNo(insertMassUsers.get(j).getMdn());
|
||||
svcUserInfo2.setEmail(insertMassUsers.get(j).getEmail());
|
||||
svcUserInfo2.setUserSttusCd(insertMassUsers.get(j).getStat() == "사용" ? Const.USER_STTUS_CD_NOMAL
|
||||
: Const.USER_STTUS_CD_STOP);
|
||||
svcUserInfo2.setCustSeq(svcUserInfo.getCustSeq());
|
||||
svcUserInfo2.setPrntsUserSeq(svcUserInfo.getUserSeq());
|
||||
svcUserInfo2.setUserTpCd(Const.USER_TP_CD_USR);
|
||||
svcUserInfo2.setLineTpCd(Const.LINE_TP_CD_NORMAL);
|
||||
svcUserInfo2.setRegId(userId);
|
||||
svcUserInfo2.setChgId(userId);
|
||||
|
||||
custMgtMapper.insertSvcUserInfo(svcUserInfo2);
|
||||
|
||||
successCnt++;
|
||||
} catch (Exception e) {
|
||||
errInsertMassUsers.add(insertMassUsers.get(j));
|
||||
}
|
||||
}
|
||||
|
||||
// 요청건수.
|
||||
insertMassUserRes.setTotalCnt(String.valueOf(insertMassUsers.size()));
|
||||
// 성공건수.
|
||||
insertMassUserRes.setSuccessCnt(String.valueOf(successCnt));
|
||||
// 실패건수.
|
||||
insertMassUserRes.setFailCnt(String.valueOf(errInsertMassUsers.size()));
|
||||
|
||||
InsertMassUserResDto result = new InsertMassUserResDto(ApiResponseCode.SUCCESS, insertMassUserRes);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사용자 정보 삭제
|
||||
* date : 2022. 4. 25. auth : ckr desc : 사용자 정보 삭제
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public DeleteUserResDto deleteUser(DeleteUserReqDto deleteUserReqDto) {
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
//1.관리자 정보 조회
|
||||
int checkAdminId = custMgtMapper.selectAdminId(deleteUserReqDto.getAdminId());
|
||||
|
||||
//2. 관리자 정보 조회결과 응답 없음
|
||||
if(checkAdminId < 1) {
|
||||
return new DeleteUserResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
// 1.관리자 정보 조회
|
||||
// String checkAdminId = custMgtMapper.selectAdminId(deleteUserReqDto.getAdminId());
|
||||
//
|
||||
// //2. 관리자 정보 조회결과 응답 없음
|
||||
// if(checkAdminId == null) {
|
||||
// return new DeleteUserResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
// }
|
||||
|
||||
try {
|
||||
//3. 사용자정보 삭제
|
||||
// 3. 사용자정보 삭제
|
||||
int result = custMgtMapper.deleteUserList(deleteUserReqDto);
|
||||
|
||||
//4. 삭제대상이 없음.
|
||||
if(result < 1) {
|
||||
// 4. 삭제대상이 없음.
|
||||
if (result < 1) {
|
||||
return new DeleteUserResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//5. 그 이외의 결과가 나왔을때 데이터
|
||||
// 5. 그 이외의 결과가 나왔을때 데이터
|
||||
return new DeleteUserResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
//6. 성공 응답.
|
||||
// 6. 성공 응답.
|
||||
return new DeleteUserResDto(ApiResponseCode.SUCCESS);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자 정보 수정
|
||||
* date : 2022. 4. 25. auth : ckr desc : 관리자 정보 수정
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@@ -685,4 +742,59 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자 정보(종합) 수정
|
||||
* @param UpdateAdminInfoTotalReqDto
|
||||
* @return UpdateAdminInfoTotalResDto
|
||||
* @
|
||||
*/
|
||||
public UpdateAdminInfoTotalResDto updateAdminInfoTotal(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto) {
|
||||
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
Map<String, Object> paramMap = new HashMap<String, Object>();
|
||||
Map<String, Object> rstAmtMap = new HashMap<String, Object>();
|
||||
try {
|
||||
// 1. 사용자 정보 update
|
||||
custMgtMapper.updateAdminInfoTotal(updateAdminInfoTotalReqDto);
|
||||
|
||||
// 2. 메모정보 insert
|
||||
custMgtMapper.insertMemo(updateAdminInfoTotalReqDto);
|
||||
|
||||
// 3. 발송 한도 update
|
||||
if(updateAdminInfoTotalReqDto.getSendingLimit() != null) {
|
||||
BigDecimal sendingLimitAmt = new BigDecimal(updateAdminInfoTotalReqDto.getSendingLimit());
|
||||
|
||||
paramMap.put("userId", updateAdminInfoTotalReqDto.getUserId());
|
||||
// 3-1. 기존 정액한도금액 조회
|
||||
rstAmtMap = custMgtMapper.selectAdminSendingLimt(paramMap);
|
||||
if(rstAmtMap.get("fxLmtAmt") != null) {
|
||||
String stFxLmtAmt = rstAmtMap.get("fxLmtAmt").toString();
|
||||
BigDecimal fxLmtAmt = new BigDecimal(stFxLmtAmt);
|
||||
|
||||
BigDecimal targetMrtLmtAmt = new BigDecimal(0);
|
||||
|
||||
// 변동요청발송한도금액이 기존정액한도금액보다 작으면 한도금액 변경 불가 실패처리
|
||||
if(sendingLimitAmt.compareTo(fxLmtAmt) < 0) {
|
||||
return new UpdateAdminInfoTotalResDto(ApiResponseCode.CE_SENDINGLIMT_ERROR);
|
||||
}
|
||||
|
||||
// 3-2. 발송한도금액 수정(종량 한도금액 UPDATE)
|
||||
// 변동요청발송한도금액 - 기존정액한도금액 = 변경할 종량한도금액
|
||||
targetMrtLmtAmt = sendingLimitAmt.subtract(fxLmtAmt);
|
||||
paramMap.put("sendingLimit", targetMrtLmtAmt);
|
||||
|
||||
custMgtMapper.updateAdminSendingLimit(paramMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
return new UpdateAdminInfoTotalResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
return new UpdateAdminInfoTotalResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ public class AllMemoList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "내용", name = "내용", dataType = "String")
|
||||
private String memo;
|
||||
@ApiModelProperty(example = "내용일련번호", name = "내용일련번호", dataType = "String")
|
||||
private String seqNo;
|
||||
@ApiModelProperty(example = "작성자", name = "작성자", dataType = "String")
|
||||
private String register;
|
||||
@ApiModelProperty(example = "작성일", name = "작성일", dataType = "String")
|
||||
|
||||
@@ -12,7 +12,7 @@ import lombok.Data;
|
||||
public class DeleteMemoReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "작성자 계정 ID", name = "작성자 계정 ID", dataType = "String")
|
||||
private String register;
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "메모 일련 번호", name = "메모 일련 번호", dataType = "String")
|
||||
private String seqNo;
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ public class InsertMassUser implements Serializable{
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "사용자 이름", name = "사용자 이름", dataType = "String")
|
||||
private String userNm;
|
||||
@ApiModelProperty(example = "ID잠금 상태(사용/미사용)", name = "ID잠금 상태(사용/미사용)", dataType = "String")
|
||||
private String stat;
|
||||
@ApiModelProperty(example = "휴대폰번호", name = "휴대폰번호", dataType = "String")
|
||||
private String mdn;
|
||||
@ApiModelProperty(example = "이메일", name = "이메일", dataType = "String")
|
||||
private String email;
|
||||
@ApiModelProperty(example = "ID잠금 상태(사용/미사용)", name = "ID잠금 상태(사용/미사용)", dataType = "String")
|
||||
private String stat;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
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 InsertMassUserRes implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "요청건수", name = "요청건수", dataType = "String")
|
||||
private String totalCnt;
|
||||
@ApiModelProperty(example = "성공건수", name = "성공건수", dataType = "String")
|
||||
private String successCnt;
|
||||
@ApiModelProperty(example = "실패건수", name = "실패건수", dataType = "String")
|
||||
private String failCnt;
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class InsertMassUserResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private Object data;
|
||||
private InsertMassUserRes data;
|
||||
|
||||
public InsertMassUserResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
@@ -22,7 +22,7 @@ public class InsertMassUserResDto extends ResponseMessage implements Serializabl
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public InsertMassUserResDto(ApiResponseCode returnStr, Object data) {
|
||||
public InsertMassUserResDto(ApiResponseCode returnStr, InsertMassUserRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
|
||||
@@ -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 UpdateAdminInfoTotalReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "사용자ID", name = "사용자ID", dataType = "String")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(example = "사용자 상태", name = "사용자 상태", dataType = "String")
|
||||
private String userStat;
|
||||
|
||||
@ApiModelProperty(example = "라인타입", name = "라인타입", dataType = "String")
|
||||
private String lineType;
|
||||
|
||||
@ApiModelProperty(example = "발송한도", name = "발송한도", dataType = "String")
|
||||
private String sendingLimit;
|
||||
|
||||
@ApiModelProperty(example = "메모", name = "메모", dataType = "String")
|
||||
private String memo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UpdateAdminInfoTotalResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
// 데이터.
|
||||
private Object data;
|
||||
|
||||
public UpdateAdminInfoTotalResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public UpdateAdminInfoTotalResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public UpdateAdminInfoTotalResDto(ApiResponseCode returnStr, Object data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -55,6 +55,8 @@ public enum ApiResponseCode {
|
||||
,CE_SYSMGT_AUTHCODE_INVALID("4017", "권한코드가 유효하지않습니다.")
|
||||
/** 이미 사용중인 아이디 입니다. */
|
||||
,CE_DUPLICATE_ID("4018", "이미 사용중인 아이디 입니다.")
|
||||
/** 발송한도금액이 정액한도금액보다 작습니다. */
|
||||
,CE_SENDINGLIMT_ERROR("4019", "발송한도금액이 정액한도금액보다 작습니다.")
|
||||
|
||||
// 시스템
|
||||
/** 알 수 없는 에러. */
|
||||
|
||||
@@ -3,5 +3,103 @@
|
||||
|
||||
<mapper namespace="kr.co.uplus.ez.api.channelMgt.ChannelMgtMapper">
|
||||
|
||||
<select id="selectTmpltTotalCnt" parameterType="kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto" resultType="int">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
from ${HUBEZ_COMMON}.EZ_ATLK_TMPLT eat
|
||||
inner join ${HUBEZ_COMMON}.EZ_SUBS_INFO esi
|
||||
on esi.USER_SEQ = eat.USER_SEQ
|
||||
and esi.SUBS_STTUS_CD in ('02','03','04','99')
|
||||
inner join ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esi.CUST_SEQ
|
||||
|
||||
|
||||
<include refid="tmpltListCondition"></include>
|
||||
</select>
|
||||
<select id="selectTmpltList" parameterType="kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto" resultType="kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo">
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
(eci.CUST_NM)AS custNm,
|
||||
(eci.BIZRNO)AS bRegNo,
|
||||
eat.TMPLT_CD AS tmpltCd,
|
||||
eat.TMPLT_NM AS tmpltNm,
|
||||
(eat.TMPLT_TP_CD) AS tmpltType,
|
||||
eat.TMPLT_STTUS_CD AS stat,
|
||||
eat.REJCT_RSN AS returnReason,
|
||||
eat.SNDRPROF_KEY AS sendProfile,
|
||||
<!-- (select CHNL_ID from ${HUBEZ_COMMON}.EZ_KKO_CHNL ekc WHERE eat.SNDRPROF_KEY = ekc.SNDRPROF_KEY) AS sendProfile, -->
|
||||
DATE_FORMAT(eat.CHG_DT, '%Y-%m-%d') As lastChgDt
|
||||
from ${HUBEZ_COMMON}.EZ_ATLK_TMPLT eat
|
||||
inner join ${HUBEZ_COMMON}.EZ_SUBS_INFO esi
|
||||
on esi.USER_SEQ = eat.USER_SEQ
|
||||
and esi.SUBS_STTUS_CD in ('02','03','04','99')
|
||||
inner join ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esi.CUST_SEQ
|
||||
<include refid="tmpltListCondition"></include>
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<sql id="tmpltListCondition">
|
||||
<if test='searchType1 != null and searchType1 != ""'>
|
||||
<choose>
|
||||
<when test='searchType1 == "N"'> <!-- 상태 - 중지 -->
|
||||
AND esi.SUBS_STTUS_CD = '99'
|
||||
</when>
|
||||
<otherwise><!-- 상태 - 사용 -->
|
||||
AND esi.SUBS_STTUS_CD != '99'
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test='searchText1 != null and searchText1 != ""'>
|
||||
<if test='searchType2 != null and searchType2 != ""'>
|
||||
<choose>
|
||||
<when test='searchType2 == "custNm"'><!-- 검색조건 - 고객사명 -->
|
||||
and UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')
|
||||
</when>
|
||||
<when test='searchType2 == "bizNo"'><!-- 검색조건 - 사업자번호 -->
|
||||
and eci.BIZRNO = #{searchText1}
|
||||
</when>
|
||||
<when test='searchType2 == "tmpltNm"'><!-- 검색조건 - 인증코드 -->
|
||||
and UPPER(eat.TMPLT_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
<select id="selectTmpltListExcel" parameterType="kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto" resultType="kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo">
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
(eci.CUST_NM)AS custNm,
|
||||
(eci.BIZRNO)AS bRegNo,
|
||||
eat.TMPLT_CD AS tmpltCd,
|
||||
eat.TMPLT_NM AS tmpltNm,
|
||||
(eat.TMPLT_TP_CD) AS tmpltType,
|
||||
eat.TMPLT_STTUS_CD AS stat,
|
||||
eat.REJCT_RSN AS returnReason,
|
||||
eat.SNDRPROF_KEY AS sendProfile,
|
||||
DATE_FORMAT(eat.CHG_DT, '%Y-%m-%d') As lastChgDt
|
||||
from
|
||||
${HUBEZ_COMMON}.EZ_ATLK_TMPLT eat
|
||||
inner join ${HUBEZ_COMMON}.EZ_SUBS_INFO esi
|
||||
on
|
||||
esi.USER_SEQ = eat.USER_SEQ
|
||||
and esi.SUBS_STTUS_CD in ('02', '03', '04', '99')
|
||||
inner join ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
on
|
||||
eci.CUST_SEQ = esi.CUST_SEQ
|
||||
<include refid="tmpltListCondition"></include>
|
||||
) A,
|
||||
(
|
||||
SELECT
|
||||
@ROWNUM := 0 ) AS R
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
<insert id="insertUserInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.InsertUserReqDto">
|
||||
/* custMgt-mapper.xml(insertUserInfo) */
|
||||
INTO
|
||||
INSERT INTO
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER(
|
||||
USER_SEQ,
|
||||
USER_ID,
|
||||
@@ -229,13 +229,13 @@
|
||||
WHERE esu.USER_ID = #{adminId}
|
||||
</insert>
|
||||
|
||||
<select id="selectUserInfoCnt" parameterType="kr.co.uplus.ez.api.custMgt.dto.InsertUserReqDto">
|
||||
<select id="selectUserInfoCnt" parameterType="kr.co.uplus.ez.api.custMgt.dto.InsertUserReqDto" resultType="int">
|
||||
/* custMgt-mapper.xml(selectUserInfoCnt) */
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
AND USER_ID = #{userId}
|
||||
WHERE USER_ID = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectSubsDetailInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsDetailReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.SubsDetail">
|
||||
@@ -460,7 +460,8 @@
|
||||
,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'SVCUSER_TP_CD' AND DTL_CD = esu.USER_TP_CD) AS USER_TYPE
|
||||
,USER_ID
|
||||
,(SELECT USER_ID FROM ${HUBEZ_COMMON}.EZ_SVC_USER where USER_SEQ = esu.PRNTS_USER_SEQ) AS ADMIN_ID
|
||||
,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'SVCUSER_STTUS_CD' AND DTL_CD = esu.USER_STTUS_CD) AS USER_STTUS
|
||||
<!-- ,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'SVCUSER_STTUS_CD' AND DTL_CD = esu.USER_STTUS_CD) AS USER_STAT -->
|
||||
,esu.USER_STTUS_CD AS USER_STAT
|
||||
,DATE_FORMAT(esu.LAST_LOGIN_DT, '%Y-%m-%d %H:%i:%s') AS LAST_LOGIN_DT
|
||||
,esu.HP_NO AS MDN
|
||||
,esu.EMAIL
|
||||
@@ -477,11 +478,12 @@
|
||||
,USER_ID
|
||||
,(SELECT USER_ID FROM ${HUBEZ_COMMON}.EZ_SVC_USER where USER_SEQ = esu.PRNTS_USER_SEQ) AS ADMIN_ID
|
||||
,(SELECT USER_NM FROM ${HUBEZ_COMMON}.EZ_SVC_USER where USER_SEQ = esu.PRNTS_USER_SEQ) AS ADMIN_NM
|
||||
,(SELECT PROD_AMT * 2 FROM ${HUBEZ_COMMON}.EZ_PROD_INFO WHERE PROD_CD = esi.PROD_CD) AS SENDING_LIMIT
|
||||
,(SELECT FX_LMT_AMT + MRT_LMT_AMT FROM ${HUBEZ_ADMIN}.EZ_USER_LMT WHERE USER_SEQ = esu.PRNTS_USER_SEQ) AS SENDING_LIMIT
|
||||
,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'LINE_TP_CD' AND DTL_CD = esu.LINE_TP_CD) AS LINE_TYPE
|
||||
,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'SVCUSER_STTUS_CD' AND DTL_CD = esu.USER_STTUS_CD) AS USER_STTUS
|
||||
<!-- ,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'SVCUSER_STTUS_CD' AND DTL_CD = esu.USER_STTUS_CD) AS USER_STTUS -->
|
||||
,esu.USER_STTUS_CD AS USER_STAT
|
||||
,DATE_FORMAT(esu.LAST_LOGIN_DT, '%Y-%m-%d %H:%i:%s') AS LAST_LOGIN_DT
|
||||
,(SELECT MEMO FROM ${HUBEZ_COMMON}.EZ_USER_MEMO EUM ORDER BY REG_DT LIMIT 1) AS MEMO
|
||||
,(SELECT MEMO FROM ${HUBEZ_COMMON}.EZ_USER_MEMO EUM WHERE USER_SEQ = esu.USER_SEQ ORDER BY REG_DT DESC LIMIT 1) AS MEMO
|
||||
,esu.HP_NO AS MDN
|
||||
,esu.EMAIL
|
||||
FROM ${HUBEZ_COMMON}.EZ_SUBS_INFO esi
|
||||
@@ -536,10 +538,10 @@
|
||||
<select id="selectMemoList" parameterType="kr.co.uplus.ez.api.custMgt.dto.AllMemoListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.AllMemoList">
|
||||
/* custMgt-mapper.xml(selectMemoList) */
|
||||
SELECT
|
||||
MEMO,
|
||||
EUM.SEQ_NO,
|
||||
EUM.MKER_NM,
|
||||
DATE_FORMAT(EUM.REG_DT, '%Y-%m-%d') AS REG_DT
|
||||
MEMO AS memo,
|
||||
EUM.SEQ_NO AS seqNo,
|
||||
EUM.MKER_NM AS register,
|
||||
DATE_FORMAT(EUM.REG_DT, '%Y-%m-%d') AS regDt
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_USER_MEMO EUM
|
||||
WHERE
|
||||
@@ -649,7 +651,7 @@
|
||||
, #{userId}
|
||||
, #{userNm}
|
||||
, #{userSttusCd}
|
||||
, #{userSeq}
|
||||
, #{prntsUserSeq}
|
||||
, #{custSeq}
|
||||
, #{userTpCd}
|
||||
, sha2(concat(#{userId}, #{pwd}), 512)
|
||||
@@ -702,7 +704,7 @@
|
||||
/* custMgt-mapper.xml(selectUserSeq) */
|
||||
SELECT USER_SEQ
|
||||
FROM ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
WHERE USER_ID = #{register}
|
||||
WHERE USER_ID = #{userId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteMemo" parameterType="Map">
|
||||
@@ -712,24 +714,106 @@
|
||||
AND USER_SEQ = #{userSeq}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserList" parameterType="kr.co.uplus.ez.api.custMgt.dto.DeleteUserReqDto">
|
||||
<delete id="deleteUserList" parameterType="kr.co.uplus.ez.api.custMgt.dto.DeleteUserReqDto" >
|
||||
/* custMgt-mapper.xml(deleteUserList) */
|
||||
DELETE from hubez_common.EZ_SVC_USER
|
||||
DELETE FROM ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
WHERE PRNTS_USER_SEQ = (SELECT USER_SEQ FROM ${HUBEZ_COMMON}.EZ_SVC_USER WHERE USER_ID = #{adminId} )
|
||||
<where>
|
||||
USER_ID IN
|
||||
AND USER_ID IN
|
||||
<foreach collection ="list" item="item" index="i" open="("
|
||||
separator="," close=")">
|
||||
#{item.userId}
|
||||
</foreach>
|
||||
</where>
|
||||
and USER_TP_CD = '02'
|
||||
|
||||
AND USER_TP_CD = '02'
|
||||
</delete>
|
||||
|
||||
<select id="selectAdminId" parameterType="String">
|
||||
<select id="selectAdminId" parameterType="String" resultType="String">
|
||||
/* custMgt-mapper.xml(selectAdminId) */
|
||||
SELECT USER_ID from ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
WHERE USER_ID = #{adminId}
|
||||
</select>
|
||||
|
||||
<update id="updateAdminInfoTotal" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto">
|
||||
UPDATE ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
SET
|
||||
CHG_ID = #{userId}
|
||||
,CHG_DT = NOW()
|
||||
<if test="userStat != null and userStat != ''">
|
||||
,USER_STTUS_CD = #{userStat}
|
||||
</if>
|
||||
<if test="lineType != null and lineType != ''">
|
||||
,LINE_TYPE_CD = #{lineType}
|
||||
</if>
|
||||
WHERE USER_ID = #{userId}
|
||||
</update>
|
||||
|
||||
<insert id="insertMemo" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto">
|
||||
/* custMgt-mapper.xml(insertMemo) */
|
||||
INSERT INTO ${HUBEZ_COMMON}.EZ_USER_MEMO(
|
||||
SEQ_NO
|
||||
,USER_SEQ
|
||||
,MEMO
|
||||
,MKER_ID
|
||||
,MKER_NM
|
||||
,REG_ID
|
||||
,REG_DT
|
||||
) SELECT
|
||||
(SELECT MAX(eum.SEQ_NO)+1 FROM ${HUBEZ_COMMON}.EZ_USER_MEMO eum)
|
||||
, esu.USER_SEQ
|
||||
, #{memo}
|
||||
, #{userId}
|
||||
, esu.USER_NM
|
||||
, #{userId}
|
||||
, NOW()
|
||||
FROM ${HUBEZ_COMMON}.EZ_SVC_USER esu
|
||||
WHERE esu.USER_ID = #{userId}
|
||||
</insert>
|
||||
|
||||
<select id="selectAdminSendingLimt" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
FX_LMT_AMT AS fxLmtAmt
|
||||
,MRT_LMT_AMT AS mrtLmtAmt
|
||||
FROM ${HUBEZ_ADMIN}.EZ_USER_LMT
|
||||
WHERE USER_SEQ = (SELECT USER_SEQ FROM ${HUBEZ_COMMON}.EZ_SVC_USER WHERE USER_ID = #{userId})
|
||||
</select>
|
||||
|
||||
<update id="updateAdminSendingLimit" parameterType="map">
|
||||
UPDATE ${HUBEZ_ADMIN}.EZ_USER_LMT
|
||||
SET
|
||||
CHG_ID = #{userId}
|
||||
,CHG_DT = NOW()
|
||||
<if test="sendingLimit != null and sendingLimit != ''">
|
||||
,MRT_LMT_AMT = #{sendingLimit}
|
||||
</if>
|
||||
WHERE USER_SEQ = (SELECT USER_SEQ FROM ${HUBEZ_COMMON}.EZ_SVC_USER WHERE USER_ID = #{userId})
|
||||
</update>
|
||||
|
||||
<select id="selectSvcUserInfo" parameterType="String" resultType="kr.co.uplus.ez.api.custMgt.dto.SvcUserInfo">
|
||||
/* custMgt-mapper.xml(selectSvcUserInfo) */
|
||||
SELECT
|
||||
USER_SEQ
|
||||
,USER_ID
|
||||
,USER_NM
|
||||
,USER_STTUS_CD
|
||||
,PRNTS_USER_SEQ
|
||||
,CUST_SEQ
|
||||
,USER_TP_CD
|
||||
,PWD
|
||||
,BIZR_AUTH_YN
|
||||
,LINE_TP_CD
|
||||
,HP_NO
|
||||
,EMAIL
|
||||
,AUTHCD_080
|
||||
,AUT_CD
|
||||
,LAST_LOGIN_DT
|
||||
,LOGIN_FAIL_CNT
|
||||
,PWD_INIT
|
||||
,PWD_CHG_DT
|
||||
,REG_ID
|
||||
,REG_DT
|
||||
,CHG_ID
|
||||
,CHG_DT
|
||||
FROM ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
WHERE USER_ID = #{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user