From 70d572640fe4ad1fb2fa127e8024ff11fa28058e Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Fri, 23 Aug 2024 15:43:59 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=B9=B4=EC=B9=B4=EC=98=A4=ED=86=A1/?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=ED=98=B8=EC=B6=9C=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/mens_traffic.sql | 12 +++++++ db/mens_traffic_oracle.sql | 12 +++++++ .../biz/mbl/service/IMobilePageService.java | 4 +-- .../biz/mbl/service/MobilePageService.java | 34 +++++++++---------- .../xit/biz/mbl/web/MobilePageController.java | 2 +- 5 files changed, 44 insertions(+), 20 deletions(-) diff --git a/db/mens_traffic.sql b/db/mens_traffic.sql index 2eaa1fa..4ccbd5e 100644 --- a/db/mens_traffic.sql +++ b/db/mens_traffic.sql @@ -96,3 +96,15 @@ where teim.ihidnum = 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc='; select * from ens_snd_mast; select * from ENS_SND_DTL_KT_GBS; + + + SELECT tempm.sndng_detail_id + , tempm.sndng_se_code + , tempm.mobile_page_cn + , tekmd.signgu_code + , tekmd.ffnlg_code + FROM tb_ens_kakao_d10 tekmd + JOIN tb_ens_mobile_page_manage tempm + ON tekmd.sndng_detail_id = tempm.sndng_detail_id + WHERE tekmd.envelope_id = 'EVLP-01J5YX9QNMS3Y8D3QZTB51NMMN-00' + AND tekmd.external_id = '4413311202408230033'; diff --git a/db/mens_traffic_oracle.sql b/db/mens_traffic_oracle.sql index 3fd6d7c..6b83ba7 100644 --- a/db/mens_traffic_oracle.sql +++ b/db/mens_traffic_oracle.sql @@ -169,3 +169,15 @@ updt_dt + ( ELSE kt_dev_token_expires_in END - 86400) / 86400 from tb_ens_rlaybsnm_manage; + + + SELECT tempm.sndng_detail_id + , tempm.sndng_se_code + , tempm.mobile_page_cn + , tekmd.signgu_code + , tekmd.ffnlg_code + FROM tb_ens_kakao_d10 tekmd + JOIN tb_ens_mobile_page_manage tempm + ON tekmd.sndng_detail_id = tempm.sndng_detail_id + WHERE tekmd.envelope_id = 'EVLP-01J5YX9QNMS3Y8D3QZTB51NMMN-00' + AND tekmd.external_id = '4413311202408230033'; diff --git a/mens-api/src/main/java/kr/xit/biz/mbl/service/IMobilePageService.java b/mens-api/src/main/java/kr/xit/biz/mbl/service/IMobilePageService.java index 9b498e5..79053dd 100644 --- a/mens-api/src/main/java/kr/xit/biz/mbl/service/IMobilePageService.java +++ b/mens-api/src/main/java/kr/xit/biz/mbl/service/IMobilePageService.java @@ -22,8 +22,8 @@ import kr.xit.core.model.IApiResponse; */ public interface IMobilePageService { // FIXME: kakao v1 or v2 - IApiResponse findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO); - IApiResponse findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO); + String findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO); + String findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO); IApiResponse findKtMblPage(final KtTokenConfirmRequest reqDTO); 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 2e6ad54..dad5e5c 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 @@ -4,7 +4,6 @@ import org.springframework.stereotype.Service; import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.kakao.v1.KkopayDocDTO; -import kr.xit.biz.ens.model.kakao.v2.KkotalkApiDTO; import kr.xit.biz.ens.model.kt.KtCommonDTO; import kr.xit.biz.ens.model.kt.KtTokenDTO; import kr.xit.biz.mbl.mapper.IMobilePageMapper; @@ -64,7 +63,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer */ @Override @TraceLogging - public IApiResponse findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) { + public String findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) { if (Checks.isEmpty(reqDTO.getToken()) || Checks.isEmpty(reqDTO.getDocumentBinderUuid()) || Checks.isEmpty(reqDTO.getExternalDocumentUuid())) throw BizRuntimeException.create(String.valueOf(ErrorCode.BAD_REQUEST.getHttpStatus().value()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다."); @@ -82,9 +81,9 @@ public class MobilePageService extends AbstractService implements IMobilePageSer .build() ); if(!res.isSuccess()){ - return res; + throw BizRuntimeException.create(res.getMessage()); } - return ApiResponseDTO.success(mobilePageManage.getMobilePageCn()); + return mobilePageManage.getMobilePageCn(); } /** @@ -104,7 +103,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer */ @Override @TraceLogging - public IApiResponse findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) { + public String findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) { if (Checks.isEmpty(reqDTO.getToken()) || Checks.isEmpty(reqDTO.getEnvelopeId()) || Checks.isEmpty(reqDTO.getExternalId())) throw BizRuntimeException.create(String.valueOf(ErrorCode.BAD_REQUEST.getHttpStatus().value()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다."); @@ -112,18 +111,19 @@ public class MobilePageService extends AbstractService implements IMobilePageSer final MobilePageManage mobilePageManage = mapper.selectKkotalkMobilePage(reqDTO); if(mobilePageManage == null) throw BizRuntimeException.create("데이타 오류[카카오톡 내문서함 문서가 없습니다]"); - final ApiResponseDTO res = kkotalkService.findKkotalkReadyAndMblPage( - KkotalkApiDTO.ValidTokenRequest.builder() - .envelopeId(reqDTO.getEnvelopeId()) - .token(reqDTO.getToken()) - .signguCode(mobilePageManage.getSignguCode()) - .ffnlgCode(mobilePageManage.getFfnlgCode()) - .build() - ); - if(!res.isSuccess()){ - return res; - } - return ApiResponseDTO.success(mobilePageManage.getMobilePageCn()); + // FIXME: 테스트를 위해 임시로 주석처리 + // final ApiResponseDTO res = kkotalkService.findKkotalkReadyAndMblPage( + // KkotalkApiDTO.ValidTokenRequest.builder() + // .envelopeId(reqDTO.getEnvelopeId()) + // .token(reqDTO.getToken()) + // .signguCode(mobilePageManage.getSignguCode()) + // .ffnlgCode(mobilePageManage.getFfnlgCode()) + // .build() + // ); + // if(!res.isSuccess()){ + // return res; + // } + return mobilePageManage.getMobilePageCn(); } /** diff --git a/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java b/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java index d6378b1..2f9135d 100644 --- a/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java +++ b/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java @@ -58,7 +58,7 @@ public class MobilePageController { @Operation(summary = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)", description = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)") @RequestMapping( value = {"/kko/mblPage"}, method = {RequestMethod.POST, RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) - public IApiResponse findKkoMyDocReadyAndMblData(@ModelAttribute final MobilePageDTO.KakaoValidTokenRequest reqDTO) { + public String findKkoMyDocReadyAndMblData(@ModelAttribute final MobilePageDTO.KakaoValidTokenRequest reqDTO) { if((StringUtils.isEmpty(reqDTO.getDocumentBinderUuid()) && StringUtils.isEmpty(reqDTO.getEnvelopeId())) || StringUtils.isEmpty(reqDTO.getToken())) {