문자전송순위 성능개선
This commit is contained in:
parent
0227226679
commit
d490a7160e
@ -2687,17 +2687,33 @@
|
||||
</select>
|
||||
|
||||
<select id="mjonMsgDAO.selectRankNumberList_230125" parameterClass="mjPhoneMemberVO" resultClass="mjPhoneMemberVO">
|
||||
SELECT
|
||||
M.totCnt,
|
||||
M.userId,
|
||||
M.msgGroupCnt,
|
||||
M.rank,
|
||||
M.sbscrbDe,
|
||||
M.userMoney,
|
||||
M.frstRegistPnttm,
|
||||
(
|
||||
SELECT ABS(SUM(CASH))
|
||||
FROM MJ_CASH C
|
||||
WHERE 1=1
|
||||
AND M.userId = C.USER_ID
|
||||
AND C.DEL_FLAG = 'N'
|
||||
AND MSG_GROUP_ID IS NOT NULL
|
||||
AND 0 > C.CASH
|
||||
GROUP BY C.USER_ID
|
||||
) totPrice
|
||||
FROM (
|
||||
SELECT
|
||||
COUNT(A.USER_ID) OVER() AS totCnt,
|
||||
A.USER_ID AS userId,
|
||||
A.CNT AS msgGroupCnt,
|
||||
RANK() OVER (ORDER BY CNT DESC) AS rank,
|
||||
|
||||
DATE_FORMAT(D.SBSCRB_DE, '%Y-%m-%d %H:%i' ) AS sbscrbDe,
|
||||
F.totPrice,
|
||||
E.USER_MONEY AS userMoney
|
||||
, DATE_FORMAT(a.frstRegistPnttm, '%H:%i:%s') AS frstRegistPnttm
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT AA.MBER_ID AS user_id,
|
||||
@ -2713,50 +2729,8 @@
|
||||
</isNotEmpty>
|
||||
GROUP BY AA.MBER_ID
|
||||
) A
|
||||
/*
|
||||
LEFT JOIN (
|
||||
SELECT CODE_NM , CODE , CODE_DC
|
||||
FROM LETTCCMMNDETAILCODE
|
||||
WHERE USE_AT = 'Y'
|
||||
AND CODE_ID = 'ITN022'
|
||||
) B ON A.MSG_TYPE = B.CODE LEFT JOIN (
|
||||
SELECT CODE_NM , CODE , CODE_DC
|
||||
FROM LETTCCMMNDETAILCODE
|
||||
WHERE USE_AT = 'Y'
|
||||
AND CODE_ID = 'ITN019'
|
||||
) C ON A.AGENT_CODE = C.CODE
|
||||
*/
|
||||
LEFT JOIN COMVNUSERMASTER D ON A.USER_ID = D.USER_ID
|
||||
LEFT JOIN LETTNGNRLMBER E ON A.USER_ID = E.MBER_ID
|
||||
|
||||
LEFT OUTER JOIN (
|
||||
|
||||
select USER_ID
|
||||
, sum(totcnt) totPrice
|
||||
|
||||
from (
|
||||
SELECT A.USER_ID,
|
||||
ifnull(totCnt, '0') AS totCnt,
|
||||
'CASH' AS divFlag
|
||||
FROM (
|
||||
SELECT USER_ID,
|
||||
ABS(SUM(CASH)) AS totCnt
|
||||
FROM MJ_CASH A
|
||||
WHERE 1=1
|
||||
AND A.DEL_FLAG = 'N'
|
||||
AND MSG_GROUP_ID IS NOT NULL
|
||||
AND 0 > A.CASH
|
||||
GROUP BY USER_ID
|
||||
)
|
||||
A
|
||||
|
||||
)aa
|
||||
group by aa.USER_ID
|
||||
|
||||
)F
|
||||
|
||||
ON A.USER_ID = F.USER_ID
|
||||
|
||||
WHERE 1=1
|
||||
<isNotEmpty property="ntceBgnde">
|
||||
AND <![CDATA[ DATE_FORMAT(E.SBSCRB_DE, '%Y-%m-%d') >= #ntceBgnde# ]]>
|
||||
@ -2772,6 +2746,7 @@
|
||||
$searchSortOrd$
|
||||
</isNotEmpty>
|
||||
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
||||
) M
|
||||
</select>
|
||||
|
||||
<!-- today 전송사별 전송건수 -->
|
||||
|
||||
@ -114,6 +114,13 @@ function fnSetCalMonth(val) {
|
||||
|
||||
}
|
||||
|
||||
function fnSelectMber(mberId) {
|
||||
document.modiForm2.mberId.value = mberId;
|
||||
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');
|
||||
document.modiForm2.action = "<c:url value='/uss/umt/user/EgovGnrlselectedUserView.do'/>";
|
||||
document.modiForm2.target = "popupSelectMber";
|
||||
document.modiForm2.submit();
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.calBtn {
|
||||
@ -203,25 +210,23 @@ function fnSetCalMonth(val) {
|
||||
<div class="tableWrap">
|
||||
<table class="tbType1">
|
||||
<colgroup>
|
||||
<col style="width: 5%">
|
||||
<col style="width: 5%">
|
||||
<col style="width: 7%">
|
||||
<col style="width: *%">
|
||||
<col style="width: 15%">
|
||||
<col style="width: 15%">
|
||||
<col style="width: 15%">
|
||||
<col style="width: 5%">
|
||||
<col style="width: 10%">
|
||||
<col style="width: 15%">
|
||||
<col style="width: 15%">
|
||||
<col style="width: 10%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호<input type="button" class="sort sortBtn" id="sort_rank"></th>
|
||||
<th>순위</th>
|
||||
<th>순위<input type="button" class="sort sortBtn" id="sort_rank"></th>
|
||||
<th>아이디(사용자)<input type="button" class="sort sortBtn" id="sort_userId"></th>
|
||||
<th>가입일시<input type="button" class="sort sortBtn" id="sort_sbscrbDe"></th>
|
||||
<th>보유잔액<input type="button" class="sort sortBtn" id="sort_sbscrbDe"></th>
|
||||
<th>보유잔액<input type="button" class="sort sortBtn" id="sort_userMoney"></th>
|
||||
<th>발송건수<input type="button" class="sort sortBtn" id="sort_msgGroupCnt"></th>
|
||||
<th>발송금액<input type="button" class="sort sortBtn" id="sort_totPrice"></th>
|
||||
<th>발송금액</th>
|
||||
<th>메세지타입</th>
|
||||
<th>전송사</th>
|
||||
</tr>
|
||||
@ -229,27 +234,25 @@ function fnSetCalMonth(val) {
|
||||
<tbody>
|
||||
<c:forEach var="result" items="${resultList}" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<c:if test="${searchVO.searchSortOrd eq 'desc' }">
|
||||
<c:out value="${ ( paginationInfo.totalRecordCount - ((paginationInfo.currentPageNo -1)*paginationInfo.recordCountPerPage) ) - status.index }"/>
|
||||
</c:if>
|
||||
<c:if test="${searchVO.searchSortOrd eq 'asc' }">
|
||||
<c:out value="${(paginationInfo.currentPageNo - 1) * paginationInfo.recordCountPerPage + status.count}"/>
|
||||
</c:if>
|
||||
</td>
|
||||
<td><c:out value="${result.rank}"/></td>
|
||||
<td>
|
||||
<a href="#" onclick="fn_send_member_list('${result.userId}'); return false;">
|
||||
<a href="#" onclick="javascript:fnSelectMber('<c:out value="${result.userId}"/>'); return false;">
|
||||
<c:out value="${result.userId}"/>
|
||||
</a>
|
||||
</td>
|
||||
<td><c:out value="${result.sbscrbDe}"/></td>
|
||||
|
||||
<td>${result.userMoney}</td>
|
||||
|
||||
<td><c:out value="${result.msgGroupCnt}"/></td>
|
||||
<td><c:out value="${result.totPrice}"/></td>
|
||||
<td>
|
||||
<a href="#" onclick="fn_send_member_list('${result.userId}'); return false;"><c:out value="${result.sbscrbDe}"/></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" onclick="fn_send_member_list('${result.userId}'); return false;">${result.userMoney}</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="#" onclick="fn_send_member_list('${result.userId}'); return false;"><c:out value="${result.msgGroupCnt}"/></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" onclick="fn_send_member_list('${result.userId}'); return false;"><c:out value="${result.totPrice}"/></a>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${empty searchVO.msgType}">
|
||||
메시지타입(전체)
|
||||
@ -291,5 +294,10 @@ function fnSetCalMonth(val) {
|
||||
<form name="modiForm" method="get" action="<c:url value='/uss/ion/msg/SendMsgList.do'/>" >
|
||||
<input name="userId" type="hidden" />
|
||||
</form>
|
||||
|
||||
<form name="modiForm2" id="modiForm2" method="post">
|
||||
<input name="mberId" type="hidden" />
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user