feat: 카카오톡/페이 모바일 페이지 호출 반영

main
Jonguk. Lim 3 months ago
parent 6898c353a5
commit ee2aa4f1f7

@ -1,6 +1,5 @@
package kr.xit.biz.mbl.service;
import java.util.List;
import java.util.Map;
import kr.xit.biz.ens.model.cntc.CntcDTO;
@ -25,8 +24,8 @@ import kr.xit.core.model.IApiResponse;
*/
public interface IMobilePageService {
// FIXME: kakao v1 or v2
Map<String, List<Map<String, Object>>> findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
Map<String, List<Map<String, Object>>> findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
Map<String, Object> findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
Map<String, Object> findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
IApiResponse findKtMblPage(final KtTokenConfirmRequest reqDTO);

@ -1,7 +1,6 @@
package kr.xit.biz.mbl.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
@ -73,7 +72,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
*/
@Override
@TraceLogging
public Map<String, List<Map<String, Object>>> findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) {
public Map<String, Object> 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()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
@ -113,7 +112,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
*/
@Override
@TraceLogging
public Map<String, List<Map<String, Object>>> findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) {
public Map<String, Object> 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()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
@ -133,10 +132,14 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
// if(!res.isSuccess()){
// 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("contents", map.get("details"));
return mobilePage;
// 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("contents", JsonUtils.toObject(mobilePageManage.getMobilePageCn(), Map.class));
//JsonUtils.toObject(mobilePageManage.getMobilePageCn(), Map.class);
return rtnMap;
}
/**

@ -1,6 +1,5 @@
package kr.xit.biz.mbl.web;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
@ -61,7 +60,7 @@ public class MobilePageController {
@Operation(summary = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)", description = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)")
@RequestMapping(
value = {"/kko/mblPage"}, method = {RequestMethod.POST, RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE)
public Map<String, List<Map<String, Object>>> findKkoMyDocReadyAndMblData(@ModelAttribute final MobilePageDTO.KakaoValidTokenRequest reqDTO) {
public Map<String, Object> findKkoMyDocReadyAndMblData(@ModelAttribute final MobilePageDTO.KakaoValidTokenRequest reqDTO) {
if((StringUtils.isEmpty(reqDTO.getDocumentBinderUuid()) && StringUtils.isEmpty(reqDTO.getEnvelopeId()))
|| StringUtils.isEmpty(reqDTO.getToken())) {

Loading…
Cancel
Save