feat: 시군구, 과태료코드 추가 반영

dev
Jonguk. Lim 1 year ago
parent fa6f0871df
commit f843da1986

@ -52,27 +52,33 @@ public class AsyncKkopayEltrcDocController {
*/ */
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = { @Content(mediaType = "application/json", examples = {
@ExampleObject(value = "{\"document\": {\n" @ExampleObject(value = """
+ " \"title\": \"문서 제목\",\n" {
+ " \"read_expired_sec\": 3600,\n" "document": {
+ " \"hash\": \"6EFE827AC88914DE471C621AE\",\n" "title": "문서 제목",
+ " \"common_categories\": [\n" "read_expired_sec": 3600,
+ " \"NOTICE\"\n" "hash": "6EFE827AC88914DE471C621AE",
+ " ],\n" "common_categories": [
+ " \"receiver\": {\n" "NOTICE"
+ " \"phone_number\": \"01093414345\",\n" ],
+ " \"name\": \"김지호\",\n" "receiver": {
+ " \"birthday\": \"19831218\",\n" "phone_number": "01093414345",
+ " \"is_required_verify_name\": false\n" "name": "김지호",
+ " },\n" "birthday": "19831218",
+ " \"property\": {\n" "is_required_verify_name": false
+ " \"link\": \"http://ip:8081/api/kakaopay/v1/ott\",\n" },
+ " \"cs_number\": \"02-123-4567\",\n" "property": {
+ " \"cs_name\": \"콜센터\",\n" "link": "http://ip:8081/api/kakaopay/v1/ott",
+ " \"payload\": \"payload 파라미터 입니다.\",\n" "cs_number": "02-123-4567",
+ " \"message\": \"해당 안내문은 다음과 같습니다.\"\n" "cs_name": "콜센터",
+ " }\n" "payload": "payload 파라미터 입니다.",
+ " }}") "message": "해당 안내문은 다음과 같습니다."
}
},
"signguCode": "88328",
"ffnlgCode": "11"
}
""")
}) })
}) })
@Operation(summary = "문서발송 요청", description = "카카오페이 전자문서 서버로 문서발송 처리를 요청") @Operation(summary = "문서발송 요청", description = "카카오페이 전자문서 서버로 문서발송 처리를 요청")

