2024-03-22 17:44 마이페이지 페이지 로딩 개선을 위해 최근 발송내역 - 알림톡 ajax 처리
@c21c8ce1ca4611edec34c6f2f2bcae4ad6c5c72c
--- src/main/java/itn/let/uat/uia/web/EgovMypageController.java
+++ src/main/java/itn/let/uat/uia/web/EgovMypageController.java
... | ... | @@ -378,6 +378,8 @@ |
| 378 | 378 |
model.addAttribute("mjonMsgSentList", mjonMsgSentList);
|
| 379 | 379 |
} |
| 380 | 380 |
|
| 381 |
+ /* |
|
| 382 |
+ * 2024-03-22 페이지 로딩 속도 개선을 위해 ajax로 처리 |
|
| 381 | 383 |
{//최근 발송 알림톡 내용 불러오기 - 최근 3개 내역만
|
| 382 | 384 |
KakaoSentVO kakaoSentVO = new KakaoSentVO(); |
| 383 | 385 |
kakaoSentVO.setUserId(userId); |
... | ... | @@ -391,6 +393,7 @@ |
| 391 | 393 |
List<KakaoSentVO> kakaoATSentList = kakaoSentService.selectAllKakaoSentList(kakaoSentVO); |
| 392 | 394 |
model.addAttribute("kakaoATSentList", kakaoATSentList);
|
| 393 | 395 |
} |
| 396 |
+ */ |
|
| 394 | 397 |
|
| 395 | 398 |
{//최근 발송 팩스 내용 불러오기 - 최근 3개 내역만
|
| 396 | 399 |
FaxGroupDataVO faxGroupDataVO = new FaxGroupDataVO(); |
... | ... | @@ -518,6 +521,42 @@ |
| 518 | 521 |
return "/web/user/subcontent/mberInfo_send_reservAjax"; |
| 519 | 522 |
} |
| 520 | 523 |
|
| 524 |
+ /** |
|
| 525 |
+ * 마이페이지 - 최근발송내역-알림톡 |
|
| 526 |
+ * @param mjonMsgVO |
|
| 527 |
+ * @param model |
|
| 528 |
+ * @return "/web/member/pay/PayUserListAjax.do" |
|
| 529 |
+ * @throws Exception |
|
| 530 |
+ */ |
|
| 531 |
+ @RequestMapping(value="/web/user/subcontent/mberInfo_kakaoATSentListAjax.do") |
|
| 532 |
+ public String mberInfo_kakaoATSentListAjax( |
|
| 533 |
+ HttpServletRequest request, |
|
| 534 |
+ ModelMap model) throws Exception{
|
|
| 535 |
+ |
|
| 536 |
+ System.out.println("mberInfo_kakaoATSentListAjax");
|
|
| 537 |
+ |
|
| 538 |
+ LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser(); |
|
| 539 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 540 |
+ |
|
| 541 |
+ {//최근 발송 알림톡 내용 불러오기 - 최근 3개 내역만
|
|
| 542 |
+ KakaoSentVO kakaoSentVO = new KakaoSentVO(); |
|
| 543 |
+ kakaoSentVO.setUserId(userId); |
|
| 544 |
+ kakaoSentVO.setTabType("at");
|
|
| 545 |
+ kakaoSentVO.setRecordCountPerPage(3); |
|
| 546 |
+ kakaoSentVO.setFirstIndex(0); |
|
| 547 |
+ kakaoSentVO.setListType("groupList");
|
|
| 548 |
+ kakaoSentVO.setStateType("all");
|
|
| 549 |
+ kakaoSentVO.setSearchSortOrd("desc");
|
|
| 550 |
+ kakaoSentVO.setSearchSortCnd("regdate");
|
|
| 551 |
+ List<KakaoSentVO> kakaoATSentList = kakaoSentService.selectAllKakaoSentList(kakaoSentVO); |
|
| 552 |
+ model.addAttribute("kakaoATSentList", kakaoATSentList);
|
|
| 553 |
+ } |
|
| 554 |
+ |
|
| 555 |
+ System.out.println("mberInfo_kakaoATSentListAjax_end");
|
|
| 556 |
+ |
|
| 557 |
+ return "/web/user/subcontent/mberInfo_kakaoATSentListAjax"; |
|
| 558 |
+ } |
|
| 559 |
+ |
|
| 521 | 560 |
//발송문자 건수 계산하는 함수 |
| 522 | 561 |
public String[] getTotalSendCnt(List<MjonMsgSentVO> mjonMsgSentVO) {
|
| 523 | 562 |
|
--- src/main/resources/egovframework/sqlmap/let/mjo/kakao/KakaoSent_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/mjo/kakao/KakaoSent_SQL_Mysql.xml
... | ... | @@ -201,6 +201,7 @@ |
| 201 | 201 |
|
| 202 | 202 |
<!-- 전체 발송결과 조회 (그룹별)--> |
| 203 | 203 |
<select id="KakaoSentDAO.selectAllKakaoSentList" parameterClass="kakaoSentVO" resultClass="kakaoSentVO"> |
| 204 |
+ /* KakaoSentDAO.selectAllKakaoSentList */ |
|
| 204 | 205 |
SELECT |
| 205 | 206 |
M2.totMsgCnt , |
| 206 | 207 |
M2.userId , |
... | ... | @@ -478,6 +479,7 @@ |
| 478 | 479 |
|
| 479 | 480 |
<!-- 전체 발송결과 조회 (개인별)--> |
| 480 | 481 |
<select id="KakaoSentDAO.selectAllPrivateKakaoSentList" parameterClass="kakaoSentVO" resultClass="kakaoSentVO"> |
| 482 |
+ /* KakaoSentDAO.selectAllPrivateKakaoSentList */ |
|
| 481 | 483 |
SELECT |
| 482 | 484 |
M2.totMsgCnt |
| 483 | 485 |
, M2.userId |
--- src/main/webapp/WEB-INF/jsp/web/user/mberInfoIndex.jsp
+++ src/main/webapp/WEB-INF/jsp/web/user/mberInfoIndex.jsp
... | ... | @@ -45,6 +45,8 @@ |
| 45 | 45 |
subContent(); //이용내역 총금액 |
| 46 | 46 |
|
| 47 | 47 |
subContentSendReserv(); //발송,예약건수 |
| 48 |
+ |
|
| 49 |
+ subContentKakaoATSentList();//톡 발송 정보 |
|
| 48 | 50 |
}); |
| 49 | 51 |
|
| 50 | 52 |
//기간 요일 지정 |
... | ... | @@ -139,6 +141,43 @@ |
| 139 | 141 |
|
| 140 | 142 |
|
| 141 | 143 |
$("#send_reserv").load("/web/user/subcontent/mberInfo_send_reservAjax.do", sendData ,function(response, status, xhr){
|
| 144 |
+ }); |
|
| 145 |
+ |
|
| 146 |
+} |
|
| 147 |
+ |
|
| 148 |
+//마이페이지 - 세부내역 - 발송/예약건수 |
|
| 149 |
+function subContentKakaoATSentList(p_content_no){
|
|
| 150 |
+ |
|
| 151 |
+ var sendData = $(document.listForm).serializeArray(); |
|
| 152 |
+ var v_html_pre = '<table>' |
|
| 153 |
+ + '<caption>등록일자, 발신번호, 발신번호 명, 상태 정보를 제공하는 표</caption>' |
|
| 154 |
+ + '<colgroup>' |
|
| 155 |
+ + '<col style="width: 10%;">' |
|
| 156 |
+ + '<col style="width: 15%;">' |
|
| 157 |
+ + '<col style="width: auto;">' |
|
| 158 |
+ + '<col style="width: 10%;">' |
|
| 159 |
+ + '<col style="width: 10%;">' |
|
| 160 |
+ + '<col style="width: 15%;">' |
|
| 161 |
+ + '</colgroup>' |
|
| 162 |
+ + '<thead>' |
|
| 163 |
+ + '<tr>' |
|
| 164 |
+ + '<th scope="col">메시지 형태</th>' |
|
| 165 |
+ + '<th scope="col">발송일시</th>' |
|
| 166 |
+ + '<th scope="col">내용</th>' |
|
| 167 |
+ + '<th scope="col">발송건수</th>' |
|
| 168 |
+ + '<th scope="col">결과</th>' |
|
| 169 |
+ + '<th scope="col">대체문자 건수</th>' |
|
| 170 |
+ + '</tr>' |
|
| 171 |
+ + '</thead>' |
|
| 172 |
+ + '<tbody>' |
|
| 173 |
+ + '<tr><td colspan="6">LOADING...</td></tr>' |
|
| 174 |
+ + '</tbody>' |
|
| 175 |
+ + '</table>'; |
|
| 176 |
+ |
|
| 177 |
+ //$("#prePaymentYn_Y").html('<div class="list_info"><table class="tType4"><tbody><tr><td colspan="12">LOADING...</td></tr></tbody></table></div>');
|
|
| 178 |
+ $("#kakaoATSentList").html(v_html_pre);
|
|
| 179 |
+ |
|
| 180 |
+ $("#kakaoATSentList").load("/web/user/subcontent/mberInfo_kakaoATSentListAjax.do", sendData ,function(response, status, xhr){
|
|
| 142 | 181 |
}); |
| 143 | 182 |
|
| 144 | 183 |
} |
... | ... | @@ -772,7 +811,7 @@ |
| 772 | 811 |
|
| 773 | 812 |
<div class="my_dashboard_cont3"> |
| 774 | 813 |
<p class="dashboard_title">최근 발송내역 - 알림톡</p> |
| 775 |
- <div class="table_wrap"> |
|
| 814 |
+ <div class="table_wrap" id="kakaoATSentList"> |
|
| 776 | 815 |
<table> |
| 777 | 816 |
<caption>등록일자, 발신번호, 발신번호 명, 상태 정보를 제공하는 표</caption> |
| 778 | 817 |
<colgroup> |
+++ src/main/webapp/WEB-INF/jsp/web/user/subcontent/mberInfo_kakaoATSentListAjax.jsp
... | ... | @@ -0,0 +1,118 @@ |
| 1 | +<%-- | |
| 2 | + Class Name : mberInfo_kakaoATSentListAjax.jsp | |
| 3 | + Description : 마이페이지 - 최근발송내역-알림톡 | |
| 4 | + Modification Information | |
| 5 | + | |
| 6 | + 수정일 수정자 수정내용 | |
| 7 | + ------- -------- --------------------------- | |
| 8 | + 2021.03.31 신명섭 최초 생성 | |
| 9 | + | |
| 10 | + Copyright (C) 2009 by ITN All right reserved. | |
| 11 | +--%> | |
| 12 | +<%@ page contentType="text/html; charset=utf-8"%> | |
| 13 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
| 14 | +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> | |
| 15 | +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> | |
| 16 | +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> | |
| 17 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
| 18 | +<%@ taglib prefix="ec" uri="/WEB-INF/tld/ecnet_tld.tld"%> | |
| 19 | + | |
| 20 | +<script src="/publish/js/content.js"></script> | |
| 21 | +<script> | |
| 22 | +$(document).ready(function(){ | |
| 23 | + | |
| 24 | +}); | |
| 25 | + | |
| 26 | +</script> | |
| 27 | + <table> | |
| 28 | + <caption>등록일자, 발신번호, 발신번호 명, 상태 정보를 제공하는 표</caption> | |
| 29 | + <colgroup> | |
| 30 | + <col style="width: 10%;"> | |
| 31 | + <col style="width: 15%;"> | |
| 32 | + <col style="width: auto;"> | |
| 33 | + <col style="width: 10%;"> | |
| 34 | + <col style="width: 10%;"> | |
| 35 | + <col style="width: 15%;"> | |
| 36 | + </colgroup> | |
| 37 | + <thead> | |
| 38 | + <tr> | |
| 39 | + <th scope="col">메시지 형태</th> | |
| 40 | + <th scope="col">발송일시</th> | |
| 41 | + <th scope="col">내용</th> | |
| 42 | + <th scope="col">발송건수</th> | |
| 43 | + <th scope="col">결과</th> | |
| 44 | + <th scope="col">대체문자 건수</th> | |
| 45 | + </tr> | |
| 46 | + </thead> | |
| 47 | + <tbody> | |
| 48 | + <c:choose> | |
| 49 | + <c:when test="${not empty kakaoATSentList}"> | |
| 50 | + <c:forEach var="resultSentMsg" items="${kakaoATSentList}" varStatus="status"> | |
| 51 | + <tr> | |
| 52 | + <td> | |
| 53 | + 알림톡 | |
| 54 | + </td> | |
| 55 | + <td> | |
| 56 | + <c:choose> | |
| 57 | + <c:when test="${not empty resultSentMsg.regdate}"> | |
| 58 | + <fmt:formatDate value="${resultSentMsg.regdate}" pattern="yyyy-MM-dd HH:mm:ss"/> | |
| 59 | + </c:when> | |
| 60 | + <c:otherwise> | |
| 61 | + - | |
| 62 | + </c:otherwise> | |
| 63 | + </c:choose> | |
| 64 | + </td> | |
| 65 | + <td> | |
| 66 | + <button class="btnType btnType20" onClick="javascript:fnRevDetailPop02('${resultSentMsg.msgGroupId}'); return false;">상세보기</button> | |
| 67 | + </td> | |
| 68 | + <td class="font_ellipsis"> | |
| 69 | + <p> | |
| 70 | + <fmt:formatNumber value="${resultSentMsg.msgGroupCnt}" type="number" /> | |
| 71 | + </p> | |
| 72 | + </td> | |
| 73 | + <td class="font_ellipsis"> | |
| 74 | + <p class= "c_002c9a fwMd"> | |
| 75 | + <c:choose> | |
| 76 | + <c:when test="${resultSentMsg.msgResult == 'S'}"> | |
| 77 | + 정상수신 | |
| 78 | + </c:when> | |
| 79 | + <c:when test="${resultSentMsg.msgResult == 'W'}"> | |
| 80 | + 발송대기 | |
| 81 | + </c:when> | |
| 82 | + <c:when test="${resultSentMsg.msgResult == 'F'}"> | |
| 83 | + 수신오류 | |
| 84 | + </c:when> | |
| 85 | + <c:otherwise> | |
| 86 | + - | |
| 87 | + </c:otherwise> | |
| 88 | + </c:choose> | |
| 89 | + </p> | |
| 90 | + </td> | |
| 91 | + <td> | |
| 92 | + <c:choose> | |
| 93 | + <c:when test="${resultSentMsg.bizKakaoResendYn == 'Y'}"> | |
| 94 | + <c:choose> | |
| 95 | + <c:when test="${resultSentMsg.kakaoResendSuccCount ne '0'}"> | |
| 96 | + <c:out value="${resultSentMsg.kakaoResendSuccCount}"/> | |
| 97 | + </c:when> | |
| 98 | + <c:otherwise> | |
| 99 | + 0 | |
| 100 | + </c:otherwise> | |
| 101 | + </c:choose> | |
| 102 | + </c:when> | |
| 103 | + <c:otherwise> | |
| 104 | + 0 | |
| 105 | + </c:otherwise> | |
| 106 | + </c:choose> | |
| 107 | + </td> | |
| 108 | + </tr> | |
| 109 | + </c:forEach> | |
| 110 | + </c:when> | |
| 111 | + <c:otherwise> | |
| 112 | + <tr> | |
| 113 | + <td colspan="6">발송 내역이 없습니다.</td> | |
| 114 | + </tr> | |
| 115 | + </c:otherwise> | |
| 116 | + </c:choose> | |
| 117 | + </tbody> | |
| 118 | + </table>(No newline at end of file) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?