feat: kt gibis API 추가

main
Jonguk. Lim 3 months ago
parent 17c925244f
commit 15f1904d64

@ -2,15 +2,19 @@ package kr.xit.biz.ktgbs.service;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO.ErrorMsg;
import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.biz.ktgbs.mapper.IBizKtGbsMapper;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.support.utils.Checks;
@ -52,10 +56,9 @@ public class BizKtGbsService extends AbstractService implements IBizKtGbsService
* @return KtTokenResponse
* </pre>
*/
/*
@Override
public KtTokenResponse requestToken(final KtMnsRequest paramDTO) {
KtTokenResponse resDTO = ktMmsService.requestToken(paramDTO);
public KtGbsDTO.TokenResponse requestToken(final KtCommonDTO.KtMnsRequest paramDTO) {
KtGbsDTO.TokenResponse resDTO = ktGbsService.requestToken(paramDTO);
if(StringUtils.isEmpty(resDTO.getAccessToken())){
throw BizRuntimeException.create("fail.api.kt.token.request");
@ -68,7 +71,6 @@ public class BizKtGbsService extends AbstractService implements IBizKtGbsService
.ktAccessToken(resDTO.getAccessToken())
.ktTokenExpiresIn(resDTO.getExpiresIn())
.ktScope(resDTO.getScope())
.ktTokenJti(resDTO.getJti())
.build()
);
cacheService.removeRlaybsnmInfoCache(
@ -80,7 +82,7 @@ public class BizKtGbsService extends AbstractService implements IBizKtGbsService
);
return resDTO;
}
*/
/**
* <pre>
* / /
@ -99,12 +101,12 @@ public class BizKtGbsService extends AbstractService implements IBizKtGbsService
@Override
@TraceLogging
@Transactional
public KtCommonDTO.KtCommonResponse messageResult(final KtGbsApiDTO.MsgRsltRequest reqDTO) {
public KtCommonDTO.KtCommonResponse messageResult(final KtGbsDTO.MsgRsltRequest reqDTO) {
List<ErrorMsg> errors = CmmEnsUtils.getValidateErrors(reqDTO);
if(!errors.isEmpty()) return throwError(errors);
for(KtGbsApiDTO.MsgRsltReqsData dto : reqDTO.getReqs()){
for(KtGbsDTO.MsgRsltReqsData dto : reqDTO.getReqs()){
// 결과코드가 '40' 이고 열람타임스탬프가 있는 경우 -> 결과코드 '열람확인:60'으로 reset
if("40".equals(dto.getMmsRsltDvcd()) && Checks.isNotEmpty(dto.getMmsRdgTmst())){

@ -2,7 +2,7 @@ package kr.xit.biz.ktgbs.service;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
/**
* <pre>
@ -21,6 +21,6 @@ import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
*/
public interface IBizKtGbsService {
//KtTokenResponse requestToken(final KtMnsRequest paramDTO);
KtCommonDTO.KtCommonResponse messageResult(final KtGbsApiDTO.MsgRsltRequest reqDTO);
KtGbsDTO.TokenResponse requestToken(final KtCommonDTO.KtMnsRequest paramDTO);
KtCommonDTO.KtCommonResponse messageResult(final KtGbsDTO.MsgRsltRequest reqDTO);
}

@ -0,0 +1,75 @@
package kr.xit.biz.ktgbs.web;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
import kr.xit.biz.ktgbs.service.IBizKtGbsService;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.ktgbs.web
* fileName : BizKtGbsController
* author : limju
* date : 2024-08-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-08-19 limju
*
* </pre>
*/
@Tag(name = "BizKtGbsController", description = "KT GIBIS 업무처리 Controller")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/biz/ktgbs/v1")
@Slf4j
public class BizKtGbsController {
private static final String PARAM1 = """
{
"signguCode": "88328",
"ffnlgCode": "11",
"profile": "local"
}
""";
private static final String PARAM2 = """
{
"signguCode": "88316",
"ffnlgCode": "11",
"profile": "local"
}
""";
private final IBizKtGbsService service;
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(
mediaType = "application/json",
examples = {
@ExampleObject(
name = "교통시설운영처",
value = PARAM1),
@ExampleObject(
name = "승화원",
value = PARAM2)
})
})
@Operation(deprecated = true, summary = "기관용 토큰 발급 요청", description = "기관용 토큰 발급 요청")
@PostMapping(value = "/requestToken", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse requestToken(@RequestBody final KtMnsRequest paramDTO) {
return ApiResponseDTO.success(service.requestToken(paramDTO));
}
}

