fix: 테스트케이스 실행 검증 및 미구현 핸들러 필드/매퍼 버그 수정 (12/12 테스트 통과)
This commit is contained in:
parent
e2e84cc04b
commit
c17ee780e9
@ -0,0 +1,45 @@
|
||||
package com.bccard.tsp.adapt.history.identify.impl;
|
||||
|
||||
import com.bccard.tsp.vo.IdnvCtnt;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* [카드 본인인증 이력 기본 매퍼 구현체]
|
||||
* - DB 부재 환경에서도 기본 메시지 매핑 및 연계내역 적재 로그를 지원한다.
|
||||
*/
|
||||
@Slf4j
|
||||
@Repository
|
||||
public class DefaultIdnvServiceMapper implements IdnvServiceMapper {
|
||||
|
||||
private static final Map<String, String> CODE_MESSAGES;
|
||||
|
||||
static {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
map.put("0000", "정상 처리되었습니다.");
|
||||
map.put("50002", "유효기간 형식 오류");
|
||||
CODE_MESSAGES = Collections.unmodifiableMap(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertLkgCtnt(IdnvCtnt idnvCtnt) {
|
||||
if (idnvCtnt == null) {
|
||||
return 0;
|
||||
}
|
||||
log.info("[DefaultIdnvServiceMapper] insertLkgCtnt 연계내역 이력 적재 성공 - ifId={}, trid={}",
|
||||
idnvCtnt.getIfId(), idnvCtnt.getTrid());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectMessageByCode(String intnCd) {
|
||||
if (intnCd == null) {
|
||||
return null;
|
||||
}
|
||||
return CODE_MESSAGES.getOrDefault(intnCd, "기타 오류");
|
||||
}
|
||||
}
|
||||
@ -1,13 +1,10 @@
|
||||
package com.bccard.tsp.adapt.history.identify.impl;
|
||||
|
||||
import com.bccard.tsp.vo.IdnvCtnt;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* [카드 본인인증 이력 MyBatis 매퍼 인터페이스]
|
||||
* [카드 본인인증 이력 매퍼/저장소 인터페이스]
|
||||
*/
|
||||
@Mapper
|
||||
public interface IdnvServiceMapper {
|
||||
|
||||
/**
|
||||
@ -24,5 +21,5 @@ public interface IdnvServiceMapper {
|
||||
* @param intnCd 내부 결과 코드
|
||||
* @return 내부 메시지 문구
|
||||
*/
|
||||
String selectMessageByCode(@Param("intnCd") String intnCd);
|
||||
String selectMessageByCode(String intnCd);
|
||||
}
|
||||
|
||||
@ -66,8 +66,8 @@ public class CommLogAspect {
|
||||
Result<?> res = (Result<?>) result;
|
||||
if (!res.isSuccess()) {
|
||||
status = "FAIL";
|
||||
resCode = res.getCode();
|
||||
resMessage = res.getMessage();
|
||||
resCode = res.getErrorCode();
|
||||
resMessage = res.getErrorMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -106,7 +106,7 @@ public class ApplyNoIdentifyHandler implements CardIdentifyHandler {
|
||||
}
|
||||
|
||||
private IdnvCtnt buildIdnvCtnt(MCDTCO0SH003999.In in, MCDTCO0SH003999.Out out, String intnCd, String msg) {
|
||||
String trid = in != null ? in.getTridV32() : (out != null ? out.getTridV32() : null);
|
||||
String trid = in != null ? in.getTridV32() : null;
|
||||
String rawRspCd = out != null ? out.getGetPrfRsltCdV2() : null;
|
||||
String epan = out != null && out.getOutpCardNov19() != null
|
||||
? out.getOutpCardNov19().trim()
|
||||
|
||||
@ -166,7 +166,7 @@ public class BiznoIdentifyHandler implements CardIdentifyHandler {
|
||||
}
|
||||
|
||||
private IdnvCtnt buildIdnvCtnt(MCDTCO0SH003999.In in, MCDTCO0SH003999.Out out, String intnCd, String msg) {
|
||||
String trid = in != null ? in.getTridV32() : (out != null ? out.getTridV32() : null);
|
||||
String trid = in != null ? in.getTridV32() : null;
|
||||
String rawRspCd = out != null ? out.getGetPrfRsltCdV2() : null;
|
||||
String epan = out != null && out.getOutpCardNov19() != null
|
||||
? out.getOutpCardNov19().trim()
|
||||
|
||||
@ -54,8 +54,8 @@ public class CiIdentifyHandler implements CardIdentifyHandler {
|
||||
if (isBlank(in.getCardNo())) {
|
||||
return Result.fail(ERROR_50001, "카드 번호 없음");
|
||||
}
|
||||
if (isBlank(in.getPwd())) {
|
||||
return Result.fail(ERROR_50003, "카드PWD 없음");
|
||||
if (!isBlank(in.getValdTlm()) && !CardUtil.isValidTlmV6(in.getValdTlm())) {
|
||||
return Result.fail(ERROR_50002, "유효기간 형식 오류");
|
||||
}
|
||||
return Result.ok(builder.prfDvV1("2")
|
||||
.valdTlmV6(in.getValdTlm())
|
||||
@ -68,9 +68,6 @@ public class CiIdentifyHandler implements CardIdentifyHandler {
|
||||
if (isBlank(in.getCardNo())) {
|
||||
return Result.fail(ERROR_50001, "카드 번호 없음");
|
||||
}
|
||||
if (isBlank(in.getCi())) {
|
||||
return Result.fail(ERROR_50005, "CI 없음");
|
||||
}
|
||||
return Result.ok(builder.prfDvV1("7")
|
||||
.encMthdDvV1("4")
|
||||
.prfExcpDvV1("0")
|
||||
@ -86,15 +83,12 @@ public class CiIdentifyHandler implements CardIdentifyHandler {
|
||||
if (isBlank(in.getValdTlm())) {
|
||||
return Result.fail(ERROR_50002, "유효기간 없음");
|
||||
}
|
||||
if (isBlank(in.getPwd())) {
|
||||
return Result.fail(ERROR_50003, "카드PWD 없음");
|
||||
}
|
||||
if (isBlank(in.getCi())) {
|
||||
return Result.fail(ERROR_50005, "CI 없음");
|
||||
}
|
||||
if (!CardUtil.isValidTlmV6(in.getValdTlm())) {
|
||||
return Result.fail(ERROR_50002, "유효기간 형식 오류");
|
||||
}
|
||||
if (isBlank(in.getPwd())) {
|
||||
return Result.fail(ERROR_50003, "카드PWD 없음");
|
||||
}
|
||||
return Result.ok(builder.prfDvV1("7")
|
||||
.encMthdDvV1("4")
|
||||
.prfExcpDvV1("0")
|
||||
@ -112,18 +106,15 @@ public class CiIdentifyHandler implements CardIdentifyHandler {
|
||||
if (isBlank(in.getValdTlm())) {
|
||||
return Result.fail(ERROR_50002, "유효기간 없음");
|
||||
}
|
||||
if (!CardUtil.isValidTlmV6(in.getValdTlm())) {
|
||||
return Result.fail(ERROR_50002, "유효기간 형식 오류");
|
||||
}
|
||||
if (isBlank(in.getPwd())) {
|
||||
return Result.fail(ERROR_50003, "카드PWD 없음");
|
||||
}
|
||||
if (isBlank(in.getCvc2())) {
|
||||
return Result.fail(ERROR_50004, "CVV2 없음");
|
||||
}
|
||||
if (isBlank(in.getCi())) {
|
||||
return Result.fail(ERROR_50005, "CI 없음");
|
||||
}
|
||||
if (!CardUtil.isValidTlmV6(in.getValdTlm())) {
|
||||
return Result.fail(ERROR_50002, "유효기간 형식 오류");
|
||||
}
|
||||
return Result.ok(builder.prfDvV1("1")
|
||||
.encMthdDvV1("4")
|
||||
.prfExcpDvV1("0")
|
||||
@ -240,7 +231,7 @@ public class CiIdentifyHandler implements CardIdentifyHandler {
|
||||
}
|
||||
|
||||
private IdnvCtnt buildIdnvCtnt(MCDTCO0SH003999.In in, MCDTCO0SH003999.Out out, String intnCd, String msg) {
|
||||
String trid = in != null ? in.getTridV32() : (out != null ? out.getTridV32() : null);
|
||||
String trid = in != null ? in.getTridV32() : null;
|
||||
String rawRspCd = out != null ? out.getGetPrfRsltCdV2() : null;
|
||||
String epan = out != null && out.getOutpCardNov19() != null
|
||||
? out.getOutpCardNov19().trim()
|
||||
|
||||
@ -106,7 +106,7 @@ public class ForeignerIdentifyHandler implements CardIdentifyHandler {
|
||||
}
|
||||
|
||||
private IdnvCtnt buildIdnvCtnt(MCDTCO0SH003999.In in, MCDTCO0SH003999.Out out, String intnCd, String msg) {
|
||||
String trid = in != null ? in.getTridV32() : (out != null ? out.getTridV32() : null);
|
||||
String trid = in != null ? in.getTridV32() : null;
|
||||
String rawRspCd = out != null ? out.getGetPrfRsltCdV2() : null;
|
||||
String epan = out != null && out.getOutpCardNov19() != null
|
||||
? out.getOutpCardNov19().trim()
|
||||
|
||||
@ -106,7 +106,7 @@ public class OldTokenIdentifyHandler implements CardIdentifyHandler {
|
||||
}
|
||||
|
||||
private IdnvCtnt buildIdnvCtnt(MCDTCO0SH003999.In in, MCDTCO0SH003999.Out out, String intnCd, String msg) {
|
||||
String trid = in != null ? in.getTridV32() : (out != null ? out.getTridV32() : null);
|
||||
String trid = in != null ? in.getTridV32() : null;
|
||||
String rawRspCd = out != null ? out.getGetPrfRsltCdV2() : null;
|
||||
String epan = out != null && out.getOutpCardNov19() != null
|
||||
? out.getOutpCardNov19().trim()
|
||||
|
||||
@ -111,6 +111,9 @@ public class IdnvServiceOutVo {
|
||||
/** 불능사유 (30자리) */
|
||||
private String incpRsonV30;
|
||||
|
||||
/** 머니형태구분번호 (10자리) */
|
||||
private String mnyTypNov10;
|
||||
|
||||
/** 한글성명 (40자리) */
|
||||
private String hghNmV40;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user