feat: 카카오, KT-BC send, status 반영

dev
gitea-관리자 1 year ago
parent e40e3121fa
commit dc65b39561

@ -24,4 +24,6 @@ public interface IBizKtMmsMapper {
int updateRlaybsnmKtInfo(final CmmEnsRlaybsnmDTO dto);
int updateKtBcMst(final KtMsgRsltReqData dto);
int updateKtBcDtl(final KtMsgRsltReqData dto);
int saveCntcSndngResult(final KtMsgRsltReqData dto);
}

@ -169,8 +169,12 @@ public class BizKtMmsService extends EgovAbstractServiceImpl implements IBizKtMm
for(KtMsgRsltReqData dto : reqDTO.getReqs()){
dto.setMmsSndgRsltDvcdMsg(messageSource.getMessage("info.api.kt.msg.rslt."+dto.getMmsSndgRsltDvcd()));
if(mapper.updateKtBcDtl(dto) != 1)
errors.add(new ErrorMsg(String.format("존재 하지 않는 발송 대상(src_key[%s], mms_sndg_rslt_sqno[%s]) 입니다", dto.getSrcKey(), dto.getMmsSndgRsltSqno())));
if(mapper.updateKtBcDtl(dto) != 1) {
errors.add(new ErrorMsg(
String.format("존재 하지 않는 발송 대상(src_key[%s], mms_sndg_rslt_sqno[%s]) 입니다",
dto.getSrcKey(), dto.getMmsSndgRsltSqno())));
}
mapper.saveCntcSndngResult(dto);
}
if(!errors.isEmpty()) return throwError(errors);

