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 + + + + + +