feat: KT DTO 반영

dev
gitea-관리자 1 year ago
parent c0689d5f1b
commit d34771631d

@ -1,8 +1,11 @@
package kr.xit.ens.kt.service;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtTokenRequest;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtTokenResponse;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtBefSendRequest;
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenRequest;
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
/**
* <pre>
@ -22,4 +25,5 @@ import kr.xit.biz.ens.model.kt.KtMmsDTO.KtTokenResponse;
public interface IKtMmsService {
KtTokenResponse requestToken(final KtTokenRequest reqDTO);
KtCommonResponse beforeSend(final KtBefSendRequest reqDTO);
}

@ -1,9 +1,18 @@
package kr.xit.ens.kt.service;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtTokenRequest;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtTokenResponse;
import java.util.ArrayList;
import java.util.List;
import kr.xit.biz.ens.model.kt.KtCommonDTO.ErrorMsg;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtBefSendRequest;
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenRequest;
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
import kr.xit.core.spring.util.ApiWebClientUtil;
import kr.xit.core.support.utils.DateUtils;
import kr.xit.ens.cmm.CmmEnsUtils;
import lombok.RequiredArgsConstructor;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
/**
@ -21,12 +30,83 @@ import org.springframework.stereotype.Service;
*
* </pre>
*/
@RequiredArgsConstructor
@Service
public class KtMmsService extends EgovAbstractServiceImpl implements IKtMmsService {
@Value("${contract.kt.host}")
private String HOST;
@Value("${contract.kt.api.generate-token}")
private String API_GENERATE_TOKEN;
private static final String AUTH_TYPE_BEARER = "Bearer";
private final ApiWebClientUtil webClient;
@Override
public KtTokenResponse requestToken(final KtTokenRequest reqDTO) {
CmmEnsUtils.validate(reqDTO);
return KtTokenResponse.builder()
.accessToken("eyJhbGciOiJSUzI1NiIsI…")
.expiresIn("7776000")
.scope("ag.api")
.jti("67410d77-0064-4694-9da9..")
.error("sjj")
.errorDescription("jjjjjjj")
.build();
// return KtCommonResponse.builder()
// .resultCd("00")
// .resultDt(DateUtils.getTodayAndNowTime("yyyyMMddHHmmss"))
// //.errors(errors)
// .build();
/*
String jsonStr = "{\"client_id\":\"" + "clientId" + "\",\"client_secret\":\"" + "clientSecret" + "\"}";
final Map<String,String> headerMap = new HashMap<>();
headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
// headerMap.put("client-id", "client-id");
// headerMap.put("client-tp", "10");
headerMap.put(HttpHeaders.AUTHORIZATION, String.format("%s %s", AUTH_TYPE_BEARER, "access-token"));
// final KtTokenResponse tokenResponse = webClient.exchange(
// HOST + API_GENERATE_TOKEN,
// HttpMethod.POST,
// JsonUtils.toJson(reqDTO),
// KtTokenResponse.class,
// headerMap
// );
final String aaa = webClient.post(
HOST + API_GENERATE_TOKEN,
jsonStr,
String.class,
headerMap
);
return null;
*/
}
/**
* (BC-AG-SN-001)
* @param reqDTO
*/
@Override
public KtCommonResponse beforeSend(KtBefSendRequest reqDTO) {
CmmEnsUtils.validate(reqDTO);
List<ErrorMsg> errors = new ArrayList<>();
errors.add(new ErrorMsg("error1"));
errors.add(new ErrorMsg("error2"));
return KtCommonResponse.builder()
.resultCd("00")
.resultDt(DateUtils.getTodayAndNowTime("yyyyMMddHHmmss"))
.errors(errors)
.build();
}
}

@ -2,9 +2,13 @@ package kr.xit.ens.kt.web;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.ArrayList;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtMnsRequest;
import kr.xit.biz.ens.model.kt.KtMmsDTO.KtTokenRequest;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtBefSendRequest;
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenRequest;
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.ens.kt.service.IKtMmsService;
import lombok.RequiredArgsConstructor;
@ -39,10 +43,68 @@ public class KtMmsController {
@Operation(summary = "기관용 토큰 발급 요청", description = "기관용 토큰 발급 요청")
@PostMapping(value = "/requestToken", produces = MediaType.APPLICATION_JSON_VALUE)
//@PostMapping(value = "/requestToken", produces = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public ApiResponseDTO<?> requestToken(@RequestBody final KtMnsRequest reqDTO) {
return ApiResponseDTO.success(service.requestToken(KtTokenRequest.builder()
.build()));
KtTokenResponse dto = service.requestToken(
KtTokenRequest.builder()
.clientId("dkdkkd")
.clientSecret("dkdkkdkdkd")
.build());
return ApiResponseDTO.success(dto);
// return ApiResponseDTO.success(
// service.requestToken(CmmKtMmsUtils.getKtMnsInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())));
}
/*
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(
mediaType = "application/json",
examples = {
@ExampleObject(
value = """
{
"service_cd": "NPS",
"service_key": "A3AD41349D759DD3",
"msg_cd": "10006",
"msg_type": "2",
"make_dt": "20211229102000",
"sndn_ex_time": "20211229180000",
"sndn_tot_cnt": 1,
"reqs": [
{
"src_key": "S20211229102000001",
"src_seq": "1",
"ci": "gdlIa53FZGQz5aKa3wLk33nW57N3mDpcwHytWlWMhzxHKulk7EZs143442394326642342364238648423864237",
"mdn": "01011112222", "rcve_rf_str":" ○ 수신거부 및 수신 휴대폰 지정하기 :"
}
],
"opt_type": "2",
"mktn_rcve_csyn": "N",
"m_type": "2"
}
""")
})
})*/
@Operation(summary = "사전 문자 수신 등록 요청", description = "사전 문자 수신 등록 요청(BC-AG-SN-001)")
@PostMapping(value = "/beforeSend", produces = MediaType.APPLICATION_JSON_VALUE)
//@PostMapping(value = "/beforeSend", produces = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public ApiResponseDTO<?> beforeSend(@RequestBody final KtBefSendRequest reqDTO) {
KtBefSendRequest reqDTO2 = KtBefSendRequest.builder()
.serviceCd("NPS")
.serviceKey("A3AD41349D759DD3")
.msgCd("10006")
.msgType("2")
.makeDt("20211229102000")
.sndnExTime("20211229180000")
.mType("2")
.sndnTotCnt(1)
.reqs(new ArrayList<>())
.build();
KtCommonResponse dto = service.beforeSend(reqDTO);
return ApiResponseDTO.success(dto);
}
}

