feat: 모바일페이지 JSP 설정 및 테스트

main
Jonguk. Lim 3 months ago
parent 5bbc826d75
commit 65667ccb76

@ -1,7 +1,5 @@
package kr.xit.biz.mbl.service;
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;
@ -24,8 +22,8 @@ import kr.xit.core.model.IApiResponse;
*/
public interface IMobilePageService {
// FIXME: kakao v1 or v2
Map<String, Object> findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
Map<String, Object> findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
//Map<String, Object> findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
String findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
IApiResponse findKtMblPage(final KtTokenConfirmRequest reqDTO);

@ -1,6 +1,5 @@
package kr.xit.biz.mbl.service;
import java.util.HashMap;
import java.util.Map;
import org.springframework.stereotype.Service;
@ -70,7 +69,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
* @param reqDTO KkopayDocDTO.OneTimeToken
* </pre>
*/
@Override
//@Override
@TraceLogging
public Map<String, Object> findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) {
@ -112,7 +111,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
*/
@Override
@TraceLogging
public Map<String, Object> 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()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
@ -135,13 +134,9 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
// Map<String, List<Map<String, Object>>> map = gson.fromJson(mobilePageManage.getMobilePageCn(), Map.class);
// Map<String, List<Map<String, Object>>> mobilePage = new HashMap<>();
// mobilePage.put("details", map.get("details"));
Map<String, Object> rtnMap = new HashMap<>();
rtnMap.put("errCode", "OK");
rtnMap.put("errMsg", "정상");
rtnMap.put("details", mobilePageManage.getMobilePageCn());
//JsonUtils.toObject(mobilePageManage.getMobilePageCn(), Map.class);
return rtnMap;
return mobilePageManage.getMobilePageCn();
}
/**

@ -1,7 +1,5 @@
package kr.xit.biz.mbl.web;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
@ -13,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -60,18 +59,24 @@ public class MobilePageController {
@Operation(summary = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)", description = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)")
@RequestMapping(
value = {"/kko/mblPage"}, method = {RequestMethod.POST, RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE)
public Map<String, Object> findKkoMyDocReadyAndMblData(@ModelAttribute final MobilePageDTO.KakaoValidTokenRequest reqDTO) {
public ModelAndView findKkoMyDocReadyAndMblData(@ModelAttribute final MobilePageDTO.KakaoValidTokenRequest reqDTO) {
if((StringUtils.isEmpty(reqDTO.getDocumentBinderUuid()) && StringUtils.isEmpty(reqDTO.getEnvelopeId()))
|| StringUtils.isEmpty(reqDTO.getToken())) {
throw BizRuntimeException.create("정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
}
if(StringUtils.isNotEmpty(reqDTO.getDocumentBinderUuid())) {
return service.findKkopayReadyAndMblPage(reqDTO);
}else{
return service.findKkotalkReadyAndMblPage(reqDTO);
}
//if(StringUtils.isNotEmpty(reqDTO.getDocumentBinderUuid())) {
// return service.findKkopayReadyAndMblPage(reqDTO);
//}else{
// return service.findKkotalkReadyAndMblPage(reqDTO);
//}
ModelAndView mav = new ModelAndView();
mav.setViewName("notiprnt");
mav.addObject("errCode", "OK");
mav.addObject("errMsg", "정상");
mav.addObject("details", service.findKkotalkReadyAndMblPage(reqDTO));
return mav;
}
/**

@ -0,0 +1,30 @@
package kr.xit.biz.mbl.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
/**
* <pre>
* description : API Controller
* - mens-web
* packageName : kr.xit.biz.mbl.web
* fileName : MobilePageController
* author : limju
* date : 2023-08-31
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-08-31 limju
*
* </pre>
*/
@RestController
public class TestController {
@RequestMapping(value = "/index")
public ModelAndView test() {
return new ModelAndView("/index");
}
}

@ -49,6 +49,11 @@ spring:
- app
- ens
mvc:
view:
prefix: /WEB-INF/jsp/
suffix: .jsp
datasource:
hikari:
# 9 server

Loading…
Cancel
Save