|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="kr.xit.biz.ens.mapper.IEnsBatchMapper">
|
|
|
|
|
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ accept =========================================== -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<select id="selectAcceptTgts" resultType="kr.xit.biz.ens.model.EnsDTO$SndngMssageParam">
|
|
|
|
|
/** ens-mysql-mapper|selectAcceptTgts-통합 발송 접수 대상 조회|julim */
|
|
|
|
|
SELECT tcsm.unity_sndng_mastr_id
|
|
|
|
|
, tcsm.tmplat_id
|
|
|
|
|
, tcsm.sndng_co
|
|
|
|
|
, tcsm.sndng_process_sttus
|
|
|
|
|
, tcsm.sndng_dt
|
|
|
|
|
, tetm.try1
|
|
|
|
|
, tetm.try2
|
|
|
|
|
, tetm.try3
|
|
|
|
|
, tetm.try2_minute
|
|
|
|
|
, tetm.try3_minute
|
|
|
|
|
FROM tb_cntc_sndng_mastr tcsm
|
|
|
|
|
JOIN tb_ens_tmplat_manage tetm
|
|
|
|
|
ON tcsm.tmplat_id = tetm.tmplat_id
|
|
|
|
|
WHERE tcsm.sndng_process_sttus = #{sndngProcessSttus}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertUnitySndngMst">
|
|
|
|
|
/** ens-mysql-mapper|insertUnitySndngMst-통합발송마스터 생성|julim */
|
|
|
|
|
INSERT
|
|
|
|
|
INTO tb_ens_unity_sndng_mastr (
|
|
|
|
|
unity_sndng_mastr_id, /* 통합발송마스터 ID */
|
|
|
|
|
signgu_code, /* 시군구 코드 */
|
|
|
|
|
ffnlg_code, /* 과태료 코드 */
|
|
|
|
|
tmplat_id, /* 템플릿 Id */
|
|
|
|
|
sndng_ty_code, /* 발송유형 코드 */
|
|
|
|
|
sndng_co, /* 발송건수 */
|
|
|
|
|
sndng_process_sttus, /* 발송처리 상태 */
|
|
|
|
|
sndng_dt_1, /* 발송 일시 */
|
|
|
|
|
sndng_dt_2, /* 발송 일시2 */
|
|
|
|
|
sndng_dt_3, /* 발송 일시3 */
|
|
|
|
|
try1,
|
|
|
|
|
try2,
|
|
|
|
|
try3,
|
|
|
|
|
try_cnt,
|
|
|
|
|
clos_dt, /* 마감일시 */
|
|
|
|
|
regist_dt,
|
|
|
|
|
register
|
|
|
|
|
)
|
|
|
|
|
SELECT tcsm.unity_sndng_mastr_id /* 통합발송마스터 ID */
|
|
|
|
|
, tcsm.signgu_code /* 시군구 코드 */
|
|
|
|
|
, tcsm.ffnlg_code /* 과태료 코드 */
|
|
|
|
|
, tcsm.tmplat_id /* 템플릿 Id */
|
|
|
|
|
, tetm.sndng_ty_code /* 발송유형 코드 */
|
|
|
|
|
, tcsm.sndng_co /* 발송건수 */
|
|
|
|
|
, 'accept-ok' /* 발송처리 상태 */
|
|
|
|
|
, tcsm.sndng_dt
|
|
|
|
|
, #{sndngDt2}
|
|
|
|
|
, #{sndngDt3}
|
|
|
|
|
, tetm.try1
|
|
|
|
|
, tetm.try2
|
|
|
|
|
, tetm.try3
|
|
|
|
|
, CASE WHEN IFNULL(tetm.try3, '') != ''
|
|
|
|
|
THEN 3
|
|
|
|
|
ELSE IF(IFNULL(tetm.try2, '') != '', 2, 1)
|
|
|
|
|
END /* try3 값이 있으면 3, try2 값이 있으면 2, try1 */
|
|
|
|
|
, clos_dt /* 마감일시 */
|
|
|
|
|
, now()
|
|
|
|
|
, 'batch'
|
|
|
|
|
FROM tb_cntc_sndng_mastr tcsm
|
|
|
|
|
JOIN tb_ens_tmplat_manage tetm
|
|
|
|
|
ON tcsm.tmplat_id = tetm.tmplat_id
|
|
|
|
|
WHERE tcsm.unity_sndng_mastr_id = #{unitySndngMastrId}
|
|
|
|
|
AND tcsm.sndng_process_sttus = #{sndngProcessSttus}
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<insert id="insertUnitySndngDtls">
|
|
|
|
|
/** ens-mysql-mapper|insertUnitySndngDtls-통합발송상세 생성|julim */
|
|
|
|
|
INSERT
|
|
|
|
|
INTO tb_ens_unity_sndng_detail (
|
|
|
|
|
unity_sndng_detail_id, /* 통합발송상세 ID*/
|
|
|
|
|
unity_sndng_mastr_id, /* 통합발송마스터 ID */
|
|
|
|
|
signgu_code, /* 시군구 코드 */
|
|
|
|
|
ffnlg_code, /* 과태료 코드 */
|
|
|
|
|
main_code,
|
|
|
|
|
vhcle_no, /* 차량번호 */
|
|
|
|
|
ihidnum, /* 주민번호 */
|
|
|
|
|
moblphon_no, /* 전화번호 */
|
|
|
|
|
nm, /* 이름 */
|
|
|
|
|
adres, /* 주소 */
|
|
|
|
|
detail_adres, /* 상세주소 */
|
|
|
|
|
zip, /* 우편번호 */
|
|
|
|
|
tmplt_msg_data, /* 템플릿메세지 데이타 */
|
|
|
|
|
mobile_page_cn, /* 모바일페이지내용 */
|
|
|
|
|
use_instt_idntfc_id, /* 이용기관식별Id*/
|
|
|
|
|
regist_dt,
|
|
|
|
|
register
|
|
|
|
|
)
|
|
|
|
|
SELECT tcsd.unity_sndng_detail_id /* 통합발송상세 ID*/
|
|
|
|
|
, tcsd.unity_sndng_mastr_id /* 통합발송마스터 ID */
|
|
|
|
|
, tcsd.signgu_code /* 시군구 코드 */
|
|
|
|
|
, tcsd.ffnlg_code /* 과태료 코드 */
|
|
|
|
|
, tcsd.main_code
|
|
|
|
|
, tcsd.vhcle_no /* 차량번호 */
|
|
|
|
|
, tcsd.ihidnum /* 주민번호 */
|
|
|
|
|
, tcsd.moblphon_no /* 전화번호 */
|
|
|
|
|
, tcsd.nm /* 이름 */
|
|
|
|
|
, tcsd.adres /* 주소 */
|
|
|
|
|
, tcsd.detail_adres /* 상세주소 */
|
|
|
|
|
, tcsd.zip /* 우편번호 */
|
|
|
|
|
, tcsd.tmplt_msg_data /* 템플릿메세지 데이타 */
|
|
|
|
|
, tcsd.mobile_page_cn /* 모바일페이지내용 */
|
|
|
|
|
, tcsd.use_instt_idntfc_id /* 이용기관식별Id*/
|
|
|
|
|
, now()
|
|
|
|
|
, 'batch'
|
|
|
|
|
FROM tb_cntc_sndng_mastr tcsm
|
|
|
|
|
JOIN tb_cntc_sndng_detail tcsd
|
|
|
|
|
ON tcsm.unity_sndng_mastr_id = tcsd.unity_sndng_mastr_id
|
|
|
|
|
WHERE tcsm.unity_sndng_mastr_id = #{unitySndngMastrId}
|
|
|
|
|
AND tcsm.sndng_process_sttus = #{sndngProcessSttus}
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateProcessSttusCntcSndngMst">
|
|
|
|
|
/** ens-mysql-mapper|updateProcessSttusCntcSndngMst-연계발송마스터 상태 변경|julim */
|
|
|
|
|
UPDATE tb_cntc_sndng_mastr
|
|
|
|
|
SET sndng_process_sttus = #{newSndngProcessSttus}
|
|
|
|
|
, error_code = #{errorCode}
|
|
|
|
|
, error_mssage = #{errorMssage}
|
|
|
|
|
, updt_dt = now()
|
|
|
|
|
, updusr = 'batch'
|
|
|
|
|
WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
|
|
|
|
|
</update>
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ accept =========================================== -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ make ============================================= -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<select id="selectMakeTgts" resultType="kr.xit.biz.ens.model.EnsDTO$SndngMssageParam">
|
|
|
|
|
/** ens-mysql-mapper|selectMakeTgts-통합발송 생성 대상 조회|julim */
|
|
|
|
|
SELECT unity_sndng_mastr_id
|
|
|
|
|
, tmplat_id
|
|
|
|
|
, sndng_co
|
|
|
|
|
, try1
|
|
|
|
|
, try2
|
|
|
|
|
, try3
|
|
|
|
|
, try_cnt
|
|
|
|
|
, sndng_process_sttus
|
|
|
|
|
FROM tb_ens_unity_sndng_mastr
|
|
|
|
|
WHERE sndng_process_sttus = #{sndngProcessSttus}
|
|
|
|
|
<if test="sndngProcessSttus == 'sending1'">
|
|
|
|
|
AND sndng_dt_2 < date_format(now(), '%Y%m%d%H%i%S')
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectSendOkTgts" resultType="int">
|
|
|
|
|
/** ens-mysql-mapper|selectSendOkTgts-2차 발송 대상 건수 조회|seojh */
|
|
|
|
|
SELECT count(1)
|
|
|
|
|
FROM tb_ens_sndng_mastr tesm
|
|
|
|
|
INNER JOIN tb_ens_kakao_my_doc tekmd
|
|
|
|
|
ON tesm.sndng_mastr_id = tekmd.sndng_mastr_id
|
|
|
|
|
WHERE tesm.unity_sndng_mastr_id = #{unitySndngMastrId}
|
|
|
|
|
AND (NOT (tekmd.doc_box_status = 'READ' AND tekmd.error_code IS NULL) OR (tekmd.doc_box_status IS NULL and tekmd.error_code IS NULL))
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertSndngMst">
|
|
|
|
|
/** ens-mysql-mapper|insertSndngMst-발송마스터 생성|julim */
|
|
|
|
|
<selectKey keyProperty="sndngMastrId" resultType="string" order="BEFORE">
|
|
|
|
|
SELECT concat(date_format(now(), '%Y%m%d'), LPAD(NEXTVAL(tb_ens_sndng_mastr_seq), 12, '0'))
|
|
|
|
|
FROM dual
|
|
|
|
|
</selectKey>
|
|
|
|
|
INSERT
|
|
|
|
|
INTO tb_ens_sndng_mastr (
|
|
|
|
|
sndng_mastr_id, /* 발송마스터 ID*/
|
|
|
|
|
unity_sndng_mastr_id, /* 통합발송마스터 ID */
|
|
|
|
|
signgu_code, /* 시군구 코드 */
|
|
|
|
|
ffnlg_code, /* 과태료 코드 */
|
|
|
|
|
tmplat_id, /* 템플릿 Id */
|
|
|
|
|
sndng_ty_code, /* 발송유형 코드 */
|
|
|
|
|
sndng_se_code, /* 발송구분 코드 */
|
|
|
|
|
sndng_co, /* 발송건수 */
|
|
|
|
|
try_seq,
|
|
|
|
|
try_cnt,
|
|
|
|
|
sndng_process_sttus, /* 발송처리 상태 */
|
|
|
|
|
sndng_dt, /* 발송일시 */
|
|
|
|
|
clos_dt, /* 마감일시 */
|
|
|
|
|
regist_dt,
|
|
|
|
|
register
|
|
|
|
|
)
|
|
|
|
|
SELECT #{sndngMastrId}
|
|
|
|
|
, teusm.unity_sndng_mastr_id /* 통합발송마스터 ID */
|
|
|
|
|
, teusm.signgu_code /* 시군구 코드 */
|
|
|
|
|
, teusm.ffnlg_code /* 과태료 코드 */
|
|
|
|
|
, teusm.tmplat_id /* 템플릿 Id */
|
|
|
|
|
, teusm.sndng_ty_code /* 발송유형 코드 */
|
|
|
|
|
, #{sndngSeCode} /* 발송구분 코드 */
|
|
|
|
|
, #{sndngCo} /* 발송건수 */
|
|
|
|
|
, #{trySeq}
|
|
|
|
|
, teusm.try_cnt
|
|
|
|
|
, 'make-ok' /* 발송처리 상태 */
|
|
|
|
|
, CASE WHEN #{trySeq}=3 THEN teusm.sndng_dt_3
|
|
|
|
|
WHEN #{trySeq}=2 THEN teusm.sndng_dt_2
|
|
|
|
|
ELSE teusm.sndng_dt_1
|
|
|
|
|
END /* 1차, 2차, 3차에 따른 발송일시 */
|
|
|
|
|
, teusm.clos_dt /* 마감일시 */
|
|
|
|
|
, now()
|
|
|
|
|
, 'batch'
|
|
|
|
|
FROM tb_ens_unity_sndng_mastr teusm
|
|
|
|
|
WHERE teusm.unity_sndng_mastr_id = #{unitySndngMastrId}
|
|
|
|
|
AND teusm.sndng_process_sttus = #{sndngProcessSttus}
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<insert id="insertKakaoMyDocs">
|
|
|
|
|
/** ens-mysql-mapper|insertKakaoMyDocs-카카오내문서함 생성|julim */
|
|
|
|
|
INSERT
|
|
|
|
|
INTO tb_ens_kakao_my_doc (
|
|
|
|
|
sndng_detail_id, /* 발송상세ID */
|
|
|
|
|
unity_sndng_detail_id, /* 통합발송상세ID */
|
|
|
|
|
sndng_mastr_id, /* 발송마스터ID */
|
|
|
|
|
signgu_code, /* 시군구코드 */
|
|
|
|
|
ffnlg_code, /* 과태료코드 */
|
|
|
|
|
title, /* 제목 */
|
|
|
|
|
hash,
|
|
|
|
|
common_categories,
|
|
|
|
|
read_expired_at, /* 처리마감시간 */
|
|
|
|
|
-- recv_ci, /* 받는이 CI */
|
|
|
|
|
recv_phone_number, /* 받는이 전화번호 */
|
|
|
|
|
recv_name, /* 받는이 이름 */
|
|
|
|
|
recv_birthday, /* 받는이 생년월일 */
|
|
|
|
|
recv_is_required_verify_name,/* 성명검증옵션 */
|
|
|
|
|
prop_link, /* 모바일페이지 URL */
|
|
|
|
|
prop_payload,
|
|
|
|
|
prop_message,
|
|
|
|
|
prop_cs_number, /* 고객센터 전화번호 */
|
|
|
|
|
prop_cs_name, /* 고객센터 명 */
|
|
|
|
|
-- external_document_uuid,/* 외부문서 식별번호 */
|
|
|
|
|
regist_dt,
|
|
|
|
|
register
|
|
|
|
|
)
|
|
|
|
|
SELECT LPAD(NEXTVAL(sndng_detail_id_seq), 20, '0')
|
|
|
|
|
, teusd.unity_sndng_detail_id
|
|
|
|
|
, #{sndngMastrId}
|
|
|
|
|
, teusm.signgu_code
|
|
|
|
|
, teusm.ffnlg_code
|
|
|
|
|
, tetm.tmplat_nm
|
|
|
|
|
, SHA2(teusd.unity_sndng_detail_id, 256)
|
|
|
|
|
, '[NOTICE]'
|
|
|
|
|
, unix_timestamp(teusm.clos_dt)
|
|
|
|
|
-- , NULL
|
|
|
|
|
, teusd.moblphon_no
|
|
|
|
|
, teusd.nm
|
|
|
|
|
, teusd.ihidnum
|
|
|
|
|
, 'false'
|
|
|
|
|
, tetm.redirect_url
|
|
|
|
|
, tetm.tmplat_sj
|
|
|
|
|
, CASE WHEN teusm.sndng_ty_code='PNI' THEN teusd.tmplt_msg_data
|
|
|
|
|
ELSE tetm.tmplat_cn END
|
|
|
|
|
, tetm.cstmr_cnter_tlphon_no
|
|
|
|
|
, '콜센터'
|
|
|
|
|
-- , null
|
|
|
|
|
, now()
|
|
|
|
|
, 'batch'
|
|
|
|
|
FROM tb_ens_unity_sndng_mastr teusm
|
|
|
|
|
LEFT JOIN tb_ens_tmplat_manage tetm
|
|
|
|
|
ON teusm.tmplat_id = tetm.tmplat_id
|
|
|
|
|
LEFT JOIN tb_ens_unity_sndng_detail teusd
|
|
|
|
|
ON teusm.unity_sndng_mastr_id = teusd.unity_sndng_mastr_id
|
|
|
|
|
WHERE teusm.unity_sndng_mastr_id = #{unitySndngMastrId}
|
|
|
|
|
AND teusm.sndng_process_sttus = #{sndngProcessSttus}
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<insert id="insertSmsSndng">
|
|
|
|
|
/** ens-mysql-mapper|insertSmsSndng-문자발송 데이터 생성|julim */
|
|
|
|
|
INSERT
|
|
|
|
|
INTO tb_ens_sms_sndng (
|
|
|
|
|
sndng_detail_id, /* 발송 상세 id */
|
|
|
|
|
unity_sndng_detail_id, /* 통합 발송 상세 id */
|
|
|
|
|
sndng_mastr_id, /* 발송 마스터 id */
|
|
|
|
|
signgu_code, /* 시군구 코드 */
|
|
|
|
|
ffnlg_code, /* 과태료 코드 */
|
|
|
|
|
vhcle_no, /* 차량 번호 */
|
|
|
|
|
sms_sndng_dt, /* 문자 발송 일시 */
|
|
|
|
|
sms_trnsmis_stle, /* 문자 전송 형태 */
|
|
|
|
|
sms_trnsmit_tlphon_no, /* 문자 송신 전화 번호 */
|
|
|
|
|
sms_recptn_tlphon_no, /* 문자 수신 전화 번호 */
|
|
|
|
|
sms_mssage, /* 문자 메시지 */
|
|
|
|
|
sms_sndng_sttus, /* 문자 발송 상태 */
|
|
|
|
|
sms_sndng_process_sttus, /* 문자 발송 처리 상태 */
|
|
|
|
|
regist_dt,
|
|
|
|
|
register
|
|
|
|
|
)
|
|
|
|
|
SELECT LPAD(NEXTVAL(sndng_detail_id_seq), 20, '0')
|
|
|
|
|
, teusd.unity_sndng_detail_id
|
|
|
|
|
, #{sndngMastrId}
|
|
|
|
|
, teusm.signgu_code
|
|
|
|
|
, teusm.ffnlg_code
|
|
|
|
|
, teusd.vhcle_no
|
|
|
|
|
, date_format(now(), '%Y%m%d%H%i%S')
|
|
|
|
|
, '0'
|
|
|
|
|
, REPLACE(tetm.cstmr_cnter_tlphon_no, '-', '')
|
|
|
|
|
, teusd.moblphon_no
|
|
|
|
|
, teusd.tmplt_msg_data
|
|
|
|
|
, '2'
|
|
|
|
|
, '06'
|
|
|
|
|
, now()
|
|
|
|
|
, 'batch'
|
|
|
|
|
FROM tb_ens_unity_sndng_mastr teusm
|
|
|
|
|
LEFT JOIN tb_ens_tmplat_manage tetm
|
|
|
|
|
ON teusm.tmplat_id = tetm.tmplat_id
|
|
|
|
|
LEFT JOIN tb_ens_unity_sndng_detail teusd
|
|
|
|
|
ON teusm.unity_sndng_mastr_id = teusd.unity_sndng_mastr_id
|
|
|
|
|
WHERE teusm.unity_sndng_mastr_id = #{unitySndngMastrId}
|
|
|
|
|
AND teusm.sndng_process_sttus = #{sndngProcessSttus}
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<insert id="insertPostSndng">
|
|
|
|
|
INSERT
|
|
|
|
|
INTO tb_ens_post_sndng (
|
|
|
|
|
sndng_detail_id, /* 발송 상세 id */
|
|
|
|
|
unity_sndng_detail_id, /* 통합 발송 상세 id */
|
|
|
|
|
sndng_mastr_id, /* 발송 마스터 id */
|
|
|
|
|
signgu_code, /* 시군구 코드 */
|
|
|
|
|
ffnlg_code, /* 과태료 코드 */
|
|
|
|
|
service_cd, /* 서비스 코드 */
|
|
|
|
|
con_key, /* 연계 식별 키 */
|
|
|
|
|
sender_nm, /* 발송인 명 */
|
|
|
|
|
sender_zip_no, /* 발송인 우편번호 */
|
|
|
|
|
sender_addr, /* 발송인 주소 */
|
|
|
|
|
sender_detail_addr, /* 발송인 상세 주소 */
|
|
|
|
|
receiver_send_no, /* 수취인 일련 번호 */
|
|
|
|
|
receiver_nm, /* 수취인 명 */
|
|
|
|
|
receiver_zip_no, /* 수취인 우편번호 */
|
|
|
|
|
receiver_addr, /* 수취인 주소 */
|
|
|
|
|
receiver_detail_addr, /* 수취인 상세 주소 */
|
|
|
|
|
sschnge_1, /* 가변 1 */
|
|
|
|
|
sschnge_2, /* 가변 2 */
|
|
|
|
|
sschnge_3, /* 가변 3 */
|
|
|
|
|
regist_dt,
|
|
|
|
|
register
|
|
|
|
|
)
|
|
|
|
|
SELECT LPAD(NEXTVAL(sndng_detail_id_seq), 20, '0')
|
|
|
|
|
, teusd.unity_sndng_detail_id
|
|
|
|
|
, #{sndngMastrId}
|
|
|
|
|
, teusm.signgu_code
|
|
|
|
|
, teusm.ffnlg_code
|
|
|
|
|
, 'PST'
|
|
|
|
|
, (SELECT CONCAT('0009900112Z1',date_format(now(), '%Y%m%d%H%i%S')) from dual)
|
|
|
|
|
, term.sender_nm
|
|
|
|
|
, term.sender_zip_no
|
|
|
|
|
, term.sender_addr
|
|
|
|
|
, term.sender_detail_addr
|
|
|
|
|
, row_number() over(order by teusd.unity_sndng_detail_id)
|
|
|
|
|
, teusd.nm
|
|
|
|
|
, teusd.zip
|
|
|
|
|
, teusd.adres
|
|
|
|
|
, teusd.detail_adres
|
|
|
|
|
, CONCAT(teusd.vhcle_no, '|', tecd.spt_nm)
|
|
|
|
|
, CONCAT(tecd.reglt_dt, '|', date_format(date_add(now(), interval + 20 day), '%Y%m%d'))
|
|
|
|
|
, '32000'
|
|
|
|
|
, now()
|
|
|
|
|
, 'batch'
|
|
|
|
|
FROM tb_ens_unity_sndng_mastr teusm
|
|
|
|
|
LEFT JOIN tb_ens_tmplat_manage tetm
|
|
|
|
|
ON teusm.tmplat_id = tetm.tmplat_id
|
|
|
|
|
LEFT JOIN tb_ens_unity_sndng_detail teusd
|
|
|
|
|
ON teusm.unity_sndng_mastr_id = teusd.unity_sndng_mastr_id
|
|
|
|
|
LEFT JOIN tb_ens_rlaybsnm_manage term
|
|
|
|
|
ON teusm.signgu_code = term.signgu_code AND teusm.ffnlg_code = term.ffnlg_code
|
|
|
|
|
LEFT JOIN tb_ens_cntc_data tecd
|
|
|
|
|
ON teusd.unity_sndng_detail_id=tecd.unity_sndng_detail_id
|
|
|
|
|
<if test="sndngProcessSttus == 'sending1'">
|
|
|
|
|
INNER JOIN tb_ens_kakao_my_doc tekmd
|
|
|
|
|
ON teusd.unity_sndng_detail_id = tekmd.unity_sndng_detail_id
|
|
|
|
|
AND (NOT (tekmd.doc_box_status = 'READ' AND tekmd.error_code IS NULL) OR (tekmd.doc_box_status IS NULL and tekmd.error_code IS NULL))
|
|
|
|
|
</if>
|
|
|
|
|
WHERE teusm.unity_sndng_mastr_id = #{unitySndngMastrId}
|
|
|
|
|
AND teusm.sndng_process_sttus = #{sndngProcessSttus}
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateProcessSttusUnitySndngMst">
|
|
|
|
|
/** ens-mysql-mapper|updateProcessSttusUntySndngMst-통합발송마스터 상태 변경|julim */
|
|
|
|
|
UPDATE tb_ens_unity_sndng_mastr
|
|
|
|
|
SET sndng_process_sttus = #{newSndngProcessSttus}
|
|
|
|
|
, error_code = #{errorCode}
|
|
|
|
|
, error_mssage = #{errorMssage}
|
|
|
|
|
, updt_dt = now()
|
|
|
|
|
, updusr = 'batch'
|
|
|
|
|
WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
|
|
|
|
|
</update>
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ make ============================================= -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ close =========================================== -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<select id="selectCloseTgts" resultType="string">
|
|
|
|
|
/** ens-mysql-mapper|selectCloseTgts-종료 대상 조회|julim */
|
|
|
|
|
SELECT unity_sndng_mastr_id
|
|
|
|
|
FROM tb_cntc_sndng_mastr
|
|
|
|
|
WHERE sndng_process_sttus IN ('send-ok', 'sending1', 'sending2')
|
|
|
|
|
AND clos_dt <![CDATA[<]]> date_format(adddate(now(), -1), '%Y%m%d%H%i%S')
|
|
|
|
|
</select>
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ close =========================================== -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ send ============================================= -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<select id="selectSendBulkTgts" resultType="kr.xit.biz.ens.model.EnsDTO$SndngMssageParam">
|
|
|
|
|
/** ens-mysql-mapper|selectSendBulkTgts-발송 대상 조회|julim */
|
|
|
|
|
SELECT tesm.sndng_mastr_id
|
|
|
|
|
, tesm.unity_sndng_mastr_id
|
|
|
|
|
, tesm.tmplat_id
|
|
|
|
|
, tesm.sndng_co
|
|
|
|
|
, tesm.try_seq
|
|
|
|
|
, tesm.sndng_process_sttus
|
|
|
|
|
, teusm.try1
|
|
|
|
|
, teusm.try2
|
|
|
|
|
, teusm.try3
|
|
|
|
|
, teusm.try_cnt
|
|
|
|
|
FROM tb_ens_sndng_mastr tesm
|
|
|
|
|
JOIN tb_ens_unity_sndng_mastr teusm
|
|
|
|
|
ON tesm.unity_sndng_mastr_id = teusm.unity_sndng_mastr_id
|
|
|
|
|
WHERE tesm.sndng_process_sttus = #{sndngProcessSttus}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectKakaoSendTgts" resultType="kr.xit.biz.ens.model.EnsDTO$SendKakaoTgt">
|
|
|
|
|
/** ens-mysql-mapper|selectKakaoSendTgts-카카오 문서요청 대상 목록 조회|julim */
|
|
|
|
|
SELECT tesm.sndng_mastr_id /* 발송마스터 ID */
|
|
|
|
|
, tesm.unity_sndng_mastr_id /* 통합발송마스터 ID */
|
|
|
|
|
, tesm.signgu_code /* 시군구 코드 */
|
|
|
|
|
, tesm.ffnlg_code /* 과태료 코드 */
|
|
|
|
|
, tesm.tmplat_id /* 템플릿 Id */
|
|
|
|
|
, tesm.sndng_ty_code /* 발송유형 코드 */
|
|
|
|
|
, tesm.sndng_co /* 발송건수 */
|
|
|
|
|
, unix_timestamp(tesm.clos_dt) AS closDt /* 마감일시 */
|
|
|
|
|
, tekmd.sndng_detail_id /* 발송상세 ID */
|
|
|
|
|
, tekmd.unity_sndng_detail_id /* 통합발송상세 ID */
|
|
|
|
|
, tekmd.title /* 제목 */
|
|
|
|
|
, tekmd.hash
|
|
|
|
|
, tekmd.common_categories
|
|
|
|
|
, tekmd.recv_phone_number /* 받는이 전화번호 */
|
|
|
|
|
, tekmd.recv_name /* 받는이 이름 */
|
|
|
|
|
, tekmd.recv_birthday /* 받는이 생년월일 */
|
|
|
|
|
, tekmd.prop_link /* redirect url */
|
|
|
|
|
, tekmd.prop_payload
|
|
|
|
|
, tekmd.prop_message
|
|
|
|
|
, tekmd.prop_cs_name /* 콜센터 명 */
|
|
|
|
|
, tekmd.prop_cs_number /* 콜센터 전화번호 */
|
|
|
|
|
, tec.ci /* ci */
|
|
|
|
|
FROM tb_ens_sndng_mastr tesm
|
|
|
|
|
JOIN tb_ens_kakao_my_doc tekmd
|
|
|
|
|
ON tesm.sndng_mastr_id = tekmd.sndng_mastr_id
|
|
|
|
|
LEFT JOIN tb_ens_ci tec
|
|
|
|
|
ON tekmd.unity_sndng_detail_id = tec.unity_sndng_detail_id
|
|
|
|
|
WHERE tesm.sndng_mastr_id = #{sndngMastrId}
|
|
|
|
|
-- AND tesm.sndng_process_sttus = #{sndngProcessSttus}
|
|
|
|
|
ORDER BY tesm.unity_sndng_mastr_id
|
|
|
|
|
, tekmd.unity_sndng_detail_id
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectPostTgts" resultType="kr.xit.biz.ens.model.EnsDTO$PostSndng">
|
|
|
|
|
/** ens-mysql-mapper|selectPostTgts-E-Green 발송 대상 목록 조회|julim */
|
|
|
|
|
SELECT tesm.unity_sndng_mastr_id
|
|
|
|
|
, tesm.sndng_mastr_id
|
|
|
|
|
, CASE WHEN tesm.try_seq = tesm.try_cnt THEN 'send-ok'
|
|
|
|
|
ELSE concat('sending', try_seq)
|
|
|
|
|
END AS sndngProcessSttus
|
|
|
|
|
, teps.sndng_detail_id
|
|
|
|
|
, teps.unity_sndng_detail_id
|
|
|
|
|
, teps.sndng_mastr_id
|
|
|
|
|
, teps.signgu_code
|
|
|
|
|
, teps.ffnlg_code
|
|
|
|
|
, teps.service_cd
|
|
|
|
|
, teps.con_key
|
|
|
|
|
, teps.sender_nm
|
|
|
|
|
, teps.sender_zip_no
|
|
|
|
|
, teps.sender_addr
|
|
|
|
|
, teps.sender_detail_addr
|
|
|
|
|
, teps.receiver_send_no
|
|
|
|
|
, teps.receiver_nm
|
|
|
|
|
, teps.receiver_zip_no
|
|
|
|
|
, teps.receiver_addr
|
|
|
|
|
, teps.receiver_detail_addr
|
|
|
|
|
, teps.sschnge_1
|
|
|
|
|
, teps.sschnge_2
|
|
|
|
|
, teps.sschnge_3
|
|
|
|
|
FROM tb_ens_sndng_mastr tesm
|
|
|
|
|
JOIN tb_ens_post_sndng teps
|
|
|
|
|
ON tesm.sndng_mastr_id=teps.sndng_mastr_id
|
|
|
|
|
WHERE teps.sndng_mastr_id = #{sndngMastrId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectSmsSendTgts" resultType="kr.xit.biz.ens.model.EnsDTO$SmsSndng">
|
|
|
|
|
/** ens-mysql-mapper|selectSmsSendTgts-SMS 발송 대상 목록 조회|julim */
|
|
|
|
|
SELECT tesm.unity_sndng_mastr_id
|
|
|
|
|
, tesm.sndng_mastr_id
|
|
|
|
|
, CASE WHEN tesm.try_seq = tesm.try_cnt THEN 'send-ok'
|
|
|
|
|
ELSE concat('sending', try_seq)
|
|
|
|
|
END AS sndngProcessSttus
|
|
|
|
|
, tess.sndng_detail_id
|
|
|
|
|
, tess.unity_sndng_detail_id
|
|
|
|
|
, tess.sndng_mastr_id
|
|
|
|
|
, tess.signgu_code
|
|
|
|
|
, tess.ffnlg_code
|
|
|
|
|
, tess.vhcle_no
|
|
|
|
|
, tess.sms_sndng_dt /* 문자 발송 일시 */
|
|
|
|
|
, tess.sms_trnsmis_stle /* 문자 전송 형태 */
|
|
|
|
|
, tess.sms_trnsmit_tlphon_no /* 문자 송신 전화 번호 */
|
|
|
|
|
, tess.sms_recptn_tlphon_no /* 문자 수진 전화 번호 */
|
|
|
|
|
, tess.sms_mssage /* 문자 메세지 */
|
|
|
|
|
, tess.sms_sndng_sttus /* 문자 발송 상태 */
|
|
|
|
|
, tess.sms_sndng_process_sttus /* 문자 발송 처리 상태 */
|
|
|
|
|
FROM tb_ens_sndng_mastr tesm
|
|
|
|
|
JOIN tb_ens_sms_sndng tess
|
|
|
|
|
ON tesm.sndng_mastr_id=tess.sndng_mastr_id
|
|
|
|
|
WHERE tess.sndng_mastr_id = #{sndngMastrId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectSndProcessStatus" resultType="kr.xit.biz.ens.model.EnsDTO$SndngMssageParam">
|
|
|
|
|
/** ens-mysql-mapper|selectSndProcessStatus-발송상태정보조회|julim */
|
|
|
|
|
SELECT tesm.sndng_mastr_id
|
|
|
|
|
, tesm.unity_sndng_mastr_id
|
|
|
|
|
, teusm.try_cnt
|
|
|
|
|
, tesm.try_seq
|
|
|
|
|
, CASE WHEN tesm.try_cnt = 3 THEN IF(tesm.try_seq = 3, 'send-ok', concat('sending', tesm.try_seq))
|
|
|
|
|
WHEN tesm.try_cnt = 2 THEN IF(tesm.try_seq = 2, 'send-ok', concat('sending', tesm.try_seq))
|
|
|
|
|
ELSE 'send-ok'
|
|
|
|
|
END AS newSndngProcessSttus
|
|
|
|
|
FROM tb_ens_sndng_mastr tesm
|
|
|
|
|
JOIN tb_ens_unity_sndng_mastr teusm
|
|
|
|
|
ON tesm.unity_sndng_mastr_id = teusm.unity_sndng_mastr_id
|
|
|
|
|
WHERE tesm.sndng_mastr_id = #{sndngMastrId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<update id="updateKakaoSendBulksResult">
|
|
|
|
|
/** ens-mysql-mapper|updateKakaoSendBulksResult-카카오페이 문서요청 결과 반영|julim */
|
|
|
|
|
UPDATE tb_ens_kakao_my_doc
|
|
|
|
|
SET external_document_uuid = #{external_document_uuid}
|
|
|
|
|
, document_binder_uuid = #{document_binder_uuid}
|
|
|
|
|
, error_code = #{error_code}
|
|
|
|
|
, error_message = #{error_message}
|
|
|
|
|
, updt_dt = now()
|
|
|
|
|
, updusr = 'batch'
|
|
|
|
|
WHERE unity_sndng_detail_id = #{external_document_uuid}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<insert id="insertMobilePageManage">
|
|
|
|
|
/** ens-mysql-mapper|insertMobilePageManage-모바일페이지관리 데이타 생성|julim */
|
|
|
|
|
INSERT
|
|
|
|
|
INTO tb_ens_mobile_page_manage (
|
|
|
|
|
sndng_detail_id, /* 발송상세 ID*/
|
|
|
|
|
sndng_se_code, /* 발송 구분 코드 */
|
|
|
|
|
mobile_page_cn, /* 모바일 페이지 내용 */
|
|
|
|
|
regist_dt,
|
|
|
|
|
register
|
|
|
|
|
)
|
|
|
|
|
SELECT tekmd.sndng_detail_id
|
|
|
|
|
, 'KKO-MY-DOC'
|
|
|
|
|
, teusd.mobile_page_cn
|
|
|
|
|
, date_format(now(), '%Y%m%d%H%i%s')
|
|
|
|
|
, 'batch'
|
|
|
|
|
FROM tb_ens_kakao_my_doc tekmd
|
|
|
|
|
JOIN tb_ens_unity_sndng_detail teusd
|
|
|
|
|
ON tekmd.unity_sndng_detail_id = teusd.unity_sndng_detail_id
|
|
|
|
|
WHERE teusd.unity_sndng_detail_id = #{unitySndngDetailId}
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateProcessSttusSndngMst">
|
|
|
|
|
/** ens-mysql-mapper|updateProcessSttusSndngMst-발송마스터 상태 변경|julim */
|
|
|
|
|
UPDATE tb_ens_sndng_mastr
|
|
|
|
|
SET sndng_process_sttus = #{newSndngProcessSttus}
|
|
|
|
|
, error_code = #{errorCode}
|
|
|
|
|
, error_mssage = #{errorMssage}
|
|
|
|
|
, updt_dt = now()
|
|
|
|
|
, updusr = 'batch'
|
|
|
|
|
WHERE sndng_mastr_id = #{sndngMastrId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<update id="updateProcessSttusBulkSndngMst">
|
|
|
|
|
/** ens-mysql-mapper|updateProcessSttusBulkSndngMst-발송마스터 상태 다건 변경|julim */
|
|
|
|
|
UPDATE tb_ens_sndng_mastr
|
|
|
|
|
SET sndng_process_sttus = #{newSndngProcessSttus}
|
|
|
|
|
, updt_dt = now()
|
|
|
|
|
, updusr = 'batch'
|
|
|
|
|
WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
|
|
|
|
|
</update>
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ send ============================================= -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ status ============================================= -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<select id="selectKakaoStatusTgts" resultType="string">
|
|
|
|
|
/** ens-mysql-mapper|selectKakaoStatusTgts-카카오 문서 상태 조회 대상 목록 조회|julim */
|
|
|
|
|
SELECT document_binder_uuid
|
|
|
|
|
FROM tb_ens_sndng_mastr tesm
|
|
|
|
|
JOIN tb_ens_kakao_my_doc tekmd
|
|
|
|
|
ON tesm.sndng_mastr_id = tekmd.sndng_mastr_id
|
|
|
|
|
WHERE tesm.sndng_process_sttus IN ('send-ok', 'sending1', 'sending2')
|
|
|
|
|
AND IFNULL(tekmd.document_binder_uuid, '') != ''
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<update id="updateKakaoStatusInfo">
|
|
|
|
|
/** ens-mysql-mapper|updateKakaoStatusInfo-카카오 문서 상태 조회 결과 반영|julim */
|
|
|
|
|
UPDATE tb_ens_kakao_my_doc
|
|
|
|
|
SET doc_box_status = #{status_data.doc_box_status} /* 진행상태 */
|
|
|
|
|
, doc_box_sent_at = #{status_data.doc_box_sent_at} /* 송신시간 */
|
|
|
|
|
, doc_box_received_at = #{status_data.doc_box_received_at} /* 수신시간 */
|
|
|
|
|
, doc_box_read_at = #{status_data.doc_box_read_at} /* 최초열람시간 */
|
|
|
|
|
, authenticated_at = #{status_data.authenticated_at} /* 최초열람인증시간 */
|
|
|
|
|
, token_used_at = #{status_data.token_used_at} /* 최초OTT 검증시간 */
|
|
|
|
|
, user_notified_at = #{status_data.user_notified_at} /* 알림톡 수신시간 */
|
|
|
|
|
, updt_dt = now()
|
|
|
|
|
, updusr = 'batch'
|
|
|
|
|
WHERE unity_sndng_detail_id = (SELECT tekmd.unity_sndng_detail_id
|
|
|
|
|
FROM tb_ens_kakao_my_doc tekmd
|
|
|
|
|
WHERE tekmd.document_binder_uuid = #{document_binder_uuid})
|
|
|
|
|
</update>
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ status ============================================= -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ result ============================================= -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<insert id="insertCntcSndngResult">
|
|
|
|
|
/** ens-mysql-mapper|insertCntcSndngResult-연계발송결과반영|julim */
|
|
|
|
|
INSERT
|
|
|
|
|
INTO tb_cntc_sndng_result (
|
|
|
|
|
unity_sndng_detail_id, /* 통합 발송 상세 ID*/
|
|
|
|
|
sndng_se_code, /* 발송구분코드 */
|
|
|
|
|
signgu_code, /* 시군구코드 */
|
|
|
|
|
ffnlg_code, /* 과태료코드 */
|
|
|
|
|
sndng_result_sttus,
|
|
|
|
|
requst_dt, /* 송신(요청) 일시 */
|
|
|
|
|
inqire_dt, /* 수신(조회) 일시 */
|
|
|
|
|
readng_dt, /* 최초열람일시 */
|
|
|
|
|
error_cn, /* 에러내용 */
|
|
|
|
|
regist_dt,
|
|
|
|
|
register
|
|
|
|
|
) SELECT unity_sndng_detail_id /* 통합 발송 상세 ID*/
|
|
|
|
|
, #{sndngSeCode} /* 발송구분코드 - KAKAO-MY-DOC */
|
|
|
|
|
, signgu_code /* 시군구코드 */
|
|
|
|
|
, ffnlg_code /* 과태료코드 */
|
|
|
|
|
, #{sndngResultSttus}
|
|
|
|
|
, from_unixtime(#{requstDt}, '%Y%m%d%H%i%s') /* 송신(요청) 일시 */
|
|
|
|
|
, from_unixtime(#{inqireDt}, '%Y%m%d%H%i%s') /* 수신(조회) 일시 */
|
|
|
|
|
, from_unixtime(#{readngDt}, '%Y%m%d%H%i%s') /* 최초열람일시 */
|
|
|
|
|
, #{errorCn} /* 에러내용 */
|
|
|
|
|
, now()
|
|
|
|
|
, 'batch'
|
|
|
|
|
FROM tb_ens_unity_sndng_detail
|
|
|
|
|
WHERE unity_sndng_detail_id = #{unitySndngDetailId}
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<insert id="updateCntcSndngResult">
|
|
|
|
|
/** ens-mysql-mapper|updateCntcSndngResult-연계발송결과반영|julim */
|
|
|
|
|
UPDATE tb_cntc_sndng_result
|
|
|
|
|
SET sndng_result_sttus = #{sndngResultSttus}
|
|
|
|
|
, requst_dt = from_unixtime(#{requstDt}, '%Y%m%d%H%i%s') /* 송신(요청) 일시 */
|
|
|
|
|
, inqire_dt = from_unixtime(#{inqireDt}, '%Y%m%d%H%i%s') /* 수신(조회) 일시 */
|
|
|
|
|
, readng_dt = from_unixtime(#{readngDt}, '%Y%m%d%H%i%s') /* 최초열람일시 */
|
|
|
|
|
, error_cn = #{errorCn}
|
|
|
|
|
, updt_dt = now()
|
|
|
|
|
, updusr = 'batch'
|
|
|
|
|
WHERE unity_sndng_detail_id = (SELECT tekmd.unity_sndng_detail_id
|
|
|
|
|
FROM tb_ens_kakao_my_doc tekmd
|
|
|
|
|
WHERE tekmd.document_binder_uuid = #{documentBinderUuid})
|
|
|
|
|
</insert>
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
<!-- ================================ result ============================================= -->
|
|
|
|
|
<!-- =================================================================================== -->
|
|
|
|
|
|
|
|
|
|
<select id="selectMobilePage" resultType="kr.xit.biz.ens.model.EnsDTO$MobilePageManage">
|
|
|
|
|
/** ens-mysql-mapper|selectMobilePage-모바일페이지콘텐트조회|julim */
|
|
|
|
|
SELECT tempm.sndng_detail_id
|
|
|
|
|
, tempm.sndng_se_code
|
|
|
|
|
, tempm.mobile_page_cn
|
|
|
|
|
FROM tb_ens_kakao_my_doc tekmd
|
|
|
|
|
JOIN tb_ens_mobile_page_manage tempm
|
|
|
|
|
ON tekmd.sndng_detail_id = tempm.sndng_detail_id
|
|
|
|
|
WHERE tekmd.unity_sndng_detail_id = #{external_document_uuid}
|
|
|
|
|
AND tekmd.document_binder_uuid = #{document_binder_uuid}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectTmplat" resultType="kr.xit.biz.ens.model.EnsDTO$TmplatManage">
|
|
|
|
|
/** ens-mysql-mapper|selectTmplat-템플릿정보조회|julim */
|
|
|
|
|
SELECT tmplat_id /* 템플릿 아이디 */
|
|
|
|
|
, signgu_code /* 시군구 코드 */
|
|
|
|
|
, ffnlg_code /* 과태료 코드 */
|
|
|
|
|
, sndng_ty_code /* 발송유형 코드 */
|
|
|
|
|
, tmplat_nm /* 템플릿 명 */
|
|
|
|
|
, tmplat_sj /* 템플릿 제목 */
|
|
|
|
|
, tmplat_cn /* 템플릿 내용 */
|
|
|
|
|
, cstmr_cnter_tlphon_no /* 고객센터 전화번호 */
|
|
|
|
|
, redirect_url
|
|
|
|
|
, try1
|
|
|
|
|
, try2
|
|
|
|
|
, try3
|
|
|
|
|
, try2_minute
|
|
|
|
|
, try3_minute
|
|
|
|
|
, use_at
|
|
|
|
|
FROM tb_ens_tmplat_manage
|
|
|
|
|
WHERE tmplat_id = #{tmplatId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectAcceptVali" resultType="kr.xit.biz.ens.model.EnsDTO$sndngVali">
|
|
|
|
|
/** ens-mysql-mapper|selectAcceptVali-Validate용|seojh */
|
|
|
|
|
SELECT term.ffnlg_code
|
|
|
|
|
, term.signgu_code
|
|
|
|
|
, tetm.tmplat_id
|
|
|
|
|
, tcsm.sndng_ty_code
|
|
|
|
|
, tcsm.sndng_co
|
|
|
|
|
, tcsm.sndng_dt
|
|
|
|
|
, tcsm.clos_dt
|
|
|
|
|
, tcsd.main_code
|
|
|
|
|
, tcsd.vhcle_no
|
|
|
|
|
, tcsd.nm
|
|
|
|
|
, tcsd.ffnlg_code AS ffnlg_code_de
|
|
|
|
|
, tcsd.signgu_code AS signgu_code_de
|
|
|
|
|
, tcsd.ihidnum
|
|
|
|
|
, tcsd.moblphon_no
|
|
|
|
|
, tcsd.mobile_page_cn
|
|
|
|
|
, tcsd.adres
|
|
|
|
|
, tcsd.detail_adres
|
|
|
|
|
, tcsd.zip
|
|
|
|
|
, tetm.try1
|
|
|
|
|
, tetm.try2
|
|
|
|
|
, tetm.try3
|
|
|
|
|
, 1 AS try_seq
|
|
|
|
|
, tec.ci
|
|
|
|
|
FROM tb_cntc_sndng_mastr tcsm
|
|
|
|
|
JOIN tb_cntc_sndng_detail tcsd
|
|
|
|
|
ON tcsm.unity_sndng_mastr_id = tcsd.unity_sndng_mastr_id
|
|
|
|
|
LEFT JOIN tb_ens_ci tec
|
|
|
|
|
ON tcsd.unity_sndng_detail_id = tec.unity_sndng_detail_id
|
|
|
|
|
LEFT OUTER JOIN tb_ens_tmplat_manage tetm
|
|
|
|
|
ON tcsm.tmplat_id = tetm.tmplat_id
|
|
|
|
|
LEFT OUTER JOIN tb_ens_rlaybsnm_manage term
|
|
|
|
|
ON tcsm.signgu_code = term.signgu_code AND tcsm.ffnlg_code = term.ffnlg_code
|
|
|
|
|
WHERE tcsm.unity_sndng_mastr_id = #{unitySndngMastrId}
|
|
|
|
|
AND tcsm.sndng_process_sttus = #{sndngProcessSttus}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|