From 2ba6cb61677c9a6167ab4219e0e81307b1b034a8 Mon Sep 17 00:00:00 2001 From: jhseo Date: Mon, 26 Feb 2024 09:32:27 +0900 Subject: [PATCH] =?UTF-8?q?feat:=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=85=8C=EC=8A=A4=ED=8A=B8=EC=9A=A9=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/biz/mbl/mapper/IMobilePageMapper.java | 2 ++ .../biz/mbl/service/IMobilePageService.java | 3 +++ .../biz/mbl/service/MobilePageService.java | 21 +++++++++++++++++ .../xit/biz/mbl/web/MobilePageController.java | 16 +++++++++++++ .../mapper/biz/ens-mbl-mysql-mapper.xml | 7 ++++++ .../kr/xit/biz/ens/model/cntc/CntcDTO.java | 23 +++++++++++++++---- 6 files changed, 68 insertions(+), 4 deletions(-) diff --git a/mens-api/src/main/java/kr/xit/biz/mbl/mapper/IMobilePageMapper.java b/mens-api/src/main/java/kr/xit/biz/mbl/mapper/IMobilePageMapper.java index 761d3c4..351f4ef 100644 --- a/mens-api/src/main/java/kr/xit/biz/mbl/mapper/IMobilePageMapper.java +++ b/mens-api/src/main/java/kr/xit/biz/mbl/mapper/IMobilePageMapper.java @@ -1,5 +1,6 @@ package kr.xit.biz.mbl.mapper; +import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken; import kr.xit.biz.mbl.model.MobilePageDTO.MobilePageManage; import org.egovframe.rte.psl.dataaccess.mapper.Mapper; @@ -23,4 +24,5 @@ import org.egovframe.rte.psl.dataaccess.mapper.Mapper; public interface IMobilePageMapper { MobilePageManage selectKkoMobilePage(final OneTimeToken dto); MobilePageManage selectKtMobilePage(final T t); + MobilePageManage selectXitMobilePage(final CntcDTO.XitPage dto); } 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 e737738..5473eb3 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 @@ -1,5 +1,6 @@ package kr.xit.biz.mbl.service; +import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken; import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenConfirmRequest; import kr.xit.core.model.IApiResponse; @@ -24,4 +25,6 @@ public interface IMobilePageService { IApiResponse findKkoMyDocReadyAndMblPage(OneTimeToken reqDTO); IApiResponse findKtMblPage(final KtTokenConfirmRequest reqDTO); + + IApiResponse findXitMyDocReadyAndMblPage(final CntcDTO.XitPage 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 5b1c651..6725f6a 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 @@ -1,5 +1,6 @@ package kr.xit.biz.mbl.service; +import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.kakao.KkopayDocDTO; import kr.xit.biz.ens.model.kt.KtCommonDTO; import kr.xit.biz.ens.model.kt.KtTokenDTO; @@ -124,4 +125,24 @@ public class MobilePageService extends AbstractService implements IMobilePageSer } throw BizRuntimeException.create(cfmRes.getResultCd(), cfmRes.toStringErrorMsg()); } + + /** + *
+     * XIT 내문서함 모바일 페이지 컨탠트 요청
+     * - 대상 : unitySndngDetailId를 통해 데이터 조회
+     * - 모바일의 redirect url을 통해 들어온 요청 처리
+     *
+     * @param reqDTO CntcDTO.XitPage
+     * 
+ */ + @Override + @TraceLogging + public IApiResponse findXitMyDocReadyAndMblPage(final CntcDTO.XitPage reqDTO) { + + // unitySndngDetailId로 데이타 조회 + final MobilePageManage mobilePageManage = mapper.selectXitMobilePage(reqDTO); + if(mobilePageManage == null) throw BizRuntimeException.create("데이타 오류[내문서함 문서가 없습니다]"); + + return ApiResponseDTO.success(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 22faa72..7d4da06 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 @@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import javax.servlet.http.HttpServletRequest; import kr.xit.biz.common.ApiConstants; import kr.xit.biz.common.ApiConstants.SignguCode; +import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.kakao.KkopayDocDTO; import kr.xit.biz.ens.model.kt.KtTokenDTO; import kr.xit.biz.mbl.service.IMobilePageService; @@ -90,4 +91,19 @@ public class MobilePageController { } return service.findKtMblPage(cfmReqDTO); } + + /** + *
+     *  XIT 모바일 페이지 요청
+     *  - mens-web에서 호출 : {@code EnsInboundApiController.findXitMblPage}
+     *    xit mobile page
+     * @param reqDTO CntcDTO.XitPage
+     * @return IApiResponse 모바일 페이지 데이타 String return
+     * 
+ */ + @Operation(summary = "XIT 모바일 데이타 요청(모바일 페이지에서 호출)", description = "XIT 모바일 데이타 요청(모바일 페이지에서 호출)") + @PostMapping(value = "/xit/mblPage", produces = MediaType.APPLICATION_JSON_VALUE) + public IApiResponse findXitMyDocReadyAndMblData(@RequestBody final CntcDTO.XitPage reqDTO) { + return service.findXitMyDocReadyAndMblPage(reqDTO); + } } diff --git a/mens-api/src/main/resources/egovframework/mapper/biz/ens-mbl-mysql-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/biz/ens-mbl-mysql-mapper.xml index c4dcb33..bcbd7f7 100644 --- a/mens-api/src/main/resources/egovframework/mapper/biz/ens-mbl-mysql-mapper.xml +++ b/mens-api/src/main/resources/egovframework/mapper/biz/ens-mbl-mysql-mapper.xml @@ -28,4 +28,11 @@ WHERE tekbd.unity_sndng_detail_id = #{srcKey} + + diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/cntc/CntcDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/cntc/CntcDTO.java index efd630e..281e323 100644 --- a/mens-core/src/main/java/kr/xit/biz/ens/model/cntc/CntcDTO.java +++ b/mens-core/src/main/java/kr/xit/biz/ens/model/cntc/CntcDTO.java @@ -1,11 +1,11 @@ package kr.xit.biz.ens.model.cntc; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.v3.oas.annotations.media.Schema; import kr.xit.biz.common.AuditFields; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; +import lombok.*; import lombok.experimental.SuperBuilder; +import org.hibernate.validator.constraints.Length; import java.io.Serializable; @@ -265,4 +265,19 @@ public class CntcDTO { */ private String taxNum4; } + @Schema(name = "XitPage DTO", description = "XIT 모바일 페이지 DTO") + @Data + @SuperBuilder + @NoArgsConstructor + @AllArgsConstructor + @ToString + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class XitPage { + /** + * Xit Detail ID(외부 - max:40) + */ + @Schema(requiredMode = Schema.RequiredMode.AUTO, title = "Xit Detail ID(max:40)", example = " ") + @Length(max = 40, message = "Xit Detail ID(max:40)") + private String unitySndngDetailId; + } }