feat: can(천안) 모바일페이지 반영

main
Jonguk. Lim 3 months ago
parent 4bc67bee8c
commit 39108a447b

@ -21,8 +21,8 @@ import kr.xit.core.model.IApiResponse;
* </pre> * </pre>
*/ */
public interface IMobilePageService { public interface IMobilePageService {
// FIXME: kakao v1 or v2 // FIXME: kakao v1 or v2 - 천안 jsp에서 호출됨
//Map<String, Object> findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO); String findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
String findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO); String findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
IApiResponse findKtMblPage(final KtTokenConfirmRequest reqDTO); IApiResponse findKtMblPage(final KtTokenConfirmRequest reqDTO);

@ -1,14 +1,8 @@
package kr.xit.biz.mbl.service; package kr.xit.biz.mbl.service;
import java.util.Map;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.cntc.CntcDTO;
import kr.xit.biz.ens.model.kakao.v1.KkopayDocDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO; import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.kt.KtTokenDTO; import kr.xit.biz.ens.model.kt.KtTokenDTO;
import kr.xit.biz.mbl.mapper.IMobilePageMapper; import kr.xit.biz.mbl.mapper.IMobilePageMapper;
@ -20,9 +14,7 @@ import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse; import kr.xit.core.model.IApiResponse;
import kr.xit.core.service.AbstractService; import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.annotation.TraceLogging; import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.spring.util.MapDeserailizer;
import kr.xit.core.support.utils.Checks; 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.v1.service.IKkopayEltrcDocService;
import kr.xit.ens.kakao.v2.service.IKkotalkEltrcDocService; import kr.xit.ens.kakao.v2.service.IKkotalkEltrcDocService;
import kr.xit.ens.kt.service.IKtBcService; import kr.xit.ens.kt.service.IKtBcService;
@ -53,7 +45,6 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
private final IKkotalkEltrcDocService kkotalkService; private final IKkotalkEltrcDocService kkotalkService;
private final IKtBcService ktMmsService; private final IKtBcService ktMmsService;
private Gson gson = new GsonBuilder().registerTypeAdapter(Map.class, new MapDeserailizer()).serializeNulls().create();
/** /**
* <pre> * <pre>
* </h3> * </h3>
@ -71,7 +62,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
*/ */
//@Override //@Override
@TraceLogging @TraceLogging
public Map<String, Object> findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) { public String findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) {
if (Checks.isEmpty(reqDTO.getToken()) || Checks.isEmpty(reqDTO.getDocumentBinderUuid()) || Checks.isEmpty(reqDTO.getExternalDocumentUuid())) if (Checks.isEmpty(reqDTO.getToken()) || Checks.isEmpty(reqDTO.getDocumentBinderUuid()) || Checks.isEmpty(reqDTO.getExternalDocumentUuid()))
throw BizRuntimeException.create(String.valueOf(ErrorCode.BAD_REQUEST.getHttpStatus().value()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다."); throw BizRuntimeException.create(String.valueOf(ErrorCode.BAD_REQUEST.getHttpStatus().value()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
@ -79,19 +70,20 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
final MobilePageManage mobilePageManage = mapper.selectKkopayMobilePage(reqDTO); final MobilePageManage mobilePageManage = mapper.selectKkopayMobilePage(reqDTO);
if(mobilePageManage == null) throw BizRuntimeException.create("데이타 오류[카카오페이 내문서함 문서가 없습니다]"); if(mobilePageManage == null) throw BizRuntimeException.create("데이타 오류[카카오페이 내문서함 문서가 없습니다]");
final ApiResponseDTO<KkopayDocDTO.ValidTokenResponse> res = kkopayService.findKkopayReadyAndMblPage( // FIXME: 테스트를 위해 임시로 주석처리
KkopayDocDTO.OneTimeToken.builder() // final ApiResponseDTO<KkopayDocDTO.ValidTokenResponse> res = kkopayService.findKkopayReadyAndMblPage(
.document_binder_uuid(reqDTO.getDocumentBinderUuid()) // KkopayDocDTO.OneTimeToken.builder()
.external_document_uuid(reqDTO.getExternalDocumentUuid()) // .document_binder_uuid(reqDTO.getDocumentBinderUuid())
.token(reqDTO.getToken()) // .external_document_uuid(reqDTO.getExternalDocumentUuid())
.signguCode(mobilePageManage.getSignguCode()) // .token(reqDTO.getToken())
.ffnlgCode(mobilePageManage.getFfnlgCode()) // .signguCode(mobilePageManage.getSignguCode())
.build() // .ffnlgCode(mobilePageManage.getFfnlgCode())
); // .build()
if(!res.isSuccess()){ // );
throw BizRuntimeException.create(res.getMessage()); // if(!res.isSuccess()){
} // throw BizRuntimeException.create(res.getMessage());
return JsonUtils.toObject(mobilePageManage.getMobilePageCn(), Map.class); // }
return mobilePageManage.getMobilePageCn();
} }
/** /**
@ -131,11 +123,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
// if(!res.isSuccess()){ // if(!res.isSuccess()){
// throw BizRuntimeException.create(res.getMessage()); // throw BizRuntimeException.create(res.getMessage());
// } // }
// 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"));
//JsonUtils.toObject(mobilePageManage.getMobilePageCn(), Map.class);
return mobilePageManage.getMobilePageCn(); return mobilePageManage.getMobilePageCn();
} }

@ -66,16 +66,19 @@ public class MobilePageController {
throw BizRuntimeException.create("정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다."); throw BizRuntimeException.create("정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
} }
//if(StringUtils.isNotEmpty(reqDTO.getDocumentBinderUuid())) {
// return service.findKkopayReadyAndMblPage(reqDTO);
//}else{
// return service.findKkotalkReadyAndMblPage(reqDTO);
//}
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();
mav.setViewName("notiprnt"); mav.setViewName("/notiprnt");
mav.addObject("errCode", "OK");
mav.addObject("errMsg", "정상"); try {
mav.addObject("details", service.findKkotalkReadyAndMblPage(reqDTO)); if(StringUtils.isNotEmpty(reqDTO.getDocumentBinderUuid())) {
mav.addObject("details", service.findKkopayReadyAndMblPage(reqDTO));
}else{
mav.addObject("details", service.findKkotalkReadyAndMblPage(reqDTO));;
}
}catch (Exception e){
mav.addObject("errCode", e.getMessage());
mav.addObject("errMsg", e.getMessage());
}
return mav; return mav;
} }

@ -1,30 +0,0 @@
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");
}
}

@ -1,5 +1,7 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

@ -1,99 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script type="text/javascript" src="/3rd-party/jquery/js/jquery-3.6.1.min.js"></script>
<link rel="stylesheet" href="${ctx }/css/ens/ens_style.css"/>
<%-- <script src="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.min.js"></script>--%>
<%-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.css"/>--%>
<%-- <style>--%>
<%-- .bx-wrapper ul.img-slider > li > a > img {--%>
<%-- min-height: 30rem;--%>
<%-- max-height: 45rem;--%>
<%-- margin: auto;--%>
<%-- }--%>
<%-- .bx-wrapper ul.img-slider > li {--%>
<%-- font-size: 1.5rem;--%>
<%-- }--%>
<%-- </style>--%>
<script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css"/>
<style>
.swiper {
width: 100%;
height: 100%;
}
.swiper-slide {
text-align: center;
font-size: 10px;
background: #fff;
/* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
.swiper-slide img {
display: block;
/*width: 100%;*/
/*height: 100%;*/
min-height: 20rem;
max-height: 30rem;
object-fit: scale-down; /* cover; */
}
.swiper-pagination-bullet {
width: 2rem;
height: 2rem;
text-align: center;
line-height: 2rem;
font-size: 1rem;
color: #000;
opacity: 1;
background: rgba(0, 0, 0, 0.2);
}
.swiper-pagination-bullet-active {
color: #fff;
background: #007aff;
}
/* 스크롤 활성화 하려면 코멘트 제거 */
section{
overflow-x: auto;
}
</style>
<title>고지 출력</title>
</head>
<body>
<div id="contents"></div>
<p>index.jsp test page</p>
</body>
</html>
Loading…
Cancel
Save