문자전송순위 성능개선
This commit is contained in:
parent
0227226679
commit
d490a7160e
@ -2687,17 +2687,33 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="mjonMsgDAO.selectRankNumberList_230125" parameterClass="mjPhoneMemberVO" resultClass="mjPhoneMemberVO">
|
<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
|
SELECT
|
||||||
COUNT(A.USER_ID) OVER() AS totCnt,
|
COUNT(A.USER_ID) OVER() AS totCnt,
|
||||||
A.USER_ID AS userId,
|
A.USER_ID AS userId,
|
||||||
A.CNT AS msgGroupCnt,
|
A.CNT AS msgGroupCnt,
|
||||||
RANK() OVER (ORDER BY CNT DESC) AS rank,
|
RANK() OVER (ORDER BY CNT DESC) AS rank,
|
||||||
|
|
||||||
DATE_FORMAT(D.SBSCRB_DE, '%Y-%m-%d %H:%i' ) AS sbscrbDe,
|
DATE_FORMAT(D.SBSCRB_DE, '%Y-%m-%d %H:%i' ) AS sbscrbDe,
|
||||||
F.totPrice,
|
|
||||||
E.USER_MONEY AS userMoney
|
E.USER_MONEY AS userMoney
|
||||||
, DATE_FORMAT(a.frstRegistPnttm, '%H:%i:%s') AS frstRegistPnttm
|
, DATE_FORMAT(a.frstRegistPnttm, '%H:%i:%s') AS frstRegistPnttm
|
||||||
|
|
||||||
FROM
|
FROM
|
||||||
(
|
(
|
||||||
SELECT AA.MBER_ID AS user_id,
|
SELECT AA.MBER_ID AS user_id,
|
||||||
@ -2713,50 +2729,8 @@
|
|||||||
</isNotEmpty>
|
</isNotEmpty>
|
||||||
GROUP BY AA.MBER_ID
|
GROUP BY AA.MBER_ID
|
||||||
) A
|
) 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 COMVNUSERMASTER D ON A.USER_ID = D.USER_ID
|
||||||
LEFT JOIN LETTNGNRLMBER E ON A.USER_ID = E.MBER_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
|
WHERE 1=1
|
||||||
<isNotEmpty property="ntceBgnde">
|
<isNotEmpty property="ntceBgnde">
|
||||||
AND <![CDATA[ DATE_FORMAT(E.SBSCRB_DE, '%Y-%m-%d') >= #ntceBgnde# ]]>
|
AND <![CDATA[ DATE_FORMAT(E.SBSCRB_DE, '%Y-%m-%d') >= #ntceBgnde# ]]>
|
||||||
@ -2772,6 +2746,7 @@
|
|||||||
$searchSortOrd$
|
$searchSortOrd$
|
||||||
</isNotEmpty>
|
</isNotEmpty>
|
||||||
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
||||||
|
) M
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- today 전송사별 전송건수 -->
|
<!-- 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>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.calBtn {
|
.calBtn {
|
||||||
@ -203,25 +210,23 @@ function fnSetCalMonth(val) {
|
|||||||
<div class="tableWrap">
|
<div class="tableWrap">
|
||||||
<table class="tbType1">
|
<table class="tbType1">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 5%">
|
<col style="width: 7%">
|
||||||
<col style="width: 5%">
|
<col style="width: *%">
|
||||||
<col style="width: 15%">
|
<col style="width: 15%">
|
||||||
<col style="width: 15%">
|
<col style="width: 15%">
|
||||||
<col style="width: 15%">
|
|
||||||
<col style="width: 5%">
|
|
||||||
<col style="width: 10%">
|
<col style="width: 10%">
|
||||||
<col style="width: 15%">
|
<col style="width: 15%">
|
||||||
|
<col style="width: 15%">
|
||||||
<col style="width: 10%">
|
<col style="width: 10%">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>번호<input type="button" class="sort sortBtn" id="sort_rank"></th>
|
<th>순위<input type="button" class="sort sortBtn" id="sort_rank"></th>
|
||||||
<th>순위</th>
|
|
||||||
<th>아이디(사용자)<input type="button" class="sort sortBtn" id="sort_userId"></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_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_msgGroupCnt"></th>
|
||||||
<th>발송금액<input type="button" class="sort sortBtn" id="sort_totPrice"></th>
|
<th>발송금액</th>
|
||||||
<th>메세지타입</th>
|
<th>메세지타입</th>
|
||||||
<th>전송사</th>
|
<th>전송사</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -229,27 +234,25 @@ function fnSetCalMonth(val) {
|
|||||||
<tbody>
|
<tbody>
|
||||||
<c:forEach var="result" items="${resultList}" varStatus="status">
|
<c:forEach var="result" items="${resultList}" varStatus="status">
|
||||||
<tr>
|
<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><c:out value="${result.rank}"/></td>
|
||||||
<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}"/>
|
<c:out value="${result.userId}"/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td><c:out value="${result.sbscrbDe}"/></td>
|
<td>
|
||||||
|
<a href="#" onclick="fn_send_member_list('${result.userId}'); return false;"><c:out value="${result.sbscrbDe}"/></a>
|
||||||
<td>${result.userMoney}</td>
|
</td>
|
||||||
|
<td>
|
||||||
<td><c:out value="${result.msgGroupCnt}"/></td>
|
<a href="#" onclick="fn_send_member_list('${result.userId}'); return false;">${result.userMoney}</a>
|
||||||
<td><c:out value="${result.totPrice}"/></td>
|
</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>
|
<td>
|
||||||
<c:if test="${empty searchVO.msgType}">
|
<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'/>" >
|
<form name="modiForm" method="get" action="<c:url value='/uss/ion/msg/SendMsgList.do'/>" >
|
||||||
<input name="userId" type="hidden" />
|
<input name="userId" type="hidden" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<form name="modiForm2" id="modiForm2" method="post">
|
||||||
|
<input name="mberId" type="hidden" />
|
||||||
|
</form>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user