|
|
|
@ -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();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|