feat: kt gibis 적용

main
kjh 3 months ago
parent 4bc67bee8c
commit cd8c8dff9d

@ -201,6 +201,16 @@ public interface IEnsBatchMapper {
*/ */
<T> int insertKtBcDetail(final T t); <T> int insertKtBcDetail(final T t);
/**
* <pre>
* Kt Gibis
* - tb_ens_mobile_page_manage
* @param t T
* @return int
* </pre>
*/
<T> int insertKtGbsMobilePageManage(final T t);
/** /**
* <pre> * <pre>
* Kt Gibis * Kt Gibis
@ -331,6 +341,7 @@ public interface IEnsBatchMapper {
Optional<EnsKtGbsDTO> selectKtGbsMstTgtInfo(final SndngMssageParam dto); Optional<EnsKtGbsDTO> selectKtGbsMstTgtInfo(final SndngMssageParam dto);
List<KtGbsDTO.MsgSendReqsData> selectKtGbsSendTgts(final SndngMssageParam dto); List<KtGbsDTO.MsgSendReqsData> selectKtGbsSendTgts(final SndngMssageParam dto);
int updateKtGbs(final SndngMssageParam dto);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// send // send

@ -156,9 +156,9 @@ public class EnsBatchExtractService extends AbstractService implements
public void saveKtGbsResult(final SndngMssageParam dto, final List<KtGbsDTO.MsgSendReqsData> sendReqs) { public void saveKtGbsResult(final SndngMssageParam dto, final List<KtGbsDTO.MsgSendReqsData> sendReqs) {
// 성공처리 // 성공처리
// mobile page create // mobile page create
// FIXME : KT GIBIS 적용 안됨
if(Checks.isNotEmpty(sendReqs)) sendReqs.forEach(d -> mapper.insertKtMobilePageManage(d.getSrcKey())); if(Checks.isNotEmpty(sendReqs)) sendReqs.forEach(d -> mapper.insertKtGbsMobilePageManage(d.getSrcKey()));
mapper.updateKtBcMst(dto); mapper.updateKtGbs(dto);
} }
/** /**

@ -221,7 +221,6 @@ public class EnsBatchMakeService extends AbstractService implements IEnsBatchMak
mapper.insertKtBcMastr(dto); mapper.insertKtBcMastr(dto);
yield mapper.insertKtBcDetail(dto); yield mapper.insertKtBcDetail(dto);
} }
// FIXME : KT GIBIS 적용 안됨
case KT_GIBIS -> { case KT_GIBIS -> {
// FIXME: KT callback url 확인 적용 // FIXME: KT callback url 확인 적용
// TB_ENS_KT_GBS // TB_ENS_KT_GBS

@ -670,7 +670,7 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
.map(ErrorMsg::getErrorMsg) .map(ErrorMsg::getErrorMsg)
.collect(Collectors.joining(",")) .collect(Collectors.joining(","))
); );
extractService.saveKtBcResult(dto, null); extractService.saveKtGbsResult(dto, null);
extractService.updateSndngMstFailStatus(mstId, SndngSeCode.KT_BC, dto.getErrorCode(), dto.getErrorMssage(), "[send] KT-BC 발송(bulks)요청 실패"); extractService.updateSndngMstFailStatus(mstId, SndngSeCode.KT_BC, dto.getErrorCode(), dto.getErrorMssage(), "[send] KT-BC 발송(bulks)요청 실패");
return; return;
} }

@ -490,6 +490,7 @@
data_cnt, /* 회차전체데이터건수 */ data_cnt, /* 회차전체데이터건수 */
sndn_ex_time, /* 발송 마감 시간 */ sndn_ex_time, /* 발송 마감 시간 */
ex_time, /* 열람 마감 시간 */ ex_time, /* 열람 마감 시간 */
snd_tel_no, /* 발송전화번호 */
m_type, /* 문서 종류 */ m_type, /* 문서 종류 */
opt_type, /* 메시지 발송 구분 */ opt_type, /* 메시지 발송 구분 */
src_key, /* 관리키 */ src_key, /* 관리키 */
@ -516,6 +517,7 @@
, teusm.sndng_co , teusm.sndng_co
, teusm.clos_dt , teusm.clos_dt
, teusm.clos_dt , teusm.clos_dt
, tetm.sndng_tlphon_no
, '4' /* 3: LMS 4: MMS 6: RCS*/ , '4' /* 3: LMS 4: MMS 6: RCS*/
, '1' , '1'
, teusd.unity_sndng_detail_id , teusd.unity_sndng_detail_id
@ -766,52 +768,50 @@
<select id="selectKtGbsMstTgtInfo" resultType="kr.xit.biz.ens.model.EnsKtGbsDTO"> <select id="selectKtGbsMstTgtInfo" resultType="kr.xit.biz.ens.model.EnsKtGbsDTO">
/** ens-oracle-mapper|selectKtGbsMstTgtInfo-Kt GIBIS 본문자 수신 대상 정보 조회|julim */ /** ens-oracle-mapper|selectKtGbsMstTgtInfo-Kt GIBIS 본문자 수신 대상 정보 조회|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 /* 발송건수 */ , tekg.service_cd /* 기관코드 */
, FN_GET_DATETOUNIXTIME(tesm.clos_dt) AS closDt /* 마감일시 */ , tekg.msg_cd /* 문서코드 */
, tekg.sndng_mastr_id , tekg.make_dt /* 생성일시 */
, tekg.service_cd , tekg.data_cnt /* 데이터건수 */
, tekg.msg_cd , tekg.sndn_ex_time /* 발송마감시간 */
, tekg.msg_type , tekg.ex_time /* 열람마감시간 */
, tekg.make_dt , tekg.snd_tel_no /* 발송전화번호 */
, tekg.sndn_ex_time , tekg.m_type /* 문서종류 sms,lms,mms */
, tekg.ex_time , tekg.msg_type /* 발송메시지타입 RCS:1 xMS:2 */
, tekg.snd_tel_no , tekg.opt_type /* 메시지 발송 구분 */
, tekg.m_type
, tekg.opt_type
FROM tb_ens_sndng_mastr tesm FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_kt_gbs tekg JOIN tb_ens_kt_gbs tekg
ON tesm.sndng_mastr_id = tekg.sndng_mastr_id ON tesm.sndng_mastr_id = tekg.sndng_mastr_id
WHERE tesm.sndng_mastr_id = #{sndngMastrId} WHERE tesm.sndng_mastr_id = #{sndngMastrId}
AND tesm.signgu_code = #{signguCode} AND tesm.signgu_code = #{signguCode}
AND tesm.ffnlg_code = #{ffnlgCode} AND tesm.ffnlg_code = #{ffnlgCode}
ORDER BY tesm.unity_sndng_mastr_id AND ROWNUM = 1
</select> </select>
<select id="selectKtGbsSendTgts" resultType="kr.xit.biz.ens.model.ktgbs.KtGbsDTO$MsgSendReqsData"> <select id="selectKtGbsSendTgts" resultType="kr.xit.biz.ens.model.ktgbs.KtGbsDTO$MsgSendReqsData">
/** ens-oracle-mapper|selectKtGbsSendTgts-Kt GIBIS 수신 대상 목록 조회|julim */ /** ens-oracle-mapper|selectKtGbsSendTgts-Kt GIBIS 수신 대상 목록 조회|julim */
SELECT tekbm.sndng_mastr_id /* 발송마스터 ID */ SELECT tesm.sndng_mastr_id /* 발송마스터 ID */
, tekbm.signgu_code /* 시군구 코드 */ , tesm.signgu_code /* 시군구 코드 */
, tekbm.ffnlg_code /* 과태료 코드 */ , tesm.ffnlg_code /* 과태료 코드 */
, tekg.src_key , tekg.src_key /* 관리키 */
, tekg.src_seq , tekg.src_seq /* seq 0000 */
, tekg.sci , tekg.sci /* ci */
, tekg.mms_dtl_cnts , tekg.mms_dtl_cnts /* MMS 상세 내용 */
, tekg.mms_title , tekg.mms_title /* MMS 제목 */
, tekg.rcs_dtl_cnts , tekg.rcs_dtl_cnts /* RCS 상세 내용 */
, tekg.url , tekg.url /* URL */
, tekg.doc_hash , tekg.doc_hash /* HASH */
, tekg.mdn , tekg.mdn /* 개인휴대폰번호 */
FROM tb_ens_kt_bc_mastr tekbm FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_kt_gbs tekg JOIN tb_ens_kt_gbs tekg
ON tekbm.sndng_mastr_id = tekg.sndng_mastr_id ON tesm.sndng_mastr_id = tekg.sndng_mastr_id
WHERE tekbm.sndng_mastr_id = #{sndngMastrId} WHERE tesm.sndng_mastr_id = #{sndngMastrId}
AND tekbm.signgu_code = #{signguCode} AND tesm.signgu_code = #{signguCode}
AND tekbm.ffnlg_code = #{ffnlgCode} AND tesm.ffnlg_code = #{ffnlgCode}
ORDER BY tekg.sndng_detail_id ORDER BY tekg.sndng_detail_id
</select> </select>
@ -949,6 +949,39 @@
ON tekbd.unity_sndng_detail_id = teusd.unity_sndng_detail_id ON tekbd.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="updateKtGbs" parameterType="kr.xit.biz.ens.model.cmm.SndngMssageParam">
/** ens-kt-mysql-mapper|updateKtBcMst-kt 메세지 수신결과 마스터 반영|julim */
UPDATE tb_ens_kt_gbs
SET result_cd = #{resultCd}
, result_dt = #{resultDt}
, error_msg = #{errorMssage}
, updt_dt = sysdate
, updusr = 'batch'
WHERE sndng_mastr_id = #{sndngMastrId}
AND signgu_code = #{signguCode}
AND ffnlg_code = #{ffnlgCode}
</update>
<insert id="insertKtGbsMobilePageManage">
/** ens-oracle-mapper|insertKtGbsMobilePageManage-모바일페이지관리 데이타 생성|julim */
INSERT INTO tb_ens_mobile_page_manage (
sndng_detail_id, /* 발송상세 ID*/
sndng_se_code, /* 발송 구분 코드 */
mobile_page_cn, /* 모바일 페이지 내용 */
regist_dt,
register
)
SELECT tekg.sndng_detail_id
, 'KT-GIBIS'
, teusd.mobile_page_cn
, to_char(sysdate, 'yyyymmddhh24miss')
, 'batch'
FROM tb_ens_kt_gbs tekg
JOIN tb_ens_unity_sndng_detail teusd
ON tekg.unity_sndng_detail_id = teusd.unity_sndng_detail_id
WHERE teusd.unity_sndng_detail_id = #{unitySndngDetailId}
</insert>
<!-- =================================================================================== --> <!-- =================================================================================== -->
<!-- ================================ send ============================================= --> <!-- ================================ send ============================================= -->
<!-- =================================================================================== --> <!-- =================================================================================== -->

@ -85,7 +85,7 @@ public class KtGbsDTO {
*/ */
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "발송마감시간(yyyyMMddHHmiss)", example = " ") @Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "발송마감시간(yyyyMMddHHmiss)", example = " ")
@Size(min = 14, max = 14, message = "발송마감시간(yyyyMMddHHmiss)") @Size(min = 14, max = 14, message = "발송마감시간(yyyyMMddHHmiss)")
private String sendExTime; private String sndnExTime;
/** /**
* - (yyyyMMddHHmiss : 14) * - (yyyyMMddHHmiss : 14)
@ -99,7 +99,7 @@ public class KtGbsDTO {
*/ */
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "문서종류(sms|lms|mms)", example = "mms", allowableValues = { @Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "문서종류(sms|lms|mms)", example = "mms", allowableValues = {
"sms", "lms", "mms"}) "sms", "lms", "mms"})
@Size(min = 3, max = 3, message = "문서종류(sms|lms|mms)") @Size(min = 1, max = 3, message = "문서종류(sms|lms|mms)")
@JsonProperty("m_type") @JsonProperty("m_type")
private String mType; private String mType;
@ -159,10 +159,10 @@ public class KtGbsDTO {
private String srcSeq; private String srcSeq;
/** /**
* : 128 * : 88
*/ */
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "개인식별코드", example = "vMtqVxJX56lBgbf9heK3QTc+jVndTfK77i/UJKAzPmBG4n9CazCdd/8YytlFZnN4qofIqgxHpSoiG0yYzgEpJg==") @Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "개인식별코드", example = "vMtqVxJX56lBgbf9heK3QTc+jVndTfK77i/UJKAzPmBG4n9CazCdd/8YytlFZnN4qofIqgxHpSoiG0yYzgEpJg==")
@Size(min = 128, max = 128, message = "개인식별코드는 필수 입니다(128자리)") @Size(min = 88, max = 88, message = "개인식별코드는 필수 입니다(88자리)")
private String sci; private String sci;
/** /**

Loading…
Cancel
Save