@ -14,7 +14,6 @@ import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException; import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException;
import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException; import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/** /**
@ -51,7 +50,7 @@ public class SndngMakeJobScheduler {
Map<String, JobParameter> confMap = new HashMap<>(); Map<String, JobParameter> confMap = new HashMap<>();
confMap.put("startDate", new JobParameter(new Date())); confMap.put("startDate", new JobParameter(new Date()));
confMap.put("isSlackEnabled", new JobParameter(isSlackEnabled)); confMap.put("isSlackEnabled", new JobParameter(isSlackEnabled));
confMap.put("sndngProcessSttus", new JobParameter(ApiConstants.SndngProcessStatus.ACCETP_OK.getCode())); confMap.put("sndngProcessSttus", new JobParameter(ApiConstants.SndngProcessStatus.ACCEPT_OK.getCode()));
JobParameters jobParameters = new JobParameters(confMap); JobParameters jobParameters = new JobParameters(confMap);
try { try {

@ -1,6 +1,7 @@
package kr.xit.batch.ens.task; package kr.xit.batch.ens.task;
import kr.xit.batch.ens.task.cmm.TaskCmmUtils; import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
import kr.xit.biz.ens.model.EnsDTO;
import kr.xit.biz.ens.service.IEnsBatchService; import kr.xit.biz.ens.service.IEnsBatchService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -33,11 +34,16 @@ public class SndngAcceptTasklet implements Tasklet {
@Override @Override
@JobScope @JobScope
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) { public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
String sndngProcessSttus = contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus");
final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled"); final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled");
try { try {
service.accept(sndngProcessSttus); service.accept(
EnsDTO.BatchEnsRequest.builder()
.signguCode(contribution.getStepExecution().getJobParameters().getString("signguCode"))
.ffnlgCode(contribution.getStepExecution().getJobParameters().getString("ffnlgCode"))
.sndngProcessSttus(contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus"))
.build()
);
}catch(Exception e){ }catch(Exception e){
log.error("SndngAcceptTasklet error :: {}", e.getMessage()); log.error("SndngAcceptTasklet error :: {}", e.getMessage());

@ -1,6 +1,7 @@
package kr.xit.batch.ens.task; package kr.xit.batch.ens.task;
import kr.xit.batch.ens.task.cmm.TaskCmmUtils; import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
import kr.xit.biz.ens.model.EnsDTO;
import kr.xit.biz.ens.service.IEnsBatchService; import kr.xit.biz.ens.service.IEnsBatchService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.core.ExitStatus; import org.springframework.batch.core.ExitStatus;
@ -36,11 +37,16 @@ public class SndngCloseTasklet implements Tasklet {
@Override @Override
@JobScope @JobScope
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) { public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
String sndngProcessSttus = contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus");
final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled"); final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled");
try { try {
service.close(sndngProcessSttus); service.close(
EnsDTO.BatchEnsRequest.builder()
.signguCode(contribution.getStepExecution().getJobParameters().getString("signguCode"))
.ffnlgCode(contribution.getStepExecution().getJobParameters().getString("ffnlgCode"))
.sndngProcessSttus(contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus"))
.build()
);
}catch(Exception e){ }catch(Exception e){
log.error("SndngCloseTasklet error :: {}", e.getMessage()); log.error("SndngCloseTasklet error :: {}", e.getMessage());

@ -1,6 +1,7 @@
package kr.xit.batch.ens.task; package kr.xit.batch.ens.task;
import kr.xit.batch.ens.task.cmm.TaskCmmUtils; import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
import kr.xit.biz.ens.model.EnsDTO;
import kr.xit.biz.ens.service.IEnsBatchService; import kr.xit.biz.ens.service.IEnsBatchService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -33,11 +34,16 @@ public class SndngMakeTasklet implements Tasklet {
@Override @Override
@JobScope @JobScope
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) { public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
String sndngProcessSttus = contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus");
final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled"); final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled");
try { try {
service.make(sndngProcessSttus); service.make(
EnsDTO.BatchEnsRequest.builder()
.signguCode(contribution.getStepExecution().getJobParameters().getString("signguCode"))
.ffnlgCode(contribution.getStepExecution().getJobParameters().getString("ffnlgCode"))
.sndngProcessSttus(contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus"))
.build()
);
}catch(Exception e){ }catch(Exception e){
log.error("SndngMakeTasklet error :: {}", e.getMessage()); log.error("SndngMakeTasklet error :: {}", e.getMessage());

@ -2,6 +2,7 @@ package kr.xit.batch.ens.task;
import java.util.UUID; import java.util.UUID;
import kr.xit.batch.ens.task.cmm.TaskCmmUtils; import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
import kr.xit.biz.ens.model.EnsDTO;
import kr.xit.biz.ens.service.IEnsBatchService; import kr.xit.biz.ens.service.IEnsBatchService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -35,7 +36,6 @@ public class SndngSendBulksTasklet implements Tasklet {
@Override @Override
@JobScope @JobScope
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) { public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
String sndngProcessSttus = contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus");
final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled"); final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled");
try { try {
@ -43,7 +43,13 @@ public class SndngSendBulksTasklet implements Tasklet {
MDC.put("uri", "/v1/documents/bulk"); MDC.put("uri", "/v1/documents/bulk");
MDC.put("method", "POST"); MDC.put("method", "POST");
service.sendBulks(sndngProcessSttus); service.sendBulks(
EnsDTO.BatchEnsRequest.builder()
.signguCode(contribution.getStepExecution().getJobParameters().getString("signguCode"))
.ffnlgCode(contribution.getStepExecution().getJobParameters().getString("ffnlgCode"))
.sndngProcessSttus(contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus"))
.build()
);
}catch(Exception e){ }catch(Exception e){
log.error("SndngSendBulksTasklet error :: {}", e.getMessage()); log.error("SndngSendBulksTasklet error :: {}", e.getMessage());

@ -2,6 +2,7 @@ package kr.xit.batch.ens.task;
import java.util.UUID; import java.util.UUID;
import kr.xit.batch.ens.task.cmm.TaskCmmUtils; import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
import kr.xit.biz.ens.model.EnsDTO;
import kr.xit.biz.ens.service.IEnsBatchService; import kr.xit.biz.ens.service.IEnsBatchService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -35,7 +36,6 @@ public class SndngStatusBulksTasklet implements Tasklet {
@Override @Override
@JobScope @JobScope
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) { public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
final String sndngProcessSttus = contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus");
final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled"); final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled");
try { try {
@ -43,7 +43,13 @@ public class SndngStatusBulksTasklet implements Tasklet {
MDC.put("uri", "/v1/documents/bulk/status"); MDC.put("uri", "/v1/documents/bulk/status");
MDC.put("method", "POST"); MDC.put("method", "POST");
service.findKkoMyDocStatusBulks(sndngProcessSttus); service.findKkoMyDocStatusBulks(
EnsDTO.BatchEnsRequest.builder()
.signguCode(contribution.getStepExecution().getJobParameters().getString("signguCode"))
.ffnlgCode(contribution.getStepExecution().getJobParameters().getString("ffnlgCode"))
.sndngProcessSttus(contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus"))
.build()
);
}catch(Exception e){ }catch(Exception e){
log.error("SndngStatusBulksTasklet error :: {}", e.getMessage()); log.error("SndngStatusBulksTasklet error :: {}", e.getMessage());

@ -13,6 +13,7 @@ import kr.xit.batch.ens.job.SndngMakeJobConfig;
import kr.xit.batch.ens.job.SndngSnedBulksJobConfig; import kr.xit.batch.ens.job.SndngSnedBulksJobConfig;
import kr.xit.batch.ens.job.SndngStatusBulksJobConfig; import kr.xit.batch.ens.job.SndngStatusBulksJobConfig;
import kr.xit.biz.common.ApiConstants; import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.support.utils.Checks; import kr.xit.core.support.utils.Checks;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -27,9 +28,7 @@ import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteExcep
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* <pre> * <pre>
@ -66,11 +65,13 @@ public class KkopayEltrcDocBatchController {
private final PniCctvAcceptJobConfg pniCctvAcceptJobConfg; private final PniCctvAcceptJobConfg pniCctvAcceptJobConfg;
@Operation(summary = "accept", description = "accept") @Operation(summary = "accept", description = "accept")
@GetMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> accept() { public ApiResponseDTO<?> accept(@RequestBody final CmmEnsRequestDTO reqDTO) {
try { try {
JobExecution jobExecution = jobLauncher.run(acceptJobConfig.sndngAcceptJob(), getJobParameters( JobExecution jobExecution = jobLauncher.run(
ApiConstants.SndngProcessStatus.ACCEPT.getCode())); acceptJobConfig.sndngAcceptJob(),
getJobParameters(reqDTO, ApiConstants.SndngProcessStatus.ACCEPT.getCode())
);
while(jobExecution.isRunning()){ while(jobExecution.isRunning()){
log.info("..."); log.info("...");
@ -86,11 +87,14 @@ public class KkopayEltrcDocBatchController {
} }
@Operation(summary = "make", description = "make") @Operation(summary = "make", description = "make")
@GetMapping(value = "/make", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/make", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> make() { public ApiResponseDTO<?> make(@RequestBody final CmmEnsRequestDTO reqDTO) {
try { try {
JobExecution jobExecution = jobLauncher.run(makeJobConfig.sndngMakeJob(), getJobParameters(ApiConstants.SndngProcessStatus.ACCETP_OK.getCode())); JobExecution jobExecution = jobLauncher.run(
makeJobConfig.sndngMakeJob(),
getJobParameters(reqDTO, ApiConstants.SndngProcessStatus.ACCEPT_OK.getCode())
);
while(jobExecution.isRunning()){ while(jobExecution.isRunning()){
log.info("..."); log.info("...");
@ -106,11 +110,14 @@ public class KkopayEltrcDocBatchController {
} }
@Operation(summary = "close", description = "close") @Operation(summary = "close", description = "close")
@GetMapping(value = "/close", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/close", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> close() { public ApiResponseDTO<?> close(@RequestBody final CmmEnsRequestDTO reqDTO) {
try { try {
JobExecution jobExecution = jobLauncher.run(closeJobConfig.sndngCloseJob(), getJobParameters(ApiConstants.SndngProcessStatus.SEND_OK.getCode())); JobExecution jobExecution = jobLauncher.run(
closeJobConfig.sndngCloseJob(),
getJobParameters(reqDTO, ApiConstants.SndngProcessStatus.SEND_OK.getCode())
);
while(jobExecution.isRunning()){ while(jobExecution.isRunning()){
log.info("..."); log.info("...");
@ -126,11 +133,14 @@ public class KkopayEltrcDocBatchController {
} }
@Operation(summary = "sendBulks", description = "sendBulks") @Operation(summary = "sendBulks", description = "sendBulks")
@GetMapping(value = "/sendBulks", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/sendBulks", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> sendBulks() { public ApiResponseDTO<?> sendBulks(@RequestBody final CmmEnsRequestDTO reqDTO) {
try { try {
JobExecution jobExecution = jobLauncher.run(sendBulksJobConfig.sndngSendBulksJob(), getJobParameters(ApiConstants.SndngProcessStatus.MAKE_OK.getCode())); JobExecution jobExecution = jobLauncher.run(
sendBulksJobConfig.sndngSendBulksJob(),
getJobParameters(reqDTO, ApiConstants.SndngProcessStatus.MAKE_OK.getCode())
);
while(jobExecution.isRunning()){ while(jobExecution.isRunning()){
log.info("..."); log.info("...");
@ -146,11 +156,14 @@ public class KkopayEltrcDocBatchController {
} }
@Operation(summary = "statusBulks", description = "statusBulks") @Operation(summary = "statusBulks", description = "statusBulks")
@GetMapping(value = "/statusBulks", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/statusBulks", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> statusBulks() { public ApiResponseDTO<?> statusBulks(@RequestBody final CmmEnsRequestDTO reqDTO) {
try { try {
JobExecution jobExecution = jobLauncher.run(statusJobConfig.sndngStatusBulksJob(), getJobParameters(ApiConstants.SndngProcessStatus.SEND_OK.getCode())); JobExecution jobExecution = jobLauncher.run(
statusJobConfig.sndngStatusBulksJob(),
getJobParameters(reqDTO, ApiConstants.SndngProcessStatus.SEND_OK.getCode())
);
while(jobExecution.isRunning()){ while(jobExecution.isRunning()){
log.info("..."); log.info("...");
@ -166,11 +179,14 @@ public class KkopayEltrcDocBatchController {
} }
@Operation(summary = "pniCctvFileService", description = "CCTV 사전알림(서광)") @Operation(summary = "pniCctvFileService", description = "CCTV 사전알림(서광)")
@GetMapping(value = "/pniCctvFileService", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/pniCctvFileService", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> pniCctvFileService() { public ApiResponseDTO<?> pniCctvFileService(@RequestBody final CmmEnsRequestDTO reqDTO) {
try { try {
JobExecution jobExecution = jobLauncher.run(pniCctvFileJobConfg.pniCctvFileJob(), getJobParameters(null)); JobExecution jobExecution = jobLauncher.run(
pniCctvFileJobConfg.pniCctvFileJob(),
getJobParameters(reqDTO, null)
);
while(jobExecution.isRunning()){ while(jobExecution.isRunning()){
log.info("..."); log.info("...");
@ -186,11 +202,14 @@ public class KkopayEltrcDocBatchController {
} }
@Operation(summary = "pniCctvAccept", description = "CCTV 단속 사전알림 accept") @Operation(summary = "pniCctvAccept", description = "CCTV 단속 사전알림 accept")
@GetMapping(value = "/pniCctvAccept", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/pniCctvAccept", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> pniCctvAccept() { public ApiResponseDTO<?> pniCctvAccept(@RequestBody final CmmEnsRequestDTO reqDTO) {
try { try {
JobExecution jobExecution = jobLauncher.run(pniCctvAcceptJobConfg.pniCctvAcceptJob(), getJobParameters(null)); JobExecution jobExecution = jobLauncher.run(
pniCctvAcceptJobConfg.pniCctvAcceptJob(),
getJobParameters(reqDTO, null)
);
while(jobExecution.isRunning()){ while(jobExecution.isRunning()){
log.info("..."); log.info("...");
@ -205,9 +224,11 @@ public class KkopayEltrcDocBatchController {
return ApiResponseDTO.success(HttpStatus.OK); return ApiResponseDTO.success(HttpStatus.OK);
} }
private JobParameters getJobParameters(final String processStatus){ private JobParameters getJobParameters(final CmmEnsRequestDTO reqDTO, final String processStatus){
Map<String, JobParameter> confMap = new HashMap<>(); Map<String, JobParameter> confMap = new HashMap<>();
confMap.put("signguCode", new JobParameter(reqDTO.getSignguCode()));
confMap.put("ffnlgCode", new JobParameter(reqDTO.getFfnlgCode()));
confMap.put("startDate", new JobParameter(new Date())); confMap.put("startDate", new JobParameter(new Date()));
confMap.put("isSlackEnabled", new JobParameter(isSlackEnabled)); confMap.put("isSlackEnabled", new JobParameter(isSlackEnabled));
if(Checks.isNotEmpty(processStatus)) confMap.put("sndngProcessSttus", new JobParameter(processStatus)); if(Checks.isNotEmpty(processStatus)) confMap.put("sndngProcessSttus", new JobParameter(processStatus));

@ -9,6 +9,7 @@ import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import kr.xit.biz.common.ApiConstants; import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.core.biz.model.AuditFields; import kr.xit.core.biz.model.AuditFields;
import lombok.*; import lombok.*;
import lombok.experimental.SuperBuilder; import lombok.experimental.SuperBuilder;
@ -32,6 +33,19 @@ import javax.validation.constraints.Size;
* </pre> * </pre>
*/ */
public class EnsDTO { public class EnsDTO {
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@EqualsAndHashCode(callSuper = true)
public static class BatchEnsRequest extends CmmEnsRequestDTO {
/**
*
*/
@Schema(requiredMode = Schema.RequiredMode.AUTO, title = "발송처리상태", example = " ")
@Size(max = 5)
private String sndngProcessSttus;
}
@Data @Data
@ -39,6 +53,8 @@ public class EnsDTO {
@AllArgsConstructor @AllArgsConstructor
@SuperBuilder @SuperBuilder
public static class SndngMssageParam implements Serializable { public static class SndngMssageParam implements Serializable {
private String signguCode;
private String ffnlgCode;
/** /**
* id * id

@ -6,6 +6,7 @@ import java.util.stream.Collectors;
import egovframework.com.cmm.util.EgovDateUtil; import egovframework.com.cmm.util.EgovDateUtil;
import egovframework.com.cmm.util.EgovStringUtil; import egovframework.com.cmm.util.EgovStringUtil;
import kr.xit.biz.cmm.util.CmmKakaoUtils;
import kr.xit.biz.common.ApiConstants; import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.ens.model.EnsDTO.SendKakaoTgt; import kr.xit.biz.ens.model.EnsDTO.SendKakaoTgt;
import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.Receiver; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.Receiver;
@ -101,8 +102,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
*/ */
@Override @Override
@Transactional @Transactional
public void accept(final String sndngProcessSttus) { public void accept(final EnsDTO.BatchEnsRequest reqDTO) {
final List<EnsDTO.SndngMssageParam> list = mapper.selectAcceptTgts(sndngProcessSttus); final List<EnsDTO.SndngMssageParam> list = mapper.selectAcceptTgts(reqDTO);
String sndngDt = null; String sndngDt = null;
for (EnsDTO.SndngMssageParam dto : list) { for (EnsDTO.SndngMssageParam dto : list) {
@ -137,8 +138,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
} }
} }
dto.setSndngProcessSttus(sndngProcessSttus); dto.setSndngProcessSttus(reqDTO.getSndngProcessSttus());
dto.setNewSndngProcessSttus(ApiConstants.SndngProcessStatus.ACCETP_OK.getCode()); dto.setNewSndngProcessSttus(ApiConstants.SndngProcessStatus.ACCEPT_OK.getCode());
if (mapper.insertUnitySndngMst(dto) != 1) { if (mapper.insertUnitySndngMst(dto) != 1) {
throw BizRuntimeException.create("접수 데이타 생성(마스터) 실패"); throw BizRuntimeException.create("접수 데이타 생성(마스터) 실패");
} }
@ -278,17 +279,17 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
*/ */
@Override @Override
@Transactional @Transactional
public void make(final String sndngProcessSttus) { public void make(final EnsDTO.BatchEnsRequest reqDTO) {
final String sndngProcessSttus2 = ApiConstants.SndngProcessStatus.SENDING1.getCode(); final String sndngProcessSttus2 = ApiConstants.SndngProcessStatus.SENDING1.getCode();
final String sndngProcessSttus3 = ApiConstants.SndngProcessStatus.SENDING2.getCode(); final String sndngProcessSttus3 = ApiConstants.SndngProcessStatus.SENDING2.getCode();
final List<EnsDTO.SndngMssageParam> list = mapper.selectMakeTgts(sndngProcessSttus); final List<EnsDTO.SndngMssageParam> list = mapper.selectMakeTgts(reqDTO);
final List<EnsDTO.SndngMssageParam> list2 = mapper.selectMakeTgts(sndngProcessSttus2); final List<EnsDTO.SndngMssageParam> list2 = mapper.selectMakeTgts(sndngProcessSttus2);
for (EnsDTO.SndngMssageParam dto : list) { for (EnsDTO.SndngMssageParam dto : list) {
MDC.put(UNITY_SNDNG_MST_ID, dto.getUnitySndngMastrId()); MDC.put(UNITY_SNDNG_MST_ID, dto.getUnitySndngMastrId());
MDC.put(SNDNG_PROCESS_STTUS, "make-fail1"); MDC.put(SNDNG_PROCESS_STTUS, "make-fail1");
dto.setSndngProcessSttus(sndngProcessSttus); dto.setSndngProcessSttus(reqDTO.getSndngProcessSttus());
dto.setNewSndngProcessSttus(ApiConstants.SndngProcessStatus.MAKE_OK.getCode()); dto.setNewSndngProcessSttus(ApiConstants.SndngProcessStatus.MAKE_OK.getCode());
//FIXME: try1,try2,tr3이 있는 경우 try1 이전에 try2,3이 실행될 수 있는 경우??? //FIXME: try1,try2,tr3이 있는 경우 try1 이전에 try2,3이 실행될 수 있는 경우???
dto.setTrySeq(1); dto.setTrySeq(1);
@ -395,11 +396,13 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
*/ */
@Override @Override
@Transactional @Transactional
public void sendBulks(final String sndngProcessSttus) { public void sendBulks(final EnsDTO.BatchEnsRequest reqDTO) {
// 발송/통합발송 마스터에서 대상 조회 // 발송/통합발송 마스터에서 대상 조회
final List<EnsDTO.SndngMssageParam> tgtList = mapper.selectSendBulkTgts(sndngProcessSttus); final List<EnsDTO.SndngMssageParam> tgtList = mapper.selectSendBulkTgts(reqDTO);
for (EnsDTO.SndngMssageParam tgtDTO : tgtList) { for (EnsDTO.SndngMssageParam tgtDTO : tgtList) {
tgtDTO.setSignguCode(reqDTO.getSignguCode());
tgtDTO.setFfnlgCode(reqDTO.getFfnlgCode());
MDC.put(UNITY_SNDNG_MST_ID, tgtDTO.getUnitySndngMastrId()); MDC.put(UNITY_SNDNG_MST_ID, tgtDTO.getUnitySndngMastrId());
MDC.put("sndngMastrId", tgtDTO.getSndngMastrId()); MDC.put("sndngMastrId", tgtDTO.getSndngMastrId());
MDC.put(SNDNG_PROCESS_STTUS, "send-fail" + tgtDTO.getTrySeq()); MDC.put(SNDNG_PROCESS_STTUS, "send-fail" + tgtDTO.getTrySeq());
@ -408,7 +411,7 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
Checks.checkVal(tgtDTO.getTry2(), ""), Checks.checkVal(tgtDTO.getTry3(), "")}; Checks.checkVal(tgtDTO.getTry2(), ""), Checks.checkVal(tgtDTO.getTry3(), "")};
// 마스터 상태 변경값을 파라메터에서 받은 상태값으로 set // 마스터 상태 변경값을 파라메터에서 받은 상태값으로 set
tgtDTO.setNewSndngProcessSttus(sndngProcessSttus); tgtDTO.setNewSndngProcessSttus(reqDTO.getSndngProcessSttus());
// 업무 문서 구분에 따른 분기 // 업무 문서 구분에 따른 분기
switch (tryVal[tgtDTO.getTrySeq() - 1]) { switch (tryVal[tgtDTO.getTrySeq() - 1]) {
@ -468,7 +471,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
JsonUtils.toJson(BulkSendRequests.builder() JsonUtils.toJson(BulkSendRequests.builder()
.documents(bulkSendList) .documents(bulkSendList)
.build()), .build()),
BulkSendResponses.class)) BulkSendResponses.class,
CmmKakaoUtils.getRlaybsnmInfo(tgtDTO.getSignguCode(), tgtDTO.getFfnlgCode())))
) )
.collect(Collectors.toList()); .collect(Collectors.toList());
@ -852,10 +856,10 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
*/ */
@Override @Override
@Transactional @Transactional
public void findKkoMyDocStatusBulks(final String sndngProcessSttus) { public void findKkoMyDocStatusBulks(final EnsDTO.BatchEnsRequest reqDTO) {
final String url = apiHost + apiBulkStatus;; final String url = apiHost + apiBulkStatus;;
final List<String> docsBinderUuids = mapper.selectKakaoStatusTgts(sndngProcessSttus); final List<String> docsBinderUuids = mapper.selectKakaoStatusTgts(reqDTO.getSndngProcessSttus());
List<List<String>> partitions = ListUtils.partition(docsBinderUuids, bulkMaxCnt); List<List<String>> partitions = ListUtils.partition(docsBinderUuids, bulkMaxCnt);
List<ApiResponseDTO<KkopayDocBulkDTO.BulkStatusResponses>> apiResults = partitions.stream() List<ApiResponseDTO<KkopayDocBulkDTO.BulkStatusResponses>> apiResults = partitions.stream()
@ -867,7 +871,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
JsonUtils.toJson(BulkStatusRequests.builder() JsonUtils.toJson(BulkStatusRequests.builder()
.document_binder_uuids(uuids) .document_binder_uuids(uuids)
.build()), .build()),
BulkStatusResponses.class)) BulkStatusResponses.class,
CmmKakaoUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode())))
).collect(Collectors.toList()); ).collect(Collectors.toList());
@ -905,14 +910,14 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
*/ */
@Override @Override
@Transactional @Transactional
public void close(final String sndngProcessSttus) { public void close(final EnsDTO.BatchEnsRequest reqDTO) {
final List<String> list = mapper.selectCloseTgts(sndngProcessSttus); final List<String> list = mapper.selectCloseTgts(reqDTO.getSndngProcessSttus());
// 연계발송 마스터(tb_cntc_sndng_mastr) 상태 변경 : send-ok -> close // 연계발송 마스터(tb_cntc_sndng_mastr) 상태 변경 : send-ok -> close
for (String id : list) { for (String id : list) {
EnsDTO.SndngMssageParam paramDTO = EnsDTO.SndngMssageParam.builder() EnsDTO.SndngMssageParam paramDTO = EnsDTO.SndngMssageParam.builder()
.unitySndngMastrId(id) .unitySndngMastrId(id)
.sndngProcessSttus(sndngProcessSttus) .sndngProcessSttus(reqDTO.getSndngProcessSttus())
.newSndngProcessSttus(ApiConstants.SndngProcessStatus.CLOSE.getCode()) .newSndngProcessSttus(ApiConstants.SndngProcessStatus.CLOSE.getCode())
.build(); .build();
@ -958,8 +963,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
* @return * @return
*/ */
@Override @Override
public List<EnsDTO.SendKakaoTgt> findKakaoSendTargets(final String sndngProcessSttus) { public List<EnsDTO.SendKakaoTgt> findKakaoSendTargets(final EnsDTO.BatchEnsRequest reqDTO) {
return mapper.selectKakaoSendTgts(sndngProcessSttus); return mapper.selectKakaoSendTgts(reqDTO);
} }

@ -21,15 +21,15 @@ import kr.xit.biz.ens.model.EnsDTO;
*/ */
public interface IEnsBatchService { public interface IEnsBatchService {
void accept(final String sndngProcessSttus); void accept(final EnsDTO.BatchEnsRequest reqDTO);
void make(final String sndngProcessSttus); void make(final EnsDTO.BatchEnsRequest reqDTO);
void close(final String sndngProcessSttus); void close(final EnsDTO.BatchEnsRequest reqDTO);
void sendBulks(final String sndngProcessSttus); void sendBulks(final EnsDTO.BatchEnsRequest reqDTO);
void findKkoMyDocStatusBulks(final String sndngProcessSttus); void findKkoMyDocStatusBulks(final EnsDTO.BatchEnsRequest reqDTO);
List<EnsDTO.SendKakaoTgt> findKakaoSendTargets(final String sndngProcessSttus); List<EnsDTO.SendKakaoTgt> findKakaoSendTargets(final EnsDTO.BatchEnsRequest reqDTO);
void updateErrorLog(EnsDTO.SndngMssageParam dto); void updateErrorLog(EnsDTO.SndngMssageParam dto);
} }

@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests;
import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest;
@ -98,11 +99,13 @@ public class ApiCallTestController {
.append("http://localhost:8081") .append("http://localhost:8081")
.append("/api/ens/kakao/v1/documents"); .append("/api/ens/kakao/v1/documents");
return return apiWebClient.exchangeKko(
apiWebClient.exchangeKko(url.toString(), url.toString(),
HttpMethod.POST, HttpMethod.POST,
JsonUtils.toJson(reqDTO), JsonUtils.toJson(reqDTO),
ApiResponseDTO.class); ApiResponseDTO.class,
getRlaybsnmDTO()
);
} }
@ -154,10 +157,12 @@ public class ApiCallTestController {
final String url = apiHost + apiBulkSend; final String url = apiHost + apiBulkSend;
return apiWebClient.exchangeKko( return apiWebClient.exchangeKko(
url, url,
HttpMethod.POST, HttpMethod.POST,
JsonUtils.toJson(reqDTO), JsonUtils.toJson(reqDTO),
ApiResponseDTO.class); ApiResponseDTO.class,
getRlaybsnmDTO()
);
} }
@ -191,6 +196,15 @@ public class ApiCallTestController {
url, url,
HttpMethod.POST, HttpMethod.POST,
JsonUtils.toJson(reqDTO), JsonUtils.toJson(reqDTO),
ApiResponseDTO.class); ApiResponseDTO.class,
getRlaybsnmDTO()
);
}
private CmmEnsRlaybsnmDTO getRlaybsnmDTO(){
return CmmEnsRlaybsnmDTO.builder()
.kakaoClientId("")
.kakaoContractUuid("")
.build();
} }
} }

