재전송 및 문자전송 페이지 속도 개선
This commit is contained in:
parent
f228f2a247
commit
0730ff998d
@ -4205,6 +4205,8 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
mjonMsgVO.setMsgGroupId(mjonMsgSendVO.getMsgGroupId());
|
||||
mjonMsgVO.setMsgType(mjonMsgSendVO.getMsgType());
|
||||
|
||||
mjonMsgVO.setMmsSubject(mjonMsgSendVO.getSubject());
|
||||
|
||||
|
||||
//test - 스미싱의심 [발송승인, 발송취소] 조건
|
||||
// mjonMsgVO.setDelayYn("N");
|
||||
|
||||
@ -422,6 +422,7 @@ public class MjonMsgDataController {
|
||||
model.addAttribute("msgResendAllReplaceYn", searchVO.getMsgResendAllReplaceYn());
|
||||
|
||||
model.addAttribute("tabDision", "tab01");
|
||||
|
||||
}catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
|
||||
@ -440,7 +441,7 @@ public class MjonMsgDataController {
|
||||
*/
|
||||
@RequestMapping(value= {"/web/mjon/msgdata/selectMsgDataSMLViewAjax.do"})
|
||||
public String selectMsgDataSMLView(@ModelAttribute("searchVO") MjonMsgDataVO searchVO, CateCode cateCode, ModelMap model) throws Exception{
|
||||
|
||||
|
||||
//로그인 권한정보 불러오기
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
@ -638,7 +639,7 @@ public class MjonMsgDataController {
|
||||
model.addAttribute("resultPhonList", resultPhonList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//발신번호 차단 리스트 불러오기
|
||||
//List<String> resultBlockPhonList = mjonMsgDataService.selectBlockPhonNumList();
|
||||
//model.addAttribute("resultBlockPhonList", resultBlockPhonList);
|
||||
@ -646,7 +647,7 @@ public class MjonMsgDataController {
|
||||
// 문자 카테고리 리스트 불러오기
|
||||
List<CateCode> cateConfList = letterService.selectCateConfWithList(categoryType);
|
||||
model.addAttribute("cateCodeList", cateConfList);
|
||||
|
||||
|
||||
//그림 문자 리스트 불러오기
|
||||
LetterVO letterVO = new LetterVO();
|
||||
if(letterVO.getPageUnit() != 10) {
|
||||
@ -659,24 +660,25 @@ public class MjonMsgDataController {
|
||||
model.addAttribute("symbolList", symbolList);
|
||||
|
||||
//최근 전송 내역
|
||||
Calendar cal = Calendar.getInstance();
|
||||
Date now = new Date();
|
||||
// 20241230 이호영
|
||||
// 로딩 시간이 오래걸려 ajax로 따로 분리함
|
||||
// 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.add(Calendar.DATE, -3);
|
||||
// cal.setTime(now);
|
||||
// cal.add(Calendar.DATE, -3);
|
||||
|
||||
String chkDate = format.format(cal.getTime());
|
||||
|
||||
searchVO.setMyMsgStDt(chkDate); //검색 시작일 저장 - 현재날짜로 부터 3일 이전 날짜로 시작
|
||||
List<?> resultLatestMsgList = mjonMsgDataService.selectLatestMsgList(searchVO);
|
||||
model.addAttribute("resultLatestMsgList", resultLatestMsgList);
|
||||
|
||||
// String chkDate = format.format(cal.getTime());
|
||||
// searchVO.setMyMsgStDt(chkDate); //검색 시작일 저장 - 현재날짜로 부터 3일 이전 날짜로 시작
|
||||
// List<?> resultLatestMsgList = mjonMsgDataService.selectLatestMsgList(searchVO);
|
||||
// model.addAttribute("resultLatestMsgList", resultLatestMsgList);
|
||||
|
||||
//자주보내는 번호
|
||||
List<?> resultBookMarkMsgList = mjonMsgDataService.selectBookMarkMsgList(searchVO);
|
||||
model.addAttribute("resultBookMarkMsgList", resultBookMarkMsgList);
|
||||
|
||||
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
@ -695,9 +697,40 @@ public class MjonMsgDataController {
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
model.addAttribute("tabDision", searchVO.getTabDision());
|
||||
|
||||
|
||||
return "web/msgdata/MsgDataSMLView";
|
||||
}
|
||||
|
||||
@RequestMapping(value= {"/web/mjon/msgdata/resultLatestMsgListAjax.do"})
|
||||
public ResponseEntity<StatusResponse> cancelRegistIdChkAjax() 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 searchVO = new MjonMsgDataVO();
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
Date now = new Date();
|
||||
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
||||
|
||||
cal.setTime(now);
|
||||
cal.add(Calendar.DATE, -3);
|
||||
|
||||
String chkDate = format.format(cal.getTime());
|
||||
searchVO.setUserId(userId);
|
||||
searchVO.setMyMsgStDt(chkDate); //검색 시작일 저장 - 현재날짜로 부터 3일 이전 날짜로 시작
|
||||
List<?> resultLatestMsgList = mjonMsgDataService.selectLatestMsgList(searchVO);
|
||||
|
||||
return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "", resultLatestMsgList));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@ -6299,6 +6332,7 @@ public class MjonMsgDataController {
|
||||
mjonMsgDataVO.setUserId(userId);
|
||||
mjonMsgDataVO.setMsgGroupId(mjonMsgDataVO.getMsgResendAllGroupId());
|
||||
mjonMsgDataVO = mjonMsgDataService.selectMjMsgGroupInfoByResend(mjonMsgDataVO);
|
||||
System.out.println("test!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
if (mjonMsgDataVO != null) {
|
||||
String[] atchFiles = mjonMsgDataVO.getAtchFiles().split("\\^");
|
||||
if (atchFiles.length >= 1) {
|
||||
|
||||
@ -194,8 +194,66 @@ $(document).ready(function(){
|
||||
|
||||
updateButtons(currentIndex);
|
||||
|
||||
|
||||
|
||||
// 최근 전송내역
|
||||
resultLatestMsgList();
|
||||
|
||||
});
|
||||
|
||||
|
||||
//최근 전송내역
|
||||
function resultLatestMsgList(){
|
||||
|
||||
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:"/web/mjon/msgdata/resultLatestMsgListAjax.do",
|
||||
data:{},
|
||||
dataType:'json',
|
||||
// timeout:(1000*30),
|
||||
success:function(data){
|
||||
|
||||
console.log('resultLatestMsgList data : ', data);
|
||||
|
||||
// 가져온 데이터 배열
|
||||
let resultList = data.object;
|
||||
let $latestMsgUl = $('#latestMsgUl'); // 기존 리스트 UL
|
||||
console.log('let $latestMsgUl : ', $latestMsgUl);
|
||||
|
||||
// 기존 내용을 비우기
|
||||
$latestMsgUl.empty();
|
||||
|
||||
// 데이터가 있는 경우
|
||||
if (resultList && resultList.length > 0) {
|
||||
resultList.forEach(function(item, index) {
|
||||
console.log(item.callTo + " : " + item.callTo);
|
||||
let listItem =
|
||||
'<li id="latestLi">' +
|
||||
'<input type="checkbox" id="addrChk_' + (index + 1) + '" name="latAddrChk" value="' + item.callTo + '">' +
|
||||
'<label for="addrChk_' + (index + 1) + '" class="label">최근 전송내역</label>' +
|
||||
'<p>' + item.callTo + '</p>' +
|
||||
'<button type="button" id="latestAddrDel">' +
|
||||
'<img src="/publish/images/popup/close3.png" alt="전화번호 삭제">' +
|
||||
'</button>' +
|
||||
'</li>';
|
||||
|
||||
$latestMsgUl.append(listItem);
|
||||
});
|
||||
} else {
|
||||
// 데이터가 없는 경우
|
||||
$latestMsgUl.append('<li><p>최근 발송 내역이 없습니다.</p></li>');
|
||||
}
|
||||
// console.log('$latestMsgUl : ', $latestMsgUl.html());
|
||||
},
|
||||
error:function(request , status, error){
|
||||
console.log(' error ?');
|
||||
console.log('request : ', request);
|
||||
console.log('status : ', status);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* 버튼 disabled 스크립트
|
||||
*/
|
||||
@ -3479,7 +3537,7 @@ function getMjMsgSentListAll(pageNo) {
|
||||
<div class="history_cont hascont current">
|
||||
<div class="histroy_trans latestMsgArea" id="latestMsgArea">
|
||||
<ul id="latestMsgUl">
|
||||
<c:choose>
|
||||
<%-- <c:choose>
|
||||
<c:when test="${not empty resultLatestMsgList}">
|
||||
<c:forEach var="latestMsgList" items="${resultLatestMsgList}" varStatus="status">
|
||||
<li id="latestLi">
|
||||
@ -3495,7 +3553,7 @@ function getMjMsgSentListAll(pageNo) {
|
||||
<p>최근 발송 내역이 없습니다.</p>
|
||||
</li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:choose> --%>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="popup_btn_wrap2 hisroy_btn" style="width: 230px;">
|
||||
|
||||
@ -42,6 +42,7 @@ $(document).ready(function(){
|
||||
//최 하단 그림문자 탭 리스트 내용 불러오기
|
||||
fnPhotoListAjax(1);
|
||||
|
||||
|
||||
// 내보관함 리스트 로그인이 완료된 경우에만 로드되도록
|
||||
|
||||
//그림문자 샘플 탭 활성화 시키기
|
||||
|
||||
@ -8,6 +8,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
// 문자 그룹정보 => 재전송용
|
||||
function getMjMsgGroupInfoByResend() {
|
||||
$.ajax({
|
||||
@ -50,6 +53,8 @@ function getMjMsgGroupInfoByResend() {
|
||||
imgFilePath = [];
|
||||
imgFileId = [];
|
||||
|
||||
console.log('msgData : ', msgData);
|
||||
console.log('msgData : ', msgData);
|
||||
// 문자제목
|
||||
if (msgData.subject != null && msgData.subject != "") {
|
||||
$('.msg_title').addClass('active');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user