관리자로그관리 기간설정 추가
This commit is contained in:
parent
f41acd624d
commit
fc7aac45a9
@ -36,6 +36,7 @@ import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
|||||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
import itn.com.cmm.EgovMessageSource;
|
import itn.com.cmm.EgovMessageSource;
|
||||||
import itn.com.cmm.LoginVO;
|
import itn.com.cmm.LoginVO;
|
||||||
|
import itn.com.cmm.util.MJUtil;
|
||||||
import itn.com.cmm.util.RedirectUrlMaker;
|
import itn.com.cmm.util.RedirectUrlMaker;
|
||||||
import itn.let.sym.log.clg.service.EgovLoginLogService;
|
import itn.let.sym.log.clg.service.EgovLoginLogService;
|
||||||
import itn.let.sym.log.clg.service.LoginLog;
|
import itn.let.sym.log.clg.service.LoginLog;
|
||||||
@ -112,6 +113,13 @@ public class EgovLoginLogController {
|
|||||||
loginLog.setSearchSortCnd("creatDt");
|
loginLog.setSearchSortCnd("creatDt");
|
||||||
loginLog.setSearchSortOrd("desc");
|
loginLog.setSearchSortOrd("desc");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 기간검색 설정
|
||||||
|
String beforeMonthDay = MJUtil.getBefore1MonthDate(); //한달 전
|
||||||
|
if (null == loginLog.getSearchStartDate() || loginLog.getSearchStartDate().equals("")) {
|
||||||
|
loginLog.setSearchStartDate(beforeMonthDay);
|
||||||
|
}
|
||||||
|
|
||||||
List<LoginLog> adminLogList = loginLogService.selectAmdinLog(loginLog);
|
List<LoginLog> adminLogList = loginLogService.selectAmdinLog(loginLog);
|
||||||
int adminLogListCnt = loginLogService.selectAmdinLogTotCnt(loginLog);
|
int adminLogListCnt = loginLogService.selectAmdinLogTotCnt(loginLog);
|
||||||
paginationInfo.setTotalRecordCount(adminLogListCnt);
|
paginationInfo.setTotalRecordCount(adminLogListCnt);
|
||||||
|
|||||||
@ -230,44 +230,42 @@
|
|||||||
SELECT
|
SELECT
|
||||||
COUNT(1) OVER() AS totCnt ,
|
COUNT(1) OVER() AS totCnt ,
|
||||||
a.ADMINLOG_ID logId ,
|
a.ADMINLOG_ID logId ,
|
||||||
b.USER_NM loginNm,
|
c.USER_NM loginNm,
|
||||||
DATE_FORMAT(a.CREAT_DT, '%Y-%m-%d %T' ) creatDt,
|
DATE_FORMAT(a.CREAT_DT, '%Y-%m-%d %T' ) creatDt,
|
||||||
a.CONECT_IP loginIp,
|
a.CONECT_IP loginIp,
|
||||||
a.PROGRM_FILE_NM AS progrmFileNm,
|
a.PROGRM_FILE_NM AS progrmFileNm,
|
||||||
a.MENU_NM AS menuNm,
|
a.MENU_NM AS menuNm,
|
||||||
a.APPRO_NM AS approNm,
|
a.APPRO_NM AS approNm,
|
||||||
b.USER_ID AS loginId,
|
c.EMPLYR_ID AS loginId,
|
||||||
a.URL AS url
|
a.URL AS url
|
||||||
FROM
|
FROM
|
||||||
LETTNADMINLOG a INNER JOIN COMVNUSERMASTER b
|
LETTNADMINLOG a
|
||||||
ON a.CONECT_ID = b.ESNTL_ID
|
|
||||||
INNER JOIN lettnemplyrinfo c
|
INNER JOIN lettnemplyrinfo c
|
||||||
ON b.USER_ID = c.EMPLYR_ID
|
ON a.CONECT_ID = c.ESNTL_ID
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
AND a.CONECT_ID != ''
|
AND a.CONECT_ID != ''
|
||||||
AND a.CREAT_DT > DATE_ADD(NOW(), INTERVAL -1 DAY)
|
AND a.CREAT_DT > DATE_ADD(NOW(), INTERVAL -1 DAY)
|
||||||
ORDER BY a.CREAT_DT DESC
|
ORDER BY a.CREAT_DT DESC
|
||||||
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 관리자 로그 접속 리스트 -->
|
<!-- 관리자 로그 접속 리스트 -->
|
||||||
<select id="LoginLogDAO.selectAmdinLog" parameterClass="loginLog" resultClass="loginLog">
|
<select id="LoginLogDAO.selectAmdinLog" parameterClass="loginLog" resultClass="loginLog">
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(1) OVER() AS totCnt ,
|
0 totCnt ,
|
||||||
a.ADMINLOG_ID logId ,
|
a.ADMINLOG_ID logId ,
|
||||||
b.USER_NM loginNm,
|
c.USER_NM loginNm,
|
||||||
DATE_FORMAT(a.CREAT_DT, '%Y-%m-%d %H:%i' ) creatDt,
|
DATE_FORMAT(a.CREAT_DT, '%Y-%m-%d %H:%i' ) creatDt,
|
||||||
a.CONECT_IP loginIp,
|
a.CONECT_IP loginIp,
|
||||||
a.PROGRM_FILE_NM AS progrmFileNm,
|
a.PROGRM_FILE_NM AS progrmFileNm,
|
||||||
a.MENU_NM AS menuNm,
|
a.MENU_NM AS menuNm,
|
||||||
a.APPRO_NM AS approNm,
|
a.APPRO_NM AS approNm,
|
||||||
b.USER_ID AS loginId,
|
c.EMPLYR_ID AS loginId,
|
||||||
a.URL AS url
|
a.URL AS url
|
||||||
FROM
|
FROM
|
||||||
LETTNADMINLOG a INNER JOIN COMVNUSERMASTER b
|
LETTNADMINLOG a
|
||||||
ON a.CONECT_ID = b.ESNTL_ID
|
|
||||||
INNER JOIN lettnemplyrinfo c
|
INNER JOIN lettnemplyrinfo c
|
||||||
ON b.USER_ID = c.EMPLYR_ID
|
ON a.CONECT_ID = c.ESNTL_ID
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
AND a.CONECT_ID != ''
|
AND a.CONECT_ID != ''
|
||||||
<isNotEmpty property="searchKeyword">
|
<isNotEmpty property="searchKeyword">
|
||||||
@ -281,8 +279,18 @@
|
|||||||
a.URL LIKE CONCAT('%' , #searchKeyword#, '%')
|
a.URL LIKE CONCAT('%' , #searchKeyword#, '%')
|
||||||
</isEqual>
|
</isEqual>
|
||||||
</isNotEmpty>
|
</isNotEmpty>
|
||||||
|
|
||||||
ORDER BY 1=1
|
<isNotEmpty prepend="AND" property="searchStartDate">
|
||||||
|
<![CDATA[
|
||||||
|
a.CREAT_DT >= DATE_FORMAT(#searchStartDate#, '%Y-%m-%d')
|
||||||
|
]]>
|
||||||
|
</isNotEmpty>
|
||||||
|
<isNotEmpty prepend="AND" property="searchEndDate">
|
||||||
|
<![CDATA[
|
||||||
|
a.CREAT_DT <= DATE_ADD(DATE_FORMAT(#searchEndDate#, '%Y-%m-%d'), INTERVAL 1 DAY)
|
||||||
|
]]>
|
||||||
|
</isNotEmpty>
|
||||||
|
ORDER BY 1=1
|
||||||
<isNotEmpty property="searchSortCnd">
|
<isNotEmpty property="searchSortCnd">
|
||||||
,$searchSortCnd$
|
,$searchSortCnd$
|
||||||
</isNotEmpty>
|
</isNotEmpty>
|
||||||
@ -297,10 +305,9 @@
|
|||||||
SELECT
|
SELECT
|
||||||
COUNT(0)
|
COUNT(0)
|
||||||
FROM
|
FROM
|
||||||
LETTNADMINLOG a INNER JOIN COMVNUSERMASTER b
|
LETTNADMINLOG a
|
||||||
ON a.CONECT_ID = b.ESNTL_ID
|
|
||||||
INNER JOIN lettnemplyrinfo c
|
INNER JOIN lettnemplyrinfo c
|
||||||
ON b.USER_ID = c.EMPLYR_ID
|
ON a.CONECT_ID = c.ESNTL_ID
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
AND a.CONECT_ID != ''
|
AND a.CONECT_ID != ''
|
||||||
<isNotEmpty property="searchKeyword">
|
<isNotEmpty property="searchKeyword">
|
||||||
@ -314,6 +321,17 @@
|
|||||||
a.URL LIKE CONCAT('%' , #searchKeyword#, '%')
|
a.URL LIKE CONCAT('%' , #searchKeyword#, '%')
|
||||||
</isEqual>
|
</isEqual>
|
||||||
</isNotEmpty>
|
</isNotEmpty>
|
||||||
|
|
||||||
|
<isNotEmpty prepend="AND" property="searchStartDate">
|
||||||
|
<![CDATA[
|
||||||
|
a.CREAT_DT >= DATE_FORMAT(#searchStartDate#, '%Y-%m-%d')
|
||||||
|
]]>
|
||||||
|
</isNotEmpty>
|
||||||
|
<isNotEmpty prepend="AND" property="searchEndDate">
|
||||||
|
<![CDATA[
|
||||||
|
a.CREAT_DT <= DATE_ADD(DATE_FORMAT(#searchEndDate#, '%Y-%m-%d'), INTERVAL 1 DAY)
|
||||||
|
]]>
|
||||||
|
</isNotEmpty>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 관리자 대쉬보드 접속 리스트(일자별, 아이디별 중복제거) -->
|
<!-- 관리자 대쉬보드 접속 리스트(일자별, 아이디별 중복제거) -->
|
||||||
|
|||||||
@ -24,15 +24,7 @@
|
|||||||
<script type="text/javascript" src="<c:url value='/js/EgovCalPopup.js'/>" ></script>
|
<script type="text/javascript" src="<c:url value='/js/EgovCalPopup.js'/>" ></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$( document ).ready(function(){
|
$( document ).ready(function(){
|
||||||
var tempSearchBgnDe = "${searchVO.searchBgnDe}" ;
|
|
||||||
var tempSearchEndDe = "${searchVO.searchEndDe}" ;
|
|
||||||
if(""!=tempSearchBgnDe && tempSearchBgnDe.length==8){
|
|
||||||
$('#searchBgnDe').val(tempSearchBgnDe.substring(0,4)+"-"+tempSearchBgnDe.substring(4,6)+"-"+tempSearchBgnDe.substring(6,8));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(""!=tempSearchEndDe && tempSearchEndDe.length==8){
|
|
||||||
$('#searchEndDe').val(tempSearchEndDe.substring(0,4)+"-"+tempSearchEndDe.substring(4,6)+"-"+tempSearchEndDe.substring(6,8));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* ********************************************************
|
/* ********************************************************
|
||||||
@ -53,7 +45,7 @@ String.prototype.replaceAll = function(src, repl){
|
|||||||
|
|
||||||
function fn_select(pageNo){
|
function fn_select(pageNo){
|
||||||
<c:if test="${!empty loginId}">
|
<c:if test="${!empty loginId}">
|
||||||
if(""!= document.frm.searchKeyword.value){
|
if(""!= document.listForm.searchKeyword.value){
|
||||||
updateRecentSearch();//최근검색어 등록
|
updateRecentSearch();//최근검색어 등록
|
||||||
}
|
}
|
||||||
</c:if>
|
</c:if>
|
||||||
@ -72,7 +64,7 @@ function fn_egov_inqire_loginLog(logId){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function linkPage(pageNo){
|
function linkPage(pageNo){
|
||||||
var frm = document.frm;
|
var frm = document.listForm;
|
||||||
frm.pageIndex.value = pageNo;
|
frm.pageIndex.value = pageNo;
|
||||||
if($('#searchConditionSite').length != 0){
|
if($('#searchConditionSite').length != 0){
|
||||||
frm.searchConditionSite.value = $('#searchConditionSite').val();
|
frm.searchConditionSite.value = $('#searchConditionSite').val();
|
||||||
@ -83,17 +75,37 @@ function linkPage(pageNo){
|
|||||||
|
|
||||||
//엑셀 다운로드
|
//엑셀 다운로드
|
||||||
function logListExcelDownload(){
|
function logListExcelDownload(){
|
||||||
document.frm.method = "post";
|
document.listForm.method = "post";
|
||||||
document.frm.action = "<c:url value='/sym/log/clg/roleListExcelDownload.do'/>";
|
document.listForm.action = "<c:url value='/sym/log/clg/roleListExcelDownload.do'/>";
|
||||||
document.frm.submit();
|
document.listForm.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//기간선택 select
|
||||||
|
function fnSetCalMonth(val) {
|
||||||
|
var form = document.listForm;
|
||||||
|
var today = new Date();
|
||||||
|
|
||||||
|
var year = today.getFullYear();
|
||||||
|
var month = ("0"+(today.getMonth()+1)).slice(-2);
|
||||||
|
var date = ("0"+today.getDate()).slice(-2);
|
||||||
|
|
||||||
|
var sDate = new Date(today.setMonth(today.getMonth() - val));
|
||||||
|
|
||||||
|
var sYear = sDate.getFullYear();
|
||||||
|
var sMonth = ("0"+(sDate.getMonth()+1)).slice(-2);
|
||||||
|
var sDate = ("0"+sDate.getDate()).slice(-2);
|
||||||
|
|
||||||
|
form.searchStartDate.value = sYear + "-" + sMonth + "-" + sDate;
|
||||||
|
form.searchEndDate.value = year + "-" + month + "-" + date;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<title>로그인 로그 목록</title>
|
<title>로그인 로그 목록</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>자바스크립트를 지원하지 않는 브라우저에서는 일부 기능을 사용하실 수 없습니다.</noscript>
|
<noscript>자바스크립트를 지원하지 않는 브라우저에서는 일부 기능을 사용하실 수 없습니다.</noscript>
|
||||||
<form name="frm" id="frm" action ="<c:url value='/sym/log/clg/SelectLoginLogList.do'/>" method="post">
|
<form name="listForm" action ="<c:url value='/sym/log/clg/SelectLoginLogList.do'/>" method="post">
|
||||||
<input type="hidden" name="cal_url" value="<c:url value='/sym/cmm/EgovNormalCalPopup.do'/>" />
|
|
||||||
<input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
|
<input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
|
||||||
<input type="hidden" name="searchSortCnd" value="<c:out value="${searchVO.searchSortCnd}" />" />
|
<input type="hidden" name="searchSortCnd" value="<c:out value="${searchVO.searchSortCnd}" />" />
|
||||||
<input type="hidden" name="searchSortOrd" value="<c:out value="${searchVO.searchSortOrd}" />" />
|
<input type="hidden" name="searchSortOrd" value="<c:out value="${searchVO.searchSortOrd}" />" />
|
||||||
@ -105,6 +117,26 @@ function logListExcelDownload(){
|
|||||||
</div>
|
</div>
|
||||||
<div class="pageCont">
|
<div class="pageCont">
|
||||||
<div class="listSerch">
|
<div class="listSerch">
|
||||||
|
<div class="calendar_wrap">
|
||||||
|
<select name="setCalMonth" onchange="fnSetCalMonth(this.value)">
|
||||||
|
<option value="0">전체</option>
|
||||||
|
<option value="1">1개월</option>
|
||||||
|
<option value="3">3개월</option>
|
||||||
|
<option value="6">6개월</option>
|
||||||
|
</select>
|
||||||
|
<input type="hidden" name="cal_url" id="cal_url" value="/sym/cmm/EgovNormalCalPopup.do">
|
||||||
|
<div class="calendar_box" onclick="javascript:fn_egov_NormalCalendar(document.forms.listForm, document.forms.listForm.searchStartDate);">
|
||||||
|
<input style="width:auto;min-width: 83px;" type="text" class="date_format" name="searchStartDate" id="searchStartDate" size="4" maxlength="4" readonly="" value="<c:out value='${searchVO.searchStartDate}'/>">
|
||||||
|
<input type="button" class="calBtn">
|
||||||
|
</div>
|
||||||
|
<span class="line">~</span>
|
||||||
|
<div class="calendar_box" onclick="javascript:fn_egov_NormalCalendar(document.forms.listForm, document.forms.listForm.searchEndDate);">
|
||||||
|
<input style="width:auto;min-width: 83px;" type="text" class="date_format" name="searchEndDate" id="searchEndDate" size="4" maxlength="4" readonly="" value="<c:out value='${searchVO.searchEndDate}'/>">
|
||||||
|
<input type="button" class="calBtn">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<select name="searchCondition" id="searchCondition" class="select" title="검색조건선택">
|
<select name="searchCondition" id="searchCondition" class="select" title="검색조건선택">
|
||||||
<option value='' <c:if test="${searchVO.searchCondition == ''}">selected</c:if> >전체</option>
|
<option value='' <c:if test="${searchVO.searchCondition == ''}">selected</c:if> >전체</option>
|
||||||
<option value='1' <c:if test="${searchVO.searchCondition == '1'}">selected</c:if>>메뉴명</option>
|
<option value='1' <c:if test="${searchVO.searchCondition == '1'}">selected</c:if>>메뉴명</option>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user