@ -1,7 +1,7 @@
package kr.xit.ens.ktgbs.service;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
/**
* <pre>
@ -22,10 +22,10 @@ public interface IKtGbsService {
//------------------------------------------------------------------------------
// mens 사용 API
//------------------------------------------------------------------------------
// KtTokenDTO.KtTokenResponse requestToken(final KtCommonDTO.KtMnsRequest paramDTO);
KtCommonDTO.KtCommonResponse mainSend(final KtGbsApiDTO.MsgSendRequest reqDTO);
// KtTokenDTO.KtTokenConfirmResponse cfmToken(final KtTokenDTO.KtTokenConfirmRequest reqDTO);
// KtCommonDTO.KtCommonResponse readToken(final KtTokenDTO.KtTokenReadRequest reqDTO);
KtCommonDTO.KtCommonResponse mainSend(final KtGbsDTO.MsgSendRequest reqDTO);
KtGbsDTO.TokenResponse requestToken(final KtCommonDTO.KtMnsRequest paramDTO);
KtCommonDTO.KtCommonResponse cfmToken(final KtGbsDTO.TokenConfirmRequest reqDTO);
KtCommonDTO.KtCommonResponse readToken(final KtGbsDTO.TokenReadRequest reqDTO);
//------------------------------------------------------------------------------
}

@ -1,16 +1,24 @@
package kr.xit.ens.ktgbs.service;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.spring.util.ApiWebClientUtil;
import kr.xit.core.support.utils.DateUtils;
import kr.xit.core.support.utils.JsonUtils;
import kr.xit.ens.cmm.CmmEnsUtils;
import lombok.RequiredArgsConstructor;
@ -35,18 +43,102 @@ public class KtGbsService extends AbstractService implements IKtGbsService {
@Value("${app.contract.ktgbs.host}")
private String HOST;
@Value("${app.contract.ktgbs.api.access-token}")
private String API_ACCESS_TOKEN;
/**
* : BC-AG-SN-008
*/
@Value("${app.contract.ktgbs.api.cfm-token}")
private String API_CFM_TOKEN;
/**
* : BC-AG-SN-009
*/
@Value("${app.contract.ktgbs.api.read-token}")
private String API_READ_TOKEN;
/**
* : BC-AG-SN-002
*
*/
@Value("${app.contract.ktgbs.api.main-send}")
private String API_MAIN_SEND;
private final ApiWebClientUtil webClient;
private final ICmmEnsCacheService cacheService;
@Override
@TraceLogging
public KtGbsDTO.TokenResponse requestToken(final KtCommonDTO.KtMnsRequest paramDTO) {
final CmmEnsRlaybsnmDTO ktMnsInfo = cacheService.getRlaybsnmInfoCache(CmmEnsRequestDTO.builder()
.signguCode(paramDTO.getSignguCode())
.ffnlgCode(paramDTO.getFfnlgCode())
.profile(ApiConstants.PROFILE)
.build());
final KtGbsDTO.TokenRequest reqDTO = KtGbsDTO.TokenRequest.builder()
.clientId(ktMnsInfo.getKtSvcClientId())
.clientSecret(ktMnsInfo.getKtSvcClientSecret())
.build();
CmmEnsUtils.validate(reqDTO);
final Map<String,String> headerMap = new HashMap<>();
headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);
headerMap.put(HttpHeaders.AUTHORIZATION, String.format("Bearer %s", ktMnsInfo.getKtAccessToken()));
return webClient.exchangeFormData(
HOST + API_ACCESS_TOKEN,
HttpMethod.POST,
reqDTO,
KtGbsDTO.TokenResponse.class,
headerMap
);
}
@Override
@TraceLogging
public KtCommonDTO.KtCommonResponse cfmToken(final KtGbsDTO.TokenConfirmRequest reqDTO) {
final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO);
reqDTO.setServiceCd(ktMnsInfo.getKtServiceCode());
reqDTO.setSignguCode(null);
reqDTO.setFfnlgCode(null);
reqDTO.setProfile(null);
CmmEnsUtils.validate(reqDTO);
return webClient.exchangeKtGbs(
HOST + API_CFM_TOKEN,
HttpMethod.POST,
JsonUtils.toJson(reqDTO),
KtCommonDTO.KtCommonResponse.class,
ktMnsInfo
);
}
@Override
@TraceLogging
public KtCommonDTO.KtCommonResponse readToken(final KtGbsDTO.TokenReadRequest reqDTO) {
final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO);
reqDTO.setServiceCd(ktMnsInfo.getKtServiceCode());
reqDTO.setMmsRdgTmst(DateUtils.getTodayAndNowTime("yyyyMMddHHmmss"));
reqDTO.setSignguCode(null);
reqDTO.setFfnlgCode(null);
reqDTO.setProfile(null);
CmmEnsUtils.validate(reqDTO);
return webClient.exchangeKtGbs(
HOST + API_READ_TOKEN,
HttpMethod.POST,
JsonUtils.toJson(reqDTO),
KtCommonDTO.KtCommonResponse.class,
ktMnsInfo
);
}
// FIXME : KT GIBIS 적용 안됨
@Override
@TraceLogging
public KtCommonDTO.KtCommonResponse mainSend(final KtGbsApiDTO.MsgSendRequest reqDTO) {
public KtCommonDTO.KtCommonResponse mainSend(final KtGbsDTO.MsgSendRequest reqDTO) {
final CmmEnsRlaybsnmDTO ktMnsInfo = getRlaybsnmInfo(reqDTO);
reqDTO.setServiceCd(ktMnsInfo.getKtServiceCode());
reqDTO.setServiceCd(ktMnsInfo.getKtSvcCerfKey());

@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.ens.ktgbs.service.IKtGbsService;
@ -36,11 +36,53 @@ import lombok.RequiredArgsConstructor;
public class KtGbsController {
private final IKtGbsService service;
// FIXME : KT GIBIS 적용 안됨
@Operation(summary = "본문자 수신 등록 요청", description = "본문자 수신 등록 요청")
@PostMapping(value = "/mainSend", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse mainSend(@RequestBody final KtGbsApiDTO.MsgSendRequest reqDTO) {
public IApiResponse mainSend(@RequestBody final KtGbsDTO.MsgSendRequest reqDTO) {
KtCommonDTO.KtCommonResponse dto = service.mainSend(reqDTO);
return ApiResponseDTO.success(dto);
}
@Operation(deprecated = true, summary = "기관용 토큰 발급 요청 -> 업무(Biz)단 API 에서 처리", description = "KT 문서 중개자 정보 DB update가 필요하여 업무단의 API를 사용하여야 함")
@PostMapping(value = "/requestToken", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse requestToken(@RequestBody final KtCommonDTO.KtMnsRequest paramDTO) {
return ApiResponseDTO.success(service.requestToken(paramDTO));
}
/**
* <pre>
* - API set url
* -> OTT token get
* - API call
* - API call
* @param reqDTO TokenConfirmRequest
* @return KtCommonResponse
* </pre>
*/
@Operation(deprecated = true, summary = "토큰인증확인 조회 -> KT GIBIS 모바일 데이타 요청(모바일 페이지에서 호출)에서 처리", description = "토큰인증확인조회요청(BC-AG-SN-008) <br><a href='http://localhost:8081/swagger-ui/index.html?urls.primaryName=6.%20%EC%A0%84%EC%9E%90%EA%B3%A0%EC%A7%80%20%EC%97%85%EB%AC%B4%20API#/MobilePageController'>전자문서중개자모바일페이지</a>")
@PostMapping(value = "/cfmToken", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse cfmToken(@RequestBody final KtGbsDTO.TokenConfirmRequest reqDTO) {
KtCommonDTO.KtCommonResponse dto = service.cfmToken(reqDTO);
return ApiResponseDTO.success(dto);
}
/**
* <pre>
* - (BC-AG-SN-002) API set url
* -> OTT token get
* - (BC-AG-SN-008) API call
* - (BC-AG-SN-009) API call
* @param reqDTO KtTokenReadRequest
* @return KtCommonResponse
* </pre>
*/
@Operation(deprecated = true, summary = "토큰열람확인결과 전송 -> KT GIBIS 모바일 데이타 요청(모바일 페이지에서 호출)에서 처리", description = "토큰열람확인결과 전송(BC-AG-SN-009) <br><a href='http://localhost:8081/swagger-ui/index.html?urls.primaryName=6.%20%EC%A0%84%EC%9E%90%EA%B3%A0%EC%A7%80%20%EC%97%85%EB%AC%B4%20API#/MobilePageController'>전자문서중개자모바일페이지</a>")
@PostMapping(value = "/readToken", produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse readToken(@RequestBody final KtGbsDTO.TokenReadRequest reqDTO) {
KtCommonDTO.KtCommonResponse dto = service.readToken(reqDTO);
return ApiResponseDTO.success(dto);
}
}

@ -10,7 +10,8 @@ import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.biz.ktgbs.service.IBizKtGbsService;
import lombok.RequiredArgsConstructor;
/**
@ -31,6 +32,8 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@RestController
public class KtGbsInboundController {
private final IBizKtGbsService bizService;
/**
* <pre>
* / -> KT GIBIS
@ -73,7 +76,7 @@ public class KtGbsInboundController {
@Operation(summary = "메세지 발송/수신 결과 전송 -> KT GIBIS에서 호출", description = "메세지 발송/수신 결과 전송 -> KT GIBIS에서 호출")
//@PostMapping(value = "/goji/kt/gibis/stat/bulk", produces = MediaType.APPLICATION_JSON_VALUE)
@PostMapping(value = "/api/msg/result", produces = MediaType.APPLICATION_JSON_VALUE)
public KtCommonDTO.KtCommonResponse messageResult(@RequestBody final KtGbsApiDTO.MsgRsltRequest reqDTO) {
return null; //bizService.messageResult(reqDTO);
public KtCommonDTO.KtCommonResponse messageResult(@RequestBody final KtGbsDTO.MsgRsltRequest reqDTO) {
return bizService.messageResult(reqDTO);
}
}

@ -83,9 +83,13 @@ app:
# 전자문서유통정보수치확인서 발급처리 : BC-AG-HS-002
cfm-acmd: /api/acmdinfocfm
ktgbs:
host: http://172.16.0.13:10210/ONLWeb
host: http://108.1.143.27:8080
api:
# 본문자수신등록 : BC-AG-SN-002
main-send: /api/msg/send
# 사전/본 문자 발송/수신 결과 전송 : BC-AG-SN-010
result-message: /api/msg/result
# 토큰발행
access-token: /api/oauth/token
# 토큰인증확인조회
cfm-token: /api/msg/token
# 토큰열람확인결과전송
read-token: /api/msg/read

@ -16,7 +16,7 @@ import kr.xit.biz.ens.model.kakao.v1.KkopayDocBulkDTO;
import kr.xit.biz.ens.model.kakao.v1.KkopayDocDTO;
import kr.xit.biz.ens.model.kakao.v2.KkotalkDTO;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
/**
* <pre>
@ -331,7 +331,7 @@ public interface IEnsBatchMapper {
int updateKtBcMst(final SndngMssageParam dto);
Optional<EnsKtGbsDTO> selectKtGbsMstTgtInfo(final SndngMssageParam dto);
List<KtGbsApiDTO.MsgSendReqsData> selectKtGbsSendTgts(final SndngMssageParam dto);
List<KtGbsDTO.MsgSendReqsData> selectKtGbsSendTgts(final SndngMssageParam dto);
//----------------------------------------------------------------------
// send

@ -1,7 +1,7 @@
package kr.xit.biz.ens.model;
import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -29,7 +29,7 @@ import lombok.experimental.SuperBuilder;
@AllArgsConstructor
@SuperBuilder
@EqualsAndHashCode(callSuper = true)
public class EnsKtGbsDTO extends KtGbsApiDTO.MsgSendRequest {
public class EnsKtGbsDTO extends KtGbsDTO.MsgSendRequest {
@Builder.Default
private String sndngTyCode = "ENS";

@ -23,7 +23,7 @@ import kr.xit.biz.ens.model.cntc.CntcDTO;
import kr.xit.biz.ens.model.kakao.v1.KkopayDocBulkDTO;
import kr.xit.biz.ens.model.kakao.v2.KkotalkDTO;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.service.AbstractService;
import kr.xit.core.support.utils.Checks;
@ -153,7 +153,7 @@ public class EnsBatchExtractService extends AbstractService implements
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void saveKtGbsResult(final SndngMssageParam dto, final List<KtGbsApiDTO.MsgSendReqsData> sendReqs) {
public void saveKtGbsResult(final SndngMssageParam dto, final List<KtGbsDTO.MsgSendReqsData> sendReqs) {
// 성공처리
// mobile page create
// FIXME : KT GIBIS 적용 안됨

@ -41,7 +41,7 @@ import kr.xit.biz.ens.model.kakao.v2.KkotalkDTO;
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.KtMainSendReqData;
import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.service.AbstractService;
@ -614,7 +614,7 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
final String mstId = dto.getSndngMastrId();
final String unitySndMstId = dto.getUnitySndngMastrId();
final List<KtGbsApiDTO.MsgSendReqsData> sendReqs = mapper.selectKtGbsSendTgts(dto);
final List<KtGbsDTO.MsgSendReqsData> sendReqs = mapper.selectKtGbsSendTgts(dto);
// validation check
try {
@ -624,7 +624,7 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
throw e;
}
final List<List<KtGbsApiDTO.MsgSendReqsData>> partitions = ListUtils.partition(sendReqs, bulkKtMaxCnt);
final List<List<KtGbsDTO.MsgSendReqsData>> partitions = ListUtils.partition(sendReqs, bulkKtMaxCnt);
@SuppressWarnings("rawtypes")
List<ApiResponseDTO> apiResults = partitions.stream()
.map(bulkSendList -> {
@ -709,12 +709,12 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
}
}
private void validatedKtGbsSendBulks(List<KtGbsApiDTO.MsgSendReqsData> sendReqs) {
private void validatedKtGbsSendBulks(List<KtGbsDTO.MsgSendReqsData> sendReqs) {
List<String> errors = new ArrayList<>();
int idx = 0;
for (KtGbsApiDTO.MsgSendReqsData dto : sendReqs) {
Set<ConstraintViolation<KtGbsApiDTO.MsgSendReqsData>> errList = validator.validate(dto);
for (KtGbsDTO.MsgSendReqsData dto : sendReqs) {
Set<ConstraintViolation<KtGbsDTO.MsgSendReqsData>> errList = validator.validate(dto);
if (!errList.isEmpty()) {
int finalIdx = idx;

@ -7,7 +7,7 @@ import kr.xit.biz.ens.model.cmm.SndngMssageParam;
import kr.xit.biz.ens.model.kakao.v1.KkopayDocBulkDTO;
import kr.xit.biz.ens.model.kakao.v2.KkotalkDTO;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
import kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO;
import kr.xit.biz.ens.model.ktgbs.KtGbsDTO;
/**
* <pre>
@ -35,7 +35,7 @@ public interface IEnsBatchExtractService {
void saveKkotalkSendResult(final String mstId, String unitySndMstId, final List<KkotalkDTO.BulkSendResponse> resList);
void saveKtBcResult(final SndngMssageParam dto, final List<KtMainSendReqData> sendReqs);
void saveKtGbsResult(final SndngMssageParam dto, final List<KtGbsApiDTO.MsgSendReqsData> sendReqs);
void saveKtGbsResult(final SndngMssageParam dto, final List<KtGbsDTO.MsgSendReqsData> sendReqs);
void updateSndngMstFailStatus(final String mstId, final SndngSeCode seCode, final String errCode, final String errMsg, final String stsErrMsg);

@ -794,7 +794,7 @@
ORDER BY tesm.unity_sndng_mastr_id
</select>
<select id="selectKtGbsSendTgts" resultType="kr.xit.biz.ens.model.ktgbs.KtGbsApiDTO$MsgSendReqsData">
<select id="selectKtGbsSendTgts" resultType="kr.xit.biz.ens.model.ktgbs.KtGbsDTO$MsgSendReqsData">
/** ens-oracle-mapper|selectKtGbsSendTgts-Kt GIBIS 수신 대상 목록 조회|julim */
SELECT tekbm.sndng_mastr_id /* 발송마스터 ID */
, tekbm.signgu_code /* 시군구 코드 */

@ -1,425 +0,0 @@
package kr.xit.biz.ens.model.ktgbs;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.NotEmpty;
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 kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* <pre>
* description :
* packageName : kr.xit.biz.ens.model.ktgbs
* fileName : KtGbsApiDTO
* author : limju
* date : 2024-08-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-08-19 limju
*
* </pre>
*/
public class KtGbsApiDTO {
//-------------------------------------------------------------------
// 메세지 발송
//-------------------------------------------------------------------
@Schema(name = "MsgSendRequest DTO", description = "메세지 발송 요청 request DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@EqualsAndHashCode(callSuper = false)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class MsgSendRequest extends KtCommonDTO.KtMnsRequest {
/**
* - (5)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "기관코드", example = "51110")
@Size(min = 5, max = 5, message = "기관코드는 필수 입니다(5자리)")
private String serviceCd;
/**
* - (5)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "문서코드", example = "DP112")
@Size(min = 5, max = 5, message = "기관코드는 필수 입니다(5자리)")
private String msgCd;
/**
* - (14) : yyyymmddHHmiss
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "생성일시", example = "20240819123456")
@Size(min = 5, max = 5, message = "생성일시는 필수 입니다(14자리)")
private String makeDt;
/**
* - (max:8)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "회차전체데이터건수", example = " ")
@Digits(integer = 8, fraction = 0, message = "회차전체데이터건수(max:8자리)")
private Integer dataCnt;
/**
* - (yyyyMMddHHmiss : 14)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "발송마감시간(yyyyMMddHHmiss)", example = " ")
@Size(min = 14, max = 14, message = "발송마감시간(yyyyMMddHHmiss)")
private String sendExTime;
/**
* - (yyyyMMddHHmiss : 14)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "열람마감시간(yyyyMMddHHmiss)", example = " ")
@Size(min = 14, max = 14, message = "열람마감시간(yyyyMMddHHmiss)")
private String exTime;
/**
* - (3 : sms|lms|mms)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "문서종류(sms|lms|mms)", example = " ", allowableValues = {
"sms", "lms", "mms"})
@Size(min = 3, max = 3, message = "문서종류(sms|lms|mms)")
@JsonProperty("m_type")
private String mType;
/**
* - (1 : 1-RCS, 2-xMS)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "발송메세지타입(1-RCS, 2-xMS)", example = " ", allowableValues = {
"1", "2"})
@Size(min = 1, max = 1, message = "발송메세지타입(1-RCS, 2-xMS)")
private String msgType;
@Schema(requiredMode = Schema.RequiredMode.REQUIRED)
@Valid
private List<MsgSendReqsData> reqs;
/**
* ()
*/
@Schema(title = "발신번호", example = " ")
@Size(max = 20, message = "발신번호(max:20)")
private String sndTelNo;
/**
*
*/
@Schema(title = "메세지발송구분", example = " ")
@Digits(integer = 8, fraction = 0, message = "메세지발송구분(max:1자리)")
private Integer optType;
}
@Schema(name = "MsgSendReqsData", description = "메세지 발송 요청 reqs DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class MsgSendReqsData {
//-------------------------------------------------------------------
// 필수
//-------------------------------------------------------------------
/**
* : Unique key
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "관리키", example = "S20211229102000011")
@NotEmpty(message = "관리키는 필수 입니다(max:50)")
@Size(max = 50)
private String srcKey;
/**
* : max 8
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "리스트순번", example = "1")
@NotEmpty(message = "리스트 순번은 필수 입니다(max:8)")
@Size(max = 8)
private String srcSeq;
/**
* : 128
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "개인식별코드", example = "vMtqVxJX56lBgbf9heK3QTc+jVndTfK77i/UJKAzPmBG4n9CazCdd/8YytlFZnN4qofIqgxHpSoiG0yYzgEpJg==")
@Size(min = 128, max = 128, message = "개인식별코드는 필수 입니다(128자리)")
private String sci;
/**
* <pre>
* MMS : max 4000
* URL
* {#INFO_CFRM_STR}, {#RCVE_RF_STR} .
* , 'Y' {#RCVE_RF_STR} .
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "MMS 상세내용", example = "{#INFO_CFRM_STR}, {#RCVE_RF_STR}")
@Size(min = 1, max = 4000, message = "MMS 상세내용 필수입니다(max:4000)")
private String mmsDtlCnts;
/**
* <pre>
* MMS : max 40
* utf-8 20
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "MMS 제목(max:40)", example = "공유재산사용료 정기분")
@Size(min = 1, max = 40, message = "MMS 제목은 필수 입니다(max:40)")
private String mmsTitle;
//-------------------------------------------------------------------
/**
* <pre>
* RCS : max 4000 - RCS|Binary
* RCS fallback mms_dtl_cnts
* RCS title mms_title .
* </pre>
*/
@Schema(title = "RCS 메세지 상세내용(max:4000)", example = " ")
@Size(max = 4000, message = "RCS 메세지 상세내용은 4000자를 넘을 수 없습니다.")
private String rcsDtlCnts;
/**
* <pre>
* URL
* </pre>
*/
@Schema(title = "연결 URL", example = "http://localhost:8081/api/biz/kt/v1/cfmToken")
private String url;
/**
* : max 64
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "문서해시(max:64)", example = "gdlIa53FZGQz5aKa3wLk33nW57N3mDpcwHytWlWMhzxHKulk7EZs143442394326642342364238648423864237")
@Size(max = 64, message = "문서해시 64자를 넘을 수 없습니다.")
private String docHash;
/**
* <pre>
* : 11
* MDN
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.AUTO, title = "개인휴대전화번호(max:11)", example = "01093414345")
@Size(max = 11, message = "개인 휴대 전화번호는 11자리 입니다")
private String mdn;
}
//-------------------------------------------------------------------
// 메세지 발송
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// 메세지 발송 및 수신결과 전송
//-------------------------------------------------------------------
@Schema(name = "MsgRsltRequest", description = "메세지 발송 및 수신결과 전송 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@EqualsAndHashCode(callSuper = false)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class MsgRsltRequest {
/**
* <pre>
* : - 5
* BizCenter
* </pre>>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "서비스코드", example = " ")
@Size(min = 5, max = 5, message = "서비스코드는 필수 입니다(5자리)")
private String serviceCd;
@Schema(requiredMode = Schema.RequiredMode.REQUIRED)
@Valid
private List<MsgRsltReqsData> reqs;
}
@Schema(name = "MsgRsltReqsData", description = "메세지 발송 및 수신결과 전송 reqs DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@EqualsAndHashCode(callSuper = false)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class MsgRsltReqsData extends CmmEnsRequestDTO {
//-------------------------------------------------------------------
// 필수
//-------------------------------------------------------------------
/**
* : Unique key
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "관리키", example = "S20211229102000001")
@Size(min = 1, max = 50, message = "관리키는 필수 입니다(max:50)")
private String srcKey;
/**
* <pre>
* MMS : - max 8
* 1:(), ():2
* </pre>>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "MMS 발송결과 상태 순번", example = " ", allowableValues = {
"1", "2"})
@Digits(integer = 8, fraction = 0, message = "MMS 발송결과 상태 순번(1|2)")
private Integer mmsSndgRsltSqno;
/**
* <pre>
* : - 8
*
* </pre>>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "처리일자", example = "20231210")
@Size(min = 8, max = 8, message = "처리일자는 필수 입니다(YYYYMMDD)")
private String prcsDt;
/**
* : - 5
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "문서코드", example = "00001")
@Size(min = 5, max = 5, message = "문서코드는 필수 입니다(5자리)")
private String mmsBsnsDvcd;
/**
* <pre>
* : - 2
* (01:KT, 02:SKT, 03:LGT)
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "모바일사업자구분", example = "01", allowableValues = {"01","02","03"})
@Size(min = 2, max = 2, message = "모바일 사업자 구분은 필수 입니다(01|02|03)")
private String mblBzowrDvcd;
/**
* <pre>
* TODO::
* : - 2
* 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 = Schema.RequiredMode.REQUIRED, title = "발송결과코드", example = "40")
@Size(min = 2, max = 2, message = "발송결과코드는 필수 입니다")
private String mmsRsltDvcd;
//private String mmsSndgRsltDvcd;
/**
* <pre>
* : - 14
* YYYYMMDDHHMISS
* </pre>>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "발송타임스탬프", example = "20241030121000")
@Size(min = 14, max = 14, message = "발송타임스탬프는 필수 입니다(YYYYMMDDHHMISS)")
private String mmsSndgTmst;
/**
* <pre>
* : - 1
* RCS/xMS (RCS :1, xMS: 2)
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "발송 메시지 타입", example = "2", allowableValues = {"1",
"2"})
@Size(min = 1, max = 1, message = "발송 메시지 타입은 필수 입니다")
private String msgType;
//-------------------------------------------------------------------
/**
* <pre>
* () : max 20
* (****0323)
* </pre>
*/
@Schema(title = "실제발송번호(일부)", example = " ")
@Size(max = 20, message = "실제발송번호(일부)는 20자를 넘을 수 없습니다.")
private String rlMmsSndgTelno;
/**
* <pre>
* : 14
* (mms_sndg_rslt_sqno 1 )
* </pre>>
*/
@Schema(title = "수신타임스탬프", example = " ")
@Size(max = 14, message = "수신타임스탬프는 14자리 입니다")
private String mmsRcvTmst;
/**
* <pre>
* : 14
* (mms_sndg_rslt_sqno 2 )
* </pre>>
*/
@Schema(title = "열람타임스탬프", example = " ")
@Size(max = 14, message = "열람타임스탬프는 14자리 입니다")
private String mmsRdgTmst;
/**
* <pre>
* : 1
* Y: ( )
* N: ( )
* </pre>
*/
@Schema(title = "기동의발송여부", example = "2", allowableValues = {"Y", "N"})
@Size(max = 1, message = "기동의발송여부는 1자리 입니다(Y|N)")
private String prevApproveYn;
/**
* API :
*/
@Schema(requiredMode = Schema.RequiredMode.AUTO, title = "발송결과코드메세지", example = "MMS/RCS 발송 수신성공")
@Size(max = 100, message = "발송결과코드메세지는 100자를 넘을 수 없습니다")
private String mmsRsltDvcdMsg;
/**
* MENS
*/
@Schema(title = "발송구분코드", example = " ")
private String sndngSeCode;
}
//-------------------------------------------------------------------
// 메세지 발송/수신결과 전송
//-------------------------------------------------------------------
}

@ -1,10 +1,35 @@
package kr.xit.biz.ens.model.ktgbs;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.NotEmpty;
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 kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO;
import kr.xit.core.model.IApiResponse;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* <pre>
* description :
* packageName : kr.xit.biz.ens.model.ktgbs
* fileName : KtGbsDTO
* fileName : KtGbsApiDTO
* author : limju
* date : 2024-08-19
* ======================================================================
@ -15,4 +40,579 @@ package kr.xit.biz.ens.model.ktgbs;
* </pre>
*/
public class KtGbsDTO {
//-------------------------------------------------------------------
// 메세지 발송
//-------------------------------------------------------------------
@Schema(name = "MsgSendRequest DTO", description = "메세지 발송 요청 request DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@EqualsAndHashCode(callSuper = false)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class MsgSendRequest extends KtCommonDTO.KtMnsRequest {
/**
* - (5)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "기관코드", example = "51110")
@Size(min = 5, max = 5, message = "기관코드는 필수 입니다(5자리)")
private String serviceCd;
/**
* - (5)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "문서코드", example = "DP112")
@Size(min = 5, max = 5, message = "기관코드는 필수 입니다(5자리)")
private String msgCd;
/**
* - (14) : yyyymmddHHmiss
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "생성일시", example = "20240819123456")
@Size(min = 5, max = 5, message = "생성일시는 필수 입니다(14자리)")
private String makeDt;
/**
* - (max:8)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "회차전체데이터건수", example = " ")
@Digits(integer = 8, fraction = 0, message = "회차전체데이터건수(max:8자리)")
private Integer dataCnt;
/**
* - (yyyyMMddHHmiss : 14)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "발송마감시간(yyyyMMddHHmiss)", example = " ")
@Size(min = 14, max = 14, message = "발송마감시간(yyyyMMddHHmiss)")
private String sendExTime;
/**
* - (yyyyMMddHHmiss : 14)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "열람마감시간(yyyyMMddHHmiss)", example = " ")
@Size(min = 14, max = 14, message = "열람마감시간(yyyyMMddHHmiss)")
private String exTime;
/**
* - (3 : sms|lms|mms)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "문서종류(sms|lms|mms)", example = "mms", allowableValues = {
"sms", "lms", "mms"})
@Size(min = 3, max = 3, message = "문서종류(sms|lms|mms)")
@JsonProperty("m_type")
private String mType;
/**
* - (1 : 1-RCS, 2-xMS)
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "발송메세지타입(1-RCS, 2-xMS)", example = " ", allowableValues = {
"1", "2"})
@Size(min = 1, max = 1, message = "발송메세지타입(1-RCS, 2-xMS)")
private String msgType;
@Schema(requiredMode = Schema.RequiredMode.REQUIRED)
@Valid
private List<MsgSendReqsData> reqs;
/**
* ()
*/
@Schema(title = "발신번호", example = " ")
@Size(max = 20, message = "발신번호(max:20)")
private String sndTelNo;
/**
*
*/
@Schema(title = "메세지발송구분", example = " ")
@Digits(integer = 8, fraction = 0, message = "메세지발송구분(max:1자리)")
private Integer optType;
}
@Schema(name = "MsgSendReqsData", description = "메세지 발송 요청 reqs DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class MsgSendReqsData {
//-------------------------------------------------------------------
// 필수
//-------------------------------------------------------------------
/**
* : Unique key
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "관리키", example = "S20211229102000011")
@NotEmpty(message = "관리키는 필수 입니다(max:50)")
@Size(max = 50)
private String srcKey;
/**
* : max 8
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "리스트순번", example = "1")
@NotEmpty(message = "리스트 순번은 필수 입니다(max:8)")
@Size(max = 8)
private String srcSeq;
/**
* : 128
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "개인식별코드", example = "vMtqVxJX56lBgbf9heK3QTc+jVndTfK77i/UJKAzPmBG4n9CazCdd/8YytlFZnN4qofIqgxHpSoiG0yYzgEpJg==")
@Size(min = 128, max = 128, message = "개인식별코드는 필수 입니다(128자리)")
private String sci;
/**
* <pre>
* MMS : max 4000
* URL
* {#INFO_CFRM_STR}, {#RCVE_RF_STR} .
* , 'Y' {#RCVE_RF_STR} .
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "MMS 상세내용", example = "{#INFO_CFRM_STR}, {#RCVE_RF_STR}")
@Size(min = 1, max = 4000, message = "MMS 상세내용 필수입니다(max:4000)")
private String mmsDtlCnts;
/**
* <pre>
* MMS : max 40
* utf-8 20
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "MMS 제목(max:40)", example = "공유재산사용료 정기분")
@Size(min = 1, max = 40, message = "MMS 제목은 필수 입니다(max:40)")
private String mmsTitle;
//-------------------------------------------------------------------
/**
* <pre>
* RCS : max 4000 - RCS|Binary
* RCS fallback mms_dtl_cnts
* RCS title mms_title .
* </pre>
*/
@Schema(title = "RCS 메세지 상세내용(max:4000)", example = " ")
@Size(max = 4000, message = "RCS 메세지 상세내용은 4000자를 넘을 수 없습니다.")
private String rcsDtlCnts;
/**
* <pre>
* URL
* </pre>
*/
@Schema(title = "연결 URL", example = "http://localhost:8081/api/biz/kt/v1/cfmToken")
private String url;
/**
* : max 64
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "문서해시(max:64)", example = "gdlIa53FZGQz5aKa3wLk33nW57N3mDpcwHytWlWMhzxHKulk7EZs143442394326642342364238648423864237")
@Size(max = 64, message = "문서해시 64자를 넘을 수 없습니다.")
private String docHash;
/**
* <pre>
* : 11
* MDN
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.AUTO, title = "개인휴대전화번호(max:11)", example = "01093414345")
@Size(max = 11, message = "개인 휴대 전화번호는 11자리 입니다")
private String mdn;
}
//-------------------------------------------------------------------
// 메세지 발송
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// 메세지 발송 및 수신결과 전송
//-------------------------------------------------------------------
@Schema(name = "MsgRsltRequest", description = "메세지 발송 및 수신결과 전송 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@EqualsAndHashCode(callSuper = false)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class MsgRsltRequest {
/**
* <pre>
* : - 5
* BizCenter
* </pre>>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "서비스코드", example = " ")
@Size(min = 5, max = 5, message = "서비스코드는 필수 입니다(5자리)")
private String serviceCd;
@Schema(requiredMode = Schema.RequiredMode.REQUIRED)
@Valid
private List<MsgRsltReqsData> reqs;
}
@Schema(name = "MsgRsltReqsData", description = "메세지 발송 및 수신결과 전송 reqs DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@EqualsAndHashCode(callSuper = false)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class MsgRsltReqsData extends CmmEnsRequestDTO {
//-------------------------------------------------------------------
// 필수
//-------------------------------------------------------------------
/**
* : Unique key
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "관리키", example = "S20211229102000001")
@Size(min = 1, max = 50, message = "관리키는 필수 입니다(max:50)")
private String srcKey;
/**
* <pre>
* MMS : - max 8
* 1:(), ():2
* </pre>>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "MMS 발송결과 상태 순번", example = " ", allowableValues = {
"1", "2"})
@Digits(integer = 8, fraction = 0, message = "MMS 발송결과 상태 순번(1|2)")
private Integer mmsSndgRsltSqno;
/**
* <pre>
* : - 8
*
* </pre>>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "처리일자", example = "20231210")
@Size(min = 8, max = 8, message = "처리일자는 필수 입니다(YYYYMMDD)")
private String prcsDt;
/**
* : - 5
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "문서코드", example = "00001")
@Size(min = 5, max = 5, message = "문서코드는 필수 입니다(5자리)")
private String mmsBsnsDvcd;
/**
* <pre>
* : - 2
* (01:KT, 02:SKT, 03:LGT)
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "모바일사업자구분", example = "01", allowableValues = {"01","02","03"})
@Size(min = 2, max = 2, message = "모바일 사업자 구분은 필수 입니다(01|02|03)")
private String mblBzowrDvcd;
/**
* <pre>
* TODO::
* : - 2
* 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 = Schema.RequiredMode.REQUIRED, title = "발송결과코드", example = "40")
@Size(min = 2, max = 2, message = "발송결과코드는 필수 입니다")
private String mmsRsltDvcd;
//private String mmsSndgRsltDvcd;
/**
* <pre>
* : - 14
* YYYYMMDDHHMISS
* </pre>>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "발송타임스탬프", example = "20241030121000")
@Size(min = 14, max = 14, message = "발송타임스탬프는 필수 입니다(YYYYMMDDHHMISS)")
private String mmsSndgTmst;
/**
* <pre>
* : - 1
* RCS/xMS (RCS :1, xMS: 2)
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "발송 메시지 타입", example = "2", allowableValues = {"1",
"2"})
@Size(min = 1, max = 1, message = "발송 메시지 타입은 필수 입니다")
private String msgType;
//-------------------------------------------------------------------
/**
* <pre>
* () : max 20
* (****0323)
* </pre>
*/
@Schema(title = "실제발송번호(일부)", example = " ")
@Size(max = 20, message = "실제발송번호(일부)는 20자를 넘을 수 없습니다.")
private String rlMmsSndgTelno;
/**
* <pre>
* : 14
* (mms_sndg_rslt_sqno 1 )
* </pre>>
*/
@Schema(title = "수신타임스탬프", example = " ")
@Size(max = 14, message = "수신타임스탬프는 14자리 입니다")
private String mmsRcvTmst;
/**
* <pre>
* : 14
* (mms_sndg_rslt_sqno 2 )
* </pre>>
*/
@Schema(title = "열람타임스탬프", example = " ")
@Size(max = 14, message = "열람타임스탬프는 14자리 입니다")
private String mmsRdgTmst;
/**
* <pre>
* : 1
* Y: ( )
* N: ( )
* </pre>
*/
@Schema(title = "기동의발송여부", example = "2", allowableValues = {"Y", "N"})
@Size(max = 1, message = "기동의발송여부는 1자리 입니다(Y|N)")
private String prevApproveYn;
/**
* API :
*/
@Schema(requiredMode = Schema.RequiredMode.AUTO, title = "발송결과코드메세지", example = "MMS/RCS 발송 수신성공")
@Size(max = 100, message = "발송결과코드메세지는 100자를 넘을 수 없습니다")
private String mmsRsltDvcdMsg;
/**
* MENS
*/
@Schema(title = "발송구분코드", example = " ")
private String sndngSeCode;
}
//-------------------------------------------------------------------
// 메세지 발송/수신결과 전송
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// token
//-------------------------------------------------------------------
/**
* <pre>
* KT GIBIS Token
* Request : TokenRequest
* Response : TokenResponse
* </pre>
*/
@Schema(name = "TokenRequest", description = "KT GIBIS 토큰발행 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class TokenRequest {
/**
*
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "클라이언트 ID", example = " ")
@NotEmpty(message = "클라이언트 ID는 필수 입니다")
@Size(max = 500)
private String clientId;
/**
* secret
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "클라이언트 secret", example = " ")
@NotEmpty(message = "클라이언트 secret는 필수 입니다")
@Size(max = 500)
private String clientSecret;
}
@Schema(name = "TokenResponse", description = "KT GIBIS 토큰발행 요청 결과 DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class TokenResponse implements IApiResponse {
//-------------------------------------------------------------------
// 토큰 발행 성공시 필수
//-------------------------------------------------------------------
/**
* :
*/
@Size(max = 1000)
private String accessToken;
/**
* <pre>
* :
* bearer
* </pre>
*/
@Size(max = 100)
private String tokenType;
/**
* () :
*/
@Size(max = 100)
private String expiresIn;
/**
* <pre>
* :
* , scope
* </pre>
*/
@Size(max = 100)
private String scope;
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// 토큰 발행 실패시 필수
//-------------------------------------------------------------------
private String timestamp;
/**
* :
*/
@Size(max = 100)
private String status;
/**
* <pre>
*
* </pre>
*/
@Size(max = 100)
private String error;
/**
*
*/
@Size(max = 1000)
private String message;
/**
*
*/
@Size(max = 1000)
private String path;
}
/**
* <pre>
* KT GIBIS Token : BC-AG-SN-008
* Request : KtTokenConfirmRequest
* Response : KtTokenConfirmResponse
* </pre>
*/
@Schema(name = "TokenConfirmRequest", description = "KT GIBIS 토큰 인증 확인 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
@EqualsAndHashCode(callSuper = false)
public static class TokenConfirmRequest extends KtCommonDTO.KtMnsRequest {
/**
* <pre>
* : - 5
* BizCenter
* </pre>>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "기관코드", example = " ")
@NotEmpty(message = "기관코드는 필수 입니다(max:5)")
private String serviceCd;
/**
* <pre>
* : - max:50
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "관리키", example = " ")
@Size(min = 1, max = 50, message = "관리키는 필수 입니다(max:50)")
private String srcKey;
/**
* <pre>
* : - max 128
* </pre>
*/
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, title = "토큰", example = " ")
@NotEmpty(message = "토큰은 필수 입니다")
private String token;
}
@Schema(name = "TokenReadRequest", description = "KT GIBIS 열람확인 결과 전송 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
@EqualsAndHashCode(callSuper = true)
public static class TokenReadRequest extends KtCommonDTO.KtMnsRequest {
/**
* <pre>
* : - 5
* BizCenter
* </pre>>
*/
private String serviceCd;
/**
* <pre>
* : - max 150
* </pre>
*/
private String accessToken;
/**
* <pre>
* : 14
* </pre>>
*/
private String mmsRdgTmst;
}
//-------------------------------------------------------------------
// token
//-------------------------------------------------------------------
}

Loading…
Cancel
Save