mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 15:38:29 +09:00
수정건 수정
This commit is contained in:
@@ -205,64 +205,49 @@
|
||||
</sql>
|
||||
|
||||
<select id="selectMsgBlckwordListTotalCnt" parameterType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpListReqDto" resultType="int">
|
||||
/* riskMgt-mapper.xml(selectMsgBlckwordListTotalCnt) */
|
||||
SELECT
|
||||
COUNT(*) AS TOTAL_CNT
|
||||
FROM
|
||||
hubez_common.EZ_MSG_BLCKWORD emb
|
||||
LEFT OUTER JOIN hubez_common.EZ_BLCKWORD_DTL ebd
|
||||
ON emb.SEQ_NO = ebd.SEQ_NO
|
||||
/* riskMgt-mapper.xml(selectMsgBlckwordListTotalCnt) */
|
||||
SELECT COUNT(*) AS TOTAL_CNT
|
||||
FROM hubez_common.EZ_MSG_BLCKWORD emb
|
||||
WHERE 1 = 1
|
||||
<include refid="msgBlckwordListCondition"/>
|
||||
</select>
|
||||
|
||||
<select id="selectMsgBlckwordList" parameterType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpListReqDto" resultType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpList">
|
||||
/* riskMgt-mapper.xml(selectMsgBlckwordList) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
emb.SEQ_NO
|
||||
, ebd.WORD
|
||||
, (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 = 'SNDBLCK_YN_CD'
|
||||
AND T2.DTL_CD=emb.BLCK_YN) AS BLCK_YN
|
||||
, DATE_FORMAT(emb.CHG_DT , '%Y-%m-%d') AS LAST_CHG_DT
|
||||
,(
|
||||
SELECT
|
||||
DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL
|
||||
WHERE
|
||||
GRP_CD = 'SNDBLCK_RSN_CD'
|
||||
AND DTL_CD = emb.BLCK_RSN_CD) AS BLCK_RSN_CD
|
||||
, emb.REG_ID
|
||||
FROM
|
||||
hubez_common.EZ_MSG_BLCKWORD emb
|
||||
LEFT OUTER JOIN hubez_common.EZ_BLCKWORD_DTL ebd
|
||||
ON emb.SEQ_NO = ebd.SEQ_NO
|
||||
WHERE 1 = 1
|
||||
<include refid="msgBlckwordListCondition"/>
|
||||
ORDER BY emb.CHG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows} ) A
|
||||
,( SELECT @ROWNUM := #{page} ) AS R;
|
||||
/* riskMgt-mapper.xml(selectMsgBlckwordList) */
|
||||
select @ROWNUM := @ROWNUM + 1 AS NO
|
||||
, A.SEQ_NO
|
||||
, ( select case when char_length(GROUP_CONCAT(WORD)) > 12 then concat(substr(GROUP_CONCAT(WORD) , 1, 12),'...')
|
||||
else GROUP_CONCAT(WORD)
|
||||
end
|
||||
from hubez_common.EZ_BLCKWORD_DTL
|
||||
where SEQ_NO = A.SEQ_NO
|
||||
) as WORD
|
||||
, (select DTL_CD_NM from hubez_common.EZ_CD_DTL where GRP_CD = 'SNDBLCK_YN_CD' and DTL_CD = A.BLCK_YN ) as BLCK_YN
|
||||
, DATE_FORMAT(A.CHG_DT , '%Y-%m-%d') AS LAST_CHG_DT
|
||||
, (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
|
||||
, A.REG_ID
|
||||
from (
|
||||
select emb.SEQ_NO
|
||||
, emb.BLCK_YN
|
||||
, emb.BLCK_RSN_CD
|
||||
, emb.REG_ID
|
||||
, emb.CHG_DT
|
||||
from hubez_common.EZ_MSG_BLCKWORD emb
|
||||
where 1 = 1
|
||||
<include refid="msgBlckwordListCondition"/>
|
||||
ORDER BY emb.CHG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows} ) A ,( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<sql id="msgBlckwordListCondition">
|
||||
<sql id="msgBlckwordListCondition">
|
||||
<if test="regId != null and regId != ''">
|
||||
AND UPPER(emb.REG_ID) LIKE UPPER(CONCAT('%', #{regId}, '%'))
|
||||
AND emb.REG_ID LIKE CONCAT('%', #{regId}, '%')
|
||||
</if>
|
||||
<if test="blckRsnCd != null and blckRsnCd != ''">
|
||||
AND emb.BLCK_RSN_CD = #{blckRsnCd}
|
||||
</if>
|
||||
<if test="word != null and word != ''">
|
||||
AND UPPER(ebd.WORD) LIKE UPPER(CONCAT('%', #{word}, '%'))
|
||||
and emb.SEQ_NO in (select SEQ_NO from hubez_common.EZ_BLCKWORD_DTL where WORD like CONCAT('%', #{word}, '%'))
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user