mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 23:04:44 +09:00
Merge branch 'smsNoti' into develop
This commit is contained in:
74
frontend/src/modules/sysMgt/components/NotiDetailPop.vue
Normal file
74
frontend/src/modules/sysMgt/components/NotiDetailPop.vue
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="dimmed modal21" @click="adminDetailModalClose();"></div>
|
||||||
|
<div class="popup-wrap modal21">
|
||||||
|
<div class="popup modal21 popup_form">
|
||||||
|
<div class="pop-head">
|
||||||
|
<h3 class="pop-tit">메시지 상세 내용</h3>
|
||||||
|
</div>
|
||||||
|
<form autocomplete="off">
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>내용</th>
|
||||||
|
<td>{{ notiMsg }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>등록 일시</th>
|
||||||
|
<td>{{ regDt }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<div class="popup-btn2">
|
||||||
|
<button class="btn-default" @click="adminDetailModalClose();">닫기</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "notiDetailPop",
|
||||||
|
watch: {
|
||||||
|
stat() {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
row: {},
|
||||||
|
notiMsg: '',
|
||||||
|
regDt : ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
model: {
|
||||||
|
prop: 'sendData',
|
||||||
|
event: 'event-data'
|
||||||
|
},
|
||||||
|
props: ['sendData'],
|
||||||
|
methods: {
|
||||||
|
// 모달 띄우기
|
||||||
|
async notiDetailModalOpen(props) {
|
||||||
|
this.row.notiMsg = props.notiMsg;
|
||||||
|
this.row.regDt = props.regDt;
|
||||||
|
this.notiMsg = this.row.notiMsg;
|
||||||
|
this.regDt = this.row.regDt;
|
||||||
|
var dimmed = document.getElementsByClassName('modal21');
|
||||||
|
for (var i = 0; i < dimmed.length; i++) {
|
||||||
|
dimmed[i].style.display = 'block';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 모달 끄기
|
||||||
|
adminDetailModalClose() {
|
||||||
|
var dimmed = document.getElementsByClassName('modal21');
|
||||||
|
for (var i = 0; i < dimmed.length; i++) {
|
||||||
|
dimmed[i].style.display = 'none';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -4,6 +4,7 @@ import AuthAdd from '../views/AuthAdd'
|
|||||||
import AuthModify from '../views/AuthModify'
|
import AuthModify from '../views/AuthModify'
|
||||||
import BatchList from '../views/BatchList'
|
import BatchList from '../views/BatchList'
|
||||||
import BatchDetail from '../views/BatchDetail'
|
import BatchDetail from '../views/BatchDetail'
|
||||||
|
import NotiList from '../views/NotiList'
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
@@ -42,6 +43,12 @@ export default [
|
|||||||
component: BatchDetail,
|
component: BatchDetail,
|
||||||
name: 'batchDetail',
|
name: 'batchDetail',
|
||||||
meta: { public: false }
|
meta: { public: false }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/sysMgt/notiList',
|
||||||
|
component: NotiList,
|
||||||
|
name: 'notiList',
|
||||||
|
meta: { public: false }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,10 @@ const batchExecuteJob = (params) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const notiList = (params) => {
|
||||||
|
return httpClient.post('/api/v1/bo/sysMgt/notiList', params, { withCredentials: false })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
insertAdmin,
|
insertAdmin,
|
||||||
@@ -99,5 +103,6 @@ export default {
|
|||||||
resetPassword,
|
resetPassword,
|
||||||
batchList,
|
batchList,
|
||||||
batchDetail,
|
batchDetail,
|
||||||
batchExecuteJob
|
batchExecuteJob,
|
||||||
|
notiList
|
||||||
}
|
}
|
||||||
|
|||||||
311
frontend/src/modules/sysMgt/views/NotiList.vue
Normal file
311
frontend/src/modules/sysMgt/views/NotiList.vue
Normal file
@@ -0,0 +1,311 @@
|
|||||||
|
<template>
|
||||||
|
<div class="contents">
|
||||||
|
<div class="contents_wrap">
|
||||||
|
<div class="top_wrap">
|
||||||
|
<h3 class="title">알림 이력</h3>
|
||||||
|
<p class="breadcrumb">알림 이력</p>
|
||||||
|
</div>
|
||||||
|
<div class="search_wrap">
|
||||||
|
<div class="group">
|
||||||
|
<div class="input_box cal">
|
||||||
|
<label for="right" class="label">조회기간</label>
|
||||||
|
<div class="term">
|
||||||
|
<span class="custom_input icon_date">
|
||||||
|
<vuejs-datepicker
|
||||||
|
:language="ko"
|
||||||
|
:format="customFormatter"
|
||||||
|
:disabled-dates="disabledSDate"
|
||||||
|
v-model="startDate"
|
||||||
|
@selected="selectedStartDate(0)"
|
||||||
|
@closed="closeDate('start')"
|
||||||
|
></vuejs-datepicker>
|
||||||
|
</span>~
|
||||||
|
<span class="custom_input icon_date">
|
||||||
|
<vuejs-datepicker
|
||||||
|
:language="ko"
|
||||||
|
:format="customFormatter"
|
||||||
|
:disabled-dates="disabledEDate"
|
||||||
|
v-model="endDate"
|
||||||
|
@selected="selectedEndDate(0)"
|
||||||
|
@closed="closeDate('end')"
|
||||||
|
></vuejs-datepicker>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="select_box id">
|
||||||
|
<label for="searchType" class="label">알림 구분</label>
|
||||||
|
<select name="" id="searchType2" v-model="srchGbn2" @keyup.enter="search">
|
||||||
|
<option value="00">선택안함</option>
|
||||||
|
<option value="01">종량 전환 알림</option>
|
||||||
|
<option value="02">이월 소멸 알림</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="select_box id">
|
||||||
|
<label for="searchType" class="label">상세검색</label>
|
||||||
|
<select name="" id="searchType" v-model="srchGbn" @keyup.enter="search">
|
||||||
|
<option value="00">선택안함</option>
|
||||||
|
<option value="01">유저ID</option>
|
||||||
|
<option value="02">웹요청ID</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="input_box id">
|
||||||
|
<label for="id1" class="label">검색어</label>
|
||||||
|
<input
|
||||||
|
class="search-box"
|
||||||
|
type="text"
|
||||||
|
id="id1"
|
||||||
|
placeholder="검색어 입력"
|
||||||
|
v-model.trim="grid.params.search"
|
||||||
|
@keyup.enter="search"
|
||||||
|
:readonly="!isFocused"
|
||||||
|
@focus="isFocused = true"
|
||||||
|
@blur="isFocused = false"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button type="button" class="button grey" @click="search">조회</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="info">
|
||||||
|
<div class="count">
|
||||||
|
총 <span> {{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }} </span>건
|
||||||
|
<div class="select_box NumberSe">
|
||||||
|
<select name="" id="perpage" v-model="perPageCnt" @change="changePerPage()">
|
||||||
|
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">
|
||||||
|
{{ option.text }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table">
|
||||||
|
<custom-grid
|
||||||
|
ref="table"
|
||||||
|
:totalItems="'totalItems'"
|
||||||
|
:url="grid.url"
|
||||||
|
:columns="grid.columns"
|
||||||
|
:pagePerRows="grid.pagePerRows"
|
||||||
|
:initialRequest="grid.pagination"
|
||||||
|
:pagination="grid.pagination"
|
||||||
|
:noDataStr="grid.noDataStr"
|
||||||
|
:addCls="grid.addCls"
|
||||||
|
></custom-grid>
|
||||||
|
</div>
|
||||||
|
<noti-detail-pop ref="notiDetailModal"></noti-detail-pop>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import customGrid from '@/components/CustomGrid';
|
||||||
|
import moment from 'moment';
|
||||||
|
import NotiDetailPop from '../components/NotiDetailPop';
|
||||||
|
|
||||||
|
class CustomATagRenderer {
|
||||||
|
constructor(props) {
|
||||||
|
this.props = props;
|
||||||
|
const el = document.createElement('a');
|
||||||
|
el.href = 'javascript:void(0);';
|
||||||
|
el.className = 'btn_text';
|
||||||
|
el.innerText = String(props.colValue);
|
||||||
|
this.el = el;
|
||||||
|
}
|
||||||
|
|
||||||
|
getElement() {
|
||||||
|
return this.el;
|
||||||
|
}
|
||||||
|
|
||||||
|
addEvent(selEl) {
|
||||||
|
selEl.addEventListener('click', () => {
|
||||||
|
const { callback } = this.props['cgrido' + this.props.colName].options;
|
||||||
|
callback(this.props);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'notiList',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isFocused: false,
|
||||||
|
srchGbn: '00',
|
||||||
|
srchGbn2: '00',
|
||||||
|
row: {},
|
||||||
|
perPageCnt: 50,
|
||||||
|
options: [
|
||||||
|
{ text: '20', value: 20 },
|
||||||
|
{ text: '50', value: 50 },
|
||||||
|
{ text: '100', value: 100 },
|
||||||
|
],
|
||||||
|
//날짜 조회
|
||||||
|
ko: vdp_translation_ko.js,
|
||||||
|
periodDay: 7,
|
||||||
|
sDateDiv: 'day',
|
||||||
|
startDate: new Date(),
|
||||||
|
endDate: new Date(),
|
||||||
|
strDate: new Date(),
|
||||||
|
|
||||||
|
totalItems: 0,
|
||||||
|
grid: {
|
||||||
|
url: '/api/v1/bo/sysMgt/notiList',
|
||||||
|
pagePerRows: 20,
|
||||||
|
pagination: true,
|
||||||
|
addCls: 'box_OFvis',
|
||||||
|
initialRequest: false,
|
||||||
|
columns: [
|
||||||
|
{ name: 'sndYmd', header: '발송 날짜', align: 'center', width: '15%' },
|
||||||
|
{ name: 'userId', header: '유저 ID', align: 'center', width: '15%' },
|
||||||
|
{ name: 'notiDiv', header: '알림 구분', align: 'center', width: '15%' },
|
||||||
|
{ name: 'webReqId', header: '웹요청 ID', align: 'center', width: '20%' },
|
||||||
|
{
|
||||||
|
name: 'msgTitle',
|
||||||
|
header: '내용',
|
||||||
|
align: 'center',
|
||||||
|
width: '20%' ,
|
||||||
|
renderer: {
|
||||||
|
type: CustomATagRenderer,
|
||||||
|
options: {
|
||||||
|
callback: this.notiDetailPop,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// { name: 'regDt', header: '등록 일시', align: 'center', width: '15%' },
|
||||||
|
],
|
||||||
|
noDataStr: '발송 내역이 없습니다.',
|
||||||
|
params: {
|
||||||
|
startDt: '',
|
||||||
|
endDt: '',
|
||||||
|
search: '',
|
||||||
|
srchGbn: '',
|
||||||
|
srchGbn2: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
customGrid: customGrid,
|
||||||
|
vuejsDatepicker,
|
||||||
|
NotiDetailPop
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.setPeriodDay(0);
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
// this.$store.commit('dataStore/updateDataStore', '');
|
||||||
|
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||||
|
page: 1,
|
||||||
|
perPage: 50,
|
||||||
|
params: {
|
||||||
|
startDt: '',
|
||||||
|
endDt: '',
|
||||||
|
search: '',
|
||||||
|
srchGbn: '',
|
||||||
|
srchGbn2: ''
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let page = 1;
|
||||||
|
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||||
|
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) {
|
||||||
|
|
||||||
|
this.grid.params = {
|
||||||
|
startDt: moment(this.startDate).format('YYYYMMDD'),
|
||||||
|
endDt: moment(this.endDate).format('YYYYMMDD'),
|
||||||
|
search: this.grid.params.search,
|
||||||
|
srchGbn: this.srchGbn,
|
||||||
|
srchGbn2: this.srchGbn2
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$refs.table.search(this.grid.params, isKeep);
|
||||||
|
this.sendStoreData();
|
||||||
|
},
|
||||||
|
sendStoreData: function () {
|
||||||
|
const getP = this.$refs.table.getPagination();
|
||||||
|
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||||
|
page: getP._currentPage,
|
||||||
|
perPage: this.perPageCnt,
|
||||||
|
params: this.grid.params,
|
||||||
|
});
|
||||||
|
|
||||||
|
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||||
|
},
|
||||||
|
changePerPage: function () {
|
||||||
|
// 페이지당 조회할 개수
|
||||||
|
this.grid.pagePerRows = this.perPageCnt;
|
||||||
|
},
|
||||||
|
|
||||||
|
customFormatter: function (date) {
|
||||||
|
if (this.sDateDiv == 'month') {
|
||||||
|
return moment(date).format('YYYY-MM');
|
||||||
|
} else if (this.sDateDiv == 'year') {
|
||||||
|
return moment(date).format('YYYY');
|
||||||
|
} else {
|
||||||
|
return moment(date).format('YYYY-MM-DD');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initSetStartDate() {
|
||||||
|
let setYear = Number(moment(new Date()).format('YYYY'));
|
||||||
|
let initStartDate = new Date(setYear, 0, 1);
|
||||||
|
this.startDate = initStartDate;
|
||||||
|
},
|
||||||
|
setPeriodDay(day) {
|
||||||
|
this.periodDay = day;
|
||||||
|
this.endDate = new Date();
|
||||||
|
this.initSetStartDate();
|
||||||
|
|
||||||
|
this.closeDate('start');
|
||||||
|
this.closeDate('end');
|
||||||
|
},
|
||||||
|
selectedStartDate(day) {
|
||||||
|
if (day != undefined && day != null) {
|
||||||
|
this.periodDay = day;
|
||||||
|
}
|
||||||
|
if (this.startDate > this.endDate) {
|
||||||
|
this.startDate = this.endDate;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectedEndDate(day) {
|
||||||
|
if (day != undefined && day != null) {
|
||||||
|
this.periodDay = day;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
closeDate(type) {
|
||||||
|
if (type != undefined && type != null) {
|
||||||
|
this.disabledSDate = {from: this.endDate};
|
||||||
|
this.disabledEDate = {to: this.startDate, from: new Date()};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
notiDetailPop(props){
|
||||||
|
this.$refs.notiDetailModal.notiDetailModalOpen(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
beforeRouteLeave(to, from, next) {
|
||||||
|
const getP = this.$refs.table.getPagination();
|
||||||
|
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||||
|
params: this.grid.params,
|
||||||
|
});
|
||||||
|
// 라우트 하기전 실행
|
||||||
|
next();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -8,6 +8,7 @@ package kr.co.uplus.ez.api.sysMgt;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import kr.co.uplus.ez.api.homeMgt.dto.NoticeListReqDto;
|
||||||
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
||||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||||
import kr.co.uplus.ez.common.components.WebClientRequestService;
|
import kr.co.uplus.ez.common.components.WebClientRequestService;
|
||||||
@@ -430,4 +431,19 @@ public class SysMgtController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* data: 2022. 11.23.
|
||||||
|
* auth: Lee minha
|
||||||
|
* desc: 알림 이력 조회
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "notiList", notes = "알림 이력 조회")
|
||||||
|
@RequestMapping(value = "/notiList", method = {RequestMethod.POST})
|
||||||
|
@ResponseBody
|
||||||
|
public NotiListResDto notiList(@RequestBody @Valid NotiListReqDto notiListReqDto) {
|
||||||
|
|
||||||
|
logger.info("Start notiList controller");
|
||||||
|
return sysService.notiList(notiListReqDto);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package kr.co.uplus.ez.api.sysMgt;
|
package kr.co.uplus.ez.api.sysMgt;
|
||||||
|
|
||||||
import kr.co.uplus.ez.api.comm.dto.BatchChkDto;
|
import kr.co.uplus.ez.api.comm.dto.BatchChkDto;
|
||||||
|
import kr.co.uplus.ez.api.homeMgt.dto.NoticeListReqDto;
|
||||||
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
@@ -51,4 +52,8 @@ public interface SysMgtMapper {
|
|||||||
public List<BatchDetail> batchDetailSelect(BatchDetailReqDto batchDetailReqDto); //배치 상세내용
|
public List<BatchDetail> batchDetailSelect(BatchDetailReqDto batchDetailReqDto); //배치 상세내용
|
||||||
|
|
||||||
int batchDetailCnt(BatchDetailReqDto batchDetailReqDto);
|
int batchDetailCnt(BatchDetailReqDto batchDetailReqDto);
|
||||||
|
|
||||||
|
public List<NotiList> notiListSelect(NotiListReqDto notiListReqDto);
|
||||||
|
|
||||||
|
int notiListSelectCnt(NotiListReqDto notiListReqDto);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package kr.co.uplus.ez.api.sysMgt;
|
package kr.co.uplus.ez.api.sysMgt;
|
||||||
|
|
||||||
import kr.co.uplus.ez.api.calculate.dto.CalcListResDto;
|
import kr.co.uplus.ez.api.calculate.dto.CalcListResDto;
|
||||||
|
import kr.co.uplus.ez.api.homeMgt.dto.NoticeListReqDto;
|
||||||
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
||||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||||
import kr.co.uplus.ez.common.data.Paging;
|
import kr.co.uplus.ez.common.data.Paging;
|
||||||
@@ -471,6 +472,50 @@ public class SysMgtService {
|
|||||||
return new BatchDetailResDto(ApiResponseCode.SUCCESS, batchDetailRes);
|
return new BatchDetailResDto(ApiResponseCode.SUCCESS, batchDetailRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* data : 2022. 11. 23.
|
||||||
|
* auth : Lee minha
|
||||||
|
* desc : 알림 이력 조회
|
||||||
|
* @param noticeListReqDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public NotiListResDto notiList(NotiListReqDto notiListReqDto) {
|
||||||
|
|
||||||
|
log.info("Start notiList Service");
|
||||||
|
|
||||||
|
|
||||||
|
SysMgtMapper sysmgtmapper = sqlSessionSlave.getMapper(SysMgtMapper.class);
|
||||||
|
NotiListRes notiListRes = new NotiListRes();
|
||||||
|
|
||||||
|
String nowPage = String.valueOf(notiListReqDto.getPage());
|
||||||
|
int totalCnt = sysmgtmapper.notiListSelectCnt(notiListReqDto);
|
||||||
|
|
||||||
|
if (totalCnt == 0) {
|
||||||
|
notiListRes.setList(new ArrayList<>());
|
||||||
|
Paging paging = new Paging();
|
||||||
|
paging.setPage(nowPage);
|
||||||
|
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||||
|
notiListRes.setPaging(paging);
|
||||||
|
|
||||||
|
return new NotiListResDto(ApiResponseCode.CM_NOT_FOUND, notiListRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
int page = notiListReqDto.getPage();
|
||||||
|
int pagePerRows = notiListReqDto.getPagePerRows();
|
||||||
|
page = (page - 1) * pagePerRows;
|
||||||
|
notiListReqDto.setPage(page);
|
||||||
|
|
||||||
|
List<NotiList> notiList = sysmgtmapper.notiListSelect(notiListReqDto);
|
||||||
|
notiListRes.setList(notiList);
|
||||||
|
Paging paging = new Paging();
|
||||||
|
paging.setPage(nowPage);
|
||||||
|
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||||
|
notiListRes.setPaging(paging);
|
||||||
|
|
||||||
|
log.info("End notiList Service");
|
||||||
|
|
||||||
|
return new NotiListResDto(ApiResponseCode.SUCCESS, notiListRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
32
src/main/java/kr/co/uplus/ez/api/sysMgt/dto/NotiList.java
Normal file
32
src/main/java/kr/co/uplus/ez/api/sysMgt/dto/NotiList.java
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 알림 이력 조회 DTO
|
||||||
|
* @author Lee Minha
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class NotiList {
|
||||||
|
|
||||||
|
private String sndYmd;
|
||||||
|
|
||||||
|
private String userSeq;
|
||||||
|
|
||||||
|
private String notiDiv;
|
||||||
|
|
||||||
|
private String notiSeq;
|
||||||
|
|
||||||
|
private String notiMsg;
|
||||||
|
|
||||||
|
private String webReqId;
|
||||||
|
|
||||||
|
private String regDt;
|
||||||
|
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
private String msgTitle;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
@Data
|
||||||
|
public class NotiListReqDto implements Serializable{
|
||||||
|
|
||||||
|
//검색 시작일
|
||||||
|
private String startDt;
|
||||||
|
|
||||||
|
//검색 종료일
|
||||||
|
private String endDt;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty(example = "50", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||||
|
private int pagePerRows;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty(example = "1", name = "현재 페이지", dataType = "int")
|
||||||
|
private int page;
|
||||||
|
|
||||||
|
//유저 ID
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
//웹 요청 ID
|
||||||
|
private String webReqId;
|
||||||
|
|
||||||
|
//요청 코드 (01: 종량 전환 알림. 02: 이월 소멸 알림)
|
||||||
|
private String notiDiv;
|
||||||
|
|
||||||
|
|
||||||
|
//검색어
|
||||||
|
private String search;
|
||||||
|
|
||||||
|
//검색 유형
|
||||||
|
private String srchGbn;
|
||||||
|
|
||||||
|
//검색 유형
|
||||||
|
private String srchGbn2;
|
||||||
|
|
||||||
|
}
|
||||||
15
src/main/java/kr/co/uplus/ez/api/sysMgt/dto/NotiListRes.java
Normal file
15
src/main/java/kr/co/uplus/ez/api/sysMgt/dto/NotiListRes.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package kr.co.uplus.ez.api.sysMgt.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 NotiListRes implements Serializable{
|
||||||
|
|
||||||
|
private Paging paging;
|
||||||
|
private List<NotiList> list;
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package kr.co.uplus.ez.api.sysMgt.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 NotiListResDto extends ResponseMessage implements Serializable{
|
||||||
|
|
||||||
|
private NotiListRes data;
|
||||||
|
|
||||||
|
public NotiListResDto() {
|
||||||
|
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||||
|
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||||
|
}
|
||||||
|
|
||||||
|
public NotiListResDto(ApiResponseCode returnStr) {
|
||||||
|
this.retCode = returnStr.getResultCode();
|
||||||
|
this.retMsg = returnStr.getResultMsg();
|
||||||
|
}
|
||||||
|
|
||||||
|
public NotiListResDto(ApiResponseCode returnStr, NotiListRes data) {
|
||||||
|
this.retCode = returnStr.getResultCode();
|
||||||
|
this.retMsg = returnStr.getResultMsg();
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -504,5 +504,81 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="notiListSelect" parameterType="kr.co.uplus.ez.api.sysMgt.dto.NotiListReqDto" resultType="kr.co.uplus.ez.api.sysMgt.dto.NotiList">
|
||||||
|
/* sysMgt-mapper.xml(notiListSelect) 알림 이력 조회*/
|
||||||
|
SELECT
|
||||||
|
enh.SND_YMD,
|
||||||
|
esu.USER_ID,
|
||||||
|
CASE
|
||||||
|
WHEN enh.NOTI_DIV = '01' THEN '종량 전환 알림'
|
||||||
|
WHEN enh.NOTI_DIV = '02' THEN '이월 소멸 알림'
|
||||||
|
ELSE enh.NOTI_DIV
|
||||||
|
END NOTI_DIV,
|
||||||
|
enh.NOTI_DIV,
|
||||||
|
enh.NOTI_SEQ,
|
||||||
|
enh.NOTI_MSG,
|
||||||
|
enh.WEB_REQ_ID,
|
||||||
|
enh.REG_DT,
|
||||||
|
'상세내역' AS msgTitle
|
||||||
|
FROM
|
||||||
|
hubez_common.EZ_NOTI_HIST enh
|
||||||
|
INNER JOIN
|
||||||
|
hubez_common.EZ_SVC_USER esu ON enh.USER_SEQ = esu.USER_SEQ
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
<if test = "startDt != null and endDt != null">
|
||||||
|
AND DATE_FORMAT(enh.SND_YMD,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startDt},'%Y-%m-%d') AND DATE_FORMAT(#{endDt},'%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
<if test = "srchGbn != null and srchGbn != ''">
|
||||||
|
<if test= "srchGbn == '01'">
|
||||||
|
AND esu.USER_ID LIKE CONCAT ('%',#{search},'%')
|
||||||
|
</if>
|
||||||
|
<if test = "srchGbn == '02'">
|
||||||
|
AND enh.WEB_REQ_ID LIKE CONCAT ('%',#{search},'%')
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<if test = "srchGbn2 != null and srchGbn2 != ''">
|
||||||
|
<if test= "srchGbn2 == '01'">
|
||||||
|
AND enh.NOTI_DIV = '01'
|
||||||
|
</if>
|
||||||
|
<if test= "srchGbn2 == '02'">
|
||||||
|
AND enh.NOTI_DIV = '02'
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
ORDER BY
|
||||||
|
enh.REG_DT desc, enh.NOTI_DIV
|
||||||
|
LIMIT #{page}, #{pagePerRows}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="notiListSelectCnt" parameterType="kr.co.uplus.ez.api.sysMgt.dto.NotiListReqDto" resultType="int">
|
||||||
|
/* sysMgt-mapper.xml(notiListSelect) 알림 이력 조회 카운트*/
|
||||||
|
SELECT
|
||||||
|
COUNT(1)
|
||||||
|
FROM
|
||||||
|
hubez_common.EZ_NOTI_HIST enh
|
||||||
|
INNER JOIN
|
||||||
|
hubez_common.EZ_SVC_USER esu ON enh.USER_SEQ = esu.USER_SEQ
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
<if test = "startDt != null and endDt != null">
|
||||||
|
AND DATE_FORMAT(enh.SND_YMD,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startDt},'%Y-%m-%d') AND DATE_FORMAT(#{endDt},'%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
<if test = "srchGbn != null and srchGbn != ''">
|
||||||
|
<if test= "srchGbn == '01'">
|
||||||
|
AND esu.USER_ID LIKE CONCAT ('%',#{search},'%')
|
||||||
|
</if>
|
||||||
|
<if test = "srchGbn == '02'">
|
||||||
|
AND enh.WEB_REQ_ID LIKE CONCAT ('%',#{search},'%')
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<if test = "srchGbn2 != null and srchGbn2 != ''">
|
||||||
|
<if test= "srchGbn2 == '01'">
|
||||||
|
AND enh.NOTI_DIV = '01'
|
||||||
|
</if>
|
||||||
|
<if test= "srchGbn2 == '02'">
|
||||||
|
AND enh.NOTI_DIV = '02'
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user