refactor: KtMns > KtBc로 변경

main
Jonguk. Lim 3 months ago
parent 6cc76effd4
commit 21efd3bed0

@ -1,15 +1,16 @@
package kr.xit.biz.kt.mapper;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltReqData;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.kt.mapper
* fileName : IBizKtMmsMapper
* fileName : IBizKtBcMapper
* author : limju
* date : 2023-10-12
* ======================================================================
@ -20,7 +21,7 @@ import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
* </pre>
*/
@Mapper
public interface IBizKtMmsMapper {
public interface IBizKtBcMapper {
int updateRlaybsnmKtInfo(final CmmEnsRlaybsnmDTO dto);
int updateKtBcDtl(final KtMsgRsltReqData dto);
int saveKtCntcSndngResult(final KtMsgRsltReqData dto);

@ -1,6 +1,11 @@
package kr.xit.biz.kt.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;
@ -11,26 +16,23 @@ import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltReqData;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltRequest;
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
import kr.xit.biz.kt.mapper.IBizKtMmsMapper;
import kr.xit.biz.kt.mapper.IBizKtBcMapper;
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;
import kr.xit.core.support.utils.DateUtils;
import kr.xit.ens.cmm.CmmEnsUtils;
import kr.xit.ens.kt.service.IKtMmsService;
import kr.xit.ens.kt.web.KtMmsInboundController;
import kr.xit.ens.kt.service.IKtBcService;
import kr.xit.ens.kt.web.KtBcInboundController;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.kt.service
* fileName : BizKtMmsService
* fileName : BizKtBcService
* author : limju
* date : 2023-09-22
* ======================================================================
@ -42,10 +44,10 @@ import org.springframework.transaction.annotation.Transactional;
*/
@RequiredArgsConstructor
@Service
public class BizKtMmsService extends AbstractService implements IBizKtMmsService {
private final IKtMmsService ktMmsService;
public class BizKtBcService extends AbstractService implements IBizKtBcService {
private final IKtBcService ktMmsService;
private final ICmmEnsCacheService cacheService;
private final IBizKtMmsMapper mapper;
private final IBizKtBcMapper mapper;
/**
* <pre>
@ -90,7 +92,7 @@ public class BizKtMmsService extends AbstractService implements IBizKtMmsService
* / /
* - KT
* - http://{각대행사(IP:Port)}/api/ag/message/result
* {@link KtMmsInboundController#messageResult messageResult}
* {@link KtBcInboundController#messageResult messageResult}
*
*
* -> 1 ,

@ -12,7 +12,7 @@ import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
* description :
*
* packageName : kr.xit.biz.kt.service
* fileName : IBizKtMmsService
* fileName : IBizKtBcService
* author : limju
* date : 2023-09-22
* ======================================================================
@ -22,7 +22,7 @@ import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
*
* </pre>
*/
public interface IBizKtMmsService {
public interface IBizKtBcService {
KtTokenResponse requestToken(final KtMnsRequest paramDTO);
// KtCommonResponse mainSend(final KtMnsRequest reqDTO);

@ -1,27 +1,28 @@
package kr.xit.biz.kt.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.kt.service.IBizKtMmsService;
import kr.xit.biz.kt.service.IBizKtBcService;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
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;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.kt.web
* fileName : BizKtMmsController
* fileName : BizKtBcController
* author : limju
* date : 2023-09-22
* ======================================================================
@ -36,7 +37,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/api/biz/kt/v1")
@Slf4j
public class BizKtMmsController {
public class BizKtBcController {
private static final String PARAM1 = """
{
"signguCode": "88328",
@ -52,7 +53,7 @@ public class BizKtMmsController {
}
""";
private final IBizKtMmsService service;
private final IBizKtBcService service;
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(

@ -16,7 +16,7 @@ import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.support.utils.Checks;
import kr.xit.ens.kakao.v1.service.IKkopayEltrcDocService;
import kr.xit.ens.kt.service.IKtMmsService;
import kr.xit.ens.kt.service.IKtBcService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -41,7 +41,7 @@ import lombok.extern.slf4j.Slf4j;
public class MobilePageService extends AbstractService implements IMobilePageService {
private final IMobilePageMapper mapper;
private final IKkopayEltrcDocService kkoService;
private final IKtMmsService ktMmsService;
private final IKtBcService ktMmsService;
/**
* <pre>

@ -1,14 +1,15 @@
package kr.xit.core.spring.util;
import org.springframework.context.ApplicationContext;
import kr.xit.biz.cmm.service.CmmEnsCacheService;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.kt.service.IBizKtMmsService;
import kr.xit.biz.kt.service.IBizKtBcService;
import kr.xit.biz.nice.service.IBizNiceCiService;
import kr.xit.core.spring.config.support.ApplicationContextProvider;
import kr.xit.ens.nice.service.INiceCiService;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.springframework.context.ApplicationContext;
/**
* <pre>
@ -58,7 +59,7 @@ public class ApiSpringUtils {
return (IBizNiceCiService)getBean(IBizNiceCiService.class);
}
public static IBizKtMmsService getBizKtMmsService(){
return (IBizKtMmsService)getBean(IBizKtMmsService.class);
public static IBizKtBcService getBizKtMmsService(){
return (IBizKtBcService)getBean(IBizKtBcService.class);
}
}

@ -15,6 +15,7 @@ import java.util.Locale;
import java.util.Random;
import java.util.Set;
import java.util.UUID;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
@ -26,6 +27,11 @@ import javax.crypto.spec.SecretKeySpec;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.Base64Utils;
import kr.xit.biz.cmm.service.ICmmEnsCacheService;
import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.common.ApiConstants.SndngSeCode;
@ -33,7 +39,7 @@ import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kt.KtCommonDTO.ErrorMsg;
import kr.xit.biz.ens.model.kt.KtCommonDTO.KtMnsRequest;
import kr.xit.biz.kt.service.IBizKtMmsService;
import kr.xit.biz.kt.service.IBizKtBcService;
import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.spring.util.ApiSpringUtils;
import kr.xit.core.spring.util.CoreSpringUtils;
@ -41,9 +47,6 @@ import kr.xit.core.spring.util.MessageUtil;
import kr.xit.core.support.utils.DateUtils;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.Base64Utils;
/**
* <pre>
@ -65,7 +68,7 @@ import org.springframework.util.Base64Utils;
public class CmmEnsUtils {
private static final MessageUtil messageUtil = CoreSpringUtils.getMessageUtil();
private static final ICmmEnsCacheService cacheService = ApiSpringUtils.getCmmEnsCacheService();
private static final IBizKtMmsService bizKtService = ApiSpringUtils.getBizKtMmsService();
private static final IBizKtBcService bizKtService = ApiSpringUtils.getBizKtMmsService();
/**
*

@ -43,7 +43,7 @@ import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenResponse;
*
* </pre>
*/
public interface IKtMmsService {
public interface IKtBcService {
//------------------------------------------------------------------------------
// mens 사용 API
//------------------------------------------------------------------------------

@ -2,6 +2,13 @@ package kr.xit.ens.kt.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.common.ApiConstants.SndngSeCode;
@ -41,18 +48,13 @@ import kr.xit.core.support.utils.DateUtils;
import kr.xit.core.support.utils.JsonUtils;
import kr.xit.ens.cmm.CmmEnsUtils;
import lombok.RequiredArgsConstructor;
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;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.kt.service
* fileName : KtMmsService
* fileName : KtBcService
* author : limju
* date : 2023-09-22
* ======================================================================
@ -64,7 +66,7 @@ import org.springframework.stereotype.Service;
*/
@RequiredArgsConstructor
@Service
public class KtMmsService extends AbstractService implements IKtMmsService {
public class KtBcService extends AbstractService implements IKtBcService {
@Value("${app.contract.kt.host}")
private String HOST;
//-----------------------------------------------------------------

@ -1,5 +1,11 @@
package kr.xit.ens.kt.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.tags.Tag;
import kr.xit.biz.ens.model.kt.KtAcmdDTO.KtAcmdCerfRequest;
@ -27,20 +33,15 @@ import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenExcaRequest;
import kr.xit.biz.ens.model.kt.KtTokenDTO.KtTokenReadRequest;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse;
import kr.xit.ens.kt.service.IKtMmsService;
import kr.xit.ens.kt.service.IKtBcService;
import lombok.RequiredArgsConstructor;
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;
/**
* <pre>
* description :
* description : KT BC API controller
*
* packageName : kr.xit.ens.kt.web
* fileName : KtMmsController
* fileName : KtBcController
* author : limju
* date : 2023-09-22
* ======================================================================
@ -50,13 +51,13 @@ import org.springframework.web.bind.annotation.RestController;
*
* </pre>
*/
@Tag(name = "KtMmsController", description = "KT MMS API")
@Tag(name = "KtBcController", description = "KT BC API Controller")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/ens/kt/v1")
public class KtMmsController {
public class KtBcController {
private final IKtMmsService service;
private final IKtBcService service;
//------------------------------------------------------------------------------
// mens 사용 API

@ -1,24 +1,25 @@
package kr.xit.ens.kt.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.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.KtCommonResponse;
import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMsgRsltRequest;
import kr.xit.biz.kt.service.IBizKtMmsService;
import kr.xit.biz.kt.service.IBizKtBcService;
import lombok.RequiredArgsConstructor;
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.RestController;
/**
* <pre>
* description : KT BC API
*
* packageName : kr.xit.ens.kt.web
* fileName : KtMmsController
* fileName : KtBcInboundController
* author : limju
* date : 2023-09-22
* ======================================================================
@ -28,12 +29,12 @@ import org.springframework.web.bind.annotation.RestController;
*
* </pre>
*/
@Tag(name = "KtMmsInboundController", description = "KT MMS Inbound API")
@Tag(name = "KtBcInboundController", description = "KT BC Inbound API")
@RequiredArgsConstructor
@RestController
public class KtMmsInboundController {
public class KtBcInboundController {
private final IBizKtMmsService bizService;
private final IBizKtBcService bizService;
/**
* <pre>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.kt.mapper.IBizKtMmsMapper">
<mapper namespace="kr.xit.biz.kt.mapper.IBizKtBcMapper">
<update id="updateRlaybsnmKtInfo" parameterType="kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO">
/** ens-kt-mysql-mapper|updateRlaybsnmKtInfo-kt token 정보 갱신|julim */

Loading…
Cancel
Save