자주보내는 번호 ajax로 분리하여 문자전송 페이지 속도 개선
This commit is contained in:
parent
f5c94b4d7e
commit
e997318fe6
@ -208,7 +208,6 @@ public class MjonMsgDataController {
|
|||||||
HttpServletRequest request,
|
HttpServletRequest request,
|
||||||
ModelMap model,
|
ModelMap model,
|
||||||
RedirectAttributes redirectAttributes) throws Exception{
|
RedirectAttributes redirectAttributes) throws Exception{
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -290,6 +289,9 @@ public class MjonMsgDataController {
|
|||||||
|
|
||||||
List<?> resultPhoList = mjonMsgDataService.selectPhotoLetterList(letterVO);
|
List<?> resultPhoList = mjonMsgDataService.selectPhotoLetterList(letterVO);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
model.addAttribute("resultPhoList", resultPhoList);
|
model.addAttribute("resultPhoList", resultPhoList);
|
||||||
paginationInfo.setTotalRecordCount( resultPhoList.size()> 0 ? ((Long)((EgovMap)resultPhoList.get(0)).get("totCnt")).intValue() : 0);
|
paginationInfo.setTotalRecordCount( resultPhoList.size()> 0 ? ((Long)((EgovMap)resultPhoList.get(0)).get("totCnt")).intValue() : 0);
|
||||||
model.addAttribute("paginationInfo", paginationInfo);
|
model.addAttribute("paginationInfo", paginationInfo);
|
||||||
@ -442,6 +444,9 @@ public class MjonMsgDataController {
|
|||||||
@RequestMapping(value= {"/web/mjon/msgdata/selectMsgDataSMLViewAjax.do"})
|
@RequestMapping(value= {"/web/mjon/msgdata/selectMsgDataSMLViewAjax.do"})
|
||||||
public String selectMsgDataSMLView(@ModelAttribute("searchVO") MjonMsgDataVO searchVO, CateCode cateCode, ModelMap model) throws Exception{
|
public String selectMsgDataSMLView(@ModelAttribute("searchVO") MjonMsgDataVO searchVO, CateCode cateCode, ModelMap model) throws Exception{
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println(" : selectMsgDataSMLView : ");
|
||||||
|
long startTime = System.nanoTime(); // 시작 시간
|
||||||
//로그인 권한정보 불러오기
|
//로그인 권한정보 불러오기
|
||||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||||
@ -662,23 +667,25 @@ public class MjonMsgDataController {
|
|||||||
//최근 전송 내역
|
//최근 전송 내역
|
||||||
// 20241230 이호영
|
// 20241230 이호영
|
||||||
// 로딩 시간이 오래걸려 ajax로 따로 분리함
|
// 로딩 시간이 오래걸려 ajax로 따로 분리함
|
||||||
// Calendar cal = Calendar.getInstance();
|
/*
|
||||||
// Date now = new Date();
|
Calendar cal = Calendar.getInstance();
|
||||||
|
Date now = new Date();
|
||||||
|
|
||||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
||||||
|
|
||||||
// cal.setTime(now);
|
cal.setTime(now);
|
||||||
// cal.add(Calendar.DATE, -3);
|
cal.add(Calendar.DATE, -3);
|
||||||
|
|
||||||
// String chkDate = format.format(cal.getTime());
|
String chkDate = format.format(cal.getTime());
|
||||||
// searchVO.setMyMsgStDt(chkDate); //검색 시작일 저장 - 현재날짜로 부터 3일 이전 날짜로 시작
|
searchVO.setMyMsgStDt(chkDate); //검색 시작일 저장 - 현재날짜로 부터 3일 이전 날짜로 시작
|
||||||
// List<?> resultLatestMsgList = mjonMsgDataService.selectLatestMsgList(searchVO);
|
List<?> resultLatestMsgList = mjonMsgDataService.selectLatestMsgList(searchVO);
|
||||||
// model.addAttribute("resultLatestMsgList", resultLatestMsgList);
|
model.addAttribute("resultLatestMsgList", resultLatestMsgList);
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
//자주보내는 번호
|
//자주보내는 번호
|
||||||
List<?> resultBookMarkMsgList = mjonMsgDataService.selectBookMarkMsgList(searchVO);
|
// List<?> resultBookMarkMsgList = mjonMsgDataService.selectBookMarkMsgList(searchVO);
|
||||||
model.addAttribute("resultBookMarkMsgList", resultBookMarkMsgList);
|
// model.addAttribute("resultBookMarkMsgList", resultBookMarkMsgList);
|
||||||
|
|
||||||
|
|
||||||
/** pageing */
|
/** pageing */
|
||||||
PaginationInfo paginationInfo = new PaginationInfo();
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
@ -699,11 +706,17 @@ public class MjonMsgDataController {
|
|||||||
model.addAttribute("tabDision", searchVO.getTabDision());
|
model.addAttribute("tabDision", searchVO.getTabDision());
|
||||||
|
|
||||||
|
|
||||||
|
long endTime = System.nanoTime(); // 종료 시간
|
||||||
|
// 실행 시간 계산 (나노초 단위)
|
||||||
|
long duration = endTime - startTime;
|
||||||
|
|
||||||
|
System.out.println("Execution time: " + duration + " nanoseconds");
|
||||||
|
System.out.println("Execution time: " + (duration / 1_000_000) + " milliseconds");
|
||||||
return "web/msgdata/MsgDataSMLView";
|
return "web/msgdata/MsgDataSMLView";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value= {"/web/mjon/msgdata/resultLatestMsgListAjax.do"})
|
@RequestMapping(value= {"/web/mjon/msgdata/resultLatestMsgListAjax.do"})
|
||||||
public ResponseEntity<StatusResponse> cancelRegistIdChkAjax() throws Exception {
|
public ResponseEntity<StatusResponse> resultLatestMsgListAjax() throws Exception {
|
||||||
|
|
||||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||||
@ -732,6 +745,25 @@ public class MjonMsgDataController {
|
|||||||
return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "", resultLatestMsgList));
|
return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "", resultLatestMsgList));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value= {"/web/mjon/msgdata/resultBookMarkMsgList.do"})
|
||||||
|
public ResponseEntity<StatusResponse> resultBookMarkMsgList() throws Exception {
|
||||||
|
|
||||||
|
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||||
|
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||||
|
|
||||||
|
if(StringUtils.isEmpty(userId)) {
|
||||||
|
|
||||||
|
return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "", ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
MjonMsgDataVO mjonMsgDataVO = new MjonMsgDataVO();
|
||||||
|
mjonMsgDataVO.setUserId(userId);
|
||||||
|
|
||||||
|
List<?> resultBookMarkMsgList = mjonMsgDataService.selectBookMarkMsgList(mjonMsgDataVO);
|
||||||
|
|
||||||
|
return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "", resultBookMarkMsgList));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 문자재전송 내용 처리
|
* 문자재전송 내용 처리
|
||||||
|
|||||||
@ -28,17 +28,15 @@ Globals.Env = dev
|
|||||||
|
|
||||||
# mysql
|
# mysql
|
||||||
Globals.DriverClassName=com.mysql.jdbc.Driver
|
Globals.DriverClassName=com.mysql.jdbc.Driver
|
||||||
Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon
|
#Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon
|
||||||
Globals.UserName= mjonUr
|
#Globals.UserName= mjonUr
|
||||||
#Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon_20230221
|
#Globals.Password= mjon!@#$
|
||||||
#Globals.UserName= mjonUr_20230221
|
|
||||||
Globals.Password= mjon!@#$
|
|
||||||
|
|
||||||
# mysql-prod
|
# mysql-prod
|
||||||
#Globals.DriverClassName=com.mysql.jdbc.Driver
|
#Globals.DriverClassName=com.mysql.jdbc.Driver
|
||||||
#Globals.Url=jdbc:mysql://139.150.72.157:3306/mjon
|
Globals.Url=jdbc:mysql://139.150.72.157:3306/mjon
|
||||||
#Globals.UserName= mjonUr
|
Globals.UserName= mjonUr
|
||||||
#Globals.Password= mjon!@#$
|
Globals.Password= mjon!@#$
|
||||||
|
|
||||||
# MainPage Setting(admin)
|
# MainPage Setting(admin)
|
||||||
Globals.MainPage = /cmm/main/mainPage.do
|
Globals.MainPage = /cmm/main/mainPage.do
|
||||||
|
|||||||
@ -123,8 +123,3 @@ Globals.pay.kgm.mobile.payMode=00
|
|||||||
#Slack
|
#Slack
|
||||||
Globals.slack.hooks.url=https://hooks.slack.com/services/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
|
Globals.slack.hooks.url=https://hooks.slack.com/services/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
|
||||||
Globals.slack.channel.name=\ud14c\uc2a4\ud2b8_mjon\uba54\uc2dc\uc9c0
|
Globals.slack.channel.name=\ud14c\uc2a4\ud2b8_mjon\uba54\uc2dc\uc9c0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2201,7 +2201,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="mjonMsgDAO.selectBookMarkMsgList" parameterClass="mjonMsgDataVO" resultClass="egovMap">
|
<select id="mjonMsgDAO.selectBookMarkMsgList" parameterClass="mjonMsgDataVO" resultClass="egovMap">
|
||||||
|
/* mjonMsgDAO.selectBookMarkMsgList */
|
||||||
SELECT ADDR_ID AS addrId,
|
SELECT ADDR_ID AS addrId,
|
||||||
ADDR_GRP_ID AS addrGrpId,
|
ADDR_GRP_ID AS addrGrpId,
|
||||||
MBER_ID AS mberId,
|
MBER_ID AS mberId,
|
||||||
|
|||||||
@ -19,6 +19,8 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
|
||||||
|
console.log("12111111111111");
|
||||||
|
|
||||||
// console.log(' + $(#tabDision).val() : ',$('#tabDision').val())
|
// console.log(' + $(#tabDision).val() : ',$('#tabDision').val())
|
||||||
// if($('#tabDision').val() == 'tab02'){
|
// if($('#tabDision').val() == 'tab02'){
|
||||||
// $('#send_adYnY').prop('checked', true); // 상태 변경 및 이벤트 발생
|
// $('#send_adYnY').prop('checked', true); // 상태 변경 및 이벤트 발생
|
||||||
@ -194,10 +196,10 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
updateButtons(currentIndex);
|
updateButtons(currentIndex);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 최근 전송내역
|
// 최근 전송내역
|
||||||
resultLatestMsgList();
|
resultLatestMsgList();
|
||||||
|
//자주보내는 번호
|
||||||
|
resultBookMarkMsgList();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -227,13 +229,12 @@ function resultLatestMsgList(){
|
|||||||
// 데이터가 있는 경우
|
// 데이터가 있는 경우
|
||||||
if (resultList && resultList.length > 0) {
|
if (resultList && resultList.length > 0) {
|
||||||
resultList.forEach(function(item, index) {
|
resultList.forEach(function(item, index) {
|
||||||
console.log(item.callTo + " : " + item.callTo);
|
|
||||||
let listItem =
|
let listItem =
|
||||||
'<li id="latestLi">' +
|
'<li id="latestLi">' +
|
||||||
'<input type="checkbox" id="addrChk_' + (index + 1) + '" name="latAddrChk" value="' + item.callTo + '">' +
|
'<input type="checkbox" id="bokAddrChk_' + (index + 1) + '" name="bookAddrChk" value="' + item.addrPhoneNo + '">' +
|
||||||
'<label for="addrChk_' + (index + 1) + '" class="label">최근 전송내역</label>' +
|
'<label for="bokAddrChk_' + (index + 1) + '" class="label">최근 전송내역</label>' +
|
||||||
'<p>' + item.callTo + '</p>' +
|
'<p>' + item.addrPhoneNo + '</p>' +
|
||||||
'<button type="button" id="latestAddrDel">' +
|
'<button type="button" id="bookMarkAddrDel">' +
|
||||||
'<img src="/publish/images/popup/close3.png" alt="전화번호 삭제">' +
|
'<img src="/publish/images/popup/close3.png" alt="전화번호 삭제">' +
|
||||||
'</button>' +
|
'</button>' +
|
||||||
'</li>';
|
'</li>';
|
||||||
@ -244,7 +245,6 @@ function resultLatestMsgList(){
|
|||||||
// 데이터가 없는 경우
|
// 데이터가 없는 경우
|
||||||
$latestMsgUl.append('<li><p>최근 발송 내역이 없습니다.</p></li>');
|
$latestMsgUl.append('<li><p>최근 발송 내역이 없습니다.</p></li>');
|
||||||
}
|
}
|
||||||
// console.log('$latestMsgUl : ', $latestMsgUl.html());
|
|
||||||
},
|
},
|
||||||
error:function(request , status, error){
|
error:function(request , status, error){
|
||||||
console.log(' error ?');
|
console.log(' error ?');
|
||||||
@ -254,6 +254,57 @@ function resultLatestMsgList(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 자주보내는 번호
|
||||||
|
function resultBookMarkMsgList(){
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type:"POST",
|
||||||
|
url:"/web/mjon/msgdata/resultBookMarkMsgList.do",
|
||||||
|
data:{},
|
||||||
|
dataType:'json',
|
||||||
|
// timeout:(1000*30),
|
||||||
|
success:function(data){
|
||||||
|
|
||||||
|
console.log('resultBookMarkMsgList data : ', data);
|
||||||
|
|
||||||
|
// 가져온 데이터 배열
|
||||||
|
let resultList = data.object;
|
||||||
|
let $bookMsgUl = $('#bookMsgUl'); // 기존 리스트 UL
|
||||||
|
console.log('let $bookMsgUl : ', $bookMsgUl);
|
||||||
|
|
||||||
|
// 기존 내용을 비우기
|
||||||
|
$bookMsgUl.empty();
|
||||||
|
|
||||||
|
// 데이터가 있는 경우
|
||||||
|
if (resultList && resultList.length > 0) {
|
||||||
|
resultList.forEach(function(item, index) {
|
||||||
|
console.log(item.addrPhoneNo + " : " + item.addrPhoneNo);
|
||||||
|
let listItem =
|
||||||
|
'<li id="bookMarkLi">' +
|
||||||
|
'<input type="checkbox" id="addrChk_' + (index + 1) + '" name="latAddrChk" value="' + item.addrPhoneNo + '">' +
|
||||||
|
'<label for="addrChk_' + (index + 1) + '" class="label">최근 전송내역</label>' +
|
||||||
|
'<p>' + item.addrPhoneNo + '</p>' +
|
||||||
|
'<button type="button" id="bookMarkAddrDel">' +
|
||||||
|
'<img src="/publish/images/popup/close3.png" alt="전화번호 삭제">' +
|
||||||
|
'</button>' +
|
||||||
|
'</li>';
|
||||||
|
|
||||||
|
$bookMsgUl.append(listItem);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 데이터가 없는 경우
|
||||||
|
$bookMsgUl.append('<li><p>등록된 자주 보내는 번호 내역이 없습니다..</p></li>');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error:function(request , status, error){
|
||||||
|
console.log(' error ?');
|
||||||
|
console.log('request : ', request);
|
||||||
|
console.log('status : ', status);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 버튼 disabled 스크립트
|
* 버튼 disabled 스크립트
|
||||||
*/
|
*/
|
||||||
@ -3566,7 +3617,7 @@ function getMjMsgSentListAll(pageNo) {
|
|||||||
<div class="history_cont hascont">
|
<div class="history_cont hascont">
|
||||||
<div class="histroy_trans" id="bookMarkMsgArea">
|
<div class="histroy_trans" id="bookMarkMsgArea">
|
||||||
<ul id="bookMsgUl">
|
<ul id="bookMsgUl">
|
||||||
<c:choose>
|
<%-- <c:choose>
|
||||||
<c:when test="${not empty resultBookMarkMsgList}">
|
<c:when test="${not empty resultBookMarkMsgList}">
|
||||||
<c:forEach var="bookMarkMsgList" items="${resultBookMarkMsgList}" varStatus="status">
|
<c:forEach var="bookMarkMsgList" items="${resultBookMarkMsgList}" varStatus="status">
|
||||||
<li id="bookMarkLi">
|
<li id="bookMarkLi">
|
||||||
@ -3582,7 +3633,7 @@ function getMjMsgSentListAll(pageNo) {
|
|||||||
<p>등록된 자주 보내는 번호 내역이 없습니다.</p>
|
<p>등록된 자주 보내는 번호 내역이 없습니다.</p>
|
||||||
</li>
|
</li>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose> --%>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="popup_btn_wrap2 hisroy_btn" style="width: 230px;">
|
<div class="popup_btn_wrap2 hisroy_btn" style="width: 230px;">
|
||||||
|
|||||||
@ -173,10 +173,12 @@ function listMsgDataView(){
|
|||||||
var sendData = $(document.goPageAjax).serializeArray() ;
|
var sendData = $(document.goPageAjax).serializeArray() ;
|
||||||
console.log('sendData : ', sendData)
|
console.log('sendData : ', sendData)
|
||||||
$(".contentArea").load("/web/mjon/msgdata/selectMsgDataSMLViewAjax.do", sendData ,function(response, status, xhr){
|
$(".contentArea").load("/web/mjon/msgdata/selectMsgDataSMLViewAjax.do", sendData ,function(response, status, xhr){
|
||||||
|
console.log(' contentArea : 문자전송 부분 로딩');
|
||||||
|
|
||||||
//문자 재전송 및 주소록 전달 처리를 위해 사용
|
//문자 재전송 및 주소록 전달 처리를 위해 사용
|
||||||
$("#msgForm").ready(function(){ //문자 내용 폼이 로드된 후 실행
|
$("#msgForm").ready(function(){ //문자 내용 폼이 로드된 후 실행
|
||||||
|
|
||||||
|
console.log(' contentArea : 문자전송 부분 로딩');
|
||||||
//헤더 문자검색 결과 처리
|
//헤더 문자검색 결과 처리
|
||||||
var headerMsgSearchFlag = '${headerMsgSearchVO.headerMsgSearchFlag}';
|
var headerMsgSearchFlag = '${headerMsgSearchVO.headerMsgSearchFlag}';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user