@ -2,6 +2,7 @@ package kr.xit.biz.ens.web;
import java.util.Map; import java.util.Map;
import kr.xit.biz.ens.model.EnsDTO;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -39,61 +40,96 @@ public class EnsBatchController {
@Operation(summary = "통합문서 접수", description = "통합문서 접수") @Operation(summary = "통합문서 접수", description = "통합문서 접수")
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = { @Content(mediaType = "application/json", examples = {
@ExampleObject(value = "{\"sndngProcessSttus\":\"accept\"}") @ExampleObject(value = """
}) {
"signguCode": "88328",
"ffnlgCode": "11",
"sndngProcessSttus": "accept"
}
"""
)
})
}) })
@PostMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> accept(@RequestBody final Map<String, String> map) { public ApiResponseDTO<?> accept(@RequestBody final EnsDTO.BatchEnsRequest reqDTO) {
service.accept(map.get(SNDNG_PROCESS_STTUS)); service.accept(reqDTO);
return ApiResponseDTO.success(); return ApiResponseDTO.success();
} }
@Operation(summary = "통합문서 발송 데이타 생성", description = "통합문서 발송데이타 생성") @Operation(summary = "통합문서 발송 데이타 생성", description = "통합문서 발송데이타 생성")
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = { @Content(mediaType = "application/json", examples = {
@ExampleObject(value = "{\"sndngProcessSttus\":\"accept-ok\"}") @ExampleObject(value = """
{
"signguCode": "88328",
"ffnlgCode": "11",
"sndngProcessSttus": "accept-ok"
}
"""
)
}) })
}) })
@PostMapping(value = "/make", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/make", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> make(@RequestBody final Map<String, String> map){ public ApiResponseDTO<?> make(@RequestBody final EnsDTO.BatchEnsRequest reqDTO){
service.make(map.get(SNDNG_PROCESS_STTUS)); service.make(reqDTO);
return ApiResponseDTO.success(); return ApiResponseDTO.success();
} }
@Operation(summary = "통합문서 발송 데이타 종료", description = "통합문서 발송 데이타 종료") @Operation(summary = "통합문서 발송 데이타 종료", description = "통합문서 발송 데이타 종료")
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = { @Content(mediaType = "application/json", examples = {
@ExampleObject(value = "{\"sndngProcessSttus\":\"send-ok\"}") @ExampleObject(value = """
{
"signguCode": "88328",
"ffnlgCode": "11",
"sndngProcessSttus": "send-ok"
}
"""
)
}) })
}) })
@PostMapping(value = "/close", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/close", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> close(@RequestBody final Map<String, String> map){ public ApiResponseDTO<?> close(@RequestBody final EnsDTO.BatchEnsRequest reqDTO){
service.close(map.get(SNDNG_PROCESS_STTUS)); service.close(reqDTO);
return ApiResponseDTO.success(); return ApiResponseDTO.success();
} }
@Operation(summary = "통합문서(bulk) 발송 요청", description = "통합문서 발송 요청") @Operation(summary = "통합문서(bulk) 발송 요청", description = "통합문서 발송 요청")
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = { @Content(mediaType = "application/json", examples = {
@ExampleObject(value = "{\"sndngProcessSttus\":\"make-ok\"}") @ExampleObject(value = """
{
"signguCode": "88328",
"ffnlgCode": "11",
sndngProcessSttus": "make-ok"
}
"""
)
}) })
}) })
@PostMapping(value = "/sendBulks", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/sendBulks", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> sendBulks(@RequestBody final Map<String, String> map){ public ApiResponseDTO<?> sendBulks(@RequestBody final EnsDTO.BatchEnsRequest reqDTO){
service.sendBulks(map.get(SNDNG_PROCESS_STTUS)); service.sendBulks(reqDTO);
return ApiResponseDTO.success(); return ApiResponseDTO.success();
} }
@Operation(summary = "통합문서(bulk) 상태 조회", description = "통합문서 상태 조회") @Operation(summary = "통합문서(bulk) 상태 조회", description = "통합문서 상태 조회")
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = { @Content(mediaType = "application/json", examples = {
@ExampleObject(value = "{\"sndngProcessSttus\":\"send-ok\"}") @ExampleObject(value = """
{
"signguCode": "88328",
"ffnlgCode": "11",
"sndngProcessSttus": "send-ok"
}
"""
)
}) })
}) })
@PostMapping(value = "/findStatusBulks", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/findStatusBulks", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> findStatusBulks(@RequestBody final Map<String, String> map){ public ApiResponseDTO<?> findStatusBulks(@RequestBody final EnsDTO.BatchEnsRequest reqDTO){
service.findKkoMyDocStatusBulks(map.get(SNDNG_PROCESS_STTUS)); service.findKkoMyDocStatusBulks(reqDTO);
return ApiResponseDTO.success(); return ApiResponseDTO.success();
} }
@ -101,11 +137,18 @@ public class EnsBatchController {
@Operation(summary = "통합 문서발송 목록 조회", description = "통합 문서발송 목록 조회") @Operation(summary = "통합 문서발송 목록 조회", description = "통합 문서발송 목록 조회")
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = { @Content(mediaType = "application/json", examples = {
@ExampleObject(value = "{\"sndngProcessSttus\":\"make-ok\"}") @ExampleObject(value = """
{
"signguCode": "88328",
"ffnlgCode": "11",
"sndngProcessSttus": "make-ok"
}
"""
)
}) })
}) })
@PostMapping(value = "/findKakaoSendTargets", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/findKakaoSendTargets", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> findkakaoSendTargets(@RequestBody final Map<String, String> map){ public ApiResponseDTO<?> findkakaoSendTargets(@RequestBody final EnsDTO.BatchEnsRequest reqDTO){
return ApiResponseDTO.success(service.findKakaoSendTargets(map.get(SNDNG_PROCESS_STTUS))); return ApiResponseDTO.success(service.findKakaoSendTargets(reqDTO));
} }
} }

@ -0,0 +1,62 @@
<?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.cmm.mapper.ICmmEnsCacheMapper">
<select id="selectNiceCiInfo" resultType="kr.xit.biz.ens.model.nice.NiceCiDTO$NiceCiInfo">
/** ens-cmm-cache-mysql-mapper|selectNiceCiInfo-Nice인증정보조회|julim */
SELECT signgu_code, /* 시군구코드 */
ffnlg_code, /* 과태료코드 */
client_id, /* nice client id */
client_secret, /* app security code */
product_id, /* 상품 코드 */
access_token, /* access token */
expires_in, /* access token 만료일시(초)*/
token_type, /* token type */
scope, /* token scope */
site_code, /* 공개키 사이트 코드 */
key_version, /* 공개키 버전 */
public_key, /* 공개키 */
DATE_ADD(valid_dtim, INTERVAL -1 HOUR) AS validDtim, /* 공개키 만료일시 */
cur_symkey_version, /* 현재 대칭키 버전 */
DATE_ADD(cur_symkey_valid_dtim, INTERVAL -1 HOUR) AS curSymkeyValidDtim, /* 현재 대칭키 만료일시 */
cur_symkey_key, /* 현재 대칭키 - key */
cur_symkey_iv, /* 현재 대칭키 - iv */
cur_symkey_hmac_key, /* 현재 대칭키 - hmac_key */
bef_symkey_version, /* 이전 대칭키 버전 */
bef_symkey_valid_dtim, /* 이전 대칭키 만료일시 */
bef_symkey_key, /* 이전 대칭키 - key */
bef_symkey_iv, /* 이전 대칭키 - iv */
bef_symkey_hmac_key /* 이전 대칭키 - hmac_key */
FROM tb_cmm_nice_instn_crtf_info
WHERE signgu_code = #{signguCode}
AND ffnlg_code = #{ffnlgCode}
</select>
<select id="selectEnsRlaybsnmInfo" resultType="kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO">
/** ens-cmm-cache-mysql-mapper|selectEnsRlaybsnmInfo-중계사업관리자정보조회|julim */
SELECT signgu_code, /* 시군구코드 */
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_client_id, /* KT client id */
kt_client_secret, /* KT client secret */
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 토큰 식별자 */
pplus_api_key, /* postplus api key */
sender_nm, /* 발송인 명 */
sender_zip_no, /* 발송인 우편 번호 */
sender_addr, /* 발송인 주소 */
sender_detail_addr /* 발송인 상세 주소 */
FROM tb_ens_rlaybsnm_manage
WHERE signgu_code = #{signguCode}
AND ffnlg_code = #{ffnlgCode}
</select>
</mapper>

@ -119,8 +119,8 @@ public class ApiConstants {
*/ */
public enum SndngProcessStatus { public enum SndngProcessStatus {
ACCEPT("accept"), ACCEPT("accept"),
ACCETP_OK("accept-ok"), ACCEPT_OK("accept-ok"),
ACCETP_FAIL("accept-fail"), ACCEPT_FAIL("accept-fail"),
MAKE_OK("make-ok"), MAKE_OK("make-ok"),
MAKE_FAIL1("make-fail1"), MAKE_FAIL1("make-fail1"),
MAKE_FAIL2("make-fail2"), MAKE_FAIL2("make-fail2"),

@ -6,7 +6,7 @@ import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.spring.annotation.Secured; import kr.xit.core.spring.annotation.Secured;
import kr.xit.core.spring.annotation.SecurityPolicy; import kr.xit.core.spring.annotation.SecurityPolicy;
import kr.xit.core.spring.config.auth.util.HeaderUtil; import kr.xit.core.spring.config.auth.util.HeaderUtil;
import kr.xit.core.spring.util.SpringUtils; import kr.xit.core.spring.util.CoreSpringUtils;
import kr.xit.core.support.utils.Checks; import kr.xit.core.support.utils.Checks;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.method.HandlerMethod; import org.springframework.web.method.HandlerMethod;
@ -77,7 +77,7 @@ public class AuthentificationInterceptor implements AsyncHandlerInterceptor {//A
// Spring Security 미사용 // Spring Security 미사용
tokenString = HeaderUtil.extractAccessToken(tokenString); tokenString = HeaderUtil.extractAccessToken(tokenString);
if(SpringUtils.getJwtVerification().isVerification(tokenString)){ if(CoreSpringUtils.getJwtVerification().isVerification(tokenString)){
throw BizRuntimeException.create(ErrorCode.INVALID_AUTH_TOKEN); throw BizRuntimeException.create(ErrorCode.INVALID_AUTH_TOKEN);
}; };
return true; return true;

@ -11,7 +11,7 @@ import kr.xit.core.consts.Constants;
import kr.xit.core.consts.ErrorCode; import kr.xit.core.consts.ErrorCode;
import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.exception.BizRuntimeException;
//import kr.xit.core.spring.config.auth.jwt.JwtTokenProvider; //import kr.xit.core.spring.config.auth.jwt.JwtTokenProvider;
import kr.xit.core.spring.util.SpringUtils; import kr.xit.core.spring.util.CoreSpringUtils;
import kr.xit.core.support.utils.Checks; import kr.xit.core.support.utils.Checks;
/** /**
@ -78,7 +78,7 @@ public class HeaderUtil {
if(Checks.isEmpty(accessToken)) throw BizRuntimeException.create(ErrorCode.AUTH_HEADER_NOT_EXISTS); if(Checks.isEmpty(accessToken)) throw BizRuntimeException.create(ErrorCode.AUTH_HEADER_NOT_EXISTS);
try { try {
String username = SpringUtils.getEgovJwtTokenUtil().getUsernameFromToken(accessToken); String username = CoreSpringUtils.getEgovJwtTokenUtil().getUsernameFromToken(accessToken);
return username; return username;
}catch (Exception e){ }catch (Exception e){
throw BizRuntimeException.create(ErrorCode.INVALID_TOKEN); throw BizRuntimeException.create(ErrorCode.INVALID_TOKEN);
@ -89,7 +89,7 @@ public class HeaderUtil {
if(Checks.isEmpty(accessToken)) throw BizRuntimeException.create(ErrorCode.AUTH_HEADER_NOT_EXISTS); if(Checks.isEmpty(accessToken)) throw BizRuntimeException.create(ErrorCode.AUTH_HEADER_NOT_EXISTS);
try { try {
return SpringUtils.getEgovJwtTokenUtil().getUsernameFromToken(accessToken); return CoreSpringUtils.getEgovJwtTokenUtil().getUsernameFromToken(accessToken);
}catch (Exception e){ }catch (Exception e){
throw BizRuntimeException.create(ErrorCode.INVALID_TOKEN); throw BizRuntimeException.create(ErrorCode.INVALID_TOKEN);
} }

@ -1,6 +1,6 @@
package kr.xit.core.spring.config.support; package kr.xit.core.spring.config.support;
import lombok.RequiredArgsConstructor; import kr.xit.core.spring.util.CoreSpringUtils;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware; import org.springframework.context.ApplicationContextAware;
@ -22,7 +22,7 @@ import org.springframework.stereotype.Component;
* 2023-04-28 julim * 2023-04-28 julim
* *
* </pre> * </pre>
* @see kr.xit.core.spring.util.SpringUtils * @see CoreSpringUtils
*/ */
@Component @Component
public class ApplicationContextProvider implements ApplicationContextAware { public class ApplicationContextProvider implements ApplicationContextAware {

@ -10,7 +10,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.cfg.CoercionAction; import com.fasterxml.jackson.databind.cfg.CoercionAction;
import com.fasterxml.jackson.databind.cfg.CoercionInputShape; import com.fasterxml.jackson.databind.cfg.CoercionInputShape;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import kr.xit.core.spring.util.SpringUtils; import kr.xit.core.spring.util.CoreSpringUtils;
import kr.xit.core.support.utils.ConvertHelper; import kr.xit.core.support.utils.ConvertHelper;
import kr.xit.core.support.utils.JsonUtils; import kr.xit.core.support.utils.JsonUtils;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@ -33,7 +33,7 @@ import org.springframework.context.annotation.Primary;
* 2023-09-13 julim * 2023-09-13 julim
* *
* </pre> * </pre>
* @see SpringUtils#getObjectMapper() * @see CoreSpringUtils#getObjectMapper()
* @see JsonUtils * @see JsonUtils
* @see ConvertHelper * @see ConvertHelper
* @see WebClientConfig * @see WebClientConfig

@ -3,7 +3,7 @@ package kr.xit.core.support.utils;
import java.io.StringWriter; import java.io.StringWriter;
import java.util.Map; import java.util.Map;
import kr.xit.core.spring.util.SpringUtils; import kr.xit.core.spring.util.CoreSpringUtils;
import lombok.AccessLevel; import lombok.AccessLevel;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -35,7 +35,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PRIVATE) @NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ConvertHelper { public class ConvertHelper {
private static final Logger log = LoggerFactory.getLogger(ConvertHelper.class); private static final Logger log = LoggerFactory.getLogger(ConvertHelper.class);
private static final ObjectMapper OBJECT_MAPPER = SpringUtils.getObjectMapper(); private static final ObjectMapper OBJECT_MAPPER = CoreSpringUtils.getObjectMapper();
private static final JsonFactory JSON_FACTORY = new JsonFactory(); private static final JsonFactory JSON_FACTORY = new JsonFactory();
/** /**

@ -7,7 +7,7 @@ import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.spring.util.SpringUtils; import kr.xit.core.spring.util.CoreSpringUtils;
import lombok.AccessLevel; import lombok.AccessLevel;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -34,7 +34,7 @@ import org.json.simple.JSONObject;
@NoArgsConstructor(access = AccessLevel.PRIVATE) @NoArgsConstructor(access = AccessLevel.PRIVATE)
public class JsonUtils { public class JsonUtils {
private static final ObjectMapper OM = SpringUtils.getObjectMapper(); private static final ObjectMapper OM = CoreSpringUtils.getObjectMapper();
/** /**
* json string * json string

Loading…
Cancel
Save