refactor: docs 상세 기술

메소드 순서 변경
dev
gitea-관리자 1 year ago
parent 004c676da6
commit 642c67582a

@ -32,37 +32,51 @@ public interface IEnsBatchMapper {
// accept // accept
//---------------------------------------------------------------------- //----------------------------------------------------------------------
/** /**
* <pre>
* *
* @param t * - tb_cntc_sndng_mastr, tb_ens_tmplat_manage
* @param t T
* @return List<EnsDTO.SndngMssageParam> * @return List<EnsDTO.SndngMssageParam>
* </pre>
*/ */
<T> List<EnsDTO.SndngMssageParam> selectAcceptTgts(final T t); <T> List<EnsDTO.SndngMssageParam> selectAcceptTgts(final T t);
/** /**
* <pre>
* *
* @param t * - tb_cntc_sndng_mastr, tb_cntc_sndng_detail
* @param t T
* @return List<EnsDTO.SndngMssageParam> * @return List<EnsDTO.SndngMssageParam>
* </pre>
*/ */
<T> List<EnsDTO.sndngVali> selectAcceptVali(final T t); <T> List<EnsDTO.sndngVali> selectAcceptVali(final T t);
/** /**
* <pre>
* *
* - tb_ens_unity_sndng_mastr
* @param t status * @param t status
* @return int * @return int
* </pre>
*/ */
<T> int insertUnitySndngMst(final T t); <T> int insertUnitySndngMst(final T t);
/** /**
* <pre>
* *
* - tb_ens_unity_sndng_detail
* @param t status * @param t status
* @return int * @return int
* </pre>
*/ */
<T> int insertUnitySndngDtls(final T t); <T> int insertUnitySndngDtls(final T t);
/** /**
* <pre>
* *
* - tb_cntc_sndng_mastr : sndng_process_sttus * - tb_cntc_sndng_mastr : sndng_process_sttus
* @param t status, newStatus * @param t status, newStatus
* @return int * @return int
* </pre>
*/ */
<T> int updateProcessSttusCntcSndngMst(final T t); <T> int updateProcessSttusCntcSndngMst(final T t);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -73,15 +87,18 @@ public interface IEnsBatchMapper {
// make // make
//---------------------------------------------------------------------- //----------------------------------------------------------------------
/** /**
* <pre>
* *
* @param t * - tb_ens_unity_sndng_mastr
* @param t T
* @return List<EnsDTO.SndngMssageParam> * @return List<EnsDTO.SndngMssageParam>
* </pre>
*/ */
<T> List<EnsDTO.SndngMssageParam> selectMakeTgts(final T t); <T> List<EnsDTO.SndngMssageParam> selectMakeTgts(final T t);
/** /**
* 2 * 2
* @param t * @param t T
* @return int * @return int
*/ */
<T> int selectSendOkTgts(final T t); <T> int selectSendOkTgts(final T t);
@ -144,9 +161,13 @@ public interface IEnsBatchMapper {
// send // send
//---------------------------------------------------------------------- //----------------------------------------------------------------------
/** /**
* * <pre>
* @param t *
* - tb_ens_sndng_mastr, tb_ens_unity_sndng_mastr
* - sndng_process_sttus : make-ok
* @param t T
* @return List<EnsDTO.SndngMssageParam> * @return List<EnsDTO.SndngMssageParam>
* </pre>
*/ */
<T> List<EnsDTO.SndngMssageParam> selectSendBulkTgts(final T t); <T> List<EnsDTO.SndngMssageParam> selectSendBulkTgts(final T t);

@ -100,8 +100,14 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
/** /**
* <pre> * <pre>
* accept() * accept()
* - 'accept'
* - : ,
* - tb_ens_unity_sndng_mastr
* - tb_ens_unity_sndng_detail
* 'accept-ok'
* - : 'accept-fail'
* *
* 1. : (accept) * 1. : (accept)
* -> {@link IEnsBatchMapper#selectAcceptTgts selectAcceptTgts} * -> {@link IEnsBatchMapper#selectAcceptTgts selectAcceptTgts}
* - tb_cntc_sndng_mastr, tb_ens_tmplat_manage * - tb_cntc_sndng_mastr, tb_ens_tmplat_manage
* *
@ -180,7 +186,13 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
/** /**
* <pre> * <pre>
* make() * make() -
* - 'accept-ok', 'sending1', 'sending2'
* - 'sending1,2' 2,3(sndng_dt_2,3)
* - : , ( )
* , 'make-ok'
* - : , 'make-fail1,2,3'
*
* 1. * 1.
* - (accept-ok) * - (accept-ok)
* - 1, 2 (sending1, sending2) * - 1, 2 (sending1, sending2)
@ -251,10 +263,18 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
} }
/** /**
* () send bulks * <pre>
* () send bulks - send
* - 'make-ok'
* - : ( )
* , , - 'send-ok'
* - : , , 'send-fail1,2,3'
*
* 1. : {@link IEnsBatchMapper#selectSendBulkTgts selectSendBulkTgts}
* - | E-GREEN | SMS 1. / 2. send() * - | E-GREEN | SMS 1. / 2. send()
* *
* @param reqDTO BatchEnsRequest * @param reqDTO BatchEnsRequest
* </pre>
*/ */
@Override @Override
@Transactional @Transactional
@ -269,8 +289,11 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
MDC.put("sndngMastrId", tgtDTO.getSndngMastrId()); MDC.put("sndngMastrId", tgtDTO.getSndngMastrId());
MDC.put(SNDNG_PROCESS_STTUS, "send-fail" + tgtDTO.getTrySeq()); MDC.put(SNDNG_PROCESS_STTUS, "send-fail" + tgtDTO.getTrySeq());
String[] tryVal = {Checks.checkVal(tgtDTO.getTry1(), ""), String[] tryVal = {
Checks.checkVal(tgtDTO.getTry2(), ""), Checks.checkVal(tgtDTO.getTry3(), "")}; Checks.checkVal(tgtDTO.getTry1(), ""),
Checks.checkVal(tgtDTO.getTry2(), ""),
Checks.checkVal(tgtDTO.getTry3(), "")
};
// 마스터 상태 변경값을 파라메터에서 받은 상태값으로 set // 마스터 상태 변경값을 파라메터에서 받은 상태값으로 set
tgtDTO.setNewSndngProcessSttus(reqDTO.getSndngProcessSttus()); tgtDTO.setNewSndngProcessSttus(reqDTO.getSndngProcessSttus());

@ -166,148 +166,149 @@
<insert id="insertSndngMst"> <insert id="insertSndngMst">
/** ens-mysql-mapper|insertSndngMst-발송마스터 생성|julim */ /** ens-mysql-mapper|insertSndngMst-발송마스터 생성|julim */
<selectKey keyProperty="sndngMastrId" resultType="string" order="BEFORE"> <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 SELECT concat(date_format(now(), '%Y%m%d'), LPAD(NEXTVAL(tb_ens_sndng_mastr_seq), 12, '0'))
FROM dual
</selectKey> </selectKey>
INSERT INSERT
INTO tb_ens_sndng_mastr ( INTO tb_ens_sndng_mastr (
sndng_mastr_id, /* 발송마스터 ID*/ sndng_mastr_id, /* 발송마스터 ID*/
unity_sndng_mastr_id, /* 통합발송마스터 ID */ unity_sndng_mastr_id, /* 통합발송마스터 ID */
signgu_code, /* 시군구 코드 */ signgu_code, /* 시군구 코드 */
ffnlg_code, /* 과태료 코드 */ ffnlg_code, /* 과태료 코드 */
tmplat_id, /* 템플릿 Id */ tmplat_id, /* 템플릿 Id */
sndng_ty_code, /* 발송유형 코드 */ sndng_ty_code, /* 발송유형 코드 */
sndng_se_code, /* 발송구분 코드 */ sndng_se_code, /* 발송구분 코드 */
sndng_co, /* 발송건수 */ sndng_co, /* 발송건수 */
try_seq, try_seq,
try_cnt, try_cnt,
sndng_process_sttus, /* 발송처리 상태 */ sndng_process_sttus, /* 발송처리 상태 */
sndng_dt, /* 발송일시 */ sndng_dt, /* 발송일시 */
clos_dt, /* 마감일시 */ clos_dt, /* 마감일시 */
regist_dt, regist_dt,
register register
) )
SELECT #{sndngMastrId} SELECT #{sndngMastrId}
, teusm.unity_sndng_mastr_id /* 통합발송마스터 ID */ , teusm.unity_sndng_mastr_id /* 통합발송마스터 ID */
, teusm.signgu_code /* 시군구 코드 */ , teusm.signgu_code /* 시군구 코드 */
, teusm.ffnlg_code /* 과태료 코드 */ , teusm.ffnlg_code /* 과태료 코드 */
, teusm.tmplat_id /* 템플릿 Id */ , teusm.tmplat_id /* 템플릿 Id */
, teusm.sndng_ty_code /* 발송유형 코드 */ , teusm.sndng_ty_code /* 발송유형 코드 */
, #{sndngSeCode} /* 발송구분 코드 */ , #{sndngSeCode} /* 발송구분 코드 */
, #{sndngCo} /* 발송건수 */ , #{sndngCo} /* 발송건수 */
, #{trySeq} , #{trySeq}
, teusm.try_cnt , teusm.try_cnt
, 'make-ok' /* 발송처리 상태 */ , 'make-ok' /* 발송처리 상태 */
, CASE WHEN #{trySeq}=3 THEN teusm.sndng_dt_3 , CASE WHEN #{trySeq}=3 THEN teusm.sndng_dt_3
WHEN #{trySeq}=2 THEN teusm.sndng_dt_2 WHEN #{trySeq}=2 THEN teusm.sndng_dt_2
ELSE teusm.sndng_dt_1 ELSE teusm.sndng_dt_1
END /* 1차, 2차, 3차에 따른 발송일시 */ END /* 1차, 2차, 3차에 따른 발송일시 */
, teusm.clos_dt /* 마감일시 */ , teusm.clos_dt /* 마감일시 */
, now() , now()
, 'batch' , 'batch'
FROM tb_ens_unity_sndng_mastr teusm FROM tb_ens_unity_sndng_mastr teusm
WHERE teusm.unity_sndng_mastr_id = #{unitySndngMastrId} WHERE teusm.unity_sndng_mastr_id = #{unitySndngMastrId}
AND teusm.sndng_process_sttus = #{sndngProcessSttus} 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>
<insert id="insertSmsSndng"> <insert id="insertKakaoMyDocs">
/** ens-mysql-mapper|insertSmsSndng-문자발송 데이터 생성|julim */ /** ens-mysql-mapper|insertKakaoMyDocs-카카오내문서함 생성|julim */
INSERT INSERT
INTO tb_ens_sms_sndng ( INTO tb_ens_kakao_my_doc (
sndng_detail_id, /* 발송 상세 id */ sndng_detail_id, /* 발송상세ID */
unity_sndng_detail_id, /* 통합 발송 상세 id */ unity_sndng_detail_id, /* 통합발송상세ID */
sndng_mastr_id, /* 발송 마스터 id */ sndng_mastr_id, /* 발송마스터ID */
signgu_code, /* 시군구 코드 */ signgu_code, /* 시군구코드 */
ffnlg_code, /* 과태료 코드 */ ffnlg_code, /* 과태료코드 */
vhcle_no, /* 차량 번호 */ title, /* 제목 */
sms_sndng_dt, /* 문자 발송 일시 */ hash,
sms_trnsmis_stle, /* 문자 전송 형태 */ common_categories,
sms_trnsmit_tlphon_no, /* 문자 송신 전화 번호 */ read_expired_at, /* 처리마감시간 */
sms_recptn_tlphon_no, /* 문자 수신 전화 번호 */ -- recv_ci, /* 받는이 CI */
sms_mssage, /* 문자 메시지 */ recv_phone_number, /* 받는이 전화번호 */
sms_sndng_sttus, /* 문자 발송 상태 */ recv_name, /* 받는이 이름 */
sms_sndng_process_sttus, /* 문자 발송 처리 상태 */ recv_birthday, /* 받는이 생년월일 */
regist_dt, recv_is_required_verify_name,/* 성명검증옵션 */
register 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') SELECT LPAD(NEXTVAL(sndng_detail_id_seq), 20, '0')
, teusd.unity_sndng_detail_id , teusd.unity_sndng_detail_id
, #{sndngMastrId} , #{sndngMastrId}
, teusm.signgu_code , teusm.signgu_code
, teusm.ffnlg_code , teusm.ffnlg_code
, teusd.vhcle_no , tetm.tmplat_nm
, date_format(now(), '%Y%m%d%H%i%S') , SHA2(teusd.unity_sndng_detail_id, 256)
, '0' , '[NOTICE]'
, REPLACE(tetm.cstmr_cnter_tlphon_no, '-', '') , unix_timestamp(teusm.clos_dt)
-- , NULL
, teusd.moblphon_no , teusd.moblphon_no
, teusd.tmplt_msg_data , teusd.nm
, '2' , teusd.ihidnum
, '06' , '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() , now()
, 'batch' , '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 FROM tb_ens_unity_sndng_mastr teusm
LEFT JOIN tb_ens_tmplat_manage tetm LEFT JOIN tb_ens_tmplat_manage tetm
ON teusm.tmplat_id = tetm.tmplat_id ON teusm.tmplat_id = tetm.tmplat_id
LEFT JOIN tb_ens_unity_sndng_detail teusd LEFT JOIN tb_ens_unity_sndng_detail teusd
ON teusm.unity_sndng_mastr_id = teusd.unity_sndng_mastr_id ON teusm.unity_sndng_mastr_id = teusd.unity_sndng_mastr_id
WHERE teusm.unity_sndng_mastr_id = #{unitySndngMastrId} WHERE teusm.unity_sndng_mastr_id = #{unitySndngMastrId}
AND teusm.sndng_process_sttus = #{sndngProcessSttus} AND teusm.sndng_process_sttus = #{sndngProcessSttus}
</insert> </insert>
@ -315,27 +316,27 @@ FROM tb_ens_unity_sndng_mastr teusm
<insert id="insertPostSndng"> <insert id="insertPostSndng">
INSERT INSERT
INTO tb_ens_post_sndng ( INTO tb_ens_post_sndng (
sndng_detail_id, /* 발송 상세 id */ sndng_detail_id, /* 발송 상세 id */
unity_sndng_detail_id, /* 통합 발송 상세 id */ unity_sndng_detail_id, /* 통합 발송 상세 id */
sndng_mastr_id, /* 발송 마스터 id */ sndng_mastr_id, /* 발송 마스터 id */
signgu_code, /* 시군구 코드 */ signgu_code, /* 시군구 코드 */
ffnlg_code, /* 과태료 코드 */ ffnlg_code, /* 과태료 코드 */
service_cd, /* 서비스 코드 */ service_cd, /* 서비스 코드 */
con_key, /* 연계 식별 키 */ con_key, /* 연계 식별 키 */
sender_nm, /* 발송인 명 */ sender_nm, /* 발송인 명 */
sender_zip_no, /* 발송인 우편번호 */ sender_zip_no, /* 발송인 우편번호 */
sender_addr, /* 발송인 주소 */ sender_addr, /* 발송인 주소 */
sender_detail_addr, /* 발송인 상세 주소 */ sender_detail_addr, /* 발송인 상세 주소 */
receiver_send_no, /* 수취인 일련 번호 */ receiver_send_no, /* 수취인 일련 번호 */
receiver_nm, /* 수취인 명 */ receiver_nm, /* 수취인 명 */
receiver_zip_no, /* 수취인 우편번호 */ receiver_zip_no, /* 수취인 우편번호 */
receiver_addr, /* 수취인 주소 */ receiver_addr, /* 수취인 주소 */
receiver_detail_addr, /* 수취인 상세 주소 */ receiver_detail_addr, /* 수취인 상세 주소 */
sschnge_1, /* 가변 1 */ sschnge_1, /* 가변 1 */
sschnge_2, /* 가변 2 */ sschnge_2, /* 가변 2 */
sschnge_3, /* 가변 3 */ sschnge_3, /* 가변 3 */
regist_dt, regist_dt,
register register
) )
SELECT LPAD(NEXTVAL(sndng_detail_id_seq), 20, '0') SELECT LPAD(NEXTVAL(sndng_detail_id_seq), 20, '0')
, teusd.unity_sndng_detail_id , teusd.unity_sndng_detail_id
@ -380,10 +381,10 @@ FROM tb_ens_unity_sndng_mastr teusm
/** ens-mysql-mapper|updateProcessSttusUntySndngMst-통합발송마스터 상태 변경|julim */ /** ens-mysql-mapper|updateProcessSttusUntySndngMst-통합발송마스터 상태 변경|julim */
UPDATE tb_ens_unity_sndng_mastr UPDATE tb_ens_unity_sndng_mastr
SET sndng_process_sttus = #{newSndngProcessSttus} SET sndng_process_sttus = #{newSndngProcessSttus}
, error_code = #{errorCode} , error_code = #{errorCode}
, error_mssage = #{errorMssage} , error_mssage = #{errorMssage}
, updt_dt = now() , updt_dt = now()
, updusr = 'batch' , updusr = 'batch'
WHERE unity_sndng_mastr_id = #{unitySndngMastrId} WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
</update> </update>
<!-- =================================================================================== --> <!-- =================================================================================== -->
@ -398,7 +399,7 @@ FROM tb_ens_unity_sndng_mastr teusm
<select id="selectCloseTgts" resultType="string"> <select id="selectCloseTgts" resultType="string">
/** ens-mysql-mapper|selectCloseTgts-종료 대상 조회|julim */ /** ens-mysql-mapper|selectCloseTgts-종료 대상 조회|julim */
SELECT unity_sndng_mastr_id SELECT unity_sndng_mastr_id
FROM tb_cntc_sndng_mastr FROM tb_cntc_sndng_mastr
WHERE sndng_process_sttus IN ('send-ok', 'sending1', 'sending2') WHERE sndng_process_sttus IN ('send-ok', 'sending1', 'sending2')
AND clos_dt <![CDATA[<]]> date_format(adddate(now(), -1), '%Y%m%d%H%i%S') AND clos_dt <![CDATA[<]]> date_format(adddate(now(), -1), '%Y%m%d%H%i%S')
</select> </select>
@ -410,17 +411,17 @@ FROM tb_ens_unity_sndng_mastr teusm
<!-- ================================ send ============================================= --> <!-- ================================ send ============================================= -->
<!-- =================================================================================== --> <!-- =================================================================================== -->
<select id="selectSendBulkTgts" resultType="kr.xit.biz.ens.model.EnsDTO$SndngMssageParam"> <select id="selectSendBulkTgts" resultType="kr.xit.biz.ens.model.EnsDTO$SndngMssageParam">
/** ens-mysql-mapper|selectSendBulkTgts-통합발송 대상 조회|julim */ /** ens-mysql-mapper|selectSendBulkTgts-발송 대상 조회|julim */
SELECT tesm.sndng_mastr_id SELECT tesm.sndng_mastr_id
, tesm.unity_sndng_mastr_id , tesm.unity_sndng_mastr_id
, tesm.tmplat_id , tesm.tmplat_id
, tesm.sndng_co , tesm.sndng_co
, tesm.try_seq , tesm.try_seq
, tesm.sndng_process_sttus , tesm.sndng_process_sttus
, teusm.try1 , teusm.try1
, teusm.try2 , teusm.try2
, teusm.try3 , teusm.try3
, teusm.try_cnt , teusm.try_cnt
FROM tb_ens_sndng_mastr tesm FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_unity_sndng_mastr teusm JOIN tb_ens_unity_sndng_mastr teusm
ON tesm.unity_sndng_mastr_id = teusm.unity_sndng_mastr_id ON tesm.unity_sndng_mastr_id = teusm.unity_sndng_mastr_id
@ -431,20 +432,20 @@ FROM tb_ens_unity_sndng_mastr teusm
/** ens-mysql-mapper|selectKakaoSendTgts-카카오 문서요청 대상 목록 조회|julim */ /** ens-mysql-mapper|selectKakaoSendTgts-카카오 문서요청 대상 목록 조회|julim */
SELECT tesm.sndng_mastr_id /* 발송마스터 ID */ SELECT tesm.sndng_mastr_id /* 발송마스터 ID */
, tesm.unity_sndng_mastr_id /* 통합발송마스터 ID */ , tesm.unity_sndng_mastr_id /* 통합발송마스터 ID */
, tesm.signgu_code /* 시군구 코드 */ , tesm.signgu_code /* 시군구 코드 */
, tesm.ffnlg_code /* 과태료 코드 */ , tesm.ffnlg_code /* 과태료 코드 */
, tesm.tmplat_id /* 템플릿 Id */ , tesm.tmplat_id /* 템플릿 Id */
, tesm.sndng_ty_code /* 발송유형 코드 */ , tesm.sndng_ty_code /* 발송유형 코드 */
, tesm.sndng_co /* 발송건수 */ , tesm.sndng_co /* 발송건수 */
, unix_timestamp(tesm.clos_dt) AS closDt /* 마감일시 */ , unix_timestamp(tesm.clos_dt) AS closDt /* 마감일시 */
, tekmd.sndng_detail_id /* 발송상세 ID */ , tekmd.sndng_detail_id /* 발송상세 ID */
, tekmd.unity_sndng_detail_id /* 통합발송상세 ID */ , tekmd.unity_sndng_detail_id /* 통합발송상세 ID */
, tekmd.title /* 제목 */ , tekmd.title /* 제목 */
, tekmd.hash , tekmd.hash
, tekmd.common_categories , tekmd.common_categories
, tekmd.recv_phone_number /* 받는이 전화번호 */ , tekmd.recv_phone_number /* 받는이 전화번호 */
, tekmd.recv_name /* 받는이 이름 */ , tekmd.recv_name /* 받는이 이름 */
, tekmd.recv_birthday /* 받는이 생년월일 */ , tekmd.recv_birthday /* 받는이 생년월일 */
, tekmd.prop_link /* redirect url */ , tekmd.prop_link /* redirect url */
, tekmd.prop_payload , tekmd.prop_payload
, tekmd.prop_message , tekmd.prop_message
@ -463,9 +464,9 @@ FROM tb_ens_unity_sndng_mastr teusm
/** ens-mysql-mapper|selectPostTgts-E-Green 발송 대상 목록 조회|julim */ /** ens-mysql-mapper|selectPostTgts-E-Green 발송 대상 목록 조회|julim */
SELECT tesm.unity_sndng_mastr_id SELECT tesm.unity_sndng_mastr_id
, tesm.sndng_mastr_id , tesm.sndng_mastr_id
, CASE WHEN tesm.try_seq = tesm.try_cnt THEN 'send-ok' , CASE WHEN tesm.try_seq = tesm.try_cnt THEN 'send-ok'
ELSE concat('sending', try_seq) ELSE concat('sending', try_seq)
END AS sndngProcessSttus END AS sndngProcessSttus
, teps.sndng_detail_id , teps.sndng_detail_id
, teps.unity_sndng_detail_id , teps.unity_sndng_detail_id
, teps.sndng_mastr_id , teps.sndng_mastr_id
@ -496,7 +497,7 @@ FROM tb_ens_unity_sndng_mastr teusm
SELECT tesm.unity_sndng_mastr_id SELECT tesm.unity_sndng_mastr_id
, tesm.sndng_mastr_id , tesm.sndng_mastr_id
, CASE WHEN tesm.try_seq = tesm.try_cnt THEN 'send-ok' , CASE WHEN tesm.try_seq = tesm.try_cnt THEN 'send-ok'
ELSE concat('sending', try_seq) ELSE concat('sending', try_seq)
END AS sndngProcessSttus END AS sndngProcessSttus
, tess.sndng_detail_id , tess.sndng_detail_id
, tess.unity_sndng_detail_id , tess.unity_sndng_detail_id
@ -520,13 +521,13 @@ FROM tb_ens_unity_sndng_mastr teusm
<select id="selectSndProcessStatus" resultType="kr.xit.biz.ens.model.EnsDTO$SndngMssageParam"> <select id="selectSndProcessStatus" resultType="kr.xit.biz.ens.model.EnsDTO$SndngMssageParam">
/** ens-mysql-mapper|selectSndProcessStatus-발송상태정보조회|julim */ /** ens-mysql-mapper|selectSndProcessStatus-발송상태정보조회|julim */
SELECT tesm.sndng_mastr_id SELECT tesm.sndng_mastr_id
, tesm.unity_sndng_mastr_id , tesm.unity_sndng_mastr_id
, teusm.try_cnt , teusm.try_cnt
, tesm.try_seq , tesm.try_seq
, CASE WHEN tesm.try_cnt = 3 THEN IF(tesm.try_seq = 3, 'send-ok', concat('sending', 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)) WHEN tesm.try_cnt = 2 THEN IF(tesm.try_seq = 2, 'send-ok', concat('sending', tesm.try_seq))
ELSE 'send-ok' ELSE 'send-ok'
END AS newSndngProcessSttus END AS newSndngProcessSttus
FROM tb_ens_sndng_mastr tesm FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_unity_sndng_mastr teusm JOIN tb_ens_unity_sndng_mastr teusm
ON tesm.unity_sndng_mastr_id = teusm.unity_sndng_mastr_id ON tesm.unity_sndng_mastr_id = teusm.unity_sndng_mastr_id
@ -540,50 +541,50 @@ FROM tb_ens_unity_sndng_mastr teusm
, document_binder_uuid = #{document_binder_uuid} , document_binder_uuid = #{document_binder_uuid}
, error_code = #{error_code} , error_code = #{error_code}
, error_message = #{error_message} , error_message = #{error_message}
, updt_dt = now() , updt_dt = now()
, updusr = 'batch' , updusr = 'batch'
WHERE unity_sndng_detail_id = #{external_document_uuid} WHERE unity_sndng_detail_id = #{external_document_uuid}
</update> </update>
<insert id="insertMobilePageManage"> <insert id="insertMobilePageManage">
/** ens-mysql-mapper|insertMobilePageManage-모바일페이지관리 데이타 생성|julim */ /** ens-mysql-mapper|insertMobilePageManage-모바일페이지관리 데이타 생성|julim */
INSERT INSERT
INTO tb_ens_mobile_page_manage ( INTO tb_ens_mobile_page_manage (
sndng_detail_id, /* 발송상세 ID*/ sndng_detail_id, /* 발송상세 ID*/
sndng_se_code, /* 발송 구분 코드 */ sndng_se_code, /* 발송 구분 코드 */
mobile_page_cn, /* 모바일 페이지 내용 */ mobile_page_cn, /* 모바일 페이지 내용 */
regist_dt, regist_dt,
register register
) )
SELECT tekmd.sndng_detail_id SELECT tekmd.sndng_detail_id
, 'KKO-MY-DOC' , 'KKO-MY-DOC'
, teusd.mobile_page_cn , teusd.mobile_page_cn
, date_format(now(), '%Y%m%d%H%i%s') , date_format(now(), '%Y%m%d%H%i%s')
, 'batch' , 'batch'
FROM tb_ens_kakao_my_doc tekmd FROM tb_ens_kakao_my_doc tekmd
JOIN tb_ens_unity_sndng_detail teusd JOIN tb_ens_unity_sndng_detail teusd
ON tekmd.unity_sndng_detail_id = teusd.unity_sndng_detail_id ON tekmd.unity_sndng_detail_id = teusd.unity_sndng_detail_id
WHERE teusd.unity_sndng_detail_id = #{unitySndngDetailId} WHERE teusd.unity_sndng_detail_id = #{unitySndngDetailId}
</insert> </insert>
<update id="updateProcessSttusSndngMst"> <update id="updateProcessSttusSndngMst">
/** ens-mysql-mapper|updateProcessSttusSndngMst-발송마스터 상태 변경|julim */ /** ens-mysql-mapper|updateProcessSttusSndngMst-발송마스터 상태 변경|julim */
UPDATE tb_ens_sndng_mastr UPDATE tb_ens_sndng_mastr
SET sndng_process_sttus = #{newSndngProcessSttus} SET sndng_process_sttus = #{newSndngProcessSttus}
, error_code = #{errorCode} , error_code = #{errorCode}
, error_mssage = #{errorMssage} , error_mssage = #{errorMssage}
, updt_dt = now() , updt_dt = now()
, updusr = 'batch' , updusr = 'batch'
WHERE sndng_mastr_id = #{sndngMastrId} WHERE sndng_mastr_id = #{sndngMastrId}
</update> </update>
<update id="updateProcessSttusBulkSndngMst"> <update id="updateProcessSttusBulkSndngMst">
/** ens-mysql-mapper|updateProcessSttusBulkSndngMst-발송마스터 상태 다건 변경|julim */ /** ens-mysql-mapper|updateProcessSttusBulkSndngMst-발송마스터 상태 다건 변경|julim */
UPDATE tb_ens_sndng_mastr UPDATE tb_ens_sndng_mastr
SET sndng_process_sttus = #{newSndngProcessSttus} SET sndng_process_sttus = #{newSndngProcessSttus}
, updt_dt = now() , updt_dt = now()
, updusr = 'batch' , updusr = 'batch'
WHERE unity_sndng_mastr_id = #{unitySndngMastrId} WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
</update> </update>
<!-- =================================================================================== --> <!-- =================================================================================== -->
<!-- ================================ send ============================================= --> <!-- ================================ send ============================================= -->
@ -660,12 +661,12 @@ FROM tb_ens_unity_sndng_mastr teusm
/** ens-mysql-mapper|updateCntcSndngResult-연계발송결과반영|julim */ /** ens-mysql-mapper|updateCntcSndngResult-연계발송결과반영|julim */
UPDATE tb_cntc_sndng_result UPDATE tb_cntc_sndng_result
SET sndng_result_sttus = #{sndngResultSttus} SET sndng_result_sttus = #{sndngResultSttus}
, requst_dt = from_unixtime(#{requstDt}, '%Y%m%d%H%i%s') /* 송신(요청) 일시 */ , requst_dt = from_unixtime(#{requstDt}, '%Y%m%d%H%i%s') /* 송신(요청) 일시 */
, inqire_dt = from_unixtime(#{inqireDt}, '%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') /* 최초열람일시 */ , readng_dt = from_unixtime(#{readngDt}, '%Y%m%d%H%i%s') /* 최초열람일시 */
, error_cn = #{errorCn} , error_cn = #{errorCn}
, updt_dt = now() , updt_dt = now()
, updusr = 'batch' , updusr = 'batch'
WHERE unity_sndng_detail_id = (SELECT tekmd.unity_sndng_detail_id WHERE unity_sndng_detail_id = (SELECT tekmd.unity_sndng_detail_id
FROM tb_ens_kakao_my_doc tekmd FROM tb_ens_kakao_my_doc tekmd
WHERE tekmd.document_binder_uuid = #{documentBinderUuid}) WHERE tekmd.document_binder_uuid = #{documentBinderUuid})
@ -677,8 +678,8 @@ FROM tb_ens_unity_sndng_mastr teusm
<select id="selectMobilePage" resultType="kr.xit.biz.ens.model.EnsDTO$MobilePageManage"> <select id="selectMobilePage" resultType="kr.xit.biz.ens.model.EnsDTO$MobilePageManage">
/** ens-mysql-mapper|selectMobilePage-모바일페이지콘텐트조회|julim */ /** ens-mysql-mapper|selectMobilePage-모바일페이지콘텐트조회|julim */
SELECT tempm.sndng_detail_id SELECT tempm.sndng_detail_id
, tempm.sndng_se_code , tempm.sndng_se_code
, tempm.mobile_page_cn , tempm.mobile_page_cn
FROM tb_ens_kakao_my_doc tekmd FROM tb_ens_kakao_my_doc tekmd
JOIN tb_ens_mobile_page_manage tempm JOIN tb_ens_mobile_page_manage tempm
ON tekmd.sndng_detail_id = tempm.sndng_detail_id ON tekmd.sndng_detail_id = tempm.sndng_detail_id
@ -712,34 +713,34 @@ FROM tb_ens_unity_sndng_mastr teusm
<select id="selectAcceptVali" resultType="kr.xit.biz.ens.model.EnsDTO$sndngVali"> <select id="selectAcceptVali" resultType="kr.xit.biz.ens.model.EnsDTO$sndngVali">
/** ens-mysql-mapper|selectAcceptVali-Validate용|seojh */ /** ens-mysql-mapper|selectAcceptVali-Validate용|seojh */
SELECT term.ffnlg_code SELECT term.ffnlg_code
, term.signgu_code , term.signgu_code
, tetm.tmplat_id , tetm.tmplat_id
, tcsm.sndng_ty_code , tcsm.sndng_ty_code
, tcsm.sndng_co , tcsm.sndng_co
, tcsm.sndng_dt , tcsm.sndng_dt
, tcsm.clos_dt , tcsm.clos_dt
, tcsd.main_code , tcsd.main_code
, tcsd.vhcle_no , tcsd.vhcle_no
, tcsd.nm , tcsd.nm
, tcsd.ffnlg_code AS ffnlg_code_de , tcsd.ffnlg_code AS ffnlg_code_de
, tcsd.signgu_code AS signgu_code_de , tcsd.signgu_code AS signgu_code_de
, tcsd.ihidnum , tcsd.ihidnum
, tcsd.moblphon_no , tcsd.moblphon_no
, tcsd.mobile_page_cn , tcsd.mobile_page_cn
, tcsd.adres , tcsd.adres
, tcsd.detail_adres , tcsd.detail_adres
, tcsd.zip , tcsd.zip
, tetm.try1 , tetm.try1
, tetm.try2 , tetm.try2
, tetm.try3 , tetm.try3
, 1 AS try_seq , 1 AS try_seq
FROM tb_cntc_sndng_mastr tcsm FROM tb_cntc_sndng_mastr tcsm
JOIN tb_cntc_sndng_detail tcsd JOIN tb_cntc_sndng_detail tcsd
ON tcsm.unity_sndng_mastr_id = tcsd.unity_sndng_mastr_id ON tcsm.unity_sndng_mastr_id = tcsd.unity_sndng_mastr_id
LEFT OUTER JOIN tb_ens_tmplat_manage tetm LEFT OUTER JOIN tb_ens_tmplat_manage tetm
ON tcsm.tmplat_id = tetm.tmplat_id ON tcsm.tmplat_id = tetm.tmplat_id
LEFT OUTER JOIN tb_ens_rlaybsnm_manage term LEFT OUTER JOIN tb_ens_rlaybsnm_manage term
ON tcsm.signgu_code = term.signgu_code AND tcsm.ffnlg_code = term.ffnlg_code ON tcsm.signgu_code = term.signgu_code AND tcsm.ffnlg_code = term.ffnlg_code
WHERE tcsm.unity_sndng_mastr_id = #{unitySndngMastrId} WHERE tcsm.unity_sndng_mastr_id = #{unitySndngMastrId}
AND tcsm.sndng_process_sttus = #{sndngProcessSttus} AND tcsm.sndng_process_sttus = #{sndngProcessSttus}
</select> </select>

Loading…
Cancel
Save