refactor: docs 상세 기술

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

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

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

@ -166,148 +166,149 @@
<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
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
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="insertSmsSndng">
/** ens-mysql-mapper|insertSmsSndng-문자발송 데이터 생성|julim */
<insert id="insertKakaoMyDocs">
/** ens-mysql-mapper|insertKakaoMyDocs-카카오내문서함 생성|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
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
, 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, '-', '')
, tetm.tmplat_nm
, SHA2(teusd.unity_sndng_detail_id, 256)
, '[NOTICE]'
, unix_timestamp(teusm.clos_dt)
-- , NULL
, teusd.moblphon_no
, teusd.tmplt_msg_data
, '2'
, '06'
, 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
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>
@ -315,27 +316,27 @@ FROM tb_ens_unity_sndng_mastr teusm
<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
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
@ -380,10 +381,10 @@ FROM tb_ens_unity_sndng_mastr teusm
/** ens-mysql-mapper|updateProcessSttusUntySndngMst-통합발송마스터 상태 변경|julim */
UPDATE tb_ens_unity_sndng_mastr
SET sndng_process_sttus = #{newSndngProcessSttus}
, error_code = #{errorCode}
, error_mssage = #{errorMssage}
, error_code = #{errorCode}
, error_mssage = #{errorMssage}
, updt_dt = now()
, updusr = 'batch'
, updusr = 'batch'
WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
</update>
<!-- =================================================================================== -->
@ -398,7 +399,7 @@ FROM tb_ens_unity_sndng_mastr teusm
<select id="selectCloseTgts" resultType="string">
/** ens-mysql-mapper|selectCloseTgts-종료 대상 조회|julim */
SELECT unity_sndng_mastr_id
FROM tb_cntc_sndng_mastr
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>
@ -410,17 +411,17 @@ FROM tb_ens_unity_sndng_mastr teusm
<!-- ================================ send ============================================= -->
<!-- =================================================================================== -->
<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
, tesm.unity_sndng_mastr_id
, tesm.tmplat_id
, tesm.sndng_co
, tesm.tmplat_id
, tesm.sndng_co
, tesm.try_seq
, tesm.sndng_process_sttus
, teusm.try1
, teusm.try2
, teusm.try3
, teusm.try_cnt
, 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
@ -431,20 +432,20 @@ FROM tb_ens_unity_sndng_mastr teusm
/** 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 */
, 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.recv_phone_number /* 받는이 전화번호 */
, tekmd.recv_name /* 받는이 이름 */
, tekmd.recv_birthday /* 받는이 생년월일 */
, tekmd.prop_link /* redirect url */
, tekmd.prop_payload
, tekmd.prop_message
@ -463,9 +464,9 @@ FROM tb_ens_unity_sndng_mastr teusm
/** 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
, 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
@ -496,7 +497,7 @@ FROM tb_ens_unity_sndng_mastr teusm
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)
ELSE concat('sending', try_seq)
END AS sndngProcessSttus
, tess.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">
/** 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
, 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
@ -540,50 +541,50 @@ FROM tb_ens_unity_sndng_mastr teusm
, document_binder_uuid = #{document_binder_uuid}
, error_code = #{error_code}
, error_message = #{error_message}
, updt_dt = now()
, updusr = 'batch'
, 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
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'
, '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}
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'
, 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}
SET sndng_process_sttus = #{newSndngProcessSttus}
, updt_dt = now()
, updusr = 'batch'
WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
</update>
<!-- =================================================================================== -->
<!-- ================================ send ============================================= -->
@ -660,12 +661,12 @@ FROM tb_ens_unity_sndng_mastr teusm
/** 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'
, 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})
@ -677,8 +678,8 @@ FROM tb_ens_unity_sndng_mastr teusm
<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
, 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
@ -712,34 +713,34 @@ FROM tb_ens_unity_sndng_mastr teusm
<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
, 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
FROM tb_cntc_sndng_mastr tcsm
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
ON tcsm.tmplat_id = tetm.tmplat_id
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
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>

Loading…
Cancel
Save