mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 00:46:47 +09:00
청약목록 조회 쿼리 수정
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
ON
|
ON
|
||||||
eci.CUST_SEQ = esi.CUST_SEQ
|
eci.CUST_SEQ = esi.CUST_SEQ
|
||||||
AND esi.CUST_SEQ = esu.CUST_SEQ
|
AND esi.CUST_SEQ = esu.CUST_SEQ
|
||||||
|
LEFT JOIN hubez_imdb.EZ_IM_USER eiu
|
||||||
|
on eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||||
WHERE 1 = 1
|
WHERE 1 = 1
|
||||||
<include refid="subsListCondition"/>
|
<include refid="subsListCondition"/>
|
||||||
</select>
|
</select>
|
||||||
@@ -38,8 +40,7 @@
|
|||||||
GRP_CD = 'SUBS_STTUS_CD'
|
GRP_CD = 'SUBS_STTUS_CD'
|
||||||
AND DTL_CD = A.SUBS_STTUS_CD
|
AND DTL_CD = A.SUBS_STTUS_CD
|
||||||
) AS STAT
|
) AS STAT
|
||||||
, ifnull((
|
, case when A.EX_PROVUSERTYPE in ( 'CCS-CS1'
|
||||||
select case when EX_PROVUSERTYPE in ( 'CCS-CS1'
|
|
||||||
, 'CCS-CB1'
|
, 'CCS-CB1'
|
||||||
, 'CCS-CB2'
|
, 'CCS-CB2'
|
||||||
, 'CCS-CJ'
|
, 'CCS-CJ'
|
||||||
@@ -52,12 +53,10 @@
|
|||||||
, 'CCS-D'
|
, 'CCS-D'
|
||||||
, 'CCS-G'
|
, 'CCS-G'
|
||||||
, 'CCS-S') then '고객센터'
|
, 'CCS-S') then '고객센터'
|
||||||
when EX_PROVUSERTYPE = 'DEALER' then '대리점'
|
when A.EX_PROVUSERTYPE = 'DEALER' then '대리점'
|
||||||
|
when A.EX_PROVUSERTYPE is null then '고객셀프가입'
|
||||||
else '직접영업'
|
else '직접영업'
|
||||||
end as ATTRACT_CHANNEL
|
end as CHANNEL
|
||||||
from hubez_imdb.EZ_IM_USER
|
|
||||||
where LOGIN_ID = A.attrctorId
|
|
||||||
) , '고객셀프가입') as CHANNEL
|
|
||||||
, (
|
, (
|
||||||
SELECT
|
SELECT
|
||||||
PROD_NM
|
PROD_NM
|
||||||
@@ -77,16 +76,18 @@
|
|||||||
esi.SUBS_STTUS_CD ,
|
esi.SUBS_STTUS_CD ,
|
||||||
esi.PROD_CD,
|
esi.PROD_CD,
|
||||||
esi.USER_SEQ as adminSeq,
|
esi.USER_SEQ as adminSeq,
|
||||||
esi.ATTRCTOR_ID as attrctorId
|
esi.ATTRCTOR_ID as attrctorId ,
|
||||||
|
eiu.EX_PROVUSERTYPE
|
||||||
FROM
|
FROM
|
||||||
hubez_common.EZ_SUBS_INFO esi
|
hubez_common.EZ_SUBS_INFO esi
|
||||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||||
ON esu.USER_SEQ = esi.USER_SEQ
|
ON esu.USER_SEQ = esi.USER_SEQ
|
||||||
and esu.USER_TP_CD in ('01','03')
|
and esu.USER_TP_CD in ('01','03')
|
||||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||||
ON
|
ON eci.CUST_SEQ = esi.CUST_SEQ
|
||||||
eci.CUST_SEQ = esi.CUST_SEQ
|
|
||||||
AND esi.CUST_SEQ = esu.CUST_SEQ
|
AND esi.CUST_SEQ = esu.CUST_SEQ
|
||||||
|
LEFT JOIN hubez_imdb.EZ_IM_USER eiu
|
||||||
|
on eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||||
WHERE 1 = 1
|
WHERE 1 = 1
|
||||||
<include refid="subsListCondition"/>
|
<include refid="subsListCondition"/>
|
||||||
ORDER BY esi.OPN_DT DESC
|
ORDER BY esi.OPN_DT DESC
|
||||||
@@ -159,6 +160,8 @@
|
|||||||
ON
|
ON
|
||||||
eci.CUST_SEQ = esi.CUST_SEQ
|
eci.CUST_SEQ = esi.CUST_SEQ
|
||||||
AND esi.CUST_SEQ = esu.CUST_SEQ
|
AND esi.CUST_SEQ = esu.CUST_SEQ
|
||||||
|
LEFT JOIN hubez_imdb.EZ_IM_USER eiu
|
||||||
|
on eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||||
WHERE 1 = 1
|
WHERE 1 = 1
|
||||||
<include refid="subsListCondition"/>
|
<include refid="subsListCondition"/>
|
||||||
ORDER BY esi.OPN_DT DESC ) A, ( SELECT @ROWNUM := 0 ) AS R
|
ORDER BY esi.OPN_DT DESC ) A, ( SELECT @ROWNUM := 0 ) AS R
|
||||||
@@ -174,7 +177,42 @@
|
|||||||
AND esu.USER_STTUS_CD = #{searchType1}
|
AND esu.USER_STTUS_CD = #{searchType1}
|
||||||
</if>
|
</if>
|
||||||
<if test="searchType2 != null and searchType2 != ''">
|
<if test="searchType2 != null and searchType2 != ''">
|
||||||
AND esu.USER_TP_CD = #{searchType2}
|
<if test="searchType2 == '01'">
|
||||||
|
AND eiu.EX_PROVUSERTYPE is null
|
||||||
|
</if>
|
||||||
|
<if test="searchType2 == '02' ">
|
||||||
|
AND eiu.EX_PROVUSERTYPE = 'DEALER'
|
||||||
|
</if>
|
||||||
|
<if test="searchType2 == '03' ">
|
||||||
|
AND eiu.EX_PROVUSERTYPE in ( 'CCS-CS1'
|
||||||
|
, 'CCS-CB1'
|
||||||
|
, 'CCS-CB2'
|
||||||
|
, 'CCS-CJ'
|
||||||
|
, 'CCS-LS2'
|
||||||
|
, 'CCS-LS3'
|
||||||
|
, 'CCS-M'
|
||||||
|
, 'CCS-MJ'
|
||||||
|
, 'CCS-P'
|
||||||
|
, 'CCS-P2'
|
||||||
|
, 'CCS-D'
|
||||||
|
, 'CCS-G'
|
||||||
|
, 'CCS-S')
|
||||||
|
</if>
|
||||||
|
<if test="searchType2 == '04' ">
|
||||||
|
AND eiu.EX_PROVUSERTYPE not in ( 'CCS-CS1'
|
||||||
|
, 'CCS-CB1'
|
||||||
|
, 'CCS-CB2'
|
||||||
|
, 'CCS-CJ'
|
||||||
|
, 'CCS-LS2'
|
||||||
|
, 'CCS-LS3'
|
||||||
|
, 'CCS-M'
|
||||||
|
, 'CCS-MJ'
|
||||||
|
, 'CCS-P'
|
||||||
|
, 'CCS-P2'
|
||||||
|
, 'CCS-D'
|
||||||
|
, 'CCS-G'
|
||||||
|
, 'CCS-S', 'DEALER')
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="searchType3 != null and searchType3 != ''">
|
<if test="searchType3 != null and searchType3 != ''">
|
||||||
<if test="searchType3 == '01' and searchText1 != null and searchText1 != ''">
|
<if test="searchType3 == '01' and searchText1 != null and searchText1 != ''">
|
||||||
|
|||||||
Reference in New Issue
Block a user