시스템 로그 아이디 -> 시퀀스 사용

dev
mjkhan21 5 months ago
parent 53fb72b1c7
commit 5b069847d3

@ -58,9 +58,7 @@ SELECT LOG_ID
<insert id="insertLog" parameterType="cokr.xit.base.syslog.ServiceLog">/* 시스템 로그 등록(loggingMapper.insertLog) */
<selectKey keyProperty="id" keyColumn="NEW_ID" resultType="string" order="BEFORE">
SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(LOG_ID), 9) + 1, 1), 16, '0')) NEW_ID
FROM TB_SYS_LOG A, (<include refid="utility.selectToday" />) B
WHERE LOG_ID LIKE CONCAT(TODAY, '%')</selectKey>
select CONCAT(<include refid="utility.today" />, LPAD(NEXTVAL(SQ_SYSLOG), 16, '0')) NEW_ID</selectKey>
INSERT INTO TB_SYS_LOG (
LOG_ID <!-- 로그 ID -->
, LOG_TYPE <!-- 로그 유형 -->

Loading…
Cancel
Save