문자전송순위 성능개선
@d490a7160ef42eae6066a372906aae220ad354ee
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
... | ... | @@ -2687,91 +2687,66 @@ |
| 2687 | 2687 |
</select> |
| 2688 | 2688 |
|
| 2689 | 2689 |
<select id="mjonMsgDAO.selectRankNumberList_230125" parameterClass="mjPhoneMemberVO" resultClass="mjPhoneMemberVO"> |
| 2690 |
- SELECT |
|
| 2691 |
- COUNT(A.USER_ID) OVER() AS totCnt, |
|
| 2692 |
- A.USER_ID AS userId, |
|
| 2693 |
- A.CNT AS msgGroupCnt, |
|
| 2694 |
- RANK() OVER (ORDER BY CNT DESC) AS rank, |
|
| 2695 |
- |
|
| 2696 |
- DATE_FORMAT(D.SBSCRB_DE, '%Y-%m-%d %H:%i' ) AS sbscrbDe, |
|
| 2697 |
- F.totPrice, |
|
| 2698 |
- E.USER_MONEY AS userMoney |
|
| 2699 |
- , DATE_FORMAT(a.frstRegistPnttm, '%H:%i:%s') AS frstRegistPnttm |
|
| 2700 |
- |
|
| 2701 |
- FROM |
|
| 2690 |
+ SELECT |
|
| 2691 |
+ M.totCnt, |
|
| 2692 |
+ M.userId, |
|
| 2693 |
+ M.msgGroupCnt, |
|
| 2694 |
+ M.rank, |
|
| 2695 |
+ M.sbscrbDe, |
|
| 2696 |
+ M.userMoney, |
|
| 2697 |
+ M.frstRegistPnttm, |
|
| 2702 | 2698 |
( |
| 2703 |
- SELECT AA.MBER_ID AS user_id, |
|
| 2704 |
- sum(cnt) CNT |
|
| 2705 |
- , max(regist_pnttm) as frstRegistPnttm |
|
| 2706 |
- FROM mj_sttst_msg_rank AA |
|
| 2707 |
- WHERE 1=1 |
|
| 2708 |
- <isNotEmpty property="msgType"> |
|
| 2709 |
- AND MSG_TYPE = #msgType# |
|
| 2710 |
- </isNotEmpty> |
|
| 2711 |
- <isNotEmpty property="agentCode"> |
|
| 2712 |
- AND AGENT_CODE = #agentCode# |
|
| 2713 |
- </isNotEmpty> |
|
| 2714 |
- GROUP BY AA.MBER_ID |
|
| 2715 |
- ) A |
|
| 2716 |
- /* |
|
| 2717 |
- LEFT JOIN ( |
|
| 2718 |
- SELECT CODE_NM , CODE , CODE_DC |
|
| 2719 |
- FROM LETTCCMMNDETAILCODE |
|
| 2720 |
- WHERE USE_AT = 'Y' |
|
| 2721 |
- AND CODE_ID = 'ITN022' |
|
| 2722 |
- ) B ON A.MSG_TYPE = B.CODE LEFT JOIN ( |
|
| 2723 |
- SELECT CODE_NM , CODE , CODE_DC |
|
| 2724 |
- FROM LETTCCMMNDETAILCODE |
|
| 2725 |
- WHERE USE_AT = 'Y' |
|
| 2726 |
- AND CODE_ID = 'ITN019' |
|
| 2727 |
- ) C ON A.AGENT_CODE = C.CODE |
|
| 2728 |
- */ |
|
| 2729 |
- LEFT JOIN COMVNUSERMASTER D ON A.USER_ID = D.USER_ID |
|
| 2730 |
- LEFT JOIN LETTNGNRLMBER E ON A.USER_ID = E.MBER_ID |
|
| 2731 |
- |
|
| 2732 |
- LEFT OUTER JOIN ( |
|
| 2733 |
- |
|
| 2734 |
- select USER_ID |
|
| 2735 |
- , sum(totcnt) totPrice |
|
| 2736 |
- |
|
| 2737 |
- from ( |
|
| 2738 |
- SELECT A.USER_ID, |
|
| 2739 |
- ifnull(totCnt, '0') AS totCnt, |
|
| 2740 |
- 'CASH' AS divFlag |
|
| 2741 |
- FROM ( |
|
| 2742 |
- SELECT USER_ID, |
|
| 2743 |
- ABS(SUM(CASH)) AS totCnt |
|
| 2744 |
- FROM MJ_CASH A |
|
| 2745 |
- WHERE 1=1 |
|
| 2746 |
- AND A.DEL_FLAG = 'N' |
|
| 2747 |
- AND MSG_GROUP_ID IS NOT NULL |
|
| 2748 |
- AND 0 > A.CASH |
|
| 2749 |
- GROUP BY USER_ID |
|
| 2750 |
- ) |
|
| 2751 |
- A |
|
| 2752 |
- |
|
| 2753 |
- )aa |
|
| 2754 |
- group by aa.USER_ID |
|
| 2755 |
- |
|
| 2756 |
- )F |
|
| 2757 |
- |
|
| 2758 |
- ON A.USER_ID = F.USER_ID |
|
| 2759 |
- |
|
| 2760 |
- WHERE 1=1 |
|
| 2761 |
- <isNotEmpty property="ntceBgnde"> |
|
| 2762 |
- AND <![CDATA[ DATE_FORMAT(E.SBSCRB_DE, '%Y-%m-%d') >= #ntceBgnde# ]]> |
|
| 2763 |
- </isNotEmpty> |
|
| 2764 |
- <isNotEmpty property="ntceEndde"> |
|
| 2765 |
- AND <![CDATA[ DATE_FORMAT(E.SBSCRB_DE, '%Y-%m-%d') <= #ntceEndde# ]]> |
|
| 2766 |
- </isNotEmpty> |
|
| 2767 |
- ORDER BY 1=1 |
|
| 2768 |
- <isNotEmpty property="searchSortCnd"> |
|
| 2769 |
- ,$searchSortCnd$ |
|
| 2770 |
- </isNotEmpty> |
|
| 2771 |
- <isNotEmpty property="searchSortOrd"> |
|
| 2772 |
- $searchSortOrd$ |
|
| 2773 |
- </isNotEmpty> |
|
| 2774 |
- LIMIT #recordCountPerPage# OFFSET #firstIndex# |
|
| 2699 |
+ SELECT ABS(SUM(CASH)) |
|
| 2700 |
+ FROM MJ_CASH C |
|
| 2701 |
+ WHERE 1=1 |
|
| 2702 |
+ AND M.userId = C.USER_ID |
|
| 2703 |
+ AND C.DEL_FLAG = 'N' |
|
| 2704 |
+ AND MSG_GROUP_ID IS NOT NULL |
|
| 2705 |
+ AND 0 > C.CASH |
|
| 2706 |
+ GROUP BY C.USER_ID |
|
| 2707 |
+ ) totPrice |
|
| 2708 |
+ FROM ( |
|
| 2709 |
+ SELECT |
|
| 2710 |
+ COUNT(A.USER_ID) OVER() AS totCnt, |
|
| 2711 |
+ A.USER_ID AS userId, |
|
| 2712 |
+ A.CNT AS msgGroupCnt, |
|
| 2713 |
+ RANK() OVER (ORDER BY CNT DESC) AS rank, |
|
| 2714 |
+ DATE_FORMAT(D.SBSCRB_DE, '%Y-%m-%d %H:%i' ) AS sbscrbDe, |
|
| 2715 |
+ E.USER_MONEY AS userMoney |
|
| 2716 |
+ , DATE_FORMAT(a.frstRegistPnttm, '%H:%i:%s') AS frstRegistPnttm |
|
| 2717 |
+ FROM |
|
| 2718 |
+ ( |
|
| 2719 |
+ SELECT AA.MBER_ID AS user_id, |
|
| 2720 |
+ sum(cnt) CNT |
|
| 2721 |
+ , max(regist_pnttm) as frstRegistPnttm |
|
| 2722 |
+ FROM mj_sttst_msg_rank AA |
|
| 2723 |
+ WHERE 1=1 |
|
| 2724 |
+ <isNotEmpty property="msgType"> |
|
| 2725 |
+ AND MSG_TYPE = #msgType# |
|
| 2726 |
+ </isNotEmpty> |
|
| 2727 |
+ <isNotEmpty property="agentCode"> |
|
| 2728 |
+ AND AGENT_CODE = #agentCode# |
|
| 2729 |
+ </isNotEmpty> |
|
| 2730 |
+ GROUP BY AA.MBER_ID |
|
| 2731 |
+ ) A |
|
| 2732 |
+ LEFT JOIN COMVNUSERMASTER D ON A.USER_ID = D.USER_ID |
|
| 2733 |
+ LEFT JOIN LETTNGNRLMBER E ON A.USER_ID = E.MBER_ID |
|
| 2734 |
+ WHERE 1=1 |
|
| 2735 |
+ <isNotEmpty property="ntceBgnde"> |
|
| 2736 |
+ AND <![CDATA[ DATE_FORMAT(E.SBSCRB_DE, '%Y-%m-%d') >= #ntceBgnde# ]]> |
|
| 2737 |
+ </isNotEmpty> |
|
| 2738 |
+ <isNotEmpty property="ntceEndde"> |
|
| 2739 |
+ AND <![CDATA[ DATE_FORMAT(E.SBSCRB_DE, '%Y-%m-%d') <= #ntceEndde# ]]> |
|
| 2740 |
+ </isNotEmpty> |
|
| 2741 |
+ ORDER BY 1=1 |
|
| 2742 |
+ <isNotEmpty property="searchSortCnd"> |
|
| 2743 |
+ ,$searchSortCnd$ |
|
| 2744 |
+ </isNotEmpty> |
|
| 2745 |
+ <isNotEmpty property="searchSortOrd"> |
|
| 2746 |
+ $searchSortOrd$ |
|
| 2747 |
+ </isNotEmpty> |
|
| 2748 |
+ LIMIT #recordCountPerPage# OFFSET #firstIndex# |
|
| 2749 |
+ ) M |
|
| 2775 | 2750 |
</select> |
| 2776 | 2751 |
|
| 2777 | 2752 |
<!-- today 전송사별 전송건수 --> |
--- src/main/webapp/WEB-INF/jsp/uss/ion/msg/RankNumberList_230125.jsp
+++ src/main/webapp/WEB-INF/jsp/uss/ion/msg/RankNumberList_230125.jsp
... | ... | @@ -114,6 +114,13 @@ |
| 114 | 114 |
|
| 115 | 115 |
} |
| 116 | 116 |
|
| 117 |
+function fnSelectMber(mberId) {
|
|
| 118 |
+ document.modiForm2.mberId.value = mberId; |
|
| 119 |
+ window.open("about:blank", 'popupSelectMber', 'width=900, height=1800, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbar=no');
|
|
| 120 |
+ document.modiForm2.action = "<c:url value='/uss/umt/user/EgovGnrlselectedUserView.do'/>"; |
|
| 121 |
+ document.modiForm2.target = "popupSelectMber"; |
|
| 122 |
+ document.modiForm2.submit(); |
|
| 123 |
+} |
|
| 117 | 124 |
</script> |
| 118 | 125 |
<style> |
| 119 | 126 |
.calBtn {
|
... | ... | @@ -203,25 +210,23 @@ |
| 203 | 210 |
<div class="tableWrap"> |
| 204 | 211 |
<table class="tbType1"> |
| 205 | 212 |
<colgroup> |
| 206 |
- <col style="width: 5%"> |
|
| 207 |
- <col style="width: 5%"> |
|
| 213 |
+ <col style="width: 7%"> |
|
| 214 |
+ <col style="width: *%"> |
|
| 208 | 215 |
<col style="width: 15%"> |
| 209 | 216 |
<col style="width: 15%"> |
| 210 |
- <col style="width: 15%"> |
|
| 211 |
- <col style="width: 5%"> |
|
| 212 | 217 |
<col style="width: 10%"> |
| 218 |
+ <col style="width: 15%"> |
|
| 213 | 219 |
<col style="width: 15%"> |
| 214 | 220 |
<col style="width: 10%"> |
| 215 | 221 |
</colgroup> |
| 216 | 222 |
<thead> |
| 217 | 223 |
<tr> |
| 218 |
- <th>번호<input type="button" class="sort sortBtn" id="sort_rank"></th> |
|
| 219 |
- <th>순위</th> |
|
| 224 |
+ <th>순위<input type="button" class="sort sortBtn" id="sort_rank"></th> |
|
| 220 | 225 |
<th>아이디(사용자)<input type="button" class="sort sortBtn" id="sort_userId"></th> |
| 221 | 226 |
<th>가입일시<input type="button" class="sort sortBtn" id="sort_sbscrbDe"></th> |
| 222 |
- <th>보유잔액<input type="button" class="sort sortBtn" id="sort_sbscrbDe"></th> |
|
| 227 |
+ <th>보유잔액<input type="button" class="sort sortBtn" id="sort_userMoney"></th> |
|
| 223 | 228 |
<th>발송건수<input type="button" class="sort sortBtn" id="sort_msgGroupCnt"></th> |
| 224 |
- <th>발송금액<input type="button" class="sort sortBtn" id="sort_totPrice"></th> |
|
| 229 |
+ <th>발송금액</th> |
|
| 225 | 230 |
<th>메세지타입</th> |
| 226 | 231 |
<th>전송사</th> |
| 227 | 232 |
</tr> |
... | ... | @@ -229,27 +234,25 @@ |
| 229 | 234 |
<tbody> |
| 230 | 235 |
<c:forEach var="result" items="${resultList}" varStatus="status">
|
| 231 | 236 |
<tr> |
| 232 |
- <td> |
|
| 233 |
- <c:if test="${searchVO.searchSortOrd eq 'desc' }">
|
|
| 234 |
- <c:out value="${ ( paginationInfo.totalRecordCount - ((paginationInfo.currentPageNo -1)*paginationInfo.recordCountPerPage) ) - status.index }"/>
|
|
| 235 |
- </c:if> |
|
| 236 |
- <c:if test="${searchVO.searchSortOrd eq 'asc' }">
|
|
| 237 |
- <c:out value="${(paginationInfo.currentPageNo - 1) * paginationInfo.recordCountPerPage + status.count}"/>
|
|
| 238 |
- </c:if> |
|
| 239 |
- </td> |
|
| 240 | 237 |
<td><c:out value="${result.rank}"/></td>
|
| 241 | 238 |
<td> |
| 242 |
- <a href="#" onclick="fn_send_member_list('${result.userId}'); return false;">
|
|
| 239 |
+ <a href="#" onclick="javascript:fnSelectMber('<c:out value="${result.userId}"/>'); return false;">
|
|
| 243 | 240 |
<c:out value="${result.userId}"/>
|
| 244 | 241 |
</a> |
| 245 | 242 |
</td> |
| 246 |
- <td><c:out value="${result.sbscrbDe}"/></td>
|
|
| 243 |
+ <td> |
|
| 244 |
+ <a href="#" onclick="fn_send_member_list('${result.userId}'); return false;"><c:out value="${result.sbscrbDe}"/></a>
|
|
| 245 |
+ </td> |
|
| 246 |
+ <td> |
|
| 247 |
+ <a href="#" onclick="fn_send_member_list('${result.userId}'); return false;">${result.userMoney}</a>
|
|
| 248 |
+ </td> |
|
| 247 | 249 |
|
| 248 |
- <td>${result.userMoney}</td>
|
|
| 249 |
- |
|
| 250 |
- <td><c:out value="${result.msgGroupCnt}"/></td>
|
|
| 251 |
- <td><c:out value="${result.totPrice}"/></td>
|
|
| 252 |
- |
|
| 250 |
+ <td> |
|
| 251 |
+ <a href="#" onclick="fn_send_member_list('${result.userId}'); return false;"><c:out value="${result.msgGroupCnt}"/></a>
|
|
| 252 |
+ </td> |
|
| 253 |
+ <td> |
|
| 254 |
+ <a href="#" onclick="fn_send_member_list('${result.userId}'); return false;"><c:out value="${result.totPrice}"/></a>
|
|
| 255 |
+ </td> |
|
| 253 | 256 |
<td> |
| 254 | 257 |
<c:if test="${empty searchVO.msgType}">
|
| 255 | 258 |
메시지타입(전체) |
... | ... | @@ -291,5 +294,10 @@ |
| 291 | 294 |
<form name="modiForm" method="get" action="<c:url value='/uss/ion/msg/SendMsgList.do'/>" > |
| 292 | 295 |
<input name="userId" type="hidden" /> |
| 293 | 296 |
</form> |
| 297 |
+ |
|
| 298 |
+<form name="modiForm2" id="modiForm2" method="post"> |
|
| 299 |
+ <input name="mberId" type="hidden" /> |
|
| 300 |
+</form> |
|
| 301 |
+ |
|
| 294 | 302 |
</body> |
| 295 | 303 |
</html> |
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?