refactor: 패키지 정리

dev
gitea-관리자 1 year ago
parent 49e964378c
commit 01b9b73e58

@ -1,4 +1,4 @@
package kr.xit.ens.cmm.service;
package kr.xit.biz.cmm.service;
import java.io.IOException;
import java.io.InputStream;
@ -29,7 +29,7 @@ import org.springframework.web.multipart.MultipartFile;
* <pre>
* description :
*
* packageName : kr.xit.ens.cmm.service
* packageName : kr.xit.biz.cmm.service
* fileName : CmmEnsFileService
* author : limju
* date : 2023-09-05

@ -1,4 +1,4 @@
package kr.xit.ens.cmm.service;
package kr.xit.biz.cmm.service;
import kr.xit.biz.ens.model.cmm.CmmEnsFileDTO.FmcExcelUpload;
@ -6,7 +6,7 @@ import kr.xit.biz.ens.model.cmm.CmmEnsFileDTO.FmcExcelUpload;
* <pre>
* description :
*
* packageName : kr.xit.ens.cmm.service
* packageName : kr.xit.biz.cmm.service
* fileName : ICmmEnsFileService
* author : limju
* date : 2023-09-05

@ -1,10 +1,10 @@
package kr.xit.ens.cmm.web;
package kr.xit.biz.cmm.web;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.cmm.service.ICmmEnsFileService;
import kr.xit.biz.ens.model.cmm.CmmEnsFileDTO.FmcExcelUpload;
import kr.xit.core.model.ApiResponseDTO;
import kr.xit.ens.cmm.service.ICmmEnsFileService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
* <pre>
* description :
*
* packageName : kr.xit.ens.cmm.web
* packageName : kr.xit.biz.cmm.web
* fileName : CmmFileMgtController
* author : limju
* date : 2023-09-04
@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.RestController;
@Tag(name = "CmmEnsFileController", description = "전자고지 연계 파일 관련 처리")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/ens/cmm")
@RequestMapping(value = "/api/biz/cmm")
public class CmmEnsFileController {
private final ICmmEnsFileService service;

@ -37,19 +37,9 @@ public class SpringDocsApiConfig {
@Bean
public GroupedOpenApi kakaopayEltrcDoc() {
return GroupedOpenApi.builder()
.group("2. 카카오페이 MyDoc API")
.group("2. 문서중계자 API")
.pathsToMatch(
"/api/kakaopay/**"
)
.build();
}
@Bean
public GroupedOpenApi niceCi() {
return GroupedOpenApi.builder()
.group("3. Nice CI API")
.pathsToMatch(
"/api/nice/**"
"/api/ens/**"
)
.build();
}
@ -57,9 +47,9 @@ public class SpringDocsApiConfig {
@Bean
public GroupedOpenApi bizDoc() {
return GroupedOpenApi.builder()
.group("6. 전자고지 문서 확인 API")
.group("6. 전자고지 업무 API")
.pathsToMatch(
"/api/ens/**"
"/api/biz/**"
)
.build();
}

@ -483,6 +483,60 @@ public class NiceCiDTO {
@Schema(requiredMode = RequiredMode.AUTO, title = "사이트 코드", example = " ")
private String symkeyStatInfo;
}
@Schema(name = "SymkeyRegInfo", description = "대칭키(symmetrickey) 등록 요청시 symkey_reg_info JSON 속성")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class SymkeyRegInfo {
@Schema(requiredMode = RequiredMode.REQUIRED, title = "사이트 코드", description = "공개키요청시 수신한 사이트코드", example = "AAA==")
@Size(min = 1, max = 16, message = "사이트 코드는 필수 입니다(max:16)")
private String siteCode;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "요청고유번호", description = "이용기관에서 생성한 임의의 값", example = " ")
@Size(min = 30, max = 30, message = "요청고유번호는 필수 입니다(max:30)")
private String requestNo;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "암호화키", description = "사용할 암호화키", example = " ")
@Size(min = 32, max = 32, message = "사이트 코드는 필수 입니다(max:32)")
private String key;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "iv", description = "inital Vector", example = " ")
@Size(min = 16, max = 16, message = "iv는 필수 입니다(max:16)")
private String iv;
@Schema(requiredMode = RequiredMode.REQUIRED, title = "hmac_key", description = "사용할 HMAC KEY", example = " ")
@Size(min = 32, max = 32, message = "iv는 필수 입니다(max:16)")
private String hmacKey;
}
@Schema(name = "SymkeyStatInfo", description = "대칭키(symmetrickey) 등록 결과 symkey_stat_info JSON 속성")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class SymkeyStatInfo {
@Schema(requiredMode = RequiredMode.AUTO, title = "cur_symkey_version", description = "현재 등록 요청한 대칭키 버전", example = " ")
@Size(max = 50)
private String curSymkeyVersion;
@Schema(requiredMode = RequiredMode.AUTO, title = "cur_valid_dtim", description = "현재 등록된 대칭키 만료일시 (YYYYMMDDHH24MISS)", example = " ")
@Size(max = 14)
private String curValidDtim;
@Schema(requiredMode = RequiredMode.AUTO, title = "bef_symkey_version", description = "이전 등록된 대칭키 버전", example = " ")
@Size(max = 50)
private String befSymkeyVersion;
@Schema(requiredMode = RequiredMode.AUTO, title = "bef_valid_dtim", description = "이전 등록된 대칭키 만료일시 (YYYYMMDDHH24MISS)", example = " ")
@Size(max = 14)
private String befvaliddtim;
}
//--------------------------------------------------------------------------------
// 대칭키 : symmetrickey
//--------------------------------------------------------------------------------
@ -658,7 +712,46 @@ public class NiceCiDTO {
*
*/
private String validDtim;
/**
*
*/
private String curSymkeyVersion;
/**
*
*/
private String curSymkeyValidDtim;
/**
* key
*/
private String curSymkeyKey;
/**
* iv
*/
private String curSymkeyiv;
/**
* hmac_key
*/
private String curSymkeyHmacKey;
/**
*
*/
private String befSymkeyVersion;
/**
*
*/
private String befSymkeyValidDtim;
/**
* key
*/
private String befSymkeyKey;
/**
* iv
*/
private String befSymkeyIv;
/**
* hmac_key
*/
private String befSymkeyHmacKey;
/**
*

@ -0,0 +1,31 @@
package kr.xit.core.support.utils;
import java.nio.ByteBuffer;
import java.util.Random;
import java.util.UUID;
public class UUIDGenerateUtils {
public static String generateLengthUuid(int length) {
String allChars = UUID.randomUUID().toString().replace("-", "");
Random random = new Random();
char[] otp = new char[length];
for (int i = 0; i < length; i++) {
otp[i] = allChars.charAt(random.nextInt(allChars.length()));
}
return String.valueOf(otp);
}
public static String generateLengthUuid2(int wordLength) {
Random r = new Random();
StringBuilder sb = new StringBuilder(wordLength);
for (int i = 0; i < wordLength; i++) {
char tmp = (char) ('a' + r.nextInt('z' - 'a'));
sb.append(tmp);
}
return sb.toString();
}
}
Loading…
Cancel
Save