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 79053dd..5666a34 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,8 @@ package kr.xit.biz.mbl.service; +import java.util.List; +import java.util.Map; + import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenConfirmRequest; import kr.xit.biz.mbl.model.MobilePageDTO; @@ -22,8 +25,8 @@ import kr.xit.core.model.IApiResponse; */ public interface IMobilePageService { // FIXME: kakao v1 or v2 - String findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO); - String findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO); + Map>> findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO); + Map>> 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 46ff740..9393b9a 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,8 @@ package kr.xit.biz.mbl.service; +import java.util.List; +import java.util.Map; + import org.springframework.stereotype.Service; import kr.xit.biz.ens.model.cntc.CntcDTO; @@ -16,6 +19,7 @@ import kr.xit.core.model.IApiResponse; import kr.xit.core.service.AbstractService; import kr.xit.core.spring.annotation.TraceLogging; import kr.xit.core.support.utils.Checks; +import kr.xit.core.support.utils.JsonUtils; import kr.xit.ens.kakao.v1.service.IKkopayEltrcDocService; import kr.xit.ens.kakao.v2.service.IKkotalkEltrcDocService; import kr.xit.ens.kt.service.IKtBcService; @@ -63,7 +67,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer */ @Override @TraceLogging - public String findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) { + public Map>> 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()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다."); @@ -83,7 +87,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer if(!res.isSuccess()){ throw BizRuntimeException.create(res.getMessage()); } - return mobilePageManage.getMobilePageCn(); + return JsonUtils.toObject(mobilePageManage.getMobilePageCn(), Map.class); } /** @@ -103,7 +107,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer */ @Override @TraceLogging - public String findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) { + public Map>> 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()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다."); @@ -123,7 +127,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer // if(!res.isSuccess()){ // throw BizRuntimeException.create(res.getMessage()); // } - return mobilePageManage.getMobilePageCn(); + return JsonUtils.toObject(mobilePageManage.getMobilePageCn(), Map.class); } /** 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 2f9135d..2f26fb3 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 @@ -1,5 +1,8 @@ package kr.xit.biz.mbl.web; +import java.util.List; +import java.util.Map; + import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringUtils; @@ -58,7 +61,7 @@ public class MobilePageController { @Operation(summary = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)", description = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)") @RequestMapping( value = {"/kko/mblPage"}, method = {RequestMethod.POST, RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) - public String findKkoMyDocReadyAndMblData(@ModelAttribute final MobilePageDTO.KakaoValidTokenRequest reqDTO) { + public Map>> findKkoMyDocReadyAndMblData(@ModelAttribute final MobilePageDTO.KakaoValidTokenRequest reqDTO) { if((StringUtils.isEmpty(reqDTO.getDocumentBinderUuid()) && StringUtils.isEmpty(reqDTO.getEnvelopeId())) || StringUtils.isEmpty(reqDTO.getToken())) {