mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 06:38:22 +09:00
서비스관리 / 알림톡 템플릿관리 추가
This commit is contained in:
@@ -3,5 +3,130 @@
|
||||
|
||||
<mapper namespace="kr.co.uplus.ez.api.attractMgt.AttractMgtMapper">
|
||||
|
||||
<select id="selectAttractListTotalCnt" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto" resultType="int">
|
||||
/* attractMgt-mapper.xml(selectAttractListTotalCnt) */
|
||||
SELECT
|
||||
COUNT(*) AS totalCnt
|
||||
FROM
|
||||
hubez_common.EZ_SUBS_INFO esi
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON eci.CUST_SEQ = esi.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON esu.USER_SEQ = esi.USER_SEQ
|
||||
INNER JOIN hubez_imdb.EZ_IM_USER eiu
|
||||
ON eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||
INNER JOIN hubez_imdb.EZ_IM_GROUP eig
|
||||
ON eiu.EX_DEPT_CD = eig.NORG_CD
|
||||
WHERE 1 = 1
|
||||
<include refid="attractListCondition"/>
|
||||
</select>
|
||||
|
||||
<select id="selectAttractList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo">
|
||||
/* attractMgt-mapper.xml(selectAttractList) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
esi.SUBS_DT
|
||||
, eig.NORG_NM
|
||||
, eiu.LOGIN_ID
|
||||
, eci.CUST_NM
|
||||
, eci.BIZRNO
|
||||
, esu.USER_NM
|
||||
, esi.SUBS_STTUS_CD
|
||||
, eci.CUST_TY_CD
|
||||
,(
|
||||
SELECT
|
||||
sum(ecm.SND_CNT)
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT ecm
|
||||
WHERE
|
||||
ecm.USER_SEQ = esu.USER_SEQ
|
||||
AND DATE_FORMAT(ecm.SUM_YM, '%Y%m') BETWEEN DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 MONTH), '%Y%m') AND DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -37 MONTH), '%Y%m')) AS SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_SUBS_INFO esi
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON eci.CUST_SEQ = esi.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON esu.USER_SEQ = esi.USER_SEQ
|
||||
INNER JOIN hubez_imdb.EZ_IM_USER eiu
|
||||
ON eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||
INNER JOIN hubez_imdb.EZ_IM_GROUP eig
|
||||
ON eiu.EX_DEPT_CD = eig.NORG_CD
|
||||
WHERE 1 = 1
|
||||
<include refid="attractListCondition"/>
|
||||
ORDER BY esi.SUBS_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
) A , ( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<select id="selectAttractExcelList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListExcelReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo">
|
||||
/* attractMgt-mapper.xml(selectAttractExcelList) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
esi.SUBS_DT
|
||||
, eig.NORG_NM
|
||||
, eiu.LOGIN_ID
|
||||
, eci.CUST_NM
|
||||
, eci.BIZRNO
|
||||
, esu.USER_NM
|
||||
, esi.SUBS_STTUS_CD
|
||||
, eci.CUST_TY_CD
|
||||
,(
|
||||
SELECT
|
||||
sum(ecm.SND_CNT)
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT ecm
|
||||
WHERE
|
||||
ecm.USER_SEQ = esu.USER_SEQ
|
||||
AND DATE_FORMAT(ecm.SUM_YM, '%Y%m') BETWEEN DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 MONTH), '%Y%m') AND DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -37 MONTH), '%Y%m')) AS SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_SUBS_INFO esi
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON eci.CUST_SEQ = esi.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON esu.USER_SEQ = esi.USER_SEQ
|
||||
INNER JOIN hubez_imdb.EZ_IM_USER eiu
|
||||
ON eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||
INNER JOIN hubez_imdb.EZ_IM_GROUP eig
|
||||
ON eiu.EX_DEPT_CD = eig.NORG_CD
|
||||
WHERE 1 = 1
|
||||
<include refid="attractListCondition"/>
|
||||
ORDER BY esi.SUBS_DT DESC
|
||||
) A , ( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="attractListCondition">
|
||||
<if test="subsStDt != null and subsStDt != '' and subsEdDt != null and subsEdDt != ''">
|
||||
AND DATE_FORMAT(esi.SUBS_DT, '%Y%m%d') BETWEEN #{subsStDt} AND #{subsEdDt}
|
||||
</if>
|
||||
<if test="subsSttusCd != null and subsSttusCd != ''">
|
||||
AND esi.SUBS_STTUS_CD = #{subsSttusCd}
|
||||
</if>
|
||||
<if test="custTyCd != null and custTyCd != ''">
|
||||
AND eci.CUST_TY_CD = #{custTyCd}
|
||||
</if>
|
||||
<if test="loginId != null and loginId != ''">
|
||||
AND eiu.LOGIN_ID = #{loginId}
|
||||
</if>
|
||||
<if test="norgNm != null and norgNm != ''">
|
||||
AND eig.NORG_NM = #{norgNm}
|
||||
</if>
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND eci.CUST_NM = #{custNm}
|
||||
</if>
|
||||
<if test="userNm != null and userNm != ''">
|
||||
AND esu.USER_NM = #{userNm}
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND eci.BIZRNO = #{bizrno}
|
||||
</if>
|
||||
</sql>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user