feat: 카카오톡 make, send 반영

main
Jonguk. Lim 3 months ago
parent 57b309c931
commit 088f0d11c1

@ -109,9 +109,8 @@ app:
host: http://211.43.10.163:10210/ONLWeb host: http://211.43.10.163:10210/ONLWeb
api: api:
# 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송 # 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송
dp-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/dpMblPage.do chuncheon-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/dpMblPage.do
me-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/meMblPage.do me-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/meMblPage.do #dp-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/dpMblPage
#dp-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/dpMblPage
#me-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/meMblPage #me-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/meMblPage
# 수신거부상태전송 : BC-AG-SN-014 # 수신거부상태전송 : BC-AG-SN-014

@ -109,9 +109,8 @@ app:
host: http://211.43.10.163:10210/ONLWeb host: http://211.43.10.163:10210/ONLWeb
api: api:
# 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송 # 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송
dp-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/dpMblPage.do chuncheon-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/dpMblPage.do
me-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/meMblPage.do me-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/meMblPage.do #dp-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/dpMblPage
#dp-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/dpMblPage
#me-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/meMblPage #me-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/meMblPage
# 수신거부상태전송 : BC-AG-SN-014 # 수신거부상태전송 : BC-AG-SN-014

@ -2,9 +2,14 @@ package kr.xit.biz.ens.cmm;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.ens.model.cmm.SndngMssageParam;
import kr.xit.core.support.utils.Checks;
/** /**
* <pre> * <pre>
* description : * description :
@ -33,5 +38,21 @@ public class CmmEnsBizUtils {
return map; return map;
} }
/**
* <pre>
* get ()
* @param dto SndngMssageParam
* @return SndngSeCode ()
* </pre>
*/
public static ApiConstants.SndngSeCode getSndngSeCodFromTrySeq(final SndngMssageParam dto) {
String[] tryVal = {
Checks.checkVal(dto.getTry1(), ""),
Checks.checkVal(dto.getTry2(), ""),
Checks.checkVal(dto.getTry3(), "")
};
String seCode = tryVal[dto.getTrySeq() - 1];
return ApiConstants.SndngSeCode.getSndngSeCode(seCode);
}
} }

@ -53,7 +53,7 @@ public interface IEnsBatchMapper {
* @return List<EnsDTO.SndngMssageParam> * @return List<EnsDTO.SndngMssageParam>
* </pre> * </pre>
*/ */
<T> List<EnsDTO.sndngValidation> selectAcceptValidation(final T t); <T> List<EnsDTO.SndngValidation> selectAcceptValidation(final T t);
/** /**
* <pre> * <pre>
@ -132,7 +132,8 @@ public interface IEnsBatchMapper {
* @return int * @return int
* </pre> * </pre>
*/ */
<T> int selectSendOkTgts(final T t); <T> int selectKkopaySendOkTgts(final T t);
<T> int selectKkotalkSendOkTgts(final T t);
/** /**
* <pre> * <pre>
@ -152,8 +153,8 @@ public interface IEnsBatchMapper {
* @return int * @return int
* </pre> * </pre>
*/ */
<T> int insertKakaoMyDocs(final T t); <T> int insertKakaopay(final T t);
<T> int insertKakaoD10(final T t); <T> int insertKakaotalk(final T t);
/** /**

@ -678,7 +678,7 @@ public class EnsDTO {
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@SuperBuilder @SuperBuilder
public static class sndngValidation { public static class SndngValidation {
/* mastr */ /* mastr */
private String unitySndngDetailId; private String unitySndngDetailId;

@ -141,7 +141,7 @@ public class EnsBatchAcceptService extends AbstractService implements IEnsBatchA
} }
// validation check // validation check
final List<EnsDTO.sndngValidation> valiList = mapper.selectAcceptValidation(dto); final List<EnsDTO.SndngValidation> valiList = mapper.selectAcceptValidation(dto);
try { try {
// CI 생성이 모두 실패한 경우 오류처리후 skip // CI 생성이 모두 실패한 경우 오류처리후 skip
if(!validatedAccept(valiList)){ if(!validatedAccept(valiList)){
@ -206,14 +206,14 @@ public class EnsBatchAcceptService extends AbstractService implements IEnsBatchA
* </pre> * </pre>
*/ */
// FIXME:파라메터 유효성 check 는 하지않는다??? // FIXME:파라메터 유효성 check 는 하지않는다???
private boolean validatedAccept(List<EnsDTO.sndngValidation> valiList) { private boolean validatedAccept(List<EnsDTO.SndngValidation> valiList) {
final String url = apiHost + apiNiceCi; final String url = apiHost + apiNiceCi;
final List<String> errors = new ArrayList<>(); final List<String> errors = new ArrayList<>();
int idx = 0; int idx = 0;
boolean isSuccess = false; boolean isSuccess = false;
for (EnsDTO.sndngValidation dto : valiList) { for (EnsDTO.SndngValidation dto : valiList) {
Set<ConstraintViolation<EnsDTO.sndngValidation>> errList = validator.validate(dto); Set<ConstraintViolation<EnsDTO.SndngValidation>> errList = validator.validate(dto);
if(!errList.isEmpty()) { if(!errList.isEmpty()) {
int finalIdx = idx; int finalIdx = idx;
@ -239,60 +239,55 @@ public class EnsBatchAcceptService extends AbstractService implements IEnsBatchA
} }
} }
final String[] tryVal = { final SndngSeCode sndngSeCode = getSndngSeCodFromTrySeq(dto);
Checks.checkVal(dto.getTry1(), ""),
Checks.checkVal(dto.getTry2(), ""),
Checks.checkVal(dto.getTry3(), "")
};
// CI 생성 여부 // CI 생성 여부
boolean isCiCreate = false; boolean isCiCreate = false;
boolean isError = false; boolean isError = false;
switch(SndngSeCode.compare(tryVal[dto.getTrySeq() - 1])) { switch(sndngSeCode) {
case KAKAO: case KAKAO -> {
if(Checks.isEmpty(dto.getCi())) { if (Checks.isEmpty(dto.getCi())) {
isCiCreate = true; isCiCreate = true;
if(Checks.isEmpty(dto.getIhidnum())) { if (Checks.isEmpty(dto.getIhidnum())) {
isError = true; isError = true;
errors.add( errors.add(
String.format("주민등록번호는 필수입니다(dto.getIhidnum[%d] 번째 오류)", String.format("주민등록번호는 필수입니다(dto.getIhidnum[%d] 번째 오류)",
idx + 1)); idx + 1));
} }
if(Checks.isEmpty(dto.getMoblphonNo())) { if (Checks.isEmpty(dto.getMoblphonNo())) {
isError = true; isError = true;
errors.add( errors.add(
String.format("핸드폰 번호는 필수입니다(dto.getMoblphonNo[%d] 번째 오류)", String.format("핸드폰 번호는 필수입니다(dto.getMoblphonNo[%d] 번째 오류)",
idx + 1)); idx + 1));
} }
if(Checks.isEmpty(dto.getIhidnum())) { if (Checks.isEmpty(dto.getIhidnum())) {
isError = true; isError = true;
errors.add( errors.add(
String.format("받는이 이름은 필수입니다(dto.getIhidnum[%d] 번째 오류)", String.format("받는이 이름은 필수입니다(dto.getIhidnum[%d] 번째 오류)",
idx + 1)); idx + 1));
} }
} }
break; }
//FIXME : KT 데이타 적합성 체크 //FIXME : KT 데이타 적합성 체크
case KT_BC: case KT_BC -> {
isCiCreate = true; isCiCreate = true;
break; }
case KAKAO_NEW: case KAKAO_NEW -> {
if(Checks.isEmpty(dto.getCi())) { if (Checks.isEmpty(dto.getCi())) {
isCiCreate = true; isCiCreate = true;
if(Checks.isEmpty(dto.getIhidnum())) { if (Checks.isEmpty(dto.getIhidnum())) {
isError = true; isError = true;
errors.add( errors.add(
String.format("주민등록번호는 필수입니다(dto.getIhidnum[%d] 번째 오류)", String.format("주민등록번호는 필수입니다(dto.getIhidnum[%d] 번째 오류)",
idx + 1)); idx + 1));
} }
} }
break; }
default: default -> {}
break;
} }
// CI 생성 // CI 생성
@ -350,7 +345,7 @@ public class EnsBatchAcceptService extends AbstractService implements IEnsBatchA
* @param url ci API URL * @param url ci API URL
* @return CI * @return CI
*/ */
private boolean requestNiceCiApi(EnsDTO.sndngValidation reqDto, String ihidnumManageId, String url) { private boolean requestNiceCiApi(EnsDTO.SndngValidation reqDto, String ihidnumManageId, String url) {
boolean isSuccess = false; boolean isSuccess = false;
NiceCiDTO.IpinCiResDataBody dataBody = apiWebClient.exchange( NiceCiDTO.IpinCiResDataBody dataBody = apiWebClient.exchange(
@ -400,7 +395,7 @@ public class EnsBatchAcceptService extends AbstractService implements IEnsBatchA
* *
* @return CI * @return CI
*/ */
private boolean requestNiceDici(EnsDTO.sndngValidation reqDto, String ihidnumManageId) { private boolean requestNiceDici(EnsDTO.SndngValidation reqDto, String ihidnumManageId) {
boolean isSuccess = false; boolean isSuccess = false;
EnsDTO.NiceCiRslt rslt = getDiCi(reqDto.getIhidnum(), true); EnsDTO.NiceCiRslt rslt = getDiCi(reqDto.getIhidnum(), true);
@ -434,26 +429,18 @@ public class EnsBatchAcceptService extends AbstractService implements IEnsBatchA
iRtn = vnoInterop.fnRequestDupInfo(diciSiteCode, diciSitePwd, ihidnum, "JID"); iRtn = vnoInterop.fnRequestDupInfo(diciSiteCode, diciSitePwd, ihidnum, "JID");
} }
switch (iRtn) { switch (iRtn) {
case 1: case 1 -> {
// iRtn 값이 정상이므로, 귀사의 기획의도에 맞게 진행하시면 됩니다. // iRtn 값이 정상이므로, 귀사의 기획의도에 맞게 진행하시면 됩니다.
// 아래와 같이 getDupInfo 함수를 통해 DI 값(64 Byte)을 추출할 수 있습니다. // 아래와 같이 getDupInfo 함수를 통해 DI 값(64 Byte)을 추출할 수 있습니다.
if(isCi) ci = vnoInterop.getConnInfo(); if (isCi)
else ci = vnoInterop.getDupInfo(); ci = vnoInterop.getConnInfo();
break; else
case 3: ci = vnoInterop.getDupInfo();
errMsg = "[사용자 정보와 실명확인 서비스 구분값 매핑 오류]"; }
break; case 3 -> errMsg = "[사용자 정보와 실명확인 서비스 구분값 매핑 오류]";
case -9: case -9 -> errMsg = "[입력값 오류]\nfnRequestDupInfo 함수 처리시, 필요한 4개의 파라미터값의 정보를 정확하게 입력해 주시기 바랍니다.";
errMsg = "[입력값 오류]\nfnRequestDupInfo 함수 처리시, 필요한 4개의 파라미터값의 정보를 정확하게 입력해 주시기 바랍니다."; case -21, -31, -34 -> errMsg = "[통신오류]\n서버 네트웍크 및 방확벽 관련하여 아래 IP와 Port(5개)를 오픈해 주셔야 이용 가능합니다.\nIP : 203.234.219.72 / Port : 81, 82, 83, 84, 85";
break; default -> errMsg = "return 값 확인 후, NICE평가정보 전산 담당자에게 문의해 주세요.\n[return 값:" + iRtn + "]";
case -21:
case -31:
case -34:
errMsg = "[통신오류]\n서버 네트웍크 및 방확벽 관련하여 아래 IP와 Port(5개)를 오픈해 주셔야 이용 가능합니다.\nIP : 203.234.219.72 / Port : 81, 82, 83, 84, 85";
break;
default:
errMsg = "return 값 확인 후, NICE평가정보 전산 담당자에게 문의해 주세요.\n[return 값:" + iRtn + "]";
break;
} }
if (!errMsg.isEmpty()){ if (!errMsg.isEmpty()){
return EnsDTO.NiceCiRslt.builder() return EnsDTO.NiceCiRslt.builder()
@ -499,5 +486,23 @@ public class EnsBatchAcceptService extends AbstractService implements IEnsBatchA
} }
} }
} }
/**
* <pre>
* get ()
* @param dto SndngValidation
* @return SndngSeCode ()
* </pre>
*/
private static ApiConstants.SndngSeCode getSndngSeCodFromTrySeq(final EnsDTO.SndngValidation dto) {
String[] tryVal = {
Checks.checkVal(dto.getTry1(), ""),
Checks.checkVal(dto.getTry2(), ""),
Checks.checkVal(dto.getTry3(), "")
};
String seCode = tryVal[dto.getTrySeq() - 1];
return ApiConstants.SndngSeCode.getSndngSeCode(seCode);
}
//----------------------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------------------
} }

@ -129,8 +129,6 @@ public class EnsBatchExtractService extends AbstractService implements
// 모바일 페이지 컨텐트 생성 // 모바일 페이지 컨텐트 생성
if (Checks.isNotEmpty(t.getEnvelopeId())) { if (Checks.isNotEmpty(t.getEnvelopeId())) {
mapper.insertKkotalkMobilePageManage(t.getExternalId()); mapper.insertKkotalkMobilePageManage(t.getExternalId());
// FIXME: 코드값 확인후 지정
code = ApiConstants.KkotalkDocStatus.READ.getCode();
}else{ }else{
code = t.getErrorCode(); code = t.getErrorCode();
} }

@ -13,12 +13,12 @@ import org.springframework.transaction.annotation.Transactional;
import kr.xit.biz.common.ApiConstants; import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.common.ApiConstants.SignguCode; import kr.xit.biz.common.ApiConstants.SignguCode;
import kr.xit.biz.common.ApiConstants.SndngSeCode; import kr.xit.biz.common.ApiConstants.SndngSeCode;
import kr.xit.biz.ens.cmm.CmmEnsBizUtils;
import kr.xit.biz.ens.mapper.IEnsBatchMapper; import kr.xit.biz.ens.mapper.IEnsBatchMapper;
import kr.xit.biz.ens.model.EnsDTO; import kr.xit.biz.ens.model.EnsDTO;
import kr.xit.biz.ens.model.cmm.SndngMssageParam; import kr.xit.biz.ens.model.cmm.SndngMssageParam;
import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.service.AbstractService; import kr.xit.core.service.AbstractService;
import kr.xit.core.support.utils.Checks;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
/** /**
@ -103,9 +103,15 @@ public class EnsBatchMakeService extends AbstractService implements IEnsBatchMak
MDC.put(SNDNG_PROCESS_STTUS, "make-fail2"); MDC.put(SNDNG_PROCESS_STTUS, "make-fail2");
dto.setProfile(ApiConstants.PROFILE); dto.setProfile(ApiConstants.PROFILE);
//try2 발송 대상이 있는지 확인 final SndngSeCode sndngSeCode = CmmEnsBizUtils.getSndngSeCodFromTrySeq(dto);
final int sendCnt = mapper.selectSendOkTgts(dto);
//try2 발송 대상이 있는지 확인
int sendCnt = 0;
if(SndngSeCode.KAKAO.equals(sndngSeCode)) {
sendCnt = mapper.selectKkopaySendOkTgts(dto);
} else {
sendCnt = mapper.selectKkotalkSendOkTgts(dto);
}
//없으면 연계 발송 마스터, 통합 발송 마스터 send-ok //없으면 연계 발송 마스터, 통합 발송 마스터 send-ok
if (sendCnt == 0) { if (sendCnt == 0) {
if(IS_CCN) dto.setNewSndngProcessSttus(ApiConstants.MappingSndngProcessStatus.fromEns(dto.getNewSndngProcessSttus())); if(IS_CCN) dto.setNewSndngProcessSttus(ApiConstants.MappingSndngProcessStatus.fromEns(dto.getNewSndngProcessSttus()));
@ -179,12 +185,11 @@ public class EnsBatchMakeService extends AbstractService implements IEnsBatchMak
//----------------------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------------------
// make // make
//----------------------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------------------
/** /**
* <pre> * <pre>
* make : * make :
* - ( ), 1 , 2 * - ( ), 1 , 2
* KAKAO - {@link IEnsBatchMapper#insertKakaoMyDocs(Object) insertKakaoMyDocs} * KAKAO - {@link IEnsBatchMapper#insertKakaopay(Object) insertKakaopay}
* - tb_ens_kakao_my_doc * - tb_ens_kakao_my_doc
* KT_BC - {@link IEnsBatchMapper#insertKtBcMastr(Object) insertKtBcMastr} * KT_BC - {@link IEnsBatchMapper#insertKtBcMastr(Object) insertKtBcMastr}
* - tb_ens_kt_bc_mastr FIXME:: * - tb_ens_kt_bc_mastr FIXME::
@ -195,29 +200,25 @@ public class EnsBatchMakeService extends AbstractService implements IEnsBatchMak
* </pre> * </pre>
*/ */
private int makeEnsDetailByTry(final SndngMssageParam dto) { private int makeEnsDetailByTry(final SndngMssageParam dto) {
String[] tryVal = { final SndngSeCode sndngSeCode = CmmEnsBizUtils.getSndngSeCodFromTrySeq(dto);
Checks.checkVal(dto.getTry1(), ""),
Checks.checkVal(dto.getTry2(), ""), return
Checks.checkVal(dto.getTry3(), "") switch (sndngSeCode) {
}; case KAKAO -> mapper.insertKakaopay(dto);
final String seCode = tryVal[dto.getTrySeq() - 1]; case KAKAO_NEW -> mapper.insertKakaotalk(dto);
case KT_BC -> {
return switch (SndngSeCode.compare(seCode)) { // FIXME: KT callback url 확인 적용
case KAKAO -> mapper.insertKakaoMyDocs(dto); if(SignguCode.CHUNCHEON.getCode().equals(dto.getSignguCode())){
case KAKAO_NEW -> mapper.insertKakaoD10(dto); dto.setUrl(CHUNCHEON_CALLBACK_URL);
case KT_BC -> { }
// FIXME: KT callback url 확인 적용 // FIXME: KT callback url 확인 적용
if(SignguCode.CHUNCHEON.getCode().equals(dto.getSignguCode())){ if(SignguCode.FUNERAL.getCode().equals(dto.getSignguCode())){
dto.setUrl(CHUNCHEON_CALLBACK_URL); dto.setUrl(ME_CALLBACK_URL);
} }
// FIXME: KT callback url 확인 적용 mapper.insertKtBcMastr(dto);
if(SignguCode.FUNERAL.getCode().equals(dto.getSignguCode())){ yield mapper.insertKtBcDetail(dto);
dto.setUrl(ME_CALLBACK_URL);
} }
mapper.insertKtBcMastr(dto); //default -> throw BizRuntimeException.create(String.format("정의 되지 않은 문서 중개자[%s] 입니다", sndngSeCode.getCode()));
yield mapper.insertKtBcDetail(dto);
}
default -> throw BizRuntimeException.create(String.format("정의 되지 않은 문서 중개자[%s] 입니다", seCode));
}; };
} }
//----------------------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------------------

@ -138,18 +138,13 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
MDC.put("sndngMastrId", dto.getSndngMastrId()); MDC.put("sndngMastrId", dto.getSndngMastrId());
MDC.put(SNDNG_PROCESS_STTUS, "send-fail" + dto.getTrySeq()); MDC.put(SNDNG_PROCESS_STTUS, "send-fail" + dto.getTrySeq());
final String[] tryVal = { final SndngSeCode sndngSeCode = CmmEnsBizUtils.getSndngSeCodFromTrySeq(dto);
Checks.checkVal(dto.getTry1(), ""),
Checks.checkVal(dto.getTry2(), ""),
Checks.checkVal(dto.getTry3(), "")
};
// 마스터 상태 변경값을 파라메터에서 받은 상태값으로 set // 마스터 상태 변경값을 파라메터에서 받은 상태값으로 set
dto.setNewSndngProcessSttus(dto.getSndngProcessSttus()); dto.setNewSndngProcessSttus(dto.getSndngProcessSttus());
final String seCode = tryVal[dto.getTrySeq() - 1];
// 업무 문서 구분에 따른 분기 // 업무 문서 구분에 따른 분기
switch (SndngSeCode.compare(seCode)) { switch (sndngSeCode) {
/* /*
* : tb_ens_kakao_my_doc * : tb_ens_kakao_my_doc
* : tb_ens_mobile_page_manage * : tb_ens_mobile_page_manage
@ -158,7 +153,7 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
case KAKAO -> sendBulkKakaopay(dto); case KAKAO -> sendBulkKakaopay(dto);
case KAKAO_NEW -> sendBulkKakaotalk(dto); case KAKAO_NEW -> sendBulkKakaotalk(dto);
case KT_BC -> sendBulkKtBc(dto); case KT_BC -> sendBulkKtBc(dto);
default -> throw BizRuntimeException.create(String.format("정의 되지 않은 문서 중개자[%s] 입니다", seCode)); default -> throw BizRuntimeException.create(String.format("정의 되지 않은 문서 중개자[%s] 입니다", sndngSeCode.getCode()));
} }
} }
@ -170,7 +165,7 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
* <pre> * <pre>
* send * send
* 1. * 1.
* - {@link IEnsBatchMapper#selectKakaoSendTgts(Object) selectKakaoSendTgts} * - {@link IEnsBatchMapper#selectKakaopaySendTgts(Object) selectKakaopaySendTgts}
* 2. set, validtion check * 2. set, validtion check
* - {@link #setKkopaySendBulks} * - {@link #setKkopaySendBulks}
* - {@link #validatedKkopaySendBulks} * - {@link #validatedKkopaySendBulks}
@ -242,16 +237,16 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
* <pre> * <pre>
* send * send
* 1. * 1.
* - {@link IEnsBatchMapper#selectKakaoSendTgts(Object) selectKakaoSendTgts} * - {@link IEnsBatchMapper#selectKakaotalkSendTgts(Object) selectKakaotalkSendTgts}
* 2. set, validtion check * 2. set, validtion check
* - {@link #setKkoNewSendBulks} * - {@link #setKkotalkSendBulks}
* - {@link #validatedKkoNewSendBulks} * - {@link #validatedKkotalkSendBulks}
* 3. API * 3. API
* -> * ->
* 4. * 4.
* - bulk * - bulk
* - * -
* -> {@link EnsBatchExtractService#saveKkopaySendResult(String, String, List) saveKkoNewSendResult} * -> {@link EnsBatchExtractService#saveKkotalkSendResult(String, String, List) saveKkoNewSendResult}
* - : tb_ens_kakao_my_doc * - : tb_ens_kakao_my_doc
* - : tb_ens_mobile_page_manage * - : tb_ens_mobile_page_manage
* - : tb_cntc_sndng_result * - : tb_cntc_sndng_result
@ -307,7 +302,7 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
if(!isSuccess){ if(!isSuccess){
extractService.updateSndngMstFailStatus(mstId, SndngSeCode.KAKAO_NEW, "", errMsg, errMsg); extractService.updateSndngMstFailStatus(mstId, SndngSeCode.KAKAO_NEW, "", errMsg, errMsg);
} }
extractService.saveKkoNewSendResult(mstId, dto.getUnitySndngMastrId(), resList); extractService.saveKkotalkSendResult(mstId, dto.getUnitySndngMastrId(), resList);
} }
/** /**

@ -85,31 +85,27 @@ public class EnsBatchStatusService extends AbstractService implements IEnsBatchS
MDC.put("sndngMastrId", dto.getSndngMastrId()); MDC.put("sndngMastrId", dto.getSndngMastrId());
//MDC.put(SNDNG_PROCESS_STTUS, "send-fail" + dto.getTrySeq()); //MDC.put(SNDNG_PROCESS_STTUS, "send-fail" + dto.getTrySeq());
final String[] tryVal = { final SndngSeCode sndngSeCode = CmmEnsBizUtils.getSndngSeCodFromTrySeq(dto);
Checks.checkVal(dto.getTry1(), ""),
Checks.checkVal(dto.getTry2(), ""),
Checks.checkVal(dto.getTry3(), "")
};
// 마스터 상태 변경값을 파라메터에서 받은 상태값으로 set // 마스터 상태 변경값을 파라메터에서 받은 상태값으로 set
//dto.setNewSndngProcessSttus(reqDTO.getSndngProcessSttus()); //dto.setNewSndngProcessSttus(reqDTO.getSndngProcessSttus());
final String seCode = tryVal[dto.getTrySeq() - 1];
// 업무 문서 구분에 따른 분기 // 업무 문서 구분에 따른 분기
switch (SndngSeCode.compare(seCode)) { switch (sndngSeCode) {
/* /*
* : tb_ens_kakao_my_doc * : tb_ens_kakao_my_doc
* : tb_ens_mobile_page_manage * : tb_ens_mobile_page_manage
* : tb_cntc_sndng_result * : tb_cntc_sndng_result
*/ */
case KAKAO: case KAKAO -> statusKakao(dto);
statusKakao(dto);
break; case KAKAO_NEW
case KT_BC: -> statusKakao(dto);
break; //break;
case KT_BC -> {}
default:
throw BizRuntimeException.create(String.format("정의 되지 않은 문서 중개자[%s] 입니다", seCode)); default ->
throw BizRuntimeException.create(String.format("정의 되지 않은 문서 중개자[%s] 입니다", sndngSeCode.getCode()));
} }
} }

@ -111,5 +111,5 @@ app:
kt: kt:
api: api:
# 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송 # 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송
dp-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/dpMblPage.do chuncheon-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/dpMblPage.do
me-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/meMblPage.do me-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/meMblPage.do

@ -77,8 +77,7 @@
<insert id="insertUnitySndngDtls"> <insert id="insertUnitySndngDtls">
/** ens-mysql-mapper|insertUnitySndngDtls-통합발송상세 생성|julim */ /** ens-mysql-mapper|insertUnitySndngDtls-통합발송상세 생성|julim */
INSERT INSERT INTO tb_ens_unity_sndng_detail (
INTO tb_ens_unity_sndng_detail (
unity_sndng_detail_id, /* 통합발송상세 ID*/ unity_sndng_detail_id, /* 통합발송상세 ID*/
unity_sndng_mastr_id, /* 통합발송마스터 ID */ unity_sndng_mastr_id, /* 통합발송마스터 ID */
signgu_code, /* 시군구 코드 */ signgu_code, /* 시군구 코드 */
@ -193,18 +192,30 @@
</if> </if>
</select> </select>
<select id="selectSendOkTgts" resultType="int"> <select id="selectKkopaySendOkTgts" resultType="int">
/** ens-mysql-mapper|selectSendOkTgts-2차 발송 대상 건수 조회|seojh */ /** ens-mysql-mapper|selectKkopaySendOkTgts-카카오페이 2차 발송 대상 건수 조회|seojh */
SELECT count(1) SELECT count(1)
FROM tb_ens_sndng_mastr tesm FROM tb_ens_sndng_mastr tesm
INNER JOIN tb_ens_kakao_my_doc tekmd JOIN tb_ens_kakao_my_doc tekmd
ON tesm.sndng_mastr_id = tekmd.sndng_mastr_id ON tesm.sndng_mastr_id = tekmd.sndng_mastr_id
WHERE tesm.unity_sndng_mastr_id = #{unitySndngMastrId} WHERE tesm.unity_sndng_mastr_id = #{unitySndngMastrId}
AND tesm.signgu_code = #{signguCode} AND tesm.signgu_code = #{signguCode}
AND tesm.ffnlg_code = #{ffnlgCode} AND tesm.ffnlg_code = #{ffnlgCode}
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)) 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> </select>
<select id="selectKkotalkSendOkTgts" resultType="int">
/** ens-mysql-mapper|selectKkotalkSendOkTgts-카카오톡 2차 발송 대상 건수 조회|seojh */
SELECT count(1)
FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_kakao_d10 tekd
ON tesm.sndng_mastr_id = tekd.sndng_mastr_id
WHERE tesm.unity_sndng_mastr_id = #{unitySndngMastrId}
AND tesm.signgu_code = #{signguCode}
AND tesm.ffnlg_code = #{ffnlgCode}
AND (NOT (tekd.status = 'READ' AND tekd.error_code IS NULL) OR (tekd.status IS NULL and tekd.error_code IS NULL))
</select>
<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">
@ -252,8 +263,8 @@
AND teusm.sndng_process_sttus = #{sndngProcessSttus} AND teusm.sndng_process_sttus = #{sndngProcessSttus}
</insert> </insert>
<insert id="insertKakaoMyDocs"> <insert id="insertKakaopay">
/** ens-mysql-mapper|insertKakaoMyDocs-카카오내문서함 생성|julim */ /** ens-mysql-mapper|insertKakaopay-카카오내문서함 생성|julim */
INSERT INSERT
INTO tb_ens_kakao_my_doc ( INTO tb_ens_kakao_my_doc (
sndng_detail_id, /* 발송상세ID */ sndng_detail_id, /* 발송상세ID */
@ -542,8 +553,8 @@
WHERE unity_sndng_mastr_id = #{unitySndngMastrId} WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
</update> </update>
<insert id="insertKakaoD10"> <insert id="insertKakaotalk">
/** ens-mysql-mapper|insertKakaoD10-카카오톡 D10_2 생성|julim */ /** ens-mysql-mapper|insertKakaotalk-카카오톡 D10_2 생성|julim */
INSERT INSERT
INTO tb_ens_kakao_d10 ( INTO tb_ens_kakao_d10 (
sndng_detail_id, /* 발송상세ID */ sndng_detail_id, /* 발송상세ID */
@ -1142,7 +1153,7 @@
WHERE tmplat_id = #{tmplatId} WHERE tmplat_id = #{tmplatId}
</select> </select>
<select id="selectAcceptValidation" resultType="kr.xit.biz.ens.model.EnsDTO$sndngValidation"> <select id="selectAcceptValidation" resultType="kr.xit.biz.ens.model.EnsDTO$SndngValidation">
/** 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

@ -197,7 +197,7 @@ public class ApiConstants {
this.desc = desc; this.desc = desc;
} }
public static SndngSeCode compare(final String code){ public static SndngSeCode getSndngSeCode(final String code){
return Arrays.stream(SndngSeCode.values()) return Arrays.stream(SndngSeCode.values())
.filter(ssc -> ssc.getCode().equals(code)) .filter(ssc -> ssc.getCode().equals(code))
.findFirst() .findFirst()

Loading…
Cancel
Save