mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 06:54:16 +09:00
TC 수정사항 반영
This commit is contained in:
@@ -32,8 +32,10 @@
|
||||
, A.CUST_NM
|
||||
, A.BIZRNO
|
||||
, A.USER_NM
|
||||
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as SUBS_STTUS_CD
|
||||
, (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_CD
|
||||
, A.SUBS_STTUS_CD
|
||||
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as SUBS_STTUS_NM
|
||||
, A.CUST_TY_CD
|
||||
, (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
|
||||
, (
|
||||
SELECT
|
||||
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
|
||||
@@ -46,7 +48,7 @@
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ifnull(DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d'), DATE_FORMAT(esi.SUBS_DT , '%Y-%m-%d')) AS SUBS_DT
|
||||
DATE_FORMAT(esi.SUBS_DT , '%Y-%m-%d') AS SUBS_DT
|
||||
, eig.NORG_NM
|
||||
, esi.USER_SEQ
|
||||
, eiu.LOGIN_ID
|
||||
@@ -83,8 +85,8 @@
|
||||
, A.CUST_NM
|
||||
, A.BIZRNO
|
||||
, A.USER_NM
|
||||
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as SUBS_STTUS_CD
|
||||
, (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_CD
|
||||
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as SUBS_STTUS_NM
|
||||
, (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
|
||||
, (
|
||||
SELECT
|
||||
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
|
||||
@@ -97,7 +99,7 @@
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ifnull(DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d'), DATE_FORMAT(esi.SUBS_DT , '%Y-%m-%d')) AS SUBS_DT
|
||||
DATE_FORMAT(esi.SUBS_DT , '%Y-%m-%d') AS SUBS_DT
|
||||
, eig.NORG_NM
|
||||
, esi.USER_SEQ
|
||||
, eiu.LOGIN_ID
|
||||
@@ -125,7 +127,7 @@
|
||||
|
||||
<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}
|
||||
AND esi.SUBS_DT >= #{subsStDt} AND esi.SUBS_DT <![CDATA[ < ]]> DATE_ADD(#{subsEdDt}, interval 1 day)
|
||||
</if>
|
||||
<if test="subsSttusCd != null and subsSttusCd != ''">
|
||||
AND esi.SUBS_STTUS_CD = #{subsSttusCd}
|
||||
@@ -141,18 +143,18 @@
|
||||
</if>
|
||||
<if test="searchType != null and searchType != ''">
|
||||
<if test="searchType == '01' and searchText != null and searchText != ''">
|
||||
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText}, '%'))
|
||||
AND eci.CUST_NM LIKE CONCAT('%', #{searchText}, '%')
|
||||
</if>
|
||||
<if test="searchType == '02' and searchText != null and searchText != ''">
|
||||
AND UPPER(esu.USER_NM) LIKE UPPER(CONCAT('%', #{searchText}, '%'))
|
||||
AND esu.USER_NM LIKE CONCAT('%', #{searchText}, '%')
|
||||
</if>
|
||||
<if test="searchType == '03' and searchText != null and searchText != ''">
|
||||
AND eci.BIZRNO = #{searchText}
|
||||
AND eci.BIZRNO LIKE CONCAT('%', #{searchText}, '%')
|
||||
</if>
|
||||
</if>
|
||||
<if test="attrctorId != null and attrctorId != ''">
|
||||
and esi.ATTRCTOR_ID = #{attrctorId}
|
||||
</if>
|
||||
<if test="attrctorId != null and attrctorId != ''">
|
||||
and esi.ATTRCTOR_ID LIKE CONCAT('%', #{attrctorId}, '%')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectAttractDetail" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailRes">
|
||||
|
||||
@@ -4,134 +4,105 @@
|
||||
<mapper namespace="kr.co.uplus.ez.api.channelMgt.ChannelMgtMapper">
|
||||
|
||||
<select id="selectTmpltTotalCnt" parameterType="kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto" resultType="int">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
from hubez_common.EZ_ATLK_TMPLT eat
|
||||
inner join hubez_common.EZ_SUBS_INFO esi
|
||||
on esi.USER_SEQ = eat.USER_SEQ
|
||||
and esi.SUBS_STTUS_CD in ('02','03','04','99')
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esi.CUST_SEQ
|
||||
|
||||
|
||||
<include refid="tmpltListCondition"></include>
|
||||
SELECT COUNT(*)
|
||||
from hubez_common.EZ_ATLK_TMPLT eat
|
||||
inner join hubez_common.EZ_KKO_CHNL ekc
|
||||
on ekc.SNDRPROF_KEY = eat.SNDRPROF_KEY
|
||||
and ekc.USER_SEQ = eat.USER_SEQ
|
||||
inner join hubez_common.EZ_SVC_USER esu
|
||||
on esu.USER_SEQ = ekc.USER_SEQ
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esu.CUST_SEQ
|
||||
<include refid="tmpltListCondition"></include>
|
||||
</select>
|
||||
<select id="selectTmpltList" parameterType="kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto" resultType="kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo">
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
(eci.CUST_NM)AS custNm,
|
||||
(eci.BIZRNO)AS bRegNo,
|
||||
eat.TMPLT_CD AS tmpltCd,
|
||||
eat.TMPLT_NM AS tmpltNm,
|
||||
<!-- (eat.TMPLT_TP_CD) AS tmpltType, -->
|
||||
(SELECT
|
||||
T2.DTL_CD_NM AS codeNm
|
||||
FROM hubez_common.EZ_CD_GRP T1
|
||||
LEFT JOIN hubez_common.EZ_CD_DTL T2
|
||||
ON T1.GRP_CD = T2.GRP_CD
|
||||
WHERE T1.GRP_CD = 'TMPLT_TP_CD'
|
||||
AND T2.DTL_CD=eat.TMPLT_TP_CD) AS tmpltType,
|
||||
<!-- eat.TMPLT_STTUS_CD AS stat, -->
|
||||
(SELECT
|
||||
T2.DTL_CD_NM AS codeNm
|
||||
FROM hubez_common.EZ_CD_GRP T1
|
||||
LEFT JOIN hubez_common.EZ_CD_DTL T2
|
||||
ON T1.GRP_CD = T2.GRP_CD
|
||||
WHERE T1.GRP_CD = 'TMPLT_STTUS_CD'
|
||||
AND T2.DTL_CD=eat.TMPLT_STTUS_CD) AS stat,
|
||||
eat.REJCT_RSN AS returnReason,
|
||||
eat.SNDRPROF_KEY AS sendProfile,
|
||||
<!-- (select CHNL_ID from hubez_common.EZ_KKO_CHNL ekc WHERE eat.SNDRPROF_KEY = ekc.SNDRPROF_KEY) AS sendProfile, -->
|
||||
DATE_FORMAT(eat.CHG_DT, '%Y-%m-%d') As lastChgDt
|
||||
from hubez_common.EZ_ATLK_TMPLT eat
|
||||
inner join hubez_common.EZ_SUBS_INFO esi
|
||||
on esi.USER_SEQ = eat.USER_SEQ
|
||||
and esi.SUBS_STTUS_CD in ('02','03','04','99')
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esi.CUST_SEQ
|
||||
<include refid="tmpltListCondition"></include>
|
||||
ORDER BY eat.CHG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.custNm,
|
||||
A.bRegNo,
|
||||
A.tmpltCd,
|
||||
A.tmpltNm,
|
||||
(SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'TMPLT_TP_CD' AND DTL_CD=A.TMPLT_TP_CD) AS tmpltType,
|
||||
(SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'TMPLT_STTUS_CD' AND DTL_CD=A.TMPLT_STTUS_CD) AS stat,
|
||||
A.returnReason,
|
||||
A.sendProfile,
|
||||
DATE_FORMAT(A.CHG_DT, '%Y-%m-%d') As lastChgDt
|
||||
FROM (
|
||||
SELECT eci.CUST_NM AS custNm,
|
||||
eci.BIZRNO AS bRegNo,
|
||||
eat.TMPLT_CD AS tmpltCd,
|
||||
eat.TMPLT_NM AS tmpltNm,
|
||||
eat.TMPLT_TP_CD,
|
||||
eat.TMPLT_STTUS_CD,
|
||||
eat.REJCT_RSN AS returnReason,
|
||||
eat.SNDRPROF_KEY AS sendProfile,
|
||||
eat.CHG_DT
|
||||
from hubez_common.EZ_ATLK_TMPLT eat
|
||||
inner join hubez_common.EZ_KKO_CHNL ekc
|
||||
on ekc.SNDRPROF_KEY = eat.SNDRPROF_KEY
|
||||
and ekc.USER_SEQ = eat.USER_SEQ
|
||||
inner join hubez_common.EZ_SVC_USER esu
|
||||
on esu.USER_SEQ = ekc.USER_SEQ
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esu.CUST_SEQ
|
||||
<include refid="tmpltListCondition"></include>
|
||||
ORDER BY eat.CHG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<sql id="tmpltListCondition">
|
||||
<if test='searchType1 != null and searchType1 != ""'>
|
||||
<if test='searchType1 != null and searchType1 != ""'>
|
||||
AND eat.TMPLT_STTUS_CD = #{searchType1}
|
||||
</if>
|
||||
<if test='searchText1 != null and searchText1 != ""'>
|
||||
<choose>
|
||||
<when test='searchType1 == "N"'> <!-- 상태 - 중지 -->
|
||||
AND esi.SUBS_STTUS_CD = '99'
|
||||
<when test='searchType2 == "custNm"'><!-- 검색조건 - 고객사명 -->
|
||||
and UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')
|
||||
</when>
|
||||
<when test='searchType2 == "bizNo"'><!-- 검색조건 - 사업자번호 -->
|
||||
AND eci.BIZRNO LIKE CONCAT('%', #{searchText}, '%')
|
||||
</when>
|
||||
<when test='searchType2 == "tmpltNm"'><!-- 검색조건 - 인증코드 -->
|
||||
and UPPER(eat.TMPLT_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')
|
||||
</when>
|
||||
<otherwise><!-- 상태 - 사용 -->
|
||||
AND esi.SUBS_STTUS_CD != '99'
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test='searchText1 != null and searchText1 != ""'>
|
||||
<if test='searchType2 != null and searchType2 != ""'>
|
||||
<choose>
|
||||
<when test='searchType2 == "custNm"'><!-- 검색조건 - 고객사명 -->
|
||||
and UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')
|
||||
</when>
|
||||
<when test='searchType2 == "bizNo"'><!-- 검색조건 - 사업자번호 -->
|
||||
and eci.BIZRNO = #{searchText1}
|
||||
</when>
|
||||
<when test='searchType2 == "tmpltNm"'><!-- 검색조건 - 인증코드 -->
|
||||
and UPPER(eat.TMPLT_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</if>
|
||||
<if test='channelAuthMenuNo != null and channelAuthMenuNo != ""'>
|
||||
<if test='channelAuthMenuNo == "2003"'>
|
||||
and esi.ATTRCTOR_ID = #{userId}
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectTmpltListExcel" parameterType="kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto" resultType="kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo">
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
(eci.CUST_NM)AS custNm,
|
||||
(eci.BIZRNO)AS bRegNo,
|
||||
eat.TMPLT_CD AS tmpltCd,
|
||||
eat.TMPLT_NM AS tmpltNm,
|
||||
(eat.TMPLT_TP_CD) AS tmpltType,
|
||||
eat.TMPLT_STTUS_CD AS stat,
|
||||
eat.REJCT_RSN AS returnReason,
|
||||
eat.SNDRPROF_KEY AS sendProfile,
|
||||
DATE_FORMAT(eat.CHG_DT, '%Y-%m-%d') As lastChgDt
|
||||
from
|
||||
hubez_common.EZ_ATLK_TMPLT eat
|
||||
inner join hubez_common.EZ_SUBS_INFO esi
|
||||
on
|
||||
esi.USER_SEQ = eat.USER_SEQ
|
||||
and esi.SUBS_STTUS_CD in ('02', '03', '04', '99')
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on
|
||||
eci.CUST_SEQ = esi.CUST_SEQ
|
||||
<include refid="tmpltListCondition"></include>
|
||||
) A,
|
||||
(
|
||||
SELECT
|
||||
@ROWNUM := 0 ) AS R
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.custNm,
|
||||
A.bRegNo,
|
||||
A.tmpltCd,
|
||||
A.tmpltNm,
|
||||
(SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'TMPLT_TP_CD' AND DTL_CD=A.TMPLT_TP_CD) AS tmpltType,
|
||||
(SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'TMPLT_STTUS_CD' AND DTL_CD=A.TMPLT_STTUS_CD) AS stat,
|
||||
A.returnReason,
|
||||
A.sendProfile,
|
||||
DATE_FORMAT(A.CHG_DT, '%Y-%m-%d') As lastChgDt
|
||||
FROM (
|
||||
SELECT eci.CUST_NM AS custNm,
|
||||
eci.BIZRNO AS bRegNo,
|
||||
eat.TMPLT_CD AS tmpltCd,
|
||||
eat.TMPLT_NM AS tmpltNm,
|
||||
eat.TMPLT_TP_CD,
|
||||
eat.TMPLT_STTUS_CD,
|
||||
eat.REJCT_RSN AS returnReason,
|
||||
eat.SNDRPROF_KEY AS sendProfile,
|
||||
eat.CHG_DT
|
||||
from hubez_common.EZ_ATLK_TMPLT eat
|
||||
inner join hubez_common.EZ_KKO_CHNL ekc
|
||||
on ekc.SNDRPROF_KEY = eat.SNDRPROF_KEY
|
||||
and ekc.USER_SEQ = eat.USER_SEQ
|
||||
inner join hubez_common.EZ_SVC_USER esu
|
||||
on esu.USER_SEQ = ekc.USER_SEQ
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esu.CUST_SEQ
|
||||
<include refid="tmpltListCondition"></include>
|
||||
ORDER BY eat.CHG_DT DESC
|
||||
) A, ( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<select id="selectChannelAuthMenuNo" parameterType="String" resultType="String">
|
||||
SELECT
|
||||
eaa.MENU_NO
|
||||
FROM hubez_admin.EZ_ADM_USER eau
|
||||
INNER JOIN hubez_admin.EZ_ADM_AUTMENU eaa
|
||||
ON eau.AUT_CD = eaa.AUT_CD
|
||||
WHERE 1=1
|
||||
AND eau.OPRTR_ID = #{userId}
|
||||
AND eaa.MENU_NO IN ('2002','2003')
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -5,35 +5,36 @@
|
||||
|
||||
<select id="getMenuByRole" parameterType="string" resultType="kr.co.uplus.ez.api.comm.dto.Menu">
|
||||
/* comm-mapper.xml(getMenuByRole) */
|
||||
SELECT
|
||||
MENU_NO AS menuNo
|
||||
, PRNTS_MENU_NO AS prntsMenuNo
|
||||
, MENU_NM AS menuNm
|
||||
, MENU_ODRG AS menuOdrg
|
||||
, USE_YN AS useYn
|
||||
, AUTCHK_GRPNO AS autchkGrpno
|
||||
, MENU_LVL AS menuLvl
|
||||
, MENU_URL AS menuUrl
|
||||
FROM
|
||||
(SELECT
|
||||
M1.*
|
||||
FROM
|
||||
hubez_admin.EZ_ADM_MENU M1
|
||||
WHERE
|
||||
M1.MENU_LVL = 1
|
||||
UNION ALL
|
||||
SELECT
|
||||
M2.*
|
||||
FROM
|
||||
hubez_admin.EZ_ADM_MENU M2
|
||||
INNER JOIN (
|
||||
SELECT MENU_NO, AUT_CD
|
||||
FROM hubez_admin.EZ_ADM_AUTMENU
|
||||
WHERE AUT_CD = #{role}
|
||||
) R ON M2.MENU_NO = R.MENU_NO
|
||||
) A
|
||||
ORDER BY
|
||||
menuLvl, menuOdrg
|
||||
select eam2.MENU_NO as menuNo
|
||||
, null as prntsMenuNo
|
||||
, eam2.MENU_NM as menuNm
|
||||
, eam2.MENU_ODRG as menuOdrg
|
||||
, eam2.USE_YN as useYn
|
||||
, eam2.AUTCHK_GRPNO as autchkGrpno
|
||||
, eam2.MENU_LVL as menuLvl
|
||||
, eam2.MENU_URL as menuUrl
|
||||
from hubez_admin.EZ_ADM_AUTMENU eaa
|
||||
inner join hubez_admin.EZ_ADM_MENU eam
|
||||
on eam.MENU_NO = eaa.MENU_NO
|
||||
inner join hubez_admin.EZ_ADM_MENU eam2
|
||||
on eam2.MENU_NO = eam.PRNTS_MENU_NO
|
||||
where AUT_CD = #{role}
|
||||
UNION
|
||||
select eam.MENU_NO as menuNo
|
||||
, eam.PRNTS_MENU_NO as prntsMenuNo
|
||||
, eam.MENU_NM as menuNm
|
||||
, eam.MENU_ODRG as menuOdrg
|
||||
, eam.USE_YN as useYn
|
||||
, eam.AUTCHK_GRPNO as autchkGrpno
|
||||
, eam.MENU_LVL as menuLvl
|
||||
, eam.MENU_URL as menuUrl
|
||||
from hubez_admin.EZ_ADM_AUTMENU eaa
|
||||
inner join hubez_admin.EZ_ADM_MENU eam
|
||||
on eam.MENU_NO = eaa.MENU_NO
|
||||
inner join hubez_admin.EZ_ADM_MENU eam2
|
||||
on eam2.MENU_NO = eam.PRNTS_MENU_NO
|
||||
where AUT_CD = #{role}
|
||||
ORDER BY menuLvl, menuOdrg;
|
||||
</select>
|
||||
|
||||
<select id="getCommCode" parameterType="kr.co.uplus.ez.api.comm.dto.CodeReqDto" resultType="kr.co.uplus.ez.api.comm.dto.Code">
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
esu.USER_ID as SERVICE_ID,
|
||||
eci.CUST_NM as CUST_NM ,
|
||||
esi.ENTR_NO as REG_NO,
|
||||
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS REG_DT,
|
||||
DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS REG_DT,
|
||||
esi.SUBS_STTUS_CD ,
|
||||
esi.PROD_CD,
|
||||
esi.USER_SEQ as adminSeq,
|
||||
@@ -90,7 +90,7 @@
|
||||
on eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||
WHERE 1 = 1
|
||||
<include refid="subsListCondition"/>
|
||||
ORDER BY esi.OPN_DT DESC
|
||||
ORDER BY esi.SUBS_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A, ( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
@@ -146,11 +146,11 @@
|
||||
esu.USER_ID as SERVICE_ID,
|
||||
eci.CUST_NM as CUST_NM ,
|
||||
esi.ENTR_NO as REG_NO,
|
||||
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS REG_DT,
|
||||
DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS REG_DT,
|
||||
esi.SUBS_STTUS_CD ,
|
||||
esi.PROD_CD,
|
||||
esi.USER_SEQ as adminSeq,
|
||||
esi.ATTRCTOR_ID as attrctorId
|
||||
esi.USER_SEQ as adminSeq,
|
||||
esi.ATTRCTOR_ID as attrctorId
|
||||
FROM
|
||||
hubez_common.EZ_SUBS_INFO esi
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
@@ -164,7 +164,7 @@
|
||||
on eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||
WHERE 1 = 1
|
||||
<include refid="subsListCondition"/>
|
||||
ORDER BY esi.OPN_DT DESC ) A, ( SELECT @ROWNUM := 0 ) AS R
|
||||
ORDER BY esi.SUBS_DT DESC ) A, ( SELECT @ROWNUM := 0 ) AS R
|
||||
</select>
|
||||
<sql id="subsListCondition">
|
||||
<if test="startDt != null and startDt != ''">
|
||||
@@ -174,7 +174,7 @@
|
||||
AND esi.SUBS_DT <![CDATA[ <= ]]> STR_TO_DATE(concat(REPLACE(#{endDt}, '-', '' ),'235959'), '%Y%m%d%H%i%s')
|
||||
</if>
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
AND esu.USER_STTUS_CD = #{searchType1}
|
||||
AND esi.SUBS_STTUS_CD = #{searchType1}
|
||||
</if>
|
||||
<if test="searchType2 != null and searchType2 != ''">
|
||||
<if test="searchType2 == '01'">
|
||||
@@ -216,13 +216,13 @@
|
||||
</if>
|
||||
<if test="searchType3 != null and searchType3 != ''">
|
||||
<if test="searchType3 == '01' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType3 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND esi.ENTR_NO = #{searchText1}
|
||||
AND UPPER(esi.ENTR_NO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType3 == '03' and searchText1 != null and searchText1 != ''">
|
||||
AND esu.USER_ID = #{searchText1}
|
||||
AND UPPER(esu.USER_ID) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
@@ -444,36 +444,33 @@
|
||||
</update>
|
||||
|
||||
<select id="selectCarryOverList" parameterType="kr.co.uplus.ez.api.custMgt.dto.CarryOverListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.CarryOver">
|
||||
/* custMgt-mapper.xml(selectCarryOverList) */
|
||||
SELECT null AS COLEC_TMS
|
||||
, DATE_FORMAT(STR_TO_DATE(eul.LMT_YM ,'%Y%m'),'%Y-%m') AS LMT_YM
|
||||
, esu1.USER_ID AS USER_ID
|
||||
, SUM(FX_LMT_AMT + CFWD_AMT) AS START_AMOUNT
|
||||
, ROUND(0) AS USE_AMOUNT
|
||||
, ROUND(0) AS KRRR_AMOUNT
|
||||
, ROUND(0) AS EXTSH_AMOUNT
|
||||
FROM hubez_admin.EZ_USER_LMT eul
|
||||
JOIN hubez_common.EZ_SVC_USER esu1 ON eul.USER_SEQ = esu1.USER_SEQ
|
||||
WHERE esu1.USER_ID =#{serviceId} and eul.LMT_YM = DATE_FORMAT(now(), '%Y%m')
|
||||
UNION ALL
|
||||
(SELECT MAX(eud.COLEC_TMS) AS COLEC_TMS
|
||||
,DATE_FORMAT(eud.USE_YM, '%Y-%m') AS LMT_YM
|
||||
,esu.USER_ID
|
||||
,ROUND(SUM(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0))) AS START_AMOUNT
|
||||
,ROUND(SUM(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0))) AS USE_AMOUNT
|
||||
,ROUND(IFNULL(eud.CFWD_AMT,0)) AS KRRR_AMOUNT
|
||||
,ROUND(IFNULL(eud.EXTNC_AMT,0)) AS EXTSH_AMOUNT
|
||||
FROM hubez_admin.EZ_UTXNCOLEC_DTL eud
|
||||
JOIN hubez_common.EZ_SUBS_INFO esi ON eud.SUBS_ID = esi.SUBS_ID
|
||||
JOIN hubez_common.EZ_SVC_USER esu ON esi.USER_SEQ = esu.USER_SEQ
|
||||
WHERE 1=1
|
||||
<![CDATA[
|
||||
AND eud.USE_YM >= DATE_ADD(NOW(), INTERVAL -4 MONTH)
|
||||
AND eud.USE_YM < NOW()
|
||||
]]>
|
||||
AND esu.USER_ID = #{serviceId}
|
||||
GROUP BY eud.USE_YM, eud.SUBS_ID
|
||||
ORDER BY eud.USE_YM DESC)
|
||||
/* custMgt-mapper.xml(selectCarryOverList) */
|
||||
SELECT DATE_FORMAT(STR_TO_DATE(eul.LMT_YM ,'%Y%m'),'%Y-%m') AS LMT_YM
|
||||
, esu1.USER_ID AS USER_ID
|
||||
, (FX_LMT_AMT + CFWD_AMT) AS START_AMOUNT
|
||||
, ROUND(0) AS USE_AMOUNT
|
||||
, ROUND(0) AS KRRR_AMOUNT
|
||||
, ROUND(0) AS EXTSH_AMOUNT
|
||||
FROM hubez_admin.EZ_USER_LMT eul
|
||||
JOIN hubez_common.EZ_SVC_USER esu1 ON eul.USER_SEQ = esu1.USER_SEQ
|
||||
WHERE esu1.USER_ID =#{serviceId} and eul.LMT_YM = DATE_FORMAT(now(), '%Y%m')
|
||||
UNION ALL
|
||||
(SELECT DATE_FORMAT(eud.USE_YM, '%Y-%m') AS LMT_YM
|
||||
,esu.USER_ID
|
||||
,ROUND(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0)) AS START_AMOUNT
|
||||
,ROUND(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0)) AS USE_AMOUNT
|
||||
,ROUND(IFNULL(eud.CFWD_AMT,0)) AS KRRR_AMOUNT
|
||||
,ROUND(IFNULL(eud.EXTNC_AMT,0)) AS EXTSH_AMOUNT
|
||||
FROM hubez_admin.EZ_UTXNCOLEC_DTL eud
|
||||
join hubez_admin.EZ_USETXN_COLEC euc on euc.USE_YM = eud.USE_YM and euc.COLEC_TMS = eud.COLEC_TMS and euc.LAST_YN = 'Y'
|
||||
JOIN hubez_common.EZ_SUBS_INFO esi ON eud.SUBS_ID = esi.SUBS_ID
|
||||
JOIN hubez_common.EZ_SVC_USER esu ON esi.USER_SEQ = esu.USER_SEQ
|
||||
<![CDATA[
|
||||
AND eud.USE_YM >= DATE_ADD(NOW(), INTERVAL -4 MONTH)
|
||||
AND eud.USE_YM < NOW()
|
||||
]]>
|
||||
AND esu.USER_ID = #{serviceId}
|
||||
) ORDER BY LMT_YM DESC
|
||||
</select>
|
||||
|
||||
<select id="selectImUser" parameterType="kr.co.uplus.ez.common.data.ImUser" resultType="kr.co.uplus.ez.common.data.ImUser">
|
||||
@@ -542,13 +539,13 @@
|
||||
</if>
|
||||
<if test="searchType3 != null and searchType3 != ''">
|
||||
<if test="searchType3 == '01' and searchText1 != null and searchText1 != ''">
|
||||
AND esu.USER_ID = #{searchText1}
|
||||
AND UPPER(esu.USER_ID) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType3 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(esu.USER_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
AND UPPER(esu.USER_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType3 == '03' and searchText1 != null and searchText1 != ''">
|
||||
AND esu.USER_SEQ = (SELECT PRNTS_USER_SEQ FROM hubez_common.EZ_SVC_USER WHERE USER_ID = #{searchText1} AND USER_TP_CD ='01')
|
||||
AND esu.USER_SEQ = (SELECT PRNTS_USER_SEQ FROM hubez_common.EZ_SVC_USER WHERE USER_ID = #{searchText1} AND USER_TP_CD ='01')
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
WHEN DATE_ADD(T1.PWD_CHG_DT, INTERVAL 90 DAY) <![CDATA[ < ]]> NOW() THEN 'Y'
|
||||
ELSE 'N'
|
||||
END AS PW_CHANGE_CHECK
|
||||
, T1.AUT_CD
|
||||
FROM
|
||||
hubez_admin.EZ_ADM_USER T1
|
||||
LEFT JOIN hubez_imdb.EZ_IM_USER T2 ON T1.OPRTR_ID = T2.LOGIN_ID
|
||||
|
||||
@@ -145,32 +145,29 @@
|
||||
|
||||
<select id="selectRcvblck080ListTotalCnt" parameterType="kr.co.uplus.ez.api.riskMgt.dto.ZezNumIntrcpListReqDto" resultType="int">
|
||||
/* riskMgt-mapper.xml(selectRcvblck080ListTotalCnt) */
|
||||
SELECT
|
||||
COUNT(*) AS TOTAL_CNT
|
||||
SELECT count(*) AS TOTAL_CNT
|
||||
FROM
|
||||
(SELECT
|
||||
esu.CUST_SEQ
|
||||
,er.RCVBLCKNO
|
||||
FROM
|
||||
hubez_common.EZ_RCVBLCK_080 er
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON
|
||||
er.AUTHCD_080 = esu.AUTHCD_080
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON
|
||||
esu.CUST_SEQ = eci.CUST_SEQ
|
||||
WHERE
|
||||
1 = 1
|
||||
hubez_common.EZ_RCVBLCK_080 er
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON er.AUTHCD_080 = esu.AUTHCD_080
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON esu.CUST_SEQ = eci.CUST_SEQ
|
||||
WHERE 1 = 1
|
||||
AND esu.USER_SEQ = esu.PRNTS_USER_SEQ
|
||||
<include refid="selectRcvblck080Condition"/>
|
||||
GROUP BY esu.CUST_SEQ, er.RCVBLCKNO) A
|
||||
</select>
|
||||
|
||||
<select id="selectRcvblck080List" parameterType="kr.co.uplus.ez.api.riskMgt.dto.ZezNumIntrcpListReqDto" resultType="kr.co.uplus.ez.api.riskMgt.dto.ZezNumIntrcpList">
|
||||
/* riskMgt-mapper.xml(selectRcvblck080List) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, A.*
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, A.CUST_NM
|
||||
, A.BIZRNO
|
||||
, A.AUTHCD_080
|
||||
, A.RCVBLCKNO
|
||||
, A.USER_ID
|
||||
, A.REG_DT
|
||||
, ( SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'BLKCALL_REG_TP_CD' AND DTL_CD = A.REG_TP_CD) AS REG_TP_CD
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@@ -180,14 +177,7 @@
|
||||
, er.RCVBLCKNO
|
||||
, esu.USER_ID
|
||||
, DATE_FORMAT(er.REG_DT, '%Y-%m-%d') AS REG_DT
|
||||
,(
|
||||
SELECT
|
||||
DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL
|
||||
WHERE
|
||||
GRP_CD = 'BLKCALL_REG_TP_CD'
|
||||
AND DTL_CD = er.REG_TP_CD) AS REG_TP_CD
|
||||
, er.REG_TP_CD
|
||||
FROM
|
||||
hubez_common.EZ_RCVBLCK_080 er
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
@@ -197,7 +187,6 @@
|
||||
WHERE 1 = 1
|
||||
AND esu.USER_SEQ = esu.PRNTS_USER_SEQ
|
||||
<include refid="selectRcvblck080Condition"/>
|
||||
GROUP BY esu.CUST_SEQ, er.RCVBLCKNO
|
||||
ORDER BY er.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
) A, ( SELECT @ROWNUM := #{page} ) AS R
|
||||
@@ -205,13 +194,13 @@
|
||||
|
||||
<sql id="selectRcvblck080Condition">
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{custNm}, '%'))
|
||||
AND eci.CUST_NM LIKE CONCAT('%', #{custNm}, '%')
|
||||
</if>
|
||||
<if test="authcd080 != null and authcd080 != ''">
|
||||
AND er.AUTHCD_080 = #{authcd080}
|
||||
AND er.AUTHCD_080 LIKE CONCAT('%', #{authcd080}, '%')
|
||||
</if>
|
||||
<if test="rcvblckno != null and rcvblckno != ''">
|
||||
AND er.RCVBLCKNO = #{rcvblckno}
|
||||
AND er.RCVBLCKNO LIKE CONCAT('%', #{rcvblckno},'%')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
@@ -398,40 +387,37 @@
|
||||
/* riskMgt-mapper.xml(selectWebsndBlckList) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, A.*
|
||||
, A.SEQ_NO
|
||||
, A.BLCK_TP_CD
|
||||
, A.CUST_SEQ
|
||||
, A.USER_SEQ
|
||||
, A.USER_ID
|
||||
,(SELECT esu1.USER_ID FROM hubez_common.EZ_SVC_USER esu1 WHERE esu1.PRNTS_USER_SEQ = A.USER_SEQ LIMIT 1 ) AS SERVICE_ID
|
||||
, A.SNDRNO
|
||||
, A.CUST_NM
|
||||
, A.BIZRNO
|
||||
, A.RCVNO
|
||||
,(SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SNDBLCK_RSN_CD' AND DTL_CD = A.BLCK_RSN_CD) AS BLCK_RSN_CD
|
||||
, DATE_FORMAT(A.BLCK_DT, '%Y-%m-%d') AS BLCK_DT
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
SEQ_NO
|
||||
,(
|
||||
SELECT
|
||||
DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL
|
||||
WHERE
|
||||
GRP_CD = 'WEBBLCK_TP_CD'
|
||||
AND DTL_CD = ewb.BLCK_TP_CD) AS BLCK_TP_CD
|
||||
,ewb.BLCK_TP_CD
|
||||
, CUST_SEQ
|
||||
, USER_SEQ
|
||||
, USER_ID
|
||||
,(SELECT esu1.USER_ID FROM hubez_common.EZ_SVC_USER esu1 WHERE esu1.PRNTS_USER_SEQ = USER_SEQ LIMIT 1 ) AS SERVICE_ID
|
||||
, SNDRNO
|
||||
, CUST_NM
|
||||
, BIZRNO
|
||||
, RCVNO
|
||||
,(
|
||||
SELECT
|
||||
DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL
|
||||
WHERE
|
||||
GRP_CD = 'SNDBLCK_RSN_CD'
|
||||
AND DTL_CD = ewb.BLCK_RSN_CD) AS BLCK_RSN_CD
|
||||
, DATE_FORMAT(ewb.BLCK_DT, '%Y-%m-%d') AS BLCK_DT
|
||||
, ewb.BLCK_RSN_CD
|
||||
, ewb.BLCK_DT
|
||||
FROM
|
||||
hubez_common.EZ_WEBSND_BLCK ewb
|
||||
WHERE 1 = 1
|
||||
AND ewb.BLCK_DT BETWEEN STR_TO_DATE(#{blckDt}, '%Y%m%d') AND DATE_ADD(STR_TO_DATE(#{blckDt}, '%Y%m%d'), INTERVAL 1 DAY)
|
||||
AND ewb.BLCK_DT <![CDATA[ >= ]]> #{blckDt}
|
||||
and ewb.BLCK_DT <![CDATA[ < ]]> DATE_ADD(#{blckDt}, INTERVAL 1 DAY)
|
||||
<include refid="websndBlckListCondition"/>
|
||||
ORDER BY ewb.BLCK_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
@@ -447,17 +433,20 @@
|
||||
AND BLCK_TP_CD = #{blckTpCd}
|
||||
</if>
|
||||
<if test="sndrno != null and sndrno != ''">
|
||||
AND SNDRNO = #{sndrno}
|
||||
AND SNDRNO LIKE CONCAT('%', #{sndrno},'%')
|
||||
</if>
|
||||
<if test="rcvno != null and rcvno != ''">
|
||||
AND RCVNO LIKE CONCAT('%', #{rcvno},'%')
|
||||
</if>
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
<if test="searchType1 == '01' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(CUST_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
AND CUST_NM LIKE CONCAT('%', #{searchText1}, '%')
|
||||
</if>
|
||||
<if test="searchType1 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND BIZRNO = #{searchText1}
|
||||
AND BIZRNO LIKE CONCAT('%', #{searchText1},'%')
|
||||
</if>
|
||||
<if test="searchType1 == '03' and searchText1 != null and searchText1 != ''">
|
||||
AND USER_ID = #{searchText1}
|
||||
AND USER_ID LIKE CONCAT('%', #{searchText1},'%')
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
@@ -110,7 +110,6 @@
|
||||
|
||||
<select id="selectSendNumberList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberInfo">
|
||||
/* sendNumMgt-mapper.xml(selectSendNumberList) */
|
||||
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
@@ -141,8 +140,8 @@
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'SNDRNO_REQ_STTUS_CD'
|
||||
AND ecd.DTL_CD = esr.REQ_STTUS_CD) AS sttusCd,
|
||||
ecd.GRP_CD = 'SNDRNO_STTUS_CD'
|
||||
AND ecd.DTL_CD = ess.STTUS_CD) AS sttusCd,
|
||||
ess.SNDRNO AS SNDRNO,
|
||||
ess.SEQ_NO,
|
||||
DATE_FORMAT(esr.REG_DT, '%Y-%m-%d') AS REG_DT
|
||||
@@ -383,7 +382,7 @@
|
||||
,#{sendNm}
|
||||
,#{custSeq}
|
||||
,#{regReqNo}
|
||||
,'01'
|
||||
,'02'
|
||||
,'Y'
|
||||
,#{nmineeDivCd}
|
||||
,#{inchDivCd}
|
||||
@@ -470,90 +469,80 @@
|
||||
|
||||
<select id="selectSvcSndrnoListTotalCnt" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprListReqDto" resultType="int">
|
||||
/* sendNumMgt-mapper.xml(selectSvcSndrnoListTotalCnt) */
|
||||
SELECT
|
||||
count(*)
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ess.REG_REQ_NO
|
||||
FROM
|
||||
hubez_common.EZ_SVC_SNDRNO ess
|
||||
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
|
||||
ON
|
||||
ess.REG_REQ_NO = esr.REG_REQ_NO
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON
|
||||
esu.USER_SEQ = esr.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON
|
||||
eci.CUST_SEQ = esu.CUST_SEQ
|
||||
AND ess.INCH_DIV_CD = '01'
|
||||
<include refid="selectSvcSndrnoListCondition" />
|
||||
GROUP BY
|
||||
ess.REG_REQ_NO) AS T1
|
||||
SELECT COUNT(*)
|
||||
FROM hubez_common.EZ_SNDRNO_REG esr
|
||||
inner join hubez_common.EZ_SVC_USER esu
|
||||
on esu.USER_SEQ = esr.USER_SEQ
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esu.CUST_SEQ
|
||||
where 1 = 1
|
||||
and exists (
|
||||
select 1 from hubez_common.EZ_SVC_SNDRNO
|
||||
where REG_REQ_NO = esr.REG_REQ_NO
|
||||
<if test='searchType2 != null and searchType2 != ""'>
|
||||
and NMINEE_DIV_CD = #{searchType2}
|
||||
</if>
|
||||
)
|
||||
<include refid="selectSvcSndrnoListCondition" />
|
||||
</select>
|
||||
|
||||
<select id="selectSvcSndrnoList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprListReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprInfo">
|
||||
/* sendNumMgt-mapper.xml(selectSvcSndrnoList) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
esr.REG_REQ_NO
|
||||
, DATE_FORMAT(esr.REG_DT, '%Y-%m-%d') AS REG_DT
|
||||
, esu.USER_ID AS adminId
|
||||
, eci.BIZRNO
|
||||
,(
|
||||
SELECT
|
||||
ecd.DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'NMINEE_DIV_CD'
|
||||
AND ecd.DTL_CD = ess.NMINEE_DIV_CD) AS nmineeDivCd
|
||||
, eci.CUST_NM
|
||||
, esr.REQ_CNT
|
||||
, esr.APV_CNT
|
||||
, esr.REJT_CNT
|
||||
,(
|
||||
SELECT
|
||||
ecd.DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'SNDRNO_REQ_STTUS_CD'
|
||||
AND ecd.DTL_CD = esr.REQ_STTUS_CD) AS REQ_STTUS_CD
|
||||
, DATE_FORMAT(esr.CMPLT_DT, '%Y-%m-%d') AS CMPLT_DT
|
||||
FROM
|
||||
hubez_common.EZ_SVC_SNDRNO ess
|
||||
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
|
||||
ON ess.REG_REQ_NO = esr.REG_REQ_NO
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON esu.USER_SEQ = esr.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
AND ess.INCH_DIV_CD = '01'
|
||||
<include refid="selectSvcSndrnoListCondition" />
|
||||
GROUP BY ess.REG_REQ_NO
|
||||
ORDER BY esr.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
SELECT @ROWNUM := @ROWNUM + 1 AS NO
|
||||
, A.REG_REQ_NO
|
||||
, DATE_FORMAT(A.REG_DT, '%Y-%m-%d') AS REG_DT
|
||||
, A.USER_ID AS adminId
|
||||
, A.BIZRNO
|
||||
, A.CUST_NM
|
||||
, A.REQ_CNT
|
||||
, A.APV_CNT
|
||||
, A.REJT_CNT
|
||||
,(
|
||||
SELECT ecd.DTL_CD_NM FROM hubez_common.EZ_CD_DTL ecd
|
||||
WHERE ecd.GRP_CD = 'NMINEE_DIV_CD' AND ecd.DTL_CD = A.NMINEE_DIV_CD) AS nmineeDivCd
|
||||
, ( SELECT ecd.DTL_CD_NM FROM hubez_common.EZ_CD_DTL ecd WHERE ecd.GRP_CD = 'SNDRNO_REQ_STTUS_CD' AND ecd.DTL_CD = A.REQ_STTUS_CD) AS REQ_STTUS_CD
|
||||
, DATE_FORMAT(A.CMPLT_DT, '%Y-%m-%d') AS CMPLT_DT
|
||||
FROM
|
||||
(
|
||||
SELECT esr.REG_REQ_NO
|
||||
, esr.REG_DT
|
||||
, esu.USER_ID
|
||||
, eci.BIZRNO
|
||||
, eci.CUST_NM
|
||||
, esr.REQ_CNT
|
||||
, esr.APV_CNT
|
||||
, esr.REJT_CNT
|
||||
, esr.REQ_STTUS_CD
|
||||
, esr.CMPLT_DT
|
||||
, (select NMINEE_DIV_CD from hubez_common.EZ_SVC_SNDRNO where REG_REQ_NO = esr.REG_REQ_NO limit 1) as NMINEE_DIV_CD
|
||||
FROM hubez_common.EZ_SNDRNO_REG esr
|
||||
inner join hubez_common.EZ_SVC_USER esu
|
||||
on esu.USER_SEQ = esr.USER_SEQ
|
||||
inner join hubez_common.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esu.CUST_SEQ
|
||||
where 1 = 1
|
||||
and exists (
|
||||
select 1 from hubez_common.EZ_SVC_SNDRNO
|
||||
where REG_REQ_NO = esr.REG_REQ_NO
|
||||
<if test='searchType2 != null and searchType2 != ""'>
|
||||
and NMINEE_DIV_CD = #{searchType2}
|
||||
</if>
|
||||
)
|
||||
<include refid="selectSvcSndrnoListCondition" />
|
||||
ORDER BY esr.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<sql id="selectSvcSndrnoListCondition">
|
||||
<if test='searchType1 != null and searchType1 != ""'>
|
||||
AND esr.REQ_STTUS_CD = #{searchType1}
|
||||
</if>
|
||||
<if test='searchType2 != null and searchType2 != ""'>
|
||||
AND ess.NMINEE_DIV_CD = #{searchType2}
|
||||
</if>
|
||||
<if test='searchText1 != null and searchText1 != ""'>
|
||||
AND eci.BIZRNO = #{searchText1}
|
||||
AND eci.BIZRNO like concat('%', #{searchText1},'%')
|
||||
</if>
|
||||
<if test='searchText2 != null and searchText2 != ""'>
|
||||
AND eci.CUST_NM = #{searchText2}
|
||||
AND eci.CUST_NM like concat('%', #{searchText2},'%')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
, T1.OPRTR_NM AS NAME
|
||||
, T1.OPRTR_ID AS ADMIN_ID
|
||||
,(SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD =
|
||||
'SUBS_STTUS_CD' AND DTL_CD = T1.STTUS_CD) AS ADMIN_STAT
|
||||
'ADM_STTUS_CD' AND DTL_CD = T1.STTUS_CD) AS ADMIN_STAT
|
||||
, DATE_FORMAT(T1.REG_DT, '%Y-%m-%d') AS REG_DT
|
||||
FROM
|
||||
hubez_admin.EZ_ADM_USER T1
|
||||
|
||||
Reference in New Issue
Block a user