@ -39,10 +39,14 @@
ffnlg_code, /* 과태료코드 */
signgu_nm, /* 시군구 명 */
ffnlg_nm, /* 과태료 명 */
kakao_client_id, /* 카카오 Client ID */
kakao_product_cd, /* 카카오 상품 코드 */
kakao_access_token, /* 카카오 access token */
kakao_contract_uuid, /* 카카오 contract uuid */
kt_access_token, /* KT access token */
kt_company_cd, /* KT company code */
DATE_ADD(from_unixtime(kt_token_expires_in, '%Y%m%d%H%i%s'), INTERVAL -1 HOUR) AS ktTokenExpiresIn, /* KT 토큰 유효기간 */
kt_token_jti, /* KT 토큰 식별자 */
sender_nm, /* 발송인 명 */
sender_zip_no, /* 발송인 우편 번호 */
sender_addr, /* 발송인 주소 */

@ -46,6 +46,14 @@ public class CmmEnsRlaybsnmDTO extends AuditFields implements Serializable {
*
*/
private String ffnlgNm;
/**
* KAKAO CLIENT ID
*/
private String kakaoClientId;
/**
* KAKAO
*/
private String kakaoProductCd;
/**
* KAKAO ACCESS TOKEN
*/
@ -62,6 +70,14 @@ public class CmmEnsRlaybsnmDTO extends AuditFields implements Serializable {
* KT COMPANY CD
*/
private String ktCompanyCd;
/**
* KT
*/
private String ktTokenExpiresIn;
/**
* KT
*/
private String ktTokenJti;
/**
*
*/

@ -0,0 +1,350 @@
package kr.xit.biz.ens.model.kt;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Size;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* <pre>
* description : KT DTO
* - (BC-AG-SM-001)
* Request : {@link KtAcmdCerfRequest}
* Response : {@link KtAcmdCerfResponse}
* - (BC-AG-HS-001)
* Request : {@link KtAcmdInfoRequest}
* Response : {@link KtAcmdInfoResponse}
* - (BC-AG-HS-002)
* Request : {@link KtAcmdInfoCfmRequest}
* Response : {@link KtAcmdInfoCfmResponse}
* packageName : kr.xit.biz.ens.model.kt
* fileName : KtInputDTO
* author : limju
* date : 2023-09-26
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-09-26 limju
*
* </pre>
*/
public class KtAcmdDTO {
//-------------------------------------------------------------------
// 유통증명서 발급 : BC-AG-SM-001
// Request : KtAcmdCerfRequest
// Response : KtAcmdCerfResponse
//-------------------------------------------------------------------
@Schema(name = "KtAcmdCerfRequest", description = "KT 유통증명서 발급 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtAcmdCerfRequest {
/**
* <pre>
* - : 1
* 1: , 2:
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "발급유청구분", example = " ")
@Size(min = 1, max = 1, message = "발급요청구분은 필수 입니다(1|2)")
private String reqDvcd;
/**
* <pre>
* : - 10
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스코드", example = " ")
@Size(min = 1, max = 10, message = "서비스코드는 필수 입니다(max:10)")
private String serviceCd;
/**
* <pre>
* : - 8
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스 코드 인증키", example = " ")
@Size(min = 1, max = 8, message = "서비스 코드 인증키는 필수 입니다(max:8)")
private String serviceKey;
/**
* <pre>
* : - max 50
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "관리키", example = " ")
@Size(min = 1, max = 50, message = "관리키는 필수 입니다(max:50)")
private String srcKey;
/**
* <pre>
* : max 200
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "발급요청사유", example = " ")
@Size(max = 200, message = "발급요청사유는 200자를 넘을수 없습니다.")
private String issReqRsn;
}
@Schema(name = "KtAcmdCerfResponse", description = "KT 유통증명서 발급 요청 결과 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtAcmdCerfResponse extends KtCommonResponse {
/**
* <pre>
* : - 1
* 1:
* 2: ()
* 3: ()
* 4:
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "발급상태")
@Size(min = 1, max = 1)
private String issCls;
/**
* <pre>
* : max 255
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "발급실패 메시지")
@Size(max = 255)
private String issResultMsg;
/**
* <pre>
* : max 100
* iss_cls '2'
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "유통증명서파일명", example = " ")
@Size(max = 100)
private String fileName;
/**
* <pre>
* binary :
* iss_cls '2'
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "유통증명서 파일의 binary 값", example = " ")
private String fileBinary;
}
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// 전자문서 유통정보 수치조회 : BC-AG-HS-001
// Request : KtAcmdInfoRequest
// Response : KtAcmdInfoResponse
//-------------------------------------------------------------------
@Schema(name = "KtAcmdInfoRequest", description = "KT 전자문서 유통정보 수치조회 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtAcmdInfoRequest {
/**
* <pre>
* : - 5
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스코드", example = " ")
@Size(min = 1, max = 5, message = "서비스코드는 필수 입니다(max:5)")
private String serviceCd;
/**
* <pre>
* : - 7
* (yyyy-mm )
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "연월", example = " ")
@Size(min = 7, max = 7, message = "연월은 필수 입니다(YYYY-MM)")
private String period;
}
@Schema(name = "KtAcmdInfoResponse", description = "KT 전자문서 유통정보 수치조회 요청 결과 DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtAcmdInfoResponse extends KtCommonResponse {
@Schema(requiredMode = RequiredMode.AUTO)
@Valid
private List<KtAcmdInfoResData> results;
}
@Schema(name = "KtAcmdInfoResData", description = "KT 전자문서 유통정보 수치조회 요청 결과 results DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class KtAcmdInfoResData {
/**
* <pre>
* : - 2
* (01:KT, 02:SKT, 03:LGT)
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "통신사구분코드")
@Size(min = 2, max = 2)
@JsonProperty("mbl_bzowr_dvcd")
private String mblBzowrDvcd;
/**
* <pre>
* : - 10
* YYYY-MM-DD
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "통계집계일")
@Size(min = 10, max = 10)
private String date;
/**
* : - 8
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "송신건수")
@Digits(integer = 8, fraction = 0)
private Integer sendCount;
/**
* : - 8
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "송신건수")
@Digits(integer = 8, fraction = 0)
private Integer recvCount;
/**
* : - 8
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "열람건수")
@Digits(integer = 8, fraction = 0)
private Integer readCount;
}
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// 전자문서 유통정보 수치 확인서 발급 : BC-AG-HS-002
// Request : KtAcmdInfoCfmRequest
// Response : KtAcmdInfoCfmResponse
//-------------------------------------------------------------------
@Schema(name = "KtAcmdInfoCfmRequest", description = "KT 전자문서 유통정보 수치 확인서 발급 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtAcmdInfoCfmRequest extends KtAcmdInfoRequest {
/**
* <pre>
* - : 1
* 1: , 2:
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "발급유청구분", example = " ")
@Size(min = 1, max = 1, message = "발급요청구분은 필수 입니다(1|2)")
private String reqDvcd;
}
@Schema(name = "KtAcmdInfoCfmResponse", description = "KT 전자문서 유통정보 수치 확인서 발급 요청 결과 DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtAcmdInfoCfmResponse extends KtCommonResponse {
/**
* <pre>
* : - 1
* 1:
* 2:
* 4:
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "발급상태")
@Size(min = 1, max = 1)
private String issCls;
/**
* <pre>
* : max 255
* iss_cls=4 ,
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "발급결과 메시지")
@Size(max = 255)
private String issResultMsg;
@Schema(requiredMode = RequiredMode.AUTO)
@Valid
private List<KtAcmdInfoCfmResData> results;
}
@Schema(name = "KtAcmdInfoResData", description = "KT 전자문서 유통정보 수치조회 요청 결과 results DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class KtAcmdInfoCfmResData {
/**
* <pre>
* : - 2
* (01:KT, 02:SKT, 03:LGT)
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "모바일사업자구분")
@Size(min = 2, max = 2)
@JsonProperty("mbl_bzowr_dvcd")
private String mblBzowrDvcd;
/**
* <pre>
* : max 100
* iss_cls '2'
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "유통증명서파일명")
@Size(max = 100)
private String fileName;
/**
* <pre>
* binary :
* iss_cls '2'
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "유통증명서 파일의 binary 값")
private String fileBinary;
}
//-------------------------------------------------------------------
}

@ -0,0 +1,128 @@
package kr.xit.biz.ens.model.kt;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.Size;
import kr.xit.core.model.IApiResponse;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.NotEmpty;
/**
* <pre>
* description : KT DTO
*
* packageName : kr.xit.biz.ens.model.kt
* fileName : KtCommonDTO
* author : limju
* date : 2023-09-22
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-09-22 limju
*
* </pre>
*/
public class KtCommonDTO {
@Schema(name = "KtMnsRequest", description = "KT MMS 공통 파라메터 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class KtMnsRequest {
/**
*
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "시군구코드", example = "88328")
@NotEmpty(message = "시군구 코드는 필수 입니다")
@Size(max = 10)
private String signguCode;
/**
*
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "과태료코드", example = "11")
@NotEmpty(message = "과태료 코드는 필수 입니다")
@Size(max = 2)
private final String ffnlgCode = "11";
/**
* Id
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "주민번호", example = " ")
@Size(min = 13, max = 13, message = "주민번호는 13자리 입니다.")
private String juminId;
}
@Schema(name = "KtCommonResponse", description = "KT 응답 공통 DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtCommonResponse implements IApiResponse {
/**
* <pre>
* : 2
* 00 : , 01:
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "처리코드", example = " ")
@Size(min = 2, max = 2)
private String resultCd;
/**
* <pre>
* : 14
* Biz Center (YYYYMMDDHHMISS)
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "처리일시", example = " ")
@Size(min = 14, max = 14)
private String resultDt;
/**
* <pre>
*
* (resultCd) '01'
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO)
@Valid
private List<ErrorMsg> errors;
}
@Schema(name = "ErrorMsg", description = "KT 응답 공통 errors DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class ErrorMsg {
/**
* <pre>
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED)
@Size(max = 255)
private String errorMsg;
}
}

@ -0,0 +1,196 @@
package kr.xit.biz.ens.model.kt;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Size;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.NotEmpty;
/**
* <pre>
* description : KT DTO
* - (BC-AG-SM-002)
* Request : {@link KtTokenExcaRequest}
* Response : {@link KtCommonResponse}
* - : BC-AG-EC-001
* Request : {@link KtExcaRequest}
* Response : {@link KtExcaResponse}
* packageName : kr.xit.biz.ens.model.kt
* fileName : KtTokenDTO
* author : limju
* date : 2023-09-22
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-09-22 limju
*
* </pre>
*/
public class KtExcaDTO {
//----------------------------------------------------------------------------------------
// 기관정산화면연계 토큰인증 : BC-AG-SM-002
// Request : KtTokenExcaRequest
// Response : KtCommonResponse
//----------------------------------------------------------------------------------------
@Schema(name = "KtTokenExcaRequest", description = "KT 기관정산화면연계 토큰 인증 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtTokenExcaRequest {
/**
* <pre>
* : - 100
*
* 1
* </pre>>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "엑세스토큰", example = " ")
@NotEmpty(message = "엑세스토큰은 필수 입니다(max:100)")
private String accessToken;
}
//-------------------------------------------------------------------
//----------------------------------------------------------------------------------------
// 정산연계 자료 조회 : BC-AG-EC-001
// Request : KtExcaRequest
// Response : KtExcaResponse
//----------------------------------------------------------------------------------------
@Schema(name = "KtExcaRequest", description = "KT 정산연계 자료 조회 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtExcaRequest {
/**
* <pre>
* : - YYYYMM
* </pre>>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "정산연월", example = " ")
@Size(min = 6, max = 6, message = "정산연월은 필수 입니다(YYYYMM)")
private String yyyymm;
}
@Schema(name = "KtExcaResponse", description = "KT 정산연계 자료 조회 요청 결과 DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtExcaResponse extends KtCommonResponse {
@Schema(requiredMode = RequiredMode.REQUIRED)
@Valid
private List<KtExcaResData> rsps;
}
@Schema(name = "KtExcaResData", description = "KT 정산연계 자료 조회 요청 결과 rsps DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtExcaResData {
/**
* <pre>
* : - YYYYMM
* </pre>>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "정산연월")
@Size(min = 6, max = 6)
private String yyyymm;
/**
* <pre>
* : - 5
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스코드")
@Size(min = 1, max = 5)
private String serviceCd;
/**
* <pre>
* : - 5
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "문서코드")
@Size(min = 5, max = 5)
private String msgCd;
/**
* <pre>
* : - 2
* 01:KT, 02:SKT, 03:LGT
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "통신사구분코드")
@Size(min = 2, max = 2)
private String mobileGbn;
/**
* <pre>
* : - 9
* ,
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "발송요청건수")
@Digits(integer = 9, fraction = 0)
private Integer sndnReqCnt;
/**
* <pre>
* : - 9
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "미동의발송건수")
@Digits(integer = 9, fraction = 0)
private Integer notAppBalsongCnt;
/**
* <pre>
* : - 9
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "동의발송건수")
@Digits(integer = 9, fraction = 0)
private Integer preAppBalsongCnt;
/**
* <pre>
* : - 9
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "미동의열람건수")
@Digits(integer = 9, fraction = 0)
private Integer notAppSusinCnt;
/**
* <pre>
* : - 9
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "동의열람건수")
@Digits(integer = 9, fraction = 0)
private Integer preAppSusinCnt;
}
//-------------------------------------------------------------------
}

@ -0,0 +1,183 @@
package kr.xit.biz.ens.model.kt;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.Size;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* <pre>
* description : KT MMS DTO - KT API DTO
* - (BC-AG-SN-014)
* Request : {@link KtRefuseRcvRequest}
* Response : {@link KtCommonResponse}
* - (BC-AG-SN-015)
* Request : {@link KtApproveRcvRequest}
* Response : {@link KtCommonResponse}
* packageName : kr.xit.biz.ens.model.kt
* fileName : KtInputDTO
* author : limju
* date : 2023-09-26
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-09-26 limju
*
* </pre>
*/
public class KtInputDTO {
//-------------------------------------------------------------------
// 수신거부상태 전송 : BC-AG-SN-014
// Request : KtRefuseRcvRequest
// Response : KtCommonResponse
//-------------------------------------------------------------------
@Schema(name = "KtRefuseRcvRequest", description = "KT 수신거부상태 등록 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtRefuseRcvRequest {
/**
* <pre>
* : 8(YYYYMMDD)
* /
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "신청일자", example = " ")
@Size(min = 8, max = 8, message = "신청일자는 8자 입니다.")
private String apctDt;
@Schema(requiredMode = RequiredMode.REQUIRED)
@Valid
private List<KtRefuseRcvReqData> reqs;
}
@Schema(name = "KtRefuseRcvReqData", description = "KT 수신거부상태 등록 요청 reqs DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtRefuseRcvReqData {
/**
* <pre>
* : - 20
* BizCenter , (ALL)
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스코드", example = " ")
@Size(min = 1, max = 20, message = "서비스코드는 필수 입니다(max:20)")
private String serviceCd;
/**
* <pre>
* (CI) - : 88
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "개인식별코드", example = " ")
@Size(min = 88, max = 88, message = "개인식별코드(CI)는 필수 입니다(88자리)")
private String ci;
/**
* <pre>
* - : 1
* 0: , 1:
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "신청구분", example = " ")
@Size(min = 1, max = 1, message = "신청구분은 필수 입니다(0|1)")
private String apctAcctCls;
/**
* <pre>
* : 14
* / (YYYYMMDDhhmmss)
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "신청일시", example = " ")
@Size(min = 14, max = 14, message = "신청일시는 14자 입니다.")
private String apctTm;
}
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// 수신동의상태 전송 : BC-AG-SN-015
// Request : KtApproveRcvRequest
// Response : KtCommonResponse
//-------------------------------------------------------------------
@Schema(name = "KtApproveRcvRequest", description = "KT 수신동의상태 등록 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtApproveRcvRequest {
@Schema(requiredMode = RequiredMode.REQUIRED)
@Valid
private List<KtApproveRcvReqData> reqs;
}
@Schema(name = "KtApproveRcvReqData", description = "KT 수신동의상태 등록 요청 reqs DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtApproveRcvReqData {
/**
* <pre>
* : 14(YYYYMMDDHHMISS)
* /
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "신청일시", example = " ")
@Size(min = 8, max = 8, message = "신청일시는 14자 입니다.")
private String apctDt;
/**
* <pre>
* : - 20
* BizCenter
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스코드", example = " ")
@Size(min = 1, max = 20, message = "서비스코드는 필수 입니다(max:20)")
private String serviceCd;
/**
* <pre>
* (CI) - : 88
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "개인식별코드", example = " ")
@Size(min = 88, max = 88, message = "개인식별코드(CI)는 필수 입니다(88자리)")
private String ci;
/**
* <pre>
* - : 1
* 0:( )
* 1:( )
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "신청구분", example = " ")
@Size(min = 1, max = 1, message = "신청구분은 필수 입니다(0|1)")
private String apctAcctCls;
}
//-------------------------------------------------------------------
}

@ -5,179 +5,463 @@ import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Size;
import kr.xit.core.model.IApiResponse;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Builder.Default;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
/**
* <pre>
* description : KT DTO
*
* description : KT DTO
* - (BC-AG-SN-007)
* Request : {@link KtBlacklist}
* Response : {@link KtCommonResponse}
* - (BC-AG-SN-011)
* Request : {@link KtSendSttcRequest}
* Response : {@link KtSendSttcResponse}
* - (BC-AG-SN-012)
* Request : {@link KtSendSttcDtlRequest}
* Response : {@link KtSendSttcDtlResponse}
* - Whitelist (BC-AG-SN-013)
* Request : {@link KtWhitelistRequest}
* Response : {@link KtCommonResponse}
* packageName : kr.xit.biz.ens.model.kt
* fileName : KtMmsDTO
* author : limju
* date : 2023-09-22
* date : 2023-09-26
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-09-22 limju
* 2023-09-26 limju
*
* </pre>
*/
public class KtMmsDTO {
//-------------------------------------------------------------------
// 수신거부등록 : BC-AG-SN-007
// Request : Blacklist
// Response : KtCommonResponse
//-------------------------------------------------------------------
@Schema(name = "KtBlacklist", description = "KT 수신 거부 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtBlacklist {
/**
* <pre>
* : - 20
* BizCenter
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스코드", example = " ")
@NotEmpty(message = "서비스코드는 필수 입니다(max:20)")
private String serviceCd;
/**
* <pre>
* : - 16
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스 코드 인증키", example = " ")
@Size(min = 16, max = 16, message = "서비스 코드 인증키는 필수 입니다(16자리)")
private String serviceKey;
@Schema(requiredMode = RequiredMode.REQUIRED)
@Valid
private List<KtBlacklistReqData> reqs;
}
@Schema(name = "KtMnsRequest", description = "KT MMS 공통 파라메터 DTO")
@Schema(name = "KtBlacklistReqData", description = "KT 수신거부 등록 요청 reqs DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class KtMnsRequest {
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtBlacklistReqData {
/**
*
* <pre>
* (CI) - : 88
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "시군구코드", example = "88328")
@NotEmpty(message = "시군구 코드는 필수 입니다")
@Size(max = 10)
private String signguCode;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "개인식별코드", example = " ")
@Size(min = 88, max = 88, message = "개인식별코드(CI)는 필수 입니다(88자리)")
private String ci;
/**
*
* <pre>
* - : 1
* 0: , 1:
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "과태료코드", example = "11")
@NotEmpty(message = "과태료 코드는 필수 입니다")
@Size(max = 2)
private final String ffnlgCode = "11";
@Schema(requiredMode = RequiredMode.REQUIRED, title = "신청구분", example = " ")
@Size(min = 1, max = 1, message = "신청구분은 필수 입니다(0|1)")
private String apctAcctCls;
/**
* Id
* <pre>
* - : 14(YYYYMMDDHHMISS)
* /
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "주민번호", example = " ")
private String juminId;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "신청일시", example = " ")
@Size(min = 14, max = 14, message = "신청일시는 필수 입니다(YYYYMMDDHHMISS)")
private String apctTm;
}
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// 백오피스 발송통계 연계 조회 : BC-AG-SN-011
// Request : KtSendSttcRequest
// Response : KtSendSttcResponse
//-------------------------------------------------------------------
@Schema(name = "KtTokenRequest", description = "KT MMS 토큰발행 요청 DTO")
@Schema(name = "KtSendSttcRequest", description = "KT 백오피스 발송통계 연계 조회 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class KtTokenRequest {
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtSendSttcRequest {
/**
* <pre>
* : (YYYYMMDD)
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "발송일자", example = " ")
@Size(min = 8, max = 8, message = "발송일자는 필수입니다(YYYYMMDD)")
private String balsongDt;
}
@Schema(name = "KtSendSttcResponse", description = "KT 백오피스 발송통계 연계 조회 결과 DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtSendSttcResponse extends KtCommonResponse {
@Schema(requiredMode = RequiredMode.REQUIRED)
@Valid
private List<KtSendSttcResData> rsps;
}
@Schema(name = "KtSendSttcResData", description = "KT 백오피스 발송통계 연계 조회 결과 rsps DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtSendSttcResData {
/**
* <pre>
* : - max 22
* ( )
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "관리키")
@Size(min = 1, max = 22)
private String srcKey;
/**
* : 'clinet_credentials'
* <pre>
* : (YYYYMMDD)
* </pre>
*/
@Default
@Schema(requiredMode = RequiredMode.REQUIRED, title = "권한부여방식", example = "clinet_credentials")
@NotEmpty(message = "권한부여방식은 필수 입니다")
@Size(max = 100)
private String grantType = "clinet_credentials";
@Schema(requiredMode = RequiredMode.REQUIRED, title = "발송일자")
@Size(min = 8, max = 8)
private String balsongDt;
/**
*
* <pre>
* : - 5
* BizCenter
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "클라이언트 ID", example = " ")
@NotEmpty(message = "클라이언트 ID는 필수 입니다")
@Size(max = 500)
private String clientId;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스코드")
@Size(min = 5, max = 5)
private String serviceCd;
/**
* secret
* <pre>
* : - 5
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "클라이언트 secret", example = " ")
@NotEmpty(message = "클라이언트 secret는 필수 입니다")
@Size(max = 500)
private String clientSecret;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "문서코드")
@Size(min = 5, max = 5)
private String msgCd;
/**
* <pre>
* : ag.api|pf.api
* : - 2
* 01:KT, 02:SKT, 03:LGT
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "권한범위", example = "ag.api")
@NotEmpty(message = "권한범위는 필수 입니다")
@Length(max = 1)
private String scope;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "통신사구분코드")
@Size(min = 2, max = 2)
private String mobileGbn;
/**
* <pre>
* : - max 9
* + +
* </pre>>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "요청건수")
@Digits(integer = 9, fraction = 0)
private Integer balsongTotCnt;
/**
* <pre>
* : - max 9
* 3
*
* ( Ex. )
* </pre>>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "매핑건수")
@Digits(integer = 9, fraction = 0)
private Integer mapping_cnt;
/**
* <pre>
* : - max 9
*
* </pre>>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "동의건수")
@Digits(integer = 9, fraction = 0)
private Integer approveCnt;
/**
* <pre>
* : - max 9
*
* </pre>>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "발송건수")
@Digits(integer = 9, fraction = 0)
private Integer balsongCnt;
/**
* <pre>
* : - max 9
*
* </pre>>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "열람건수")
@Digits(integer = 9, fraction = 0)
private Integer susinCnt;
}
//-------------------------------------------------------------------
@Schema(name = "KtTokenResponse", description = "KT MMS 토큰발행 요청 결과 DTO")
@ToString
//-------------------------------------------------------------------
// 백오피스 발송결과 연계 조회 : BC-AG-SN-012
// Request : KtSendSttcDtlRequest
// Response : KtSendSttcDtlResponse
//-------------------------------------------------------------------
@Schema(name = "KtSendSttcDtlRequest", description = "KT 백오피스 발송 결과 연계 조회 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtTokenResponse implements IApiResponse {
//-------------------------------------------------------------------
// 토큰 발행 성공시 필수
//-------------------------------------------------------------------
public static class KtSendSttcDtlRequest {
/**
* :
* <pre>
* : - max 22
* ( )
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "접근 토큰", example = " ")
@Size(max = 1000)
private String accessToken;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "관리키", example = "")
@Size(min = 1, max = 22, message = "관리키는 필수입니다(max:22)")
private String srcKey;
/**
* <pre>
* :
* bearer
* : - 2
* 01:KT, 02:SKT, 03:LGT
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "접근 토큰 유형", example = "bearer")
@Size(max = 100)
private final String tokenType = "bearer";
@Schema(requiredMode = RequiredMode.REQUIRED, title = "통신사구분코드")
@Size(min = 2, max = 2)
private String mobileGbn;
}
@Schema(name = "KtSendSttcDtlResponse", description = "KT 백오피스 발송결과 연계 조회 결과 DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtSendSttcDtlResponse extends KtCommonResponse {
@Schema(requiredMode = RequiredMode.REQUIRED)
@Valid
private List<KtSendSttcDtlResData> rsps;
}
@Schema(name = "KtSendSttcDtlResData", description = "KT 백오피스 발송결과 연계 조회 결과 rsps DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtSendSttcDtlResData {
/**
* :
* <pre>
* : - 4
*
* 40 MMS/RCS
* 41 MMS
* 42 MMS
* 43 MMS ( 24 )
* 47 MMS , ,
* 48 MMS
* 49 MMS
* 4A MMS UNKNOWN/()
* 4D MMS (),
* 4J MMS
* 4N MMS
* 4O MMS LMS()
* 4P MMS LMS()
* 4T MMS ()
* 4Q MMS
* 4R MMS
* 4V MMS
* 4W MMS
* 50
* 60 (MMS=2, )
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "접근 토큰 유효 기간", example = " ")
@Size(max = 100)
private String expiresIn;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "결과코드")
@Size(min = 1, max = 4)
private String balsongRstCd;
/**
* <pre>
* :
* , scope
* : max 200
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "권한범위|scope에러인 경우만 발생", example = "ag.api")
@Size(max = 100)
private String scope;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "결과메세지")
@Size(min = 1, max = 200)
private String balsongRstMsg;
/**
* :
* <pre>
* : - max 9
* </pre>>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "접근토큰 식별자", example = "ag.api")
@Size(max = 100)
private String jtl;
//-------------------------------------------------------------------
@Schema(requiredMode = RequiredMode.REQUIRED, title = "건수")
@Digits(integer = 9, fraction = 0)
private Integer balsongCnt;
}
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// Whitelist 등록 : BC-AG-SN-013
// Request : KtWhitelistRequest
// Response : KtCommonResponse
//-------------------------------------------------------------------
@Schema(name = "KtWhitelistRequest", description = "KT Whitelist 등록 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtWhitelistRequest {
/**
* <pre>
* : - 20
* BizCenter
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스코드", example = " ")
@NotEmpty(message = "서비스코드는 필수 입니다(max:20)")
private String serviceCd;
//-------------------------------------------------------------------
// 토큰 발행 실패시 필수
//-------------------------------------------------------------------
/**
* <pre>
* :
* bearer
* : - 16
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "에러코드", example = " ")
@Size(max = 100)
private String error;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스 코드 인증키", example = " ")
@Size(min = 16, max = 16, message = "서비스 코드 인증키는 필수 입니다(16자리)")
private String serviceKey;
@Schema(requiredMode = RequiredMode.REQUIRED)
@Valid
private List<KtWhitelistReqData> reqs;
}
@Schema(name = "KtWhitelistReqData", description = "KT Whitelist 등록 요청 reqs DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtWhitelistReqData {
/**
* :
* <pre>
* (CI) - : 88
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "개인식별코드", example = " ")
@Size(min = 88, max = 88, message = "개인식별코드(CI)는 필수 입니다(88자리)")
private String ci;
/**
* <pre>
* - : 1
* 0: , 1:
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "신청구분", example = " ")
@Size(min = 1, max = 1, message = "신청구분은 필수 입니다(0|1)")
private String apctAcctCls;
/**
* <pre>
* : - 2
* (01:KT, 02:SKT, 03:LGT)
* ,
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "통신사구분코드", example = " ")
@Size(min = 2, max = 2, message = "통신사구분코드는 필수 입니다(01|02|03)")
private String mblBzowrDvcd;
/**
* <pre>
* : 11
* ,
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "에러메세지", example = " ")
@Size(max = 100)
private String error_description;
@Schema(requiredMode = RequiredMode.AUTO, title = "개인휴대전화번호", example = "01011112222")
@Size(min = 11, max = 11, message = "개인 휴대 전화번호는 11자리 입니다")
private String mdn;
}
//-------------------------------------------------------------------
}

@ -0,0 +1,269 @@
package kr.xit.biz.ens.model.kt;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import javax.validation.constraints.Size;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
import kr.xit.core.model.IApiResponse;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Builder.Default;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
/**
* <pre>
* description : KT DTO
* -
* Request: {@link KtTokenRequest}
* Response: {@link KtTokenResponse}
* - Token (BC-AG-SN-008)
* Request: {@link KtTokenConfirmRequest}
* Response: {@link KtCommonResponse}
* - (BC-AG-SN-009)
* Request : {@link KtTokenReadRequest}
* Response : {@link KtCommonResponse}
* - (BC-AG-SM-002)
* Request : {@link KtTokenExcaRequest}
* Response : {@link KtCommonResponse}
* packageName : kr.xit.biz.ens.model.kt
* fileName : KtTokenDTO
* author : limju
* date : 2023-09-22
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-09-22 limju
*
* </pre>
*/
public class KtTokenDTO {
//----------------------------------------------------------------------------------------
// Token 발행
// Request : KtTokenRequest
// Response : KtTokenResponse
//----------------------------------------------------------------------------------------
@Schema(name = "KtTokenRequest", description = "KT MMS 토큰발행 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtTokenRequest {
/**
* : 'clinet_credentials'
*/
@Default
@Schema(requiredMode = RequiredMode.REQUIRED, title = "권한부여방식", example = "clinet_credentials")
@NotEmpty(message = "권한부여방식은 필수 입니다")
@Size(max = 100)
private String grantType = "clinet_credentials";
/**
*
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "클라이언트 ID", example = " ")
@NotEmpty(message = "클라이언트 ID는 필수 입니다")
@Size(max = 500)
private String clientId;
/**
* secret
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "클라이언트 secret", example = " ")
@NotEmpty(message = "클라이언트 secret는 필수 입니다")
@Size(max = 500)
private String clientSecret;
/**
* <pre>
* : ag.api|pf.api
* </pre>
*/
@Default
@Schema(requiredMode = RequiredMode.REQUIRED, title = "권한범위", example = "ag.api")
@NotEmpty(message = "권한범위는 필수 입니다")
@Length(max = 100)
private String scope = "ag.api";
}
@Schema(name = "KtTokenResponse", description = "KT MMS 토큰발행 요청 결과 DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtTokenResponse implements IApiResponse {
//-------------------------------------------------------------------
// 토큰 발행 성공시 필수
//-------------------------------------------------------------------
/**
* :
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "접근 토큰", example = " ")
@Size(max = 1000)
private String accessToken;
/**
* <pre>
* :
* bearer
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "접근 토큰 유형", example = "bearer")
@Size(max = 100)
private final String tokenType = "bearer";
/**
* :
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "접근 토큰 유효 기간", example = " ")
@Size(max = 100)
private String expiresIn;
/**
* <pre>
* :
* , scope
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "권한범위|scope에러인 경우만 발생", example = "ag.api")
@Size(max = 100)
private String scope;
/**
* :
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "접근토큰 식별자", example = "ag.api")
@Size(max = 100)
private String jti;
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// 토큰 발행 실패시 필수
//-------------------------------------------------------------------
/**
* <pre>
* :
* bearer
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "에러코드", example = " ")
@Size(max = 100)
private String error;
/**
* :
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "에러메세지", example = " ")
@Size(max = 100)
private String errorDescription;
}
//----------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
// Token 인증 확인 조회 : BC-AG-SN-008
// Request : KtTokenConfirmRequest
// Response : KtCommonResponse
//----------------------------------------------------------------------------------------
@Schema(name = "KtTokenConfirmRequest", description = "KT 토큰 인증 확인 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtTokenConfirmRequest {
/**
* <pre>
* : - 20
* BizCenter
* </pre>>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스코드", example = " ")
@NotEmpty(message = "서비스코드는 필수 입니다(max:20)")
private String serviceCd;
/**
* <pre>
* : - 16
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스 코드 인증키", example = " ")
@Size(min = 16, max = 16, message = "서비스 코드 인증키는 필수 입니다(16자리)")
private String serviceKey;
/**
* <pre>
* : - max 150
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "토큰", example = " ")
@Size(min = 1, max = 150, message = "토큰은 필수 입니다(max:150)")
private String accessToken;
}
//----------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
// 열람확인결과전송 : BC-AG-SN-009
// Request : KtTokenReadRequest
// Response : KtCommonResponse
//----------------------------------------------------------------------------------------
@Schema(name = "KtTokenReadRequest", description = "KT 열람확인 결과 전송 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtTokenReadRequest extends KtTokenConfirmRequest {
/**
* <pre>
* : - 20
* BizCenter
* </pre>>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스코드", example = " ")
@NotEmpty(message = "서비스코드는 필수 입니다(max:20)")
private String mmsRdgTmst;
}
//-------------------------------------------------------------------
//----------------------------------------------------------------------------------------
// 기관정산화면연계 토큰인증 : BC-AG-SM-002
// Request : KtTokenExcaRequest
// Response : KtCommonResponse
//----------------------------------------------------------------------------------------
@Schema(name = "KtTokenExcaRequest", description = "KT 기관정산화면연계 토큰 인증 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class KtTokenExcaRequest {
/**
* <pre>
* : - 100
*
* 1
* </pre>>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "엑세스토큰", example = " ")
@NotEmpty(message = "엑세스토큰은 필수 입니다(max:100)")
private String accessToken;
}
//-------------------------------------------------------------------
}

@ -61,6 +61,7 @@ public class NiceCiDTO {
* Id
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "주민번호", example = " ")
@Size(min = 13, max = 13, message = "주민번호는 13자리 입니다.")
private String juminId;
}
@ -403,7 +404,7 @@ public class NiceCiDTO {
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "공개키버전", example = "20210121ca8c1612-2c2d-IPaa-aad1-xxxxxxxxxxxx")
@NotEmpty(message = "공개키버전은 필수 입니다")
@NotEmpty(message = "공개키버전은 필수 입니다(max:50)")
@Size(max = 50)
private String pubkeyVersion;

@ -76,8 +76,12 @@ public class WebMvcConfig implements WebMvcConfigurer {
*/
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
//converters.forEach(System.out::println);
// XML 관련 HttpMessageConverter 의 우선순위를 최하위로 낮추는 메소드
reorderXmlConvertersToEnd(converters);
//converters.forEach(System.out::println);
}
@Override

Loading…
Cancel
Save