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

main
Jonguk. Lim 3 months ago
parent 23639a667e
commit 70d572640f

@ -96,3 +96,15 @@ where teim.ihidnum = 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc=';
select * from ens_snd_mast;
select * from ENS_SND_DTL_KT_GBS;
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
, tekmd.signgu_code
, tekmd.ffnlg_code
FROM tb_ens_kakao_d10 tekmd
JOIN tb_ens_mobile_page_manage tempm
ON tekmd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekmd.envelope_id = 'EVLP-01J5YX9QNMS3Y8D3QZTB51NMMN-00'
AND tekmd.external_id = '4413311202408230033';

@ -169,3 +169,15 @@ updt_dt + (
ELSE kt_dev_token_expires_in
END - 86400) / 86400
from tb_ens_rlaybsnm_manage;
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
, tekmd.signgu_code
, tekmd.ffnlg_code
FROM tb_ens_kakao_d10 tekmd
JOIN tb_ens_mobile_page_manage tempm
ON tekmd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekmd.envelope_id = 'EVLP-01J5YX9QNMS3Y8D3QZTB51NMMN-00'
AND tekmd.external_id = '4413311202408230033';

@ -22,8 +22,8 @@ import kr.xit.core.model.IApiResponse;
*/
public interface IMobilePageService {
// FIXME: kakao v1 or v2
IApiResponse findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
IApiResponse findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
String findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
String findKkotalkReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO);
IApiResponse findKtMblPage(final KtTokenConfirmRequest reqDTO);

@ -4,7 +4,6 @@ import org.springframework.stereotype.Service;
import kr.xit.biz.ens.model.cntc.CntcDTO;
import kr.xit.biz.ens.model.kakao.v1.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.v2.KkotalkApiDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.kt.KtTokenDTO;
import kr.xit.biz.mbl.mapper.IMobilePageMapper;
@ -64,7 +63,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
*/
@Override
@TraceLogging
public IApiResponse findKkopayReadyAndMblPage(MobilePageDTO.KakaoValidTokenRequest reqDTO) {
public String 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()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
@ -82,9 +81,9 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
.build()
);
if(!res.isSuccess()){
return res;
throw BizRuntimeException.create(res.getMessage());
}
return ApiResponseDTO.success(mobilePageManage.getMobilePageCn());
return mobilePageManage.getMobilePageCn();
}
/**
@ -104,7 +103,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
*/
@Override
@TraceLogging
public IApiResponse 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()), "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
@ -112,18 +111,19 @@ public class MobilePageService extends AbstractService implements IMobilePageSer
final MobilePageManage mobilePageManage = mapper.selectKkotalkMobilePage(reqDTO);
if(mobilePageManage == null) throw BizRuntimeException.create("데이타 오류[카카오톡 내문서함 문서가 없습니다]");
final ApiResponseDTO<KkotalkApiDTO.ValidTokenResponse> res = kkotalkService.findKkotalkReadyAndMblPage(
KkotalkApiDTO.ValidTokenRequest.builder()
.envelopeId(reqDTO.getEnvelopeId())
.token(reqDTO.getToken())
.signguCode(mobilePageManage.getSignguCode())
.ffnlgCode(mobilePageManage.getFfnlgCode())
.build()
);
if(!res.isSuccess()){
return res;
}
return ApiResponseDTO.success(mobilePageManage.getMobilePageCn());
// FIXME: 테스트를 위해 임시로 주석처리
// final ApiResponseDTO<KkotalkApiDTO.ValidTokenResponse> res = kkotalkService.findKkotalkReadyAndMblPage(
// KkotalkApiDTO.ValidTokenRequest.builder()
// .envelopeId(reqDTO.getEnvelopeId())
// .token(reqDTO.getToken())
// .signguCode(mobilePageManage.getSignguCode())
// .ffnlgCode(mobilePageManage.getFfnlgCode())
// .build()
// );
// if(!res.isSuccess()){
// return res;
// }
return mobilePageManage.getMobilePageCn();
}
/**

@ -58,7 +58,7 @@ public class MobilePageController {
@Operation(summary = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)", description = "카카오 모바일 데이타 요청(모바일 페이지에서 호출)")
@RequestMapping(
value = {"/kko/mblPage"}, method = {RequestMethod.POST, RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findKkoMyDocReadyAndMblData(@ModelAttribute final MobilePageDTO.KakaoValidTokenRequest reqDTO) {
public String findKkoMyDocReadyAndMblData(@ModelAttribute final MobilePageDTO.KakaoValidTokenRequest reqDTO) {
if((StringUtils.isEmpty(reqDTO.getDocumentBinderUuid()) && StringUtils.isEmpty(reqDTO.getEnvelopeId()))
|| StringUtils.isEmpty(reqDTO.getToken())) {

Loading…
Cancel
Save