mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 19:55:05 +09:00
유치채널 현황
This commit is contained in:
@@ -97,17 +97,20 @@
|
|||||||
<form autocomplete="off">
|
<form autocomplete="off">
|
||||||
<table class="table-r">
|
<table class="table-r">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="16%" />
|
<col width="12%" />
|
||||||
<col width="16%" />
|
<col width="11%" />
|
||||||
<col width="16%" />
|
<col width="11%" />
|
||||||
<col width="16%" />
|
<col width="11%" />
|
||||||
<col width="16%" />
|
<col width="11%" />
|
||||||
<col width="20%" />
|
<col width="11%" />
|
||||||
|
<col width="11%" />
|
||||||
|
<col width="11%" />
|
||||||
|
<col width="11%" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">날짜</th>
|
<th rowspan="2">날짜</th>
|
||||||
<th colspan="5">채널별 발송 건수</th>
|
<th colspan="8">채널별 발송 건수</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="total">
|
<tr class="total">
|
||||||
<th>전체</th>
|
<th>전체</th>
|
||||||
@@ -115,6 +118,9 @@
|
|||||||
<th>LMS</th>
|
<th>LMS</th>
|
||||||
<th>MMS</th>
|
<th>MMS</th>
|
||||||
<th>알림톡</th>
|
<th>알림톡</th>
|
||||||
|
<th>대체발송SMS</th>
|
||||||
|
<th>대체발송LMS</th>
|
||||||
|
<th>대체발송MMS</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -125,6 +131,9 @@
|
|||||||
<td>{{ sndCntLTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ sndCntLTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ sndCntMTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ sndCntMTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ sndCntATotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ sndCntATotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
|
<td>{{ fbSndCntSTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
|
<td>{{ fbSndCntLTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
|
<td>{{ fbSndCntMTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||||
<td>{{ option.sumYm }}</td>
|
<td>{{ option.sumYm }}</td>
|
||||||
@@ -133,6 +142,9 @@
|
|||||||
<td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ option.sndCntA.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ option.sndCntA.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
|
<td>{{ option.fbSndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
|
<td>{{ option.fbSndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
|
<td>{{ option.fbSndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -200,6 +212,9 @@ export default {
|
|||||||
sndCntLTotal: 0,
|
sndCntLTotal: 0,
|
||||||
sndCntMTotal: 0,
|
sndCntMTotal: 0,
|
||||||
sndCntATotal: 0,
|
sndCntATotal: 0,
|
||||||
|
fbSndCntSTotal: 0,
|
||||||
|
fbSndCntLTotal: 0,
|
||||||
|
fbSndCntMTotal: 0,
|
||||||
list: [],
|
list: [],
|
||||||
totalCnt: '',
|
totalCnt: '',
|
||||||
props: {},
|
props: {},
|
||||||
@@ -244,21 +259,31 @@ export default {
|
|||||||
var sndCntLTotal = 0;
|
var sndCntLTotal = 0;
|
||||||
var sndCntMTotal = 0;
|
var sndCntMTotal = 0;
|
||||||
var sndCntATotal = 0;
|
var sndCntATotal = 0;
|
||||||
|
var fbSndCntSTotal = 0;
|
||||||
|
var fbSndCntLTotal = 0;
|
||||||
|
var fbSndCntMTotal = 0;
|
||||||
if (result != null && result.retCode == '0000') {
|
if (result != null && result.retCode == '0000') {
|
||||||
//데이터값이 널이면 오류처리
|
//데이터값이 널이면 오류처리
|
||||||
|
console.log(result.data.list);
|
||||||
for (var i = 0; i < result.data.list.length; i++) {
|
for (var i = 0; i < result.data.list.length; i++) {
|
||||||
sndCntTotal = sndCntTotal + Number(result.data.list[i].sndCnt);
|
sndCntTotal = sndCntTotal + Number(result.data.list[i].sndCnt);
|
||||||
sndCntSTotal = sndCntSTotal + Number(result.data.list[i].sndCntS);
|
sndCntSTotal = sndCntSTotal + Number(result.data.list[i].sndCntS);
|
||||||
sndCntLTotal = sndCntLTotal + Number(result.data.list[i].sndCntL);
|
sndCntLTotal = sndCntLTotal + Number(result.data.list[i].sndCntL);
|
||||||
sndCntMTotal = sndCntMTotal + Number(result.data.list[i].sndCntM);
|
sndCntMTotal = sndCntMTotal + Number(result.data.list[i].sndCntM);
|
||||||
sndCntATotal = sndCntATotal + Number(result.data.list[i].sndCntA);
|
sndCntATotal = sndCntATotal + Number(result.data.list[i].sndCntA);
|
||||||
|
fbSndCntSTotal = fbSndCntSTotal + Number(result.data.list[i].fbSndCntS);
|
||||||
|
fbSndCntLTotal = fbSndCntLTotal + Number(result.data.list[i].fbSndCntL);
|
||||||
|
fbSndCntMTotal = fbSndCntMTotal + Number(result.data.list[i].fbSndCntM);
|
||||||
}
|
}
|
||||||
this.sndCntTotal = sndCntTotal;
|
this.sndCntTotal = sndCntTotal;
|
||||||
this.sndCntSTotal = sndCntSTotal;
|
this.sndCntSTotal = sndCntSTotal;
|
||||||
this.sndCntLTotal = sndCntLTotal;
|
this.sndCntLTotal = sndCntLTotal;
|
||||||
this.sndCntMTotal = sndCntMTotal;
|
this.sndCntMTotal = sndCntMTotal;
|
||||||
this.sndCntATotal = sndCntATotal;
|
this.sndCntATotal = sndCntATotal;
|
||||||
|
this.fbSndCntSTotal = fbSndCntSTotal;
|
||||||
|
this.fbSndCntLTotal = fbSndCntLTotal;
|
||||||
|
this.fbSndCntMTotal = fbSndCntMTotal;
|
||||||
|
|
||||||
this.list = result.data.list;
|
this.list = result.data.list;
|
||||||
this.sndCntS = result.data.sndCntS;
|
this.sndCntS = result.data.sndCntS;
|
||||||
this.sndCntL = result.data.sndCntL;
|
this.sndCntL = result.data.sndCntL;
|
||||||
|
|||||||
@@ -31,5 +31,17 @@ public class ChannelDetail implements Serializable {
|
|||||||
private String sndCntA;
|
private String sndCntA;
|
||||||
@ApiModelProperty(example = "10", name = "알림톡 성공건수", dataType = "String")
|
@ApiModelProperty(example = "10", name = "알림톡 성공건수", dataType = "String")
|
||||||
private String succCntA;
|
private String succCntA;
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "대체발송SMS 발송건수", name = "대체발송SMS 발송건수", dataType = "String")
|
||||||
|
private String fbSndCntS;
|
||||||
|
@ApiModelProperty(example = "대체발송SMS 성공건수", name = "대체발송SMS 성공건수", dataType = "String")
|
||||||
|
private String fbSuccCntS;
|
||||||
|
@ApiModelProperty(example = "대체발송LMS 발송건수", name = "대체발송LMS 발송건수", dataType = "String")
|
||||||
|
private String fbSndCntL;
|
||||||
|
@ApiModelProperty(example = "대체발송LMS 성공건수", name = "대체발송LMS 성공건수", dataType = "String")
|
||||||
|
private String fbSuccCntL;
|
||||||
|
@ApiModelProperty(example = "대체발송MMS 발송건수", name = "대체발송MMS 발송건수", dataType = "String")
|
||||||
|
private String fbSndCntM;
|
||||||
|
@ApiModelProperty(example = "대체발송MMS 성공건수", name = "대체발송MMS 성공건수", dataType = "String")
|
||||||
|
private String fbSuccCntM;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,13 +41,13 @@
|
|||||||
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as
|
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as
|
||||||
CUST_TY_NM
|
CUST_TY_NM
|
||||||
, (
|
, (
|
||||||
SELECT
|
SELECT
|
||||||
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
|
sum(IFNULL(ecm.SND_CNT,0)) AS SND_CNT
|
||||||
FROM
|
FROM
|
||||||
hubez_common.EZ_CUST_MSTAT ecm
|
hubez_common.EZ_CUST_MSTAT ecm
|
||||||
WHERE
|
WHERE
|
||||||
ecm.USER_SEQ = A.USER_SEQ
|
ecm.USER_SEQ = A.USER_SEQ
|
||||||
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -24 MONTH) AND NOW()
|
||||||
) AS SND_CNT
|
) AS SND_CNT
|
||||||
FROM
|
FROM
|
||||||
(
|
(
|
||||||
@@ -95,13 +95,13 @@
|
|||||||
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as
|
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as
|
||||||
CUST_TY_NM
|
CUST_TY_NM
|
||||||
, (
|
, (
|
||||||
SELECT
|
SELECT
|
||||||
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
|
sum(IFNULL(ecm.SND_CNT,0)) AS SND_CNT
|
||||||
FROM
|
FROM
|
||||||
hubez_common.EZ_CUST_MSTAT ecm
|
hubez_common.EZ_CUST_MSTAT ecm
|
||||||
WHERE
|
WHERE
|
||||||
ecm.USER_SEQ = A.USER_SEQ
|
ecm.USER_SEQ = A.USER_SEQ
|
||||||
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -24 MONTH) AND NOW()
|
||||||
) AS SND_CNT
|
) AS SND_CNT
|
||||||
FROM
|
FROM
|
||||||
(
|
(
|
||||||
@@ -212,142 +212,105 @@
|
|||||||
AND esu.USER_SEQ = #{userSeq}
|
AND esu.USER_SEQ = #{userSeq}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSndCountList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto"
|
<select id="selectSndCountList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail">
|
||||||
resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail">
|
/* attractMgt-mapper.xml(selectSndCountList) */
|
||||||
/* attractMgt-mapper.xml(selectSndCountList) */
|
SELECT
|
||||||
SELECT DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS sumYm
|
SUM_YM AS sumYm, A.sndCnt, A.succCnt, A.sndCntS, A.succCntS, A.sndCntL, A.succCntL,
|
||||||
, ecm.SND_CNT
|
A.sndCntM, A.succCntM, A.sndCntR AS sndCntA, A.succCntR AS succCntA, A.fbSndCntS, A.fbSuccCntS, A.fbSndCntL,
|
||||||
, ecm.SUCC_CNT
|
A.fbSuccCntL, A.fbSndCntM, A.fbSuccCntM
|
||||||
, S.SND_CNT AS SND_CNT_S
|
FROM
|
||||||
, S.SUCC_CNT AS SUCC_CNT_S
|
(
|
||||||
, L.SND_CNT AS SND_CNT_L
|
SELECT
|
||||||
, L.SUCC_CNT AS SUCC_CNT_L
|
DATE_FORMAT(S1.SUM_YM, '%Y-%m') AS SUM_YM,
|
||||||
, M.SND_CNT AS SND_CNT_M
|
(SUM(S1.sndCntS) + SUM(S1.sndCntL) + SUM(S1.sndCntM) + SUM(S1.sndCntR)) AS sndCnt,
|
||||||
, M.SUCC_CNT AS SUCC_CNT_M
|
(SUM(S1.succCntS) + SUM(S1.succCntL) +SUM(S1.succCntM) +SUM(S1.succCntR) + SUM(fbSuccCntS) + SUM(fbSuccCntL)+ SUM(fbSuccCntM)) AS succCnt,
|
||||||
, A.SND_CNT AS SND_CNT_A
|
SUM(S1.sndCntS) AS sndCntS, SUM(S1.succCntS) AS succCntS, SUM(S1.sndCntL) AS sndCntL, SUM(S1.succCntL) AS succCntL, SUM(S1.sndCntM) AS sndCntM,
|
||||||
, A.SUCC_CNT AS SUCC_CNT_A
|
SUM(S1.succCntM) AS succCntM, SUM(S1.sndCntR) AS sndCntR, SUM(S1.succCntR) AS succCntR, SUM(S1.fbSndCntS) AS fbSndCntS, SUM(S1.fbSuccCntS) AS fbSuccCntS,
|
||||||
FROM (
|
SUM(S1.fbSndCntL) AS fbSndCntL, SUM(S1.fbSuccCntL) AS fbSuccCntL, SUM(S1.fbSndCntM) AS fbSndCntM, SUM(S1.fbSuccCntM) AS fbSuccCntM
|
||||||
SELECT SUM_YM
|
FROM
|
||||||
, USER_SEQ
|
(
|
||||||
, SUM(IFNULL(SND_CNT, 0) + IFNULL(FBACK_CNT, 0)) AS SND_CNT
|
SELECT
|
||||||
, SUM(IFNULL(SUCC_CNT, 0) + IFNULL(FBACK_SUCC_CNT, 0)) AS SUCC_CNT
|
SUM_YM,
|
||||||
FROM hubez_common.EZ_CUST_MSTAT
|
CASE WHEN SND_CH_CD = 'SMS' THEN IFNULL(SND_CNT, 0) ELSE 0 END AS sndCntS,
|
||||||
WHERE 1 = 1
|
CASE WHEN SND_CH_CD = 'SMS' THEN IFNULL(SUCC_CNT, 0) ELSE 0 END AS succCntS,
|
||||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
CASE WHEN SND_CH_CD = 'LMS' THEN IFNULL(SND_CNT, 0) ELSE 0 END AS sndCntL,
|
||||||
AND USER_SEQ = #{userSeq}
|
CASE WHEN SND_CH_CD = 'LMS' THEN IFNULL(SUCC_CNT, 0) ELSE 0 END AS succCntL,
|
||||||
GROUP BY SUM_YM, USER_SEQ
|
CASE WHEN SND_CH_CD = 'MMS' THEN IFNULL(SND_CNT, 0) ELSE 0 END AS sndCntM,
|
||||||
) ecm,
|
CASE WHEN SND_CH_CD = 'MMS' THEN IFNULL(SUCC_CNT, 0) ELSE 0 END AS succCntM,
|
||||||
(
|
CASE WHEN SND_CH_CD = 'ALIMTALK' THEN IFNULL(SND_CNT, 0) ELSE 0 END AS sndCntR,
|
||||||
SELECT S1.SUM_YM
|
CASE WHEN SND_CH_CD = 'ALIMTALK' THEN IFNULL(SUCC_CNT, 0) ELSE 0 END AS succCntR,
|
||||||
, S1.USER_SEQ
|
CASE WHEN RPLCSND_CH_CD = 'SMS' THEN IFNULL(FBACK_CNT, 0) ELSE 0 END AS fbSndCntS,
|
||||||
, SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT
|
CASE WHEN RPLCSND_CH_CD = 'SMS' THEN IFNULL(FBACK_SUCC_CNT, 0) ELSE 0 END AS fbSuccCntS,
|
||||||
, SUM(IFNULL(S1.SUCC_CNT, 0) + IFNULL(S2.FBACK_SUCC_CNT, 0)) AS SUCC_CNT
|
CASE WHEN RPLCSND_CH_CD = 'LMS' THEN IFNULL(FBACK_CNT, 0) ELSE 0 END AS fbSndCntL,
|
||||||
FROM (SELECT SUM_YM
|
CASE WHEN RPLCSND_CH_CD = 'LMS' THEN IFNULL(FBACK_SUCC_CNT, 0) ELSE 0 END AS fbSuccCntL,
|
||||||
, USER_SEQ
|
CASE WHEN RPLCSND_CH_CD = 'MMS' THEN IFNULL(FBACK_CNT, 0) ELSE 0 END AS fbSndCntM,
|
||||||
, SUM(SND_CNT) AS SND_CNT
|
CASE WHEN RPLCSND_CH_CD = 'MMS' THEN IFNULL(FBACK_SUCC_CNT, 0) ELSE 0 END AS fbSuccCntM
|
||||||
, SUM(SUCC_CNT) AS SUCC_CNT
|
FROM
|
||||||
FROM hubez_common.EZ_CUST_MSTAT
|
hubez_common.EZ_CUST_MSTAT ewm INNER JOIN
|
||||||
WHERE 1 = 1
|
hubez_common.EZ_SVC_USER esu ON ewm.USER_SEQ = esu.USER_SEQ
|
||||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
WHERE
|
||||||
AND SND_CH_CD = 'SMS'
|
SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -24 MONTH) AND NOW()
|
||||||
AND USER_SEQ = #{userSeq}
|
AND ewm.USER_SEQ = #{userSeq}
|
||||||
GROUP BY SUM_YM, USER_SEQ) S1
|
UNION ALL
|
||||||
LEFT OUTER JOIN
|
SELECT
|
||||||
(SELECT SUM_YM
|
SUM_YM,
|
||||||
, USER_SEQ
|
CASE WHEN SND_CH_CD = 'SMS' THEN SUM(SND_CNT) ELSE 0 END AS sndCntS,
|
||||||
, SUM(FBACK_CNT) AS FBACK_CNT
|
CASE WHEN SND_CH_CD = 'SMS' THEN SUM(SUCC_CNT) ELSE 0 END AS succCntS,
|
||||||
, SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
|
CASE WHEN SND_CH_CD = 'LMS' THEN SUM(SND_CNT) ELSE 0 END AS sndCntL,
|
||||||
FROM hubez_common.EZ_CUST_MSTAT
|
CASE WHEN SND_CH_CD = 'LMS' THEN SUM(SUCC_CNT) ELSE 0 END AS succCntL,
|
||||||
WHERE 1 = 1
|
CASE WHEN SND_CH_CD = 'MMS' THEN SUM(SND_CNT) ELSE 0 END AS sndCntM,
|
||||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
CASE WHEN SND_CH_CD = 'MMS' THEN SUM(SUCC_CNT) ELSE 0 END AS succCntM,
|
||||||
AND SND_CH_CD = 'ALIMTALK'
|
CASE WHEN SND_CH_CD = 'ALIMTALK' THEN SUM(SND_CNT) ELSE 0 END AS sndCntR,
|
||||||
AND RPLCSND_CH_CD = 'SMS'
|
CASE WHEN SND_CH_CD = 'ALIMTALK' THEN SUM(SUCC_CNT) ELSE 0 END AS succCntR,
|
||||||
AND USER_SEQ = #{userSeq}
|
CASE WHEN SND_CH_CD = 'SMS' THEN SUM(FBACK_CNT) ELSE 0 END AS fbSndCntS,
|
||||||
GROUP BY SUM_YM, USER_SEQ) S2
|
CASE WHEN SND_CH_CD = 'SMS' THEN SUM(FBACK_SUCC_CNT) ELSE 0 END AS fbSuccCntS,
|
||||||
ON S1.SUM_YM = S2.SUM_YM
|
CASE WHEN SND_CH_CD = 'LMS' THEN SUM(FBACK_CNT) ELSE 0 END AS fbSndCntL,
|
||||||
AND S1.USER_SEQ = S2.USER_SEQ
|
CASE WHEN SND_CH_CD = 'LMS' THEN SUM(FBACK_SUCC_CNT) ELSE 0 END AS fbSuccCntL,
|
||||||
GROUP BY S1.SUM_YM, S1.USER_SEQ) S,
|
CASE WHEN SND_CH_CD = 'MMS' THEN SUM(FBACK_CNT) ELSE 0 END AS fbSndCntM,
|
||||||
(
|
CASE WHEN SND_CH_CD = 'MMS' THEN SUM(FBACK_SUCC_CNT) ELSE 0 END AS fbSuccCntM
|
||||||
SELECT S1.SUM_YM
|
FROM
|
||||||
, S1.USER_SEQ
|
(
|
||||||
, SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT
|
SELECT
|
||||||
, SUM(IFNULL(S1.SUCC_CNT, 0) + IFNULL(S2.FBACK_SUCC_CNT, 0)) AS SUCC_CNT
|
DATE_FORMAT(ewm.YMD, '%Y-%m-01') AS SUM_YM,
|
||||||
FROM (SELECT SUM_YM
|
REPLACE (ewm.CH_STR ,'KKO_NOTI', 'ALIMTALK') AS SND_CH_CD,
|
||||||
, USER_SEQ
|
SUM(IFNULL(ewm.SEND_CNT, 0)) AS SND_CNT,
|
||||||
, SUM(SND_CNT) AS SND_CNT
|
SUM(IFNULL(ewm.SUCC_CNT, 0)) AS SUCC_CNT,
|
||||||
, SUM(SUCC_CNT) AS SUCC_CNT
|
0 AS FBACK_CNT,
|
||||||
FROM hubez_common.EZ_CUST_MSTAT
|
0 AS FBACK_SUCC_CNT
|
||||||
WHERE 1 = 1
|
FROM
|
||||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
hubez_common.EZ_WEB_MSG ewm INNER JOIN
|
||||||
AND SND_CH_CD = 'LMS'
|
hubez_common.EZ_SVC_USER esu ON ewm.USER_SEQ = esu.USER_SEQ
|
||||||
AND USER_SEQ = #{userSeq}
|
WHERE
|
||||||
GROUP BY SUM_YM, USER_SEQ) S1
|
ewm.YMD BETWEEN DATE_FORMAT( NOW(), '%Y-%m-01') AND DATE_FORMAT( NOW(), '%Y-%m-%d')
|
||||||
LEFT OUTER JOIN
|
AND esu.PRNTS_USER_SEQ = #{userSeq}
|
||||||
(SELECT SUM_YM
|
GROUP BY ewm.YMD, ewm.CH_STR
|
||||||
, USER_SEQ
|
UNION ALL
|
||||||
, SUM(FBACK_CNT) AS FBACK_CNT
|
SELECT
|
||||||
, SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
|
DATE_FORMAT(ewm.YMD, '%Y-%m-01') AS SUM_YM,
|
||||||
FROM hubez_common.EZ_CUST_MSTAT
|
FB_CH_STR AS SND_CH_CD,
|
||||||
WHERE 1 = 1
|
0 AS SND_CNT,
|
||||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
0 AS SUCC_CNT,
|
||||||
AND SND_CH_CD = 'ALIMTALK'
|
SUM(IFNULL(ewm.FB_SUCC_CNT + ewm.FB_FAIL_CNT, 0)) AS FBACK_CNT,
|
||||||
AND RPLCSND_CH_CD = 'LMS'
|
SUM(IFNULL(ewm.FB_SUCC_CNT, 0)) AS FBACK_SUCC_CNT
|
||||||
AND USER_SEQ = #{userSeq}
|
FROM
|
||||||
GROUP BY SUM_YM, USER_SEQ) S2
|
hubez_common.EZ_WEB_MSG ewm INNER JOIN
|
||||||
ON S1.SUM_YM = S2.SUM_YM
|
hubez_common.EZ_SVC_USER esu ON ewm.USER_SEQ = esu.USER_SEQ
|
||||||
AND S1.USER_SEQ = S2.USER_SEQ
|
WHERE
|
||||||
GROUP BY S1.SUM_YM, S1.USER_SEQ) AS L,
|
ewm.YMD BETWEEN DATE_FORMAT( NOW(), '%Y-%m-01') AND DATE_FORMAT( NOW(), '%Y-%m-%d')
|
||||||
(
|
AND esu.PRNTS_USER_SEQ = #{userSeq}
|
||||||
SELECT S1.SUM_YM
|
AND (FB_SUCC_CNT > 0 OR FB_FAIL_CNT > 0)
|
||||||
, S1.USER_SEQ
|
GROUP BY ewm.YMD, ewm.FB_CH_STR
|
||||||
, SUM(IFNULL(S1.SND_CNT, 0) + IFNULL(S2.FBACK_CNT, 0)) AS SND_CNT
|
) T1
|
||||||
, SUM(IFNULL(S1.SUCC_CNT, 0) + IFNULL(S2.FBACK_SUCC_CNT, 0)) AS SUCC_CNT
|
WHERE
|
||||||
FROM (SELECT SUM_YM
|
1 = 1
|
||||||
, USER_SEQ
|
GROUP BY SUM_YM, SND_CH_CD
|
||||||
, SUM(SND_CNT) AS SND_CNT
|
) S1
|
||||||
, SUM(SUCC_CNT) AS SUCC_CNT
|
WHERE
|
||||||
FROM hubez_common.EZ_CUST_MSTAT
|
1 = 1
|
||||||
WHERE 1 = 1
|
GROUP BY S1.SUM_YM
|
||||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
) A
|
||||||
AND SND_CH_CD = 'MMS'
|
WHERE 1 = 1
|
||||||
AND USER_SEQ = #{userSeq}
|
ORDER BY A.SUM_YM DESC
|
||||||
GROUP BY SUM_YM, USER_SEQ) S1
|
|
||||||
LEFT OUTER JOIN
|
|
||||||
(SELECT SUM_YM
|
|
||||||
, USER_SEQ
|
|
||||||
, SUM(FBACK_CNT) AS FBACK_CNT
|
|
||||||
, SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
|
|
||||||
FROM hubez_common.EZ_CUST_MSTAT
|
|
||||||
WHERE 1 = 1
|
|
||||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
|
||||||
AND SND_CH_CD = 'ALIMTALK'
|
|
||||||
AND RPLCSND_CH_CD = 'MMS'
|
|
||||||
AND USER_SEQ = #{userSeq}
|
|
||||||
GROUP BY SUM_YM, USER_SEQ) S2
|
|
||||||
ON S1.SUM_YM = S2.SUM_YM
|
|
||||||
AND S1.USER_SEQ = S2.USER_SEQ
|
|
||||||
GROUP BY S1.SUM_YM, S1.USER_SEQ) AS M,
|
|
||||||
(
|
|
||||||
SELECT SUM_YM
|
|
||||||
, USER_SEQ
|
|
||||||
, SUM(SND_CNT) AS SND_CNT
|
|
||||||
, SUM(SUCC_CNT) AS SUCC_CNT
|
|
||||||
FROM hubez_common.EZ_CUST_MSTAT
|
|
||||||
WHERE 1 = 1
|
|
||||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
|
||||||
AND SND_CH_CD = 'ALIMTALK'
|
|
||||||
AND USER_SEQ = #{userSeq}
|
|
||||||
GROUP BY SUM_YM, USER_SEQ) AS A
|
|
||||||
WHERE 1 = 1
|
|
||||||
AND ecm.SUM_YM = S.SUM_YM
|
|
||||||
AND ecm.SUM_YM = L.SUM_YM
|
|
||||||
AND ecm.SUM_YM = M.SUM_YM
|
|
||||||
AND ecm.SUM_YM = A.SUM_YM
|
|
||||||
AND ecm.USER_SEQ = S.USER_SEQ
|
|
||||||
AND ecm.USER_SEQ = L.USER_SEQ
|
|
||||||
AND ecm.USER_SEQ = M.USER_SEQ
|
|
||||||
AND ecm.USER_SEQ = A.USER_SEQ
|
|
||||||
ORDER BY ecm.SUM_YM DESC
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="sendNumberListExcel" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto"
|
<select id="sendNumberListExcel" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto"
|
||||||
|
|||||||
Reference in New Issue
Block a user