@ -25,16 +25,6 @@
AND ffnlg_code = #{ffnlgCode}
</update>
<update id="updateKtBcMst" parameterType="kr.xit.biz.ens.model.kt.KtMmsSendDTO$KtMsgRsltReqData">
/** ens-kt-mysql-mapper|updateKtBcMst-kt 메세지 수신결과 마스터 반영|julim */
UPDATE tb_ens_kt_bc_mastr
SET updt_dt = NOW()
, updusr = 'api_inbound'
WHERE sndng_mastr_id = ''
AND signgu_code = #{signguCode}
AND ffnlg_code = #{ffnlgCode}
</update>
<update id="updateKtBcDtl" parameterType="kr.xit.biz.ens.model.kt.KtMmsSendDTO$KtMsgRsltReqData">
/** ens-kt-mysql-mapper|updateKtBcDtl-kt 메세지 수신결과 상세 반영|julim */
UPDATE tb_ens_kt_bc_detail
@ -52,4 +42,42 @@
WHERE unity_sndng_detail_id = #{srcKey}
</update>
<insert id="saveCntcSndngResult">
/** ens-mysql-mapper|saveCntcSndngResult-연계발송결과반영|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
) VALUES (
#{unitySndngDetailId}
, #{sndngSeCode} /* 발송구분코드 - KAKAO-MY-DOC|KT-BC */
, #{signguCode} /* 시군구코드 */
, #{ffnlgCode} /* 과태료코드 */
, #{mmsSndgRsltDvcd}
, #{mmsSndgTmst} /* 송신(요청) 일시 */
, #{mmsRcvTmst} /* 수신(조회) 일시 */
, #{mmsRdgTmst} /* 최초열람일시 */
, #{mmsSndgRsltDvcdMsg} /* 에러내용 */
, now()
, 'batch'
)
ON DUPLICATE KEY UPDATE
sndng_result_sttus = IFNULL(#{mmsSndgRsltDvcd}, sndng_result_sttus)
, requst_dt = IFNULL(#{mmsSndgTmst}, requst_dt) /* 송신(요청) 일시 */
, inqire_dt = IFNULL(#{mmsRcvTmst}, inqire_dt) /* 수신(조회) 일시 */
, readng_dt = IFNULL(#{mmsRdgTmst}, readng_dt) /* 최초열람일시 */
, error_cn = IFNULL(#{mmsSndgRsltDvcdMsg}, error_cn)
, updt_dt = now()
, updusr = 'batch'
</insert>
</mapper>

@ -298,8 +298,9 @@ public interface IEnsBatchMapper {
*/
<T> int updateProcessSttusSndngMst(final T t);
Optional<KtBcMst> selectKtBcMstTgtInfo(final SndngMssageParam tgtDTO);
List<KtMainSendReqData> selectKtBcSendTgts(final SndngMssageParam tgtDTO);
Optional<KtBcMst> selectKtBcMstTgtInfo(final SndngMssageParam dto);
List<KtMainSendReqData> selectKtBcSendTgts(final SndngMssageParam dto);
int updateKtBcMst(final SndngMssageParam dto);
//----------------------------------------------------------------------
// send
//----------------------------------------------------------------------

@ -110,6 +110,9 @@ public class EnsDTO {
private String errorMssage;
private String errorCode;
private String resultCd;
private String resultDt;
private String url;
}

@ -14,7 +14,6 @@ import kr.xit.biz.ens.model.EnsDTO;
import kr.xit.biz.ens.model.EnsDTO.SndngMssageParam;
import kr.xit.biz.ens.model.cntc.CntcDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
import kr.xit.biz.sms.service.ISmsMessageService;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.support.utils.Checks;
@ -65,14 +64,14 @@ public class EnsBatchRequireNewService extends EgovAbstractServiceImpl implement
* 2. : tb_ens_mobile_page_manage
* 3. : tb_cntc_sndng_result
* -> 'SENT'
* @param mstIdList List<String> ID
* @param mstId ID
* @param resList List<KkopayDocBulkDTO.BulkSendResponses>
* @param unitySndMstId String ID
* </pre>
*/
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void saveKkoMyDocResult(final List<String> mstIdList, String unitySndMstId,
public void saveKkoMyDocResult(final String mstId, String unitySndMstId,
final List<BulkSendResponses> resList) {
// 결과 반영
resList.forEach(o ->
@ -95,7 +94,7 @@ public class EnsBatchRequireNewService extends EgovAbstractServiceImpl implement
);
// 마스터 상태 변경
updateKkoMyDocSendSndngMstStatus(mstIdList, unitySndMstId, "카카오 문서 발송요청 실패(발송마스터 데이타 오류)");
updateSendSndngMstStatus(mstId, unitySndMstId, SndngSeCode.KAKAO, "카카오 문서 발송요청 실패(발송마스터 데이타 오류)");
}
/**
@ -119,7 +118,7 @@ public class EnsBatchRequireNewService extends EgovAbstractServiceImpl implement
.sndngMastrId(list.get(0).getSndngMastrId())
.newSndngProcessSttus(list.get(0).getSndngProcessSttus())
.build();
updateStepSendMststatus(paramDTO, "E-GREEN");
updateMstTable(paramDTO, SndngSeCode.E_GREEN);
}
/**
@ -141,15 +140,40 @@ public class EnsBatchRequireNewService extends EgovAbstractServiceImpl implement
.sndngMastrId(list.get(0).getSndngMastrId())
.newSndngProcessSttus(list.get(0).getSndngProcessSttus())
.build();
updateStepSendMststatus(paramDTO, "SMS");
updateMstTable(paramDTO, SndngSeCode.SMS);
}
@Override
/**
* <pre>
* fail
*
* @param mstId String
* @param stsErrMsg String
* </pre>
*/
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void saveSendKtBcResult(final List<KtMainSendReqData> sendReqs) {
sendReqs.forEach(
mapper::saveCntcSndngResult
);
public void updateSndngMstFailStatus(final String mstId, final SndngSeCode seCode, final String stsErrMsg) {
// FIXME :: stsErrMsg 메세지 확인 필
EnsDTO.SndngMssageParam dto = mapper.selectSndProcessStatus(mstId)
.orElseThrow(() -> BizRuntimeException.create(stsErrMsg));
String newSndngProcessSttus;
if (dto.getTrySeq() == 2) {
newSndngProcessSttus = "send-fail2";
} else if (dto.getTrySeq() == 3) {
newSndngProcessSttus = "send-fail3";
} else {
newSndngProcessSttus = "send-fail1";
}
EnsDTO.SndngMssageParam paramDTO = EnsDTO.SndngMssageParam.builder()
.unitySndngMastrId(dto.getUnitySndngMastrId())
.sndngMastrId(dto.getSndngMastrId())
.newSndngProcessSttus(newSndngProcessSttus)
.build();
updateMstTable(paramDTO, seCode);
}
@Override
@ -182,33 +206,39 @@ public class EnsBatchRequireNewService extends EgovAbstractServiceImpl implement
}
/**
* / / send-ok|sending1|sending2
* <pre>
* / /
* - send-ok|sending1|sending2
*
* @param mstIdList ID
* @param mstId ID
* @param unitySndMstId String ID
* @param stsErrMsg String
* @param seCode SndngSeCode
* @param stsErrMsg
* </pre>
*/
private void updateKkoMyDocSendSndngMstStatus(final List<String> mstIdList,
final String unitySndMstId, final String stsErrMsg) {
public void updateSendSndngMstStatus(final String mstId,
final String unitySndMstId, final SndngSeCode seCode, final String stsErrMsg) {
for (String id : mstIdList) {
EnsDTO.SndngMssageParam dto = mapper.selectSndProcessStatus(id)
.orElseThrow(() -> BizRuntimeException.create(stsErrMsg));
EnsDTO.SndngMssageParam paramDTO = EnsDTO.SndngMssageParam.builder()
.sndngMastrId(id)
.unitySndngMastrId(unitySndMstId)
.newSndngProcessSttus(dto.getNewSndngProcessSttus())
.build();
EnsDTO.SndngMssageParam dto = mapper.selectSndProcessStatus(mstId)
.orElseThrow(() -> BizRuntimeException.create(stsErrMsg));
EnsDTO.SndngMssageParam paramDTO = EnsDTO.SndngMssageParam.builder()
.sndngMastrId(mstId)
.unitySndngMastrId(unitySndMstId)
.newSndngProcessSttus(dto.getNewSndngProcessSttus())
.build();
if (mapper.updateProcessSttusCntcSndngMst(paramDTO) != 1) {
throw BizRuntimeException.create("[send-카카오]연계 발송 마스터 상태변경 실패");
}
if (mapper.updateProcessSttusUnitySndngMst(paramDTO) != 1) {
throw BizRuntimeException.create("[send-카카오]통합 발송 마스터 상태변경 실패");
}
if (mapper.updateProcessSttusSndngMst(paramDTO) != 1) {
throw BizRuntimeException.create("[send-카카오]발송 마스터 상태변경 실패");
}
updateMstTable(paramDTO, seCode);
}
private void updateMstTable(SndngMssageParam paramDTO, SndngSeCode seCode) {
if(mapper.updateProcessSttusCntcSndngMst(paramDTO) != 1) {
throw BizRuntimeException.create(String.format("[send-%s]연계 발송 마스터 상태변경 실패", seCode.getCode()));
}
if(mapper.updateProcessSttusUnitySndngMst(paramDTO) != 1) {
throw BizRuntimeException.create(String.format("[send-%s]통합 발송 마스터 상태변경 실패", seCode.getCode()));
}
if(mapper.updateProcessSttusSndngMst(paramDTO) != 1) {
throw BizRuntimeException.create(String.format("[send-%s]발송 마스터 상태변경 실패", seCode.getCode()));
}
}
@ -264,23 +294,4 @@ public class EnsBatchRequireNewService extends EgovAbstractServiceImpl implement
}
return true;
}
/**
*
*
* @param paramDTO EnsDTO.SndngMssageParam
* @param workCfg String
*/
private void updateStepSendMststatus(final EnsDTO.SndngMssageParam paramDTO,
final String workCfg) {
if (mapper.updateProcessSttusCntcSndngMst(paramDTO) != 1) {
throw BizRuntimeException.create(String.format("[send-%s]연계 발송 마스터 상태변경 실패", workCfg));
}
if (mapper.updateProcessSttusUnitySndngMst(paramDTO) != 1) {
throw BizRuntimeException.create(String.format("[send-%s]통합 발송 마스터 상태변경 실패", workCfg));
}
if (mapper.updateProcessSttusSndngMst(paramDTO) != 1) {
throw BizRuntimeException.create(String.format("[send-%s]발송 마스터 상태변경 실패", workCfg));
}
}
}

@ -9,6 +9,7 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
@ -29,6 +30,7 @@ import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.PropertyBulk;
import kr.xit.biz.ens.model.kt.KtCommonDTO.ErrorMsg;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
import kr.xit.core.exception.BizRuntimeException;
@ -81,7 +83,7 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
@Value("${contract.kt.api.bulkstatus}")
private String apiKtBcBulkStatus;
private final IEnsBatchRequireNewService requireNewService;
private final EnsBatchRequireNewService requireNewService;
private final ApiWebClientUtil apiWebClient;
private final IEnsBatchMapper mapper;
@ -371,11 +373,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
for(ApiResponseDTO apiResult : apiResults) {
if(apiResult.getData() != null) {
BulkStatusResponses data = JsonUtils.toObjByObj(apiResult.getData(),
BulkStatusResponses.class);
BulkStatusResponses data = JsonUtils.toObjByObj(apiResult.getData(), BulkStatusResponses.class);
resList.add(data);
}else{
throw BizRuntimeException.create(apiResult.getMessage());
}
}
@ -722,7 +721,9 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
* 3. API
* ->
* 4.
* -> {@link EnsBatchRequireNewService#saveKkoMyDocResult(List, String, List) saveKkoMyDocResult}
* - bulk
* -
* -> {@link EnsBatchRequireNewService#saveKkoMyDocResult(String, String, List) saveKkoMyDocResult}
* - : tb_ens_kakao_my_doc
* - : tb_ens_mobile_page_manage
* - : tb_cntc_sndng_result
@ -733,16 +734,16 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
final String url = apiHost + apiKkoBulkSend;
final List<SendKakaoTgt> list = mapper.selectKakaoSendTgts(tgtDTO);
final List<BulkSendReq> bulkList = new ArrayList<>();
final List<String> mstIdList = new ArrayList<>();
if(list.isEmpty()) return;
setKkoMyDocSendBulks(list, bulkList, mstIdList);
final String mstId = list.get(0).getSndngMastrId();
final List<BulkSendReq> bulkList = setKkoMyDocSendBulks(list);
// validation check
try {
validatedKkoMyDocSendBulks(bulkList);
} catch (Exception e) {
updateKkoMyDocSndngMstFailStatus(mstIdList, "[send]카카오 문서 발송(bulks)요청 실패(파라메터 오류)");
requireNewService.updateSndngMstFailStatus(mstId, SndngSeCode.KAKAO, "[send]카카오 문서 발송(bulks)요청 실패(파라메터 오류)");
throw e;
}
@ -765,38 +766,32 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
List<BulkSendResponses> resList = new ArrayList<>();
boolean isSuccess = false;
String errMsg = null;
for(ApiResponseDTO apiResult : apiResults) {
if(apiResult.getData() != null) {
BulkSendResponses data = JsonUtils.toObjByObj(apiResult.getData(),
BulkSendResponses.class);
BulkSendResponses data = JsonUtils.toObjByObj(apiResult.getData(), BulkSendResponses.class);
resList.add(data);
}else{
updateKkoMyDocSndngMstFailStatus(mstIdList, apiResult.getMessage());
throw BizRuntimeException.create(apiResult.getMessage());
isSuccess = true;
continue;
}
errMsg = apiResult.getMessage();
}
// 카카오 문서 요청 결과 반영
requireNewService.saveKkoMyDocResult(mstIdList, tgtDTO.getUnitySndngMastrId(), resList);
// 카카오 send 결과 반영
if(!isSuccess) requireNewService.updateSndngMstFailStatus(mstId, SndngSeCode.KAKAO, errMsg);
requireNewService.saveKkoMyDocResult(mstId, tgtDTO.getUnitySndngMastrId(), resList);
}
/**
* GET
* - CI
* @param list List<EnsDTO.SendKakaoTgt>
* @param bulkList List<KkopayDocBulkDTO.BulkSendReq>
* @param mstIdList List<String> ID
* @return List<KkopayDocBulkDTO.BulkSendReq>
*/
private static void setKkoMyDocSendBulks(List<EnsDTO.SendKakaoTgt> list,
List<KkopayDocBulkDTO.BulkSendReq> bulkList, List<String> mstIdList) {
String mstId = null;
private static List<KkopayDocBulkDTO.BulkSendReq> setKkoMyDocSendBulks(List<EnsDTO.SendKakaoTgt> list) {
List<KkopayDocBulkDTO.BulkSendReq> bulkList = new ArrayList<>();
for (EnsDTO.SendKakaoTgt sendTgtDTO : list) {
if (!Objects.equals(mstId, sendTgtDTO.getSndngMastrId())) {
mstId = sendTgtDTO.getSndngMastrId();
mstIdList.add(mstId);
}
/**
* : CI
*/
@ -840,6 +835,7 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
bulkList.add(bulkReqDTO);
}
return bulkList;
}
/**
@ -898,65 +894,25 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
}
}
/**
* -
*
* @param mstIdList List<String>
* @param stsErrMsg String
*/
private void updateKkoMyDocSndngMstFailStatus(final List<String> mstIdList,
final String stsErrMsg) {
for (String id : mstIdList) {
// FIXME :: stsErrMsg 메세지 확인 필
EnsDTO.SndngMssageParam dto = mapper.selectSndProcessStatus(id)
.orElseThrow(() -> BizRuntimeException.create(stsErrMsg));
String newSndngProcessSttus;
if (dto.getTrySeq() == 2) {
newSndngProcessSttus = "send-fail2";
} else if (dto.getTrySeq() == 3) {
newSndngProcessSttus = "send-fail3";
} else {
newSndngProcessSttus = "send-fail1";
}
EnsDTO.SndngMssageParam paramDTO = EnsDTO.SndngMssageParam.builder()
.unitySndngMastrId(dto.getUnitySndngMastrId())
.sndngMastrId(dto.getSndngMastrId())
.newSndngProcessSttus(newSndngProcessSttus)
.build();
if (mapper.updateProcessSttusCntcSndngMst(paramDTO) != 1) {
throw BizRuntimeException.create("[send-카카오]연계 발송 마스터 상태변경 실패");
}
if (mapper.updateProcessSttusUnitySndngMst(paramDTO) != 1) {
throw BizRuntimeException.create("[send-카카오]통합 발송 마스터 상태변경 실패");
}
if (mapper.updateProcessSttusSndngMst(paramDTO) != 1) {
throw BizRuntimeException.create("[send-카카오]발송 마스터 상태변경 실패");
}
}
}
/**
* <pre>
* KT BC send
* @param tgtDTO SndngMssageParam
* @param reqDTO SndngMssageParam
* </pre>
*/
// TODO :: 구현 필요
private void sendBulkKtBc(final EnsDTO.SndngMssageParam tgtDTO) {
private void sendBulkKtBc(final EnsDTO.SndngMssageParam reqDTO) {
final String url = apiHost + apiKtBcBulkSend;
KtBcMst mstDTO = mapper.selectKtBcMstTgtInfo(tgtDTO)
KtBcMst mstDTO = mapper.selectKtBcMstTgtInfo(reqDTO)
.orElseThrow(() -> BizRuntimeException.create("KT BC 본문자 수신 등록 대상이 존재 하지 않습니다 "));
List<KtMainSendReqData> sendReqs = mapper.selectKtBcSendTgts(tgtDTO);
List<KtMainSendReqData> sendReqs = mapper.selectKtBcSendTgts(reqDTO);
//TODO :: KKO 기준 작성 필요
final List<BulkSendReq> bulkList = new ArrayList<>();
final List<String> mstIdList = List.of(mstDTO.getSndngMastrId());
final String mstId = mstDTO.getSndngMastrId();
final String unitySndMstId = mstDTO.getUnitySndngMastrId();
// setKtBcSendBulks(list, bulkList, mstIdList);
@ -984,17 +940,52 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
)
.toList();
boolean isSuccess = false;
List<ErrorMsg> errList = new ArrayList<>();
for(ApiResponseDTO apiResult : apiResults) {
// KT-BC API 정상 호출
if(ObjectUtils.isNotEmpty(apiResult.getData())) {
KtCommonResponse resDTO = JsonUtils.toObjByObj(apiResult.getData(), KtCommonResponse.class);
assert resDTO != null;
reqDTO.setResultDt(resDTO.getResultDt());
if(ObjectUtils.isNotEmpty(resDTO) && "00".equals(resDTO.getResultCd())){
continue;
isSuccess = true;
reqDTO.setErrorMssage("정상");
}else{
//reqDTO.setErrorMssage(resDTO.toStringErrorMsg());
errList.addAll(resDTO.getErrors());
}
mapper.updateKtBcMst(reqDTO);
}else{
// KT-BC API 호출전 에러 발생
if(ObjectUtils.isEmpty(reqDTO.getResultDt())) {
reqDTO.setResultDt(DateUtils.getTodayAndNowTime(ApiConstants.FMT_DT_EMPTY_DLT));
}
reqDTO.setErrorMssage(apiResult.getMessage());
errList.add(new ErrorMsg(apiResult.getMessage()));
}
// 모두 실패한 경우
if(!isSuccess) {
reqDTO.setResultCd("01");
reqDTO.setErrorMssage(
errList.stream()
.map(ErrorMsg::getErrorMsg)
.collect(Collectors.joining(","))
);
mapper.updateKtBcMst(reqDTO);
requireNewService.updateSndngMstFailStatus(mstId, SndngSeCode.KT_BC, "[send] KT-BC 발송(bulks)요청 실패");
return;
}
updateKkoMyDocSndngMstFailStatus(mstIdList, apiResult.getMessage());
throw BizRuntimeException.create(apiResult.getMessage());
// 성공 건수 존재시 성공 처리
reqDTO.setResultCd("00");
reqDTO.setErrorMssage("정상");
mapper.updateKtBcMst(reqDTO);
requireNewService.updateSendSndngMstStatus(mstId, unitySndMstId, SndngSeCode.KAKAO, "KT-BC 실패(발송마스터 데이타 오류)");
}
requireNewService.saveSendKtBcResult(sendReqs);
}
//-----------------------------------------------------------------------------------------------------------------

@ -1,9 +1,9 @@
package kr.xit.biz.ens.service;
import java.util.List;
import kr.xit.biz.common.ApiConstants.SndngSeCode;
import kr.xit.biz.ens.model.EnsDTO.SndngMssageParam;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
/**
* <pre>
@ -24,10 +24,11 @@ import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
*/
public interface IEnsBatchRequireNewService {
void saveKkoMyDocResult(final List<String> mstIdList, String unitySndMstId, final List<BulkSendResponses> resList);
void saveKkoMyDocResult(final String mstId, String unitySndMstId, final List<BulkSendResponses> resList);
void sendEgreen(final SndngMssageParam tgtDTO);
void sendSms(final SndngMssageParam tgtDTO);
void saveSendKtBcResult(final List<KtMainSendReqData> sendReqs);
void updateSndngMstFailStatus(final String mstId, final SndngSeCode seCode, final String stsErrMsg);
void sendPostPlus(final SndngMssageParam tgtDTO);
}

@ -812,6 +812,19 @@
, updusr = 'batch'
WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
</update>
<update id="updateKtBcMst" parameterType="kr.xit.biz.ens.model.kt.KtMmsSendDTO$KtMsgRsltReqData">
/** ens-kt-mysql-mapper|updateKtBcMst-kt 메세지 수신결과 마스터 반영|julim */
UPDATE tb_ens_kt_bc_mastr
SET result_cd = #{resultCd}
, result_dt = #{resultDt}
, error_msg = #{errorMsg}
, updt_dt = NOW()
, updusr = 'batch'
WHERE sndng_mastr_id = #{sndngMastrId}
AND signgu_code = #{signguCode}
AND ffnlg_code = #{ffnlgCode}
</update>
<!-- =================================================================================== -->
<!-- ================================ send ============================================= -->
<!-- =================================================================================== -->

Loading…
Cancel
Save