diff --git a/mens-api/src/main/java/kr/xit/ens/kakao/web/AsyncKkopayEltrcDocController.java b/mens-api/src/main/java/kr/xit/ens/kakao/web/AsyncKkopayEltrcDocController.java index 50b77d0..6fb86ce 100644 --- a/mens-api/src/main/java/kr/xit/ens/kakao/web/AsyncKkopayEltrcDocController.java +++ b/mens-api/src/main/java/kr/xit/ens/kakao/web/AsyncKkopayEltrcDocController.java @@ -52,27 +52,33 @@ public class AsyncKkopayEltrcDocController { */ @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @Content(mediaType = "application/json", examples = { - @ExampleObject(value = "{\"document\": {\n" - + " \"title\": \"문서 제목\",\n" - + " \"read_expired_sec\": 3600,\n" - + " \"hash\": \"6EFE827AC88914DE471C621AE\",\n" - + " \"common_categories\": [\n" - + " \"NOTICE\"\n" - + " ],\n" - + " \"receiver\": {\n" - + " \"phone_number\": \"01093414345\",\n" - + " \"name\": \"김지호\",\n" - + " \"birthday\": \"19831218\",\n" - + " \"is_required_verify_name\": false\n" - + " },\n" - + " \"property\": {\n" - + " \"link\": \"http://ip:8081/api/kakaopay/v1/ott\",\n" - + " \"cs_number\": \"02-123-4567\",\n" - + " \"cs_name\": \"콜센터\",\n" - + " \"payload\": \"payload 파라미터 입니다.\",\n" - + " \"message\": \"해당 안내문은 다음과 같습니다.\"\n" - + " }\n" - + " }}") + @ExampleObject(value = """ + { + "document": { + "title": "문서 제목", + "read_expired_sec": 3600, + "hash": "6EFE827AC88914DE471C621AE", + "common_categories": [ + "NOTICE" + ], + "receiver": { + "phone_number": "01093414345", + "name": "김지호", + "birthday": "19831218", + "is_required_verify_name": false + }, + "property": { + "link": "http://ip:8081/api/kakaopay/v1/ott", + "cs_number": "02-123-4567", + "cs_name": "콜센터", + "payload": "payload 파라미터 입니다.", + "message": "해당 안내문은 다음과 같습니다." + } + }, + "signguCode": "88328", + "ffnlgCode": "11" + } + """) }) }) @Operation(summary = "문서발송 요청", description = "카카오페이 전자문서 서버로 문서발송 처리를 요청") diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngMakeJobScheduler.java b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngMakeJobScheduler.java index cfe7e07..8325736 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngMakeJobScheduler.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/scheduler/SndngMakeJobScheduler.java @@ -14,7 +14,6 @@ import org.springframework.batch.core.launch.JobLauncher; import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException; import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException; import org.springframework.beans.factory.annotation.Value; -import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; /** @@ -51,7 +50,7 @@ public class SndngMakeJobScheduler { Map confMap = new HashMap<>(); confMap.put("startDate", new JobParameter(new Date())); 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); try { diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngAcceptTasklet.java b/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngAcceptTasklet.java index 4b1faa7..1c39006 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngAcceptTasklet.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngAcceptTasklet.java @@ -1,6 +1,7 @@ package kr.xit.batch.ens.task; import kr.xit.batch.ens.task.cmm.TaskCmmUtils; +import kr.xit.biz.ens.model.EnsDTO; import kr.xit.biz.ens.service.IEnsBatchService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -33,11 +34,16 @@ public class SndngAcceptTasklet implements Tasklet { @Override @JobScope public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) { - String sndngProcessSttus = contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus"); final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled"); 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){ log.error("SndngAcceptTasklet error :: {}", e.getMessage()); diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngCloseTasklet.java b/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngCloseTasklet.java index 14ea1f9..4da547f 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngCloseTasklet.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngCloseTasklet.java @@ -1,6 +1,7 @@ package kr.xit.batch.ens.task; import kr.xit.batch.ens.task.cmm.TaskCmmUtils; +import kr.xit.biz.ens.model.EnsDTO; import kr.xit.biz.ens.service.IEnsBatchService; import lombok.extern.slf4j.Slf4j; import org.springframework.batch.core.ExitStatus; @@ -36,11 +37,16 @@ public class SndngCloseTasklet implements Tasklet { @Override @JobScope public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) { - String sndngProcessSttus = contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus"); final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled"); 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){ log.error("SndngCloseTasklet error :: {}", e.getMessage()); diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngMakeTasklet.java b/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngMakeTasklet.java index 84d2088..cad36d0 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngMakeTasklet.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngMakeTasklet.java @@ -1,6 +1,7 @@ package kr.xit.batch.ens.task; import kr.xit.batch.ens.task.cmm.TaskCmmUtils; +import kr.xit.biz.ens.model.EnsDTO; import kr.xit.biz.ens.service.IEnsBatchService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -33,11 +34,16 @@ public class SndngMakeTasklet implements Tasklet { @Override @JobScope public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) { - String sndngProcessSttus = contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus"); final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled"); 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){ log.error("SndngMakeTasklet error :: {}", e.getMessage()); diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngSendBulksTasklet.java b/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngSendBulksTasklet.java index 291f07a..045eda6 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngSendBulksTasklet.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngSendBulksTasklet.java @@ -2,6 +2,7 @@ package kr.xit.batch.ens.task; import java.util.UUID; import kr.xit.batch.ens.task.cmm.TaskCmmUtils; +import kr.xit.biz.ens.model.EnsDTO; import kr.xit.biz.ens.service.IEnsBatchService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -35,7 +36,6 @@ public class SndngSendBulksTasklet implements Tasklet { @Override @JobScope public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) { - String sndngProcessSttus = contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus"); final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled"); try { @@ -43,7 +43,13 @@ public class SndngSendBulksTasklet implements Tasklet { MDC.put("uri", "/v1/documents/bulk"); 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){ log.error("SndngSendBulksTasklet error :: {}", e.getMessage()); diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngStatusBulksTasklet.java b/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngStatusBulksTasklet.java index 17cdd62..f5c13ab 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngStatusBulksTasklet.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/task/SndngStatusBulksTasklet.java @@ -2,6 +2,7 @@ package kr.xit.batch.ens.task; import java.util.UUID; import kr.xit.batch.ens.task.cmm.TaskCmmUtils; +import kr.xit.biz.ens.model.EnsDTO; import kr.xit.biz.ens.service.IEnsBatchService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -35,7 +36,6 @@ public class SndngStatusBulksTasklet implements Tasklet { @Override @JobScope public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) { - final String sndngProcessSttus = contribution.getStepExecution().getJobParameters().getString("sndngProcessSttus"); final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled"); try { @@ -43,7 +43,13 @@ public class SndngStatusBulksTasklet implements Tasklet { MDC.put("uri", "/v1/documents/bulk/status"); 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){ log.error("SndngStatusBulksTasklet error :: {}", e.getMessage()); diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/web/KkopayEltrcDocBatchController.java b/mens-batch/src/main/java/kr/xit/batch/ens/web/KkopayEltrcDocBatchController.java index 4e97333..94b4c3b 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/web/KkopayEltrcDocBatchController.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/web/KkopayEltrcDocBatchController.java @@ -13,6 +13,7 @@ import kr.xit.batch.ens.job.SndngMakeJobConfig; import kr.xit.batch.ens.job.SndngSnedBulksJobConfig; import kr.xit.batch.ens.job.SndngStatusBulksJobConfig; import kr.xit.biz.common.ApiConstants; +import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO; import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.support.utils.Checks; import lombok.RequiredArgsConstructor; @@ -27,9 +28,7 @@ import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteExcep import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** *
@@ -66,11 +65,13 @@ public class KkopayEltrcDocBatchController {
     private final PniCctvAcceptJobConfg pniCctvAcceptJobConfg;
 
     @Operation(summary = "accept", description = "accept")
-    @GetMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE)
-    public ApiResponseDTO accept() {
+    @PostMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE)
+    public ApiResponseDTO accept(@RequestBody final CmmEnsRequestDTO reqDTO) {
         try {
-            JobExecution jobExecution = jobLauncher.run(acceptJobConfig.sndngAcceptJob(), getJobParameters(
-                ApiConstants.SndngProcessStatus.ACCEPT.getCode()));
+            JobExecution jobExecution = jobLauncher.run(
+                acceptJobConfig.sndngAcceptJob(),
+                getJobParameters(reqDTO, ApiConstants.SndngProcessStatus.ACCEPT.getCode())
+            );
 
             while(jobExecution.isRunning()){
                 log.info("...");
@@ -86,11 +87,14 @@ public class KkopayEltrcDocBatchController {
     }
 
     @Operation(summary = "make", description = "make")
-    @GetMapping(value = "/make", produces = MediaType.APPLICATION_JSON_VALUE)
-    public ApiResponseDTO make() {
+    @PostMapping(value = "/make", produces = MediaType.APPLICATION_JSON_VALUE)
+    public ApiResponseDTO make(@RequestBody final CmmEnsRequestDTO reqDTO) {
 
         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()){
                 log.info("...");
@@ -106,11 +110,14 @@ public class KkopayEltrcDocBatchController {
     }
 
     @Operation(summary = "close", description = "close")
-    @GetMapping(value = "/close", produces = MediaType.APPLICATION_JSON_VALUE)
-    public ApiResponseDTO close() {
+    @PostMapping(value = "/close", produces = MediaType.APPLICATION_JSON_VALUE)
+    public ApiResponseDTO close(@RequestBody final CmmEnsRequestDTO reqDTO) {
 
         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()){
                 log.info("...");
@@ -126,11 +133,14 @@ public class KkopayEltrcDocBatchController {
     }
 
     @Operation(summary = "sendBulks", description = "sendBulks")
-    @GetMapping(value = "/sendBulks", produces = MediaType.APPLICATION_JSON_VALUE)
-    public ApiResponseDTO sendBulks() {
+    @PostMapping(value = "/sendBulks", produces = MediaType.APPLICATION_JSON_VALUE)
+    public ApiResponseDTO sendBulks(@RequestBody final CmmEnsRequestDTO reqDTO) {
 
         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()){
                 log.info("...");
@@ -146,11 +156,14 @@ public class KkopayEltrcDocBatchController {
     }
 
     @Operation(summary = "statusBulks", description = "statusBulks")
-    @GetMapping(value = "/statusBulks", produces = MediaType.APPLICATION_JSON_VALUE)
-    public ApiResponseDTO statusBulks() {
+    @PostMapping(value = "/statusBulks", produces = MediaType.APPLICATION_JSON_VALUE)
+    public ApiResponseDTO statusBulks(@RequestBody final CmmEnsRequestDTO reqDTO) {
 
         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()){
                 log.info("...");
@@ -166,11 +179,14 @@ public class KkopayEltrcDocBatchController {
     }
 
     @Operation(summary = "pniCctvFileService", description = "CCTV 사전알림(서광)")
-    @GetMapping(value = "/pniCctvFileService", produces = MediaType.APPLICATION_JSON_VALUE)
-    public ApiResponseDTO pniCctvFileService() {
+    @PostMapping(value = "/pniCctvFileService", produces = MediaType.APPLICATION_JSON_VALUE)
+    public ApiResponseDTO pniCctvFileService(@RequestBody final CmmEnsRequestDTO reqDTO) {
 
         try {
-            JobExecution jobExecution = jobLauncher.run(pniCctvFileJobConfg.pniCctvFileJob(), getJobParameters(null));
+            JobExecution jobExecution = jobLauncher.run(
+                pniCctvFileJobConfg.pniCctvFileJob(),
+                getJobParameters(reqDTO, null)
+            );
 
             while(jobExecution.isRunning()){
                 log.info("...");
@@ -186,11 +202,14 @@ public class KkopayEltrcDocBatchController {
     }
 
     @Operation(summary = "pniCctvAccept", description = "CCTV 단속 사전알림 accept")
-    @GetMapping(value = "/pniCctvAccept", produces = MediaType.APPLICATION_JSON_VALUE)
-    public ApiResponseDTO pniCctvAccept() {
+    @PostMapping(value = "/pniCctvAccept", produces = MediaType.APPLICATION_JSON_VALUE)
+    public ApiResponseDTO pniCctvAccept(@RequestBody final CmmEnsRequestDTO reqDTO) {
 
         try {
-            JobExecution jobExecution = jobLauncher.run(pniCctvAcceptJobConfg.pniCctvAcceptJob(), getJobParameters(null));
+            JobExecution jobExecution = jobLauncher.run(
+                pniCctvAcceptJobConfg.pniCctvAcceptJob(),
+                getJobParameters(reqDTO, null)
+            );
 
             while(jobExecution.isRunning()){
                 log.info("...");
@@ -205,9 +224,11 @@ public class KkopayEltrcDocBatchController {
         return ApiResponseDTO.success(HttpStatus.OK);
     }
 
-    private JobParameters getJobParameters(final String processStatus){
+    private JobParameters getJobParameters(final CmmEnsRequestDTO reqDTO, final String processStatus){
         Map 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("isSlackEnabled", new JobParameter(isSlackEnabled));
         if(Checks.isNotEmpty(processStatus)) confMap.put("sndngProcessSttus", new JobParameter(processStatus));
diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java b/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java
index a3d9c6b..da1694d 100644
--- a/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java
+++ b/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java
@@ -9,6 +9,7 @@ import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import kr.xit.biz.common.ApiConstants;
+import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
 import kr.xit.core.biz.model.AuditFields;
 import lombok.*;
 import lombok.experimental.SuperBuilder;
@@ -32,6 +33,19 @@ import javax.validation.constraints.Size;
  * 
*/ 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 @@ -39,6 +53,8 @@ public class EnsDTO { @AllArgsConstructor @SuperBuilder public static class SndngMssageParam implements Serializable { + private String signguCode; + private String ffnlgCode; /** * 통합 발송 마스터 id diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java index 2ae6160..6e4a60a 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java @@ -6,6 +6,7 @@ import java.util.stream.Collectors; import egovframework.com.cmm.util.EgovDateUtil; import egovframework.com.cmm.util.EgovStringUtil; +import kr.xit.biz.cmm.util.CmmKakaoUtils; import kr.xit.biz.common.ApiConstants; import kr.xit.biz.ens.model.EnsDTO.SendKakaoTgt; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.Receiver; @@ -101,8 +102,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc */ @Override @Transactional - public void accept(final String sndngProcessSttus) { - final List list = mapper.selectAcceptTgts(sndngProcessSttus); + public void accept(final EnsDTO.BatchEnsRequest reqDTO) { + final List list = mapper.selectAcceptTgts(reqDTO); String sndngDt = null; for (EnsDTO.SndngMssageParam dto : list) { @@ -137,8 +138,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc } } - dto.setSndngProcessSttus(sndngProcessSttus); - dto.setNewSndngProcessSttus(ApiConstants.SndngProcessStatus.ACCETP_OK.getCode()); + dto.setSndngProcessSttus(reqDTO.getSndngProcessSttus()); + dto.setNewSndngProcessSttus(ApiConstants.SndngProcessStatus.ACCEPT_OK.getCode()); if (mapper.insertUnitySndngMst(dto) != 1) { throw BizRuntimeException.create("접수 데이타 생성(마스터) 실패"); } @@ -278,17 +279,17 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc */ @Override @Transactional - public void make(final String sndngProcessSttus) { + public void make(final EnsDTO.BatchEnsRequest reqDTO) { final String sndngProcessSttus2 = ApiConstants.SndngProcessStatus.SENDING1.getCode(); final String sndngProcessSttus3 = ApiConstants.SndngProcessStatus.SENDING2.getCode(); - final List list = mapper.selectMakeTgts(sndngProcessSttus); + final List list = mapper.selectMakeTgts(reqDTO); final List list2 = mapper.selectMakeTgts(sndngProcessSttus2); for (EnsDTO.SndngMssageParam dto : list) { MDC.put(UNITY_SNDNG_MST_ID, dto.getUnitySndngMastrId()); MDC.put(SNDNG_PROCESS_STTUS, "make-fail1"); - dto.setSndngProcessSttus(sndngProcessSttus); + dto.setSndngProcessSttus(reqDTO.getSndngProcessSttus()); dto.setNewSndngProcessSttus(ApiConstants.SndngProcessStatus.MAKE_OK.getCode()); //FIXME: try1,try2,tr3이 있는 경우 try1 이전에 try2,3이 실행될 수 있는 경우??? dto.setTrySeq(1); @@ -395,11 +396,13 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc */ @Override @Transactional - public void sendBulks(final String sndngProcessSttus) { + public void sendBulks(final EnsDTO.BatchEnsRequest reqDTO) { // 발송/통합발송 마스터에서 대상 조회 - final List tgtList = mapper.selectSendBulkTgts(sndngProcessSttus); + final List tgtList = mapper.selectSendBulkTgts(reqDTO); for (EnsDTO.SndngMssageParam tgtDTO : tgtList) { + tgtDTO.setSignguCode(reqDTO.getSignguCode()); + tgtDTO.setFfnlgCode(reqDTO.getFfnlgCode()); MDC.put(UNITY_SNDNG_MST_ID, tgtDTO.getUnitySndngMastrId()); MDC.put("sndngMastrId", tgtDTO.getSndngMastrId()); 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(), "")}; // 마스터 상태 변경값을 파라메터에서 받은 상태값으로 set - tgtDTO.setNewSndngProcessSttus(sndngProcessSttus); + tgtDTO.setNewSndngProcessSttus(reqDTO.getSndngProcessSttus()); // 업무 문서 구분에 따른 분기 switch (tryVal[tgtDTO.getTrySeq() - 1]) { @@ -468,7 +471,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc JsonUtils.toJson(BulkSendRequests.builder() .documents(bulkSendList) .build()), - BulkSendResponses.class)) + BulkSendResponses.class, + CmmKakaoUtils.getRlaybsnmInfo(tgtDTO.getSignguCode(), tgtDTO.getFfnlgCode()))) ) .collect(Collectors.toList()); @@ -852,10 +856,10 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc */ @Override @Transactional - public void findKkoMyDocStatusBulks(final String sndngProcessSttus) { + public void findKkoMyDocStatusBulks(final EnsDTO.BatchEnsRequest reqDTO) { final String url = apiHost + apiBulkStatus;; - final List docsBinderUuids = mapper.selectKakaoStatusTgts(sndngProcessSttus); + final List docsBinderUuids = mapper.selectKakaoStatusTgts(reqDTO.getSndngProcessSttus()); List> partitions = ListUtils.partition(docsBinderUuids, bulkMaxCnt); List> apiResults = partitions.stream() @@ -867,7 +871,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc JsonUtils.toJson(BulkStatusRequests.builder() .document_binder_uuids(uuids) .build()), - BulkStatusResponses.class)) + BulkStatusResponses.class, + CmmKakaoUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()))) ).collect(Collectors.toList()); @@ -905,14 +910,14 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc */ @Override @Transactional - public void close(final String sndngProcessSttus) { - final List list = mapper.selectCloseTgts(sndngProcessSttus); + public void close(final EnsDTO.BatchEnsRequest reqDTO) { + final List list = mapper.selectCloseTgts(reqDTO.getSndngProcessSttus()); // 연계발송 마스터(tb_cntc_sndng_mastr) 상태 변경 : send-ok -> close for (String id : list) { EnsDTO.SndngMssageParam paramDTO = EnsDTO.SndngMssageParam.builder() .unitySndngMastrId(id) - .sndngProcessSttus(sndngProcessSttus) + .sndngProcessSttus(reqDTO.getSndngProcessSttus()) .newSndngProcessSttus(ApiConstants.SndngProcessStatus.CLOSE.getCode()) .build(); @@ -958,8 +963,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc * @return */ @Override - public List findKakaoSendTargets(final String sndngProcessSttus) { - return mapper.selectKakaoSendTgts(sndngProcessSttus); + public List findKakaoSendTargets(final EnsDTO.BatchEnsRequest reqDTO) { + return mapper.selectKakaoSendTgts(reqDTO); } diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/IEnsBatchService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/IEnsBatchService.java index 49043d5..7ff6e30 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/service/IEnsBatchService.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/IEnsBatchService.java @@ -21,15 +21,15 @@ import kr.xit.biz.ens.model.EnsDTO; */ public interface IEnsBatchService { - void accept(final String sndngProcessSttus); - void make(final String sndngProcessSttus); - void close(final String sndngProcessSttus); + void accept(final EnsDTO.BatchEnsRequest reqDTO); + void make(final EnsDTO.BatchEnsRequest reqDTO); + 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 findKakaoSendTargets(final String sndngProcessSttus); + List findKakaoSendTargets(final EnsDTO.BatchEnsRequest reqDTO); void updateErrorLog(EnsDTO.SndngMssageParam dto); } diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/web/ApiCallTestController.java b/mens-batch/src/main/java/kr/xit/biz/ens/web/ApiCallTestController.java index 63f5599..9ec995a 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/web/ApiCallTestController.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/web/ApiCallTestController.java @@ -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.ExampleObject; 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.BulkStatusRequests; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.SendRequest; @@ -98,11 +99,13 @@ public class ApiCallTestController { .append("http://localhost:8081") .append("/api/ens/kakao/v1/documents"); - return - apiWebClient.exchangeKko(url.toString(), - HttpMethod.POST, - JsonUtils.toJson(reqDTO), - ApiResponseDTO.class); + return apiWebClient.exchangeKko( + url.toString(), + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + ApiResponseDTO.class, + getRlaybsnmDTO() + ); } @@ -154,10 +157,12 @@ public class ApiCallTestController { final String url = apiHost + apiBulkSend; return apiWebClient.exchangeKko( - url, - HttpMethod.POST, - JsonUtils.toJson(reqDTO), - ApiResponseDTO.class); + url, + HttpMethod.POST, + JsonUtils.toJson(reqDTO), + ApiResponseDTO.class, + getRlaybsnmDTO() + ); } @@ -191,6 +196,15 @@ public class ApiCallTestController { url, HttpMethod.POST, JsonUtils.toJson(reqDTO), - ApiResponseDTO.class); + ApiResponseDTO.class, + getRlaybsnmDTO() + ); + } + + private CmmEnsRlaybsnmDTO getRlaybsnmDTO(){ + return CmmEnsRlaybsnmDTO.builder() + .kakaoClientId("") + .kakaoContractUuid("") + .build(); } } diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/web/EnsBatchController.java b/mens-batch/src/main/java/kr/xit/biz/ens/web/EnsBatchController.java index dd0131b..6a9972b 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/web/EnsBatchController.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/web/EnsBatchController.java @@ -2,6 +2,7 @@ package kr.xit.biz.ens.web; import java.util.Map; +import kr.xit.biz.ens.model.EnsDTO; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.*; @@ -39,61 +40,96 @@ public class EnsBatchController { @Operation(summary = "통합문서 접수", description = "통합문서 접수") @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { - @Content(mediaType = "application/json", examples = { - @ExampleObject(value = "{\"sndngProcessSttus\":\"accept\"}") - }) + @Content(mediaType = "application/json", examples = { + @ExampleObject(value = """ + { + "signguCode": "88328", + "ffnlgCode": "11", + "sndngProcessSttus": "accept" + } + """ + ) + }) }) @PostMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE) - public ApiResponseDTO accept(@RequestBody final Map map) { - service.accept(map.get(SNDNG_PROCESS_STTUS)); + public ApiResponseDTO accept(@RequestBody final EnsDTO.BatchEnsRequest reqDTO) { + service.accept(reqDTO); return ApiResponseDTO.success(); } @Operation(summary = "통합문서 발송 데이타 생성", description = "통합문서 발송데이타 생성") @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @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) - public ApiResponseDTO make(@RequestBody final Map map){ - service.make(map.get(SNDNG_PROCESS_STTUS)); + public ApiResponseDTO make(@RequestBody final EnsDTO.BatchEnsRequest reqDTO){ + service.make(reqDTO); return ApiResponseDTO.success(); } @Operation(summary = "통합문서 발송 데이타 종료", description = "통합문서 발송 데이타 종료") @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @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) - public ApiResponseDTO close(@RequestBody final Map map){ - service.close(map.get(SNDNG_PROCESS_STTUS)); + public ApiResponseDTO close(@RequestBody final EnsDTO.BatchEnsRequest reqDTO){ + service.close(reqDTO); return ApiResponseDTO.success(); } @Operation(summary = "통합문서(bulk) 발송 요청", description = "통합문서 발송 요청") @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @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) - public ApiResponseDTO sendBulks(@RequestBody final Map map){ - service.sendBulks(map.get(SNDNG_PROCESS_STTUS)); + public ApiResponseDTO sendBulks(@RequestBody final EnsDTO.BatchEnsRequest reqDTO){ + service.sendBulks(reqDTO); return ApiResponseDTO.success(); } @Operation(summary = "통합문서(bulk) 상태 조회", description = "통합문서 상태 조회") @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @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) - public ApiResponseDTO findStatusBulks(@RequestBody final Map map){ - service.findKkoMyDocStatusBulks(map.get(SNDNG_PROCESS_STTUS)); + public ApiResponseDTO findStatusBulks(@RequestBody final EnsDTO.BatchEnsRequest reqDTO){ + service.findKkoMyDocStatusBulks(reqDTO); return ApiResponseDTO.success(); } @@ -101,11 +137,18 @@ public class EnsBatchController { @Operation(summary = "통합 문서발송 목록 조회", description = "통합 문서발송 목록 조회") @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { @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) - public ApiResponseDTO findkakaoSendTargets(@RequestBody final Map map){ - return ApiResponseDTO.success(service.findKakaoSendTargets(map.get(SNDNG_PROCESS_STTUS))); + public ApiResponseDTO findkakaoSendTargets(@RequestBody final EnsDTO.BatchEnsRequest reqDTO){ + return ApiResponseDTO.success(service.findKakaoSendTargets(reqDTO)); } } diff --git a/mens-batch/src/main/resources/egovframework/mapper/biz/ens-cmm-cache-mysql-mapper.xml b/mens-batch/src/main/resources/egovframework/mapper/biz/ens-cmm-cache-mysql-mapper.xml new file mode 100644 index 0000000..0c0791e --- /dev/null +++ b/mens-batch/src/main/resources/egovframework/mapper/biz/ens-cmm-cache-mysql-mapper.xml @@ -0,0 +1,62 @@ + + + + + + + + + diff --git a/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java b/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java index 95fc218..47fe69e 100644 --- a/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java +++ b/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java @@ -119,8 +119,8 @@ public class ApiConstants { */ public enum SndngProcessStatus { ACCEPT("accept"), - ACCETP_OK("accept-ok"), - ACCETP_FAIL("accept-fail"), + ACCEPT_OK("accept-ok"), + ACCEPT_FAIL("accept-fail"), MAKE_OK("make-ok"), MAKE_FAIL1("make-fail1"), MAKE_FAIL2("make-fail2"), diff --git a/mens-core/src/main/java/kr/xit/core/spring/config/auth/AuthentificationInterceptor.java b/mens-core/src/main/java/kr/xit/core/spring/config/auth/AuthentificationInterceptor.java index 8a78651..ab9812b 100644 --- a/mens-core/src/main/java/kr/xit/core/spring/config/auth/AuthentificationInterceptor.java +++ b/mens-core/src/main/java/kr/xit/core/spring/config/auth/AuthentificationInterceptor.java @@ -6,7 +6,7 @@ import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.spring.annotation.Secured; import kr.xit.core.spring.annotation.SecurityPolicy; 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 lombok.extern.slf4j.Slf4j; import org.springframework.web.method.HandlerMethod; @@ -77,7 +77,7 @@ public class AuthentificationInterceptor implements AsyncHandlerInterceptor {//A // Spring Security 미사용 tokenString = HeaderUtil.extractAccessToken(tokenString); - if(SpringUtils.getJwtVerification().isVerification(tokenString)){ + if(CoreSpringUtils.getJwtVerification().isVerification(tokenString)){ throw BizRuntimeException.create(ErrorCode.INVALID_AUTH_TOKEN); }; return true; diff --git a/mens-core/src/main/java/kr/xit/core/spring/config/auth/util/HeaderUtil.java b/mens-core/src/main/java/kr/xit/core/spring/config/auth/util/HeaderUtil.java index 5c9abf5..7d9578d 100644 --- a/mens-core/src/main/java/kr/xit/core/spring/config/auth/util/HeaderUtil.java +++ b/mens-core/src/main/java/kr/xit/core/spring/config/auth/util/HeaderUtil.java @@ -11,7 +11,7 @@ import kr.xit.core.consts.Constants; import kr.xit.core.consts.ErrorCode; import kr.xit.core.exception.BizRuntimeException; //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; /** @@ -78,7 +78,7 @@ public class HeaderUtil { if(Checks.isEmpty(accessToken)) throw BizRuntimeException.create(ErrorCode.AUTH_HEADER_NOT_EXISTS); try { - String username = SpringUtils.getEgovJwtTokenUtil().getUsernameFromToken(accessToken); + String username = CoreSpringUtils.getEgovJwtTokenUtil().getUsernameFromToken(accessToken); return username; }catch (Exception e){ 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); try { - return SpringUtils.getEgovJwtTokenUtil().getUsernameFromToken(accessToken); + return CoreSpringUtils.getEgovJwtTokenUtil().getUsernameFromToken(accessToken); }catch (Exception e){ throw BizRuntimeException.create(ErrorCode.INVALID_TOKEN); } diff --git a/mens-core/src/main/java/kr/xit/core/spring/config/support/ApplicationContextProvider.java b/mens-core/src/main/java/kr/xit/core/spring/config/support/ApplicationContextProvider.java index 0675234..806e4c8 100644 --- a/mens-core/src/main/java/kr/xit/core/spring/config/support/ApplicationContextProvider.java +++ b/mens-core/src/main/java/kr/xit/core/spring/config/support/ApplicationContextProvider.java @@ -1,6 +1,6 @@ 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.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; @@ -22,7 +22,7 @@ import org.springframework.stereotype.Component; * 2023-04-28 julim 최초 생성 * * - * @see kr.xit.core.spring.util.SpringUtils + * @see CoreSpringUtils */ @Component public class ApplicationContextProvider implements ApplicationContextAware { diff --git a/mens-core/src/main/java/kr/xit/core/spring/config/support/CustomJacksonConfig.java b/mens-core/src/main/java/kr/xit/core/spring/config/support/CustomJacksonConfig.java index d251612..e0d8832 100644 --- a/mens-core/src/main/java/kr/xit/core/spring/config/support/CustomJacksonConfig.java +++ b/mens-core/src/main/java/kr/xit/core/spring/config/support/CustomJacksonConfig.java @@ -10,7 +10,7 @@ import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.cfg.CoercionAction; import com.fasterxml.jackson.databind.cfg.CoercionInputShape; 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.JsonUtils; import org.springframework.context.annotation.Bean; @@ -33,7 +33,7 @@ import org.springframework.context.annotation.Primary; * 2023-09-13 julim 최초 생성 * * - * @see SpringUtils#getObjectMapper() + * @see CoreSpringUtils#getObjectMapper() * @see JsonUtils * @see ConvertHelper * @see WebClientConfig diff --git a/mens-core/src/main/java/kr/xit/core/support/utils/ConvertHelper.java b/mens-core/src/main/java/kr/xit/core/support/utils/ConvertHelper.java index 99696de..121c5d4 100644 --- a/mens-core/src/main/java/kr/xit/core/support/utils/ConvertHelper.java +++ b/mens-core/src/main/java/kr/xit/core/support/utils/ConvertHelper.java @@ -3,7 +3,7 @@ package kr.xit.core.support.utils; import java.io.StringWriter; import java.util.Map; -import kr.xit.core.spring.util.SpringUtils; +import kr.xit.core.spring.util.CoreSpringUtils; import lombok.AccessLevel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,7 +35,7 @@ import lombok.NoArgsConstructor; @NoArgsConstructor(access = AccessLevel.PRIVATE) public class ConvertHelper { 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(); /** diff --git a/mens-core/src/main/java/kr/xit/core/support/utils/JsonUtils.java b/mens-core/src/main/java/kr/xit/core/support/utils/JsonUtils.java index 3e9f4c9..a9c0352 100644 --- a/mens-core/src/main/java/kr/xit/core/support/utils/JsonUtils.java +++ b/mens-core/src/main/java/kr/xit/core/support/utils/JsonUtils.java @@ -7,7 +7,7 @@ import java.io.IOException; import java.util.List; import java.util.Map; 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.NoArgsConstructor; import org.apache.commons.lang3.StringUtils; @@ -34,7 +34,7 @@ import org.json.simple.JSONObject; @NoArgsConstructor(access = AccessLevel.PRIVATE) public class JsonUtils { - private static final ObjectMapper OM = SpringUtils.getObjectMapper(); + private static final ObjectMapper OM = CoreSpringUtils.getObjectMapper(); /** * json string 인지 판별