From 9a7be016c133b4d7bda7726c146b6c645efd3adb Mon Sep 17 00:00:00 2001 From: kjh Date: Tue, 20 Aug 2024 15:08:08 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20batch-cmm-oracle-mapper.xml=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/core/batch-cmm-oracle-mapper.xml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 mens-batch/src/main/resources/egovframework/mapper/core/batch-cmm-oracle-mapper.xml diff --git a/mens-batch/src/main/resources/egovframework/mapper/core/batch-cmm-oracle-mapper.xml b/mens-batch/src/main/resources/egovframework/mapper/core/batch-cmm-oracle-mapper.xml new file mode 100644 index 0000000..e48ed38 --- /dev/null +++ b/mens-batch/src/main/resources/egovframework/mapper/core/batch-cmm-oracle-mapper.xml @@ -0,0 +1,95 @@ + + + + + + + + /** batch-cmm-oracle-mapper|insertBatchLock-배치락 데이타 생성|julim */ + INSERT INTO tb_cmm_batch_lock ( + instance_id, + regist_dt, + use_yn + ) VALUES ( + #{instanceId}, + sysdate, + #{useYn} + ) + + + + /** batch-cmm-oracle-mapper|updateBatchLock-배치 실행 상태 및 결과 반영|julim */ + UPDATE tb_cmm_batch_lock + SET result = #{result} + , message = SUBSTR(#{message}, 1, 500) + , use_yn = #{useYn} + , updt_dt = sysdate + WHERE instance_id = #{instanceId} + + + + /** batch-cmm-oracle-mapper|insertBatchLog-배치 로그 데이타 생성|julim */ + + SELECT LPAD(tb_cmm_batch_log_seq.nextval, 20, '0') FROM dual + + INSERT INTO tb_cmm_batch_log ( + batch_log_id, + instance_id, + trace_id, + result, + message, + regist_dt + ) VALUES ( + #{batchLogId}, + #{instanceId}, + #{traceId}, + #{result}, + #{message}, + sysdate + ) + + + + /** batch-cmm-oracle-mapper|updateBatchLog-배치 결과 반영|julim */ + UPDATE tb_cmm_batch_log + SET trace_id = NVL(#{traceId}, trace_id) + , result = NVL(#{result}, result) + , message = NVL(SUBSTR(#{message}, 1, 500), message) + , updt_dt = sysdate + WHERE batch_log_id = #{batchLogId} + + + + + + SELECT instance_id + , instance_name + , instance_url + , instance_param + , result + , use_yn + , regist_dt + , updt_dt + FROM tb_cmm_batch_lock + + + + + +