diff --git a/mens-api/src/main/java/kr/xit/biz/mbl/service/MobilePageService.java b/mens-api/src/main/java/kr/xit/biz/mbl/service/MobilePageService.java index e3c05dd..d8f3268 100644 --- a/mens-api/src/main/java/kr/xit/biz/mbl/service/MobilePageService.java +++ b/mens-api/src/main/java/kr/xit/biz/mbl/service/MobilePageService.java @@ -92,7 +92,7 @@ public class MobilePageService extends EgovAbstractServiceImpl implements IMobil * */ @Override - //@TraceLogging + @TraceLogging public MobilePageManage findKtMblPage(final KtTokenDTO.KtTokenConfirmRequest reqDTO) { //TODO::테스트 //return mapper.selectKtMobilePage("srcKey"); @@ -116,7 +116,7 @@ public class MobilePageService extends EgovAbstractServiceImpl implements IMobil if(readRes.getResultCd().equals("00")){ String srcKey = cfmRes.getSrcKey(); - log.error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", readRes.getResultCd()); + log.error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ read token result - {}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", readRes.getResultCd()); return mapper.selectKtMobilePage(srcKey); } log.error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ read token result - {} @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", readRes.getResultCd()); diff --git a/mens-api/src/main/java/kr/xit/ens/epost/service/EpostService.java b/mens-api/src/main/java/kr/xit/ens/epost/service/EpostService.java index 6b44b32..641de50 100644 --- a/mens-api/src/main/java/kr/xit/ens/epost/service/EpostService.java +++ b/mens-api/src/main/java/kr/xit/ens/epost/service/EpostService.java @@ -2,6 +2,7 @@ package kr.xit.ens.epost.service; import java.util.HashMap; import java.util.Map; +import kr.xit.biz.common.ApiConstants.SndngSeCode; import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO; import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceRequest; import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceResponse; @@ -48,8 +49,8 @@ public class EpostService extends EgovAbstractServiceImpl implements IEpostServi @Override @TraceLogging public EpostTraceResponse postTrackInfo(final EpostTraceRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); - reqDTO.setServiceKey(ktMnsInfo.getEpostServiceKey()); + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode(), + SndngSeCode.PPLUS);reqDTO.setServiceKey(ktMnsInfo.getEpostServiceKey()); final Map headerMap = new HashMap<>(); headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); diff --git a/mens-api/src/main/java/kr/xit/ens/kakao/service/KkopayEltrcDocService.java b/mens-api/src/main/java/kr/xit/ens/kakao/service/KkopayEltrcDocService.java index c9c76ed..f742be5 100644 --- a/mens-api/src/main/java/kr/xit/ens/kakao/service/KkopayEltrcDocService.java +++ b/mens-api/src/main/java/kr/xit/ens/kakao/service/KkopayEltrcDocService.java @@ -7,6 +7,9 @@ import java.util.Set; import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; +import kr.xit.biz.common.ApiConstants.SndngSeCode; +import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO; +import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocumentBinderUuid; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.Receiver; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendReq; @@ -106,7 +109,7 @@ public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements if(Checks.isEmpty(receiver.getBirthday())) Objects.requireNonNull(errors).add("receiver.birthday=받는이 생년월일은 필수입니다."); } if(!Objects.requireNonNull(errors).isEmpty()) throw BizRuntimeException.create(errors.toString()); - return webClient.exchangeKko(HOST + API_SEND[0], HttpMethod.valueOf(API_SEND[1]), JsonUtils.toJson(reqDTO), SendResponse.class, CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())); + return webClient.exchangeKko(HOST + API_SEND[0], HttpMethod.valueOf(API_SEND[1]), JsonUtils.toJson(reqDTO), SendResponse.class, getRlaybsnmInfo(reqDTO)); } /** @@ -124,7 +127,7 @@ public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements final String url = HOST + API_VALID_TOKEN[0].replace(DOCUMENT_BINDER_UUID, reqDTO.getDocument_binder_uuid()) .replace("{tokens}", reqDTO.getToken()); - return webClient.exchangeKko(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null, ValidTokenResponse.class, CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())); + return webClient.exchangeKko(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null, ValidTokenResponse.class, getRlaybsnmInfo(reqDTO)); } /** @@ -145,7 +148,7 @@ public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements final String body = "{\"document\": {\"is_detail_read\": true} }"; final String url = HOST + API_MODIFY_STATUS[0].replace(DOCUMENT_BINDER_UUID, reqDTO.getDocument_binder_uuid()); - webClient.exchangeKko(url, HttpMethod.valueOf(API_MODIFY_STATUS[1]), body, Void.class, CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())); + webClient.exchangeKko(url, HttpMethod.valueOf(API_MODIFY_STATUS[1]), body, Void.class, getRlaybsnmInfo(reqDTO)); } /** @@ -166,7 +169,7 @@ public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements validate(reqDTO, null); final String url = HOST + API_STATUS[0].replace(DOCUMENT_BINDER_UUID, reqDTO.getDocument_binder_uuid()); - return webClient.exchangeKko(url, HttpMethod.valueOf(API_STATUS[1]), null, DocStatusResponse.class, CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())); + return webClient.exchangeKko(url, HttpMethod.valueOf(API_STATUS[1]), null, DocStatusResponse.class, getRlaybsnmInfo(reqDTO)); } /** @@ -223,7 +226,7 @@ public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements throw BizRuntimeException.create(errors.toString()); } - return webClient.exchangeKko(HOST + API_BULKSEND[0], HttpMethod.valueOf(API_BULKSEND[1]), JsonUtils.toJson(reqDTO), BulkSendResponses.class, CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())); + return webClient.exchangeKko(HOST + API_BULKSEND[0], HttpMethod.valueOf(API_BULKSEND[1]), JsonUtils.toJson(reqDTO), BulkSendResponses.class, getRlaybsnmInfo(reqDTO)); } /** @@ -253,7 +256,7 @@ public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements if(!errors.isEmpty()) { throw BizRuntimeException.create(errors.toString()); } - return webClient.exchangeKko(HOST + API_BULKSTATUS[0], HttpMethod.valueOf(API_BULKSTATUS[1]), JsonUtils.toJson(reqDTO), BulkStatusResponses.class, CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())); + return webClient.exchangeKko(HOST + API_BULKSTATUS[0], HttpMethod.valueOf(API_BULKSTATUS[1]), JsonUtils.toJson(reqDTO), BulkStatusResponses.class, getRlaybsnmInfo(reqDTO)); } @Override @@ -263,7 +266,7 @@ public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements // 유효성 검증 final ValidTokenResponse validTokenRes = webClient.exchangeKko(url, HttpMethod.valueOf(API_VALID_TOKEN[1]), null, - ValidTokenResponse.class, CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())); + ValidTokenResponse.class, getRlaybsnmInfo(reqDTO)); if(!"USED".equals(validTokenRes.getToken_status())){ return ApiResponseDTO.error(validTokenRes.getError_code(), validTokenRes.getError_message()); @@ -275,7 +278,7 @@ public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements // 정상 : HttpStatus.NO_CONTENT(204) return // error : body에 error_code, error_message return - final KkopayErrorDTO errorDTO = webClient.exchangeKko(url2, HttpMethod.valueOf(API_MODIFY_STATUS[1]), body, KkopayErrorDTO.class, CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())); + final KkopayErrorDTO errorDTO = webClient.exchangeKko(url2, HttpMethod.valueOf(API_MODIFY_STATUS[1]), body, KkopayErrorDTO.class, getRlaybsnmInfo(reqDTO)); if(errorDTO != null){ return ApiResponseDTO.error(errorDTO.getErrorCode(), errorDTO.getErrorMessage()); } @@ -302,4 +305,8 @@ public class KkopayEltrcDocService extends EgovAbstractServiceImpl implements } return errList; } + + private CmmEnsRlaybsnmDTO getRlaybsnmInfo(final CmmEnsRequestDTO request){ + return CmmKtMmsUtils.getRlaybsnmInfo(request.getSignguCode(), request.getFfnlgCode(), SndngSeCode.KAKAO); + } } diff --git a/mens-api/src/main/java/kr/xit/ens/kt/cmm/CmmKtMmsUtils.java b/mens-api/src/main/java/kr/xit/ens/kt/cmm/CmmKtMmsUtils.java index e59f25c..f9d06d2 100644 --- a/mens-api/src/main/java/kr/xit/ens/kt/cmm/CmmKtMmsUtils.java +++ b/mens-api/src/main/java/kr/xit/ens/kt/cmm/CmmKtMmsUtils.java @@ -4,9 +4,9 @@ import egovframework.com.cmm.EgovMessageSource; import java.util.Objects; import kr.xit.biz.cmm.service.ICmmEnsCacheService; import kr.xit.biz.common.ApiConstants; +import kr.xit.biz.common.ApiConstants.SndngSeCode; import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO; import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO; -import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest; import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.spring.util.ApiSpringUtils; import kr.xit.core.spring.util.CoreSpringUtils; @@ -42,7 +42,8 @@ public class CmmKtMmsUtils { * KT MMS 인증 정보 조회 * @return */ - public static CmmEnsRlaybsnmDTO getRlaybsnmInfo(final String signguCode, final String ffnlgCode) { + public static CmmEnsRlaybsnmDTO getRlaybsnmInfo(final String signguCode, final String ffnlgCode, final + SndngSeCode seCode) { CmmEnsRequestDTO ensDTO = CmmEnsRequestDTO.builder() .signguCode(signguCode) .ffnlgCode(ffnlgCode) @@ -55,11 +56,12 @@ public class CmmKtMmsUtils { if(ObjectUtils.isEmpty(dto)) throw BizRuntimeException.create(messageSource.getMessage("fail.api.rlaybsnm.info")); // 토큰 유효기간 체크 - //if(DateUtils.getTodayAndNowTime(ApiConstants.FMT_DT_STD).compareTo( - // Objects.requireNonNull(dto.getKtTokenExpiresIn(), () -> messageSource.getMessage("fail.api.kt.token.invalid.expired"))) < 0) return dto; + if(DateUtils.getTodayAndNowTime(ApiConstants.FMT_DT_STD).compareTo( + Objects.requireNonNull(dto.getKtTokenExpiresIn(), () -> messageSource.getMessage("fail.api.token.invalid.expired", new String[]{seCode.getDesc()}))) < 0) return dto; return dto; /* + //TODO :: comment remove after test ktMmsService.requestToken( KtMnsRequest.builder() .signguCode(signguCode) diff --git a/mens-api/src/main/java/kr/xit/ens/kt/service/KtMmsService.java b/mens-api/src/main/java/kr/xit/ens/kt/service/KtMmsService.java index b30c878..add0a66 100644 --- a/mens-api/src/main/java/kr/xit/ens/kt/service/KtMmsService.java +++ b/mens-api/src/main/java/kr/xit/ens/kt/service/KtMmsService.java @@ -2,6 +2,7 @@ package kr.xit.ens.kt.service; import java.util.HashMap; import java.util.Map; +import kr.xit.biz.common.ApiConstants.SndngSeCode; import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO; import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdCerfRequest; import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdCerfResponse; @@ -9,6 +10,7 @@ import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoCfmRequest; import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoCfmResponse; import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoRequest; import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdInfoResponse; +import kr.xit.biz.ens.model.kt.KtCommonDTO; import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse; import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest; import kr.xit.biz.ens.model.kt.KtExcaDTO.KtExcaRequest; @@ -164,7 +166,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override @TraceLogging public KtTokenResponse requestToken(final KtMnsRequest paramDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(paramDTO.getSignguCode(), paramDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(paramDTO); final KtTokenRequest reqDTO = KtTokenRequest.builder() .clientId(ktMnsInfo.getKtSvcClientId()) .clientSecret(ktMnsInfo.getKtSvcClientSecret()) @@ -189,7 +191,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override @TraceLogging public KtCommonResponse mainSend(final KtMainSendRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setServiceCd(ktMnsInfo.getKtServiceCode()); reqDTO.setServiceKey(ktMnsInfo.getKtSvcCerfKey()); reqDTO.setSignguCode(null); @@ -209,7 +211,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override @TraceLogging public KtTokenConfirmResponse cfmToken(final KtTokenDTO.KtTokenConfirmRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setServiceCd(ktMnsInfo.getKtServiceCode()); reqDTO.setServiceKey(ktMnsInfo.getKtSvcCerfKey()); reqDTO.setSignguCode(null); @@ -229,7 +231,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override @TraceLogging public KtCommonResponse readToken(final KtTokenReadRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setServiceCd(ktMnsInfo.getKtServiceCode()); reqDTO.setServiceKey(ktMnsInfo.getKtSvcCerfKey()); reqDTO.setMmsRdgTmst(DateUtils.getTodayAndNowTime("yyyyMMddHHmmss")); @@ -260,7 +262,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi */ @Override public KtCommonResponse beforeSend(final KtBefSendRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setServiceCd(ktMnsInfo.getKtServiceCode()); reqDTO.setServiceKey(ktMnsInfo.getKtSvcCerfKey()); @@ -280,7 +282,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override public KtCommonResponse blacklist(final KtBlacklistRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setSignguCode(null); reqDTO.setFfnlgCode(null); reqDTO.setProfile(null); @@ -297,7 +299,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override public KtSendSttcResponse sendSttc(final KtSendSttcRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setSignguCode(null); reqDTO.setFfnlgCode(null); reqDTO.setProfile(null); @@ -314,7 +316,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override public KtSendSttcDtlResponse sendSttcDtl(final KtSendSttcDtlRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setSignguCode(null); reqDTO.setFfnlgCode(null); reqDTO.setProfile(null); @@ -331,7 +333,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override public KtCommonResponse whitelist(final KtWhitelistRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setSignguCode(null); reqDTO.setFfnlgCode(null); reqDTO.setProfile(null); @@ -374,7 +376,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override public KtAcmdCerfResponse cerfAcmd(final KtAcmdCerfRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setSignguCode(null); reqDTO.setFfnlgCode(null); reqDTO.setProfile(null); @@ -391,7 +393,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override public KtCommonResponse excaAcmd(KtTokenExcaRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setSignguCode(null); reqDTO.setFfnlgCode(null); reqDTO.setProfile(null); @@ -408,7 +410,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override public KtExcaResponse exca(final KtExcaRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setSignguCode(null); reqDTO.setFfnlgCode(null); reqDTO.setProfile(null); @@ -425,7 +427,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override public KtAcmdInfoResponse infoAcmd(final KtAcmdInfoRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setSignguCode(null); reqDTO.setFfnlgCode(null); reqDTO.setProfile(null); @@ -442,7 +444,7 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi @Override public KtAcmdInfoCfmResponse cfmAcmd(final KtAcmdInfoCfmRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO); reqDTO.setSignguCode(null); reqDTO.setFfnlgCode(null); reqDTO.setProfile(null); @@ -457,4 +459,8 @@ public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsServi ); } //------------------------------------------------------------------------------ + + private CmmEnsRlaybsnmDTO getRlaybsnmInfo(final KtCommonDTO.KtMnsRequest request){ + return CmmKtMmsUtils.getRlaybsnmInfo(request.getSignguCode(), request.getFfnlgCode(), SndngSeCode.KT_BC); + } } diff --git a/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java b/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java index b3313ac..d135ecf 100644 --- a/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java +++ b/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java @@ -6,6 +6,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import kr.xit.biz.common.ApiConstants.SndngSeCode; import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO; import kr.xit.biz.ens.model.cmm.SndngMssageParam; import kr.xit.biz.ens.model.pplus.PplusDTO.BatchAcceptRequest; @@ -95,7 +96,7 @@ public class PplusService extends EgovAbstractServiceImpl implements IPplusServi } public PpCommonResponse accept(final SndngMssageParam paramDTO, final String unitySndngMstId) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(paramDTO.getSignguCode(), paramDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(paramDTO.getSignguCode(), paramDTO.getFfnlgCode(), SndngSeCode.PPLUS); MultipartFile pstFile = FileUtil.createMutipartFile(unitySndngMstId + ".json", FILE_TEMP_PATH); @@ -121,7 +122,7 @@ public class PplusService extends EgovAbstractServiceImpl implements IPplusServi @Override public PpStatusResponse statusBulks(PpStatusRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); + final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode(), SndngSeCode.PPLUS); reqDTO.setApiKey(ktMnsInfo.getPplusApiKey()); reqDTO.setSignguCode(null); reqDTO.setFfnlgCode(null); diff --git a/mens-api/src/main/resources/egovframework/messages/message-api.properties b/mens-api/src/main/resources/egovframework/messages/message-api.properties index 7c7a9e2..51c8333 100644 --- a/mens-api/src/main/resources/egovframework/messages/message-api.properties +++ b/mens-api/src/main/resources/egovframework/messages/message-api.properties @@ -9,8 +9,9 @@ fail.api.nice.token.invalid.expired=Nice token \uC720\uD6A8\uAE30\uAC04\uC774 \u fail.api.nice.symkey.invalid.expired=Nice \uB300\uCE6D\uD0A4 \uC720\uD6A8\uAE30\uAC04\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4[null]. fail.api.rlaybsnm.info=\uBB38\uC11C\uC911\uACC4\uC790 \uC778\uC99D \uC815\uBCF4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +fail.api.token.invalid.expired={0} access token \uC720\uD6A8\uAE30\uAC04\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4[null]. + fail.api.kt.token.request=KT \uD1A0\uD070 \uC694\uCCAD\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. -fail.api.kt.token.invalid.expired=kt access token \uC720\uD6A8\uAE30\uAC04\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4[null]. err.api.nice.pubKey.0000=\uACF5\uAC1C\uD0A4\uBC1C\uAE09 err.api.nice.pubKey.0001=\uD544\uC218 \uC785\uB825\uAC12 \uC624\uB958 diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java index 4f2c603..b56c90b 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java @@ -351,10 +351,9 @@ public class EnsBatchSendService extends EgovAbstractServiceImpl implements IEns throw e; } + // mobile page create sendReqs.forEach(d -> mapper.insertKtMobilePageManage(d.getSrcKey())); - - final List> partitions = ListUtils.partition(sendReqs, bulkKtMaxCnt); List apiResults = partitions.stream() .map(bulkSendList -> { @@ -383,7 +382,7 @@ public class EnsBatchSendService extends EgovAbstractServiceImpl implements IEns isSuccess = true; dto.setErrorMssage("정상"); }else{ - //TODO:: 모바일 콘텐츠 삭제 + //TODO:: 모바일 콘텐츠 삭제?? errList.addAll(resDTO.getErrors()); } diff --git a/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java b/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java index 9e51cf2..c2bc728 100644 --- a/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java +++ b/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java @@ -160,17 +160,19 @@ public class ApiConstants { */ @Getter public enum SndngSeCode { - SMS("SMS"), - KAKAO("KKO-MY-DOC"), - E_GREEN("E-GREEN"), - KT_BC("KT-BC"), - PPLUS("POST-PLUS") + SMS("SMS", "SMS"), + KAKAO("KKO-MY-DOC", "카카오"), + E_GREEN("E-GREEN", "E그린"), + KT_BC("KT-BC", "공공알림문자"), + PPLUS("POST-PLUS", "Post Plus") ; private final String code; + private final String desc; - SndngSeCode(String code) { + SndngSeCode(final String code, final String desc) { this.code = code; + this.desc = desc; } public static SndngSeCode compare(final String code){ diff --git a/mens-core/src/main/java/kr/xit/core/spring/config/WebMvcConfig.java b/mens-core/src/main/java/kr/xit/core/spring/config/WebMvcConfig.java index 73f2881..4d692ae 100644 --- a/mens-core/src/main/java/kr/xit/core/spring/config/WebMvcConfig.java +++ b/mens-core/src/main/java/kr/xit/core/spring/config/WebMvcConfig.java @@ -135,7 +135,7 @@ public class WebMvcConfig implements WebMvcConfigurer { * Post 요청시 request(stream) logging 처리를 위한 필터 * @return */ - //@Bean + @Bean public FilterRegistrationBean readableRequestWrapperFilter() { ReadableRequestWrapperFilter readableRequestWrapperFilter = new ReadableRequestWrapperFilter();