fix: file_id 관련 null 이슈로 쿼리 변경

dev
kjh 5 months ago
parent cd555937a9
commit 5357860ac3

@ -72,9 +72,9 @@ AND ${by} = #{term}
<selectKey keyProperty="file.id,file.path" keyColumn="NEW_ID,PATH" resultType="map" order="BEFORE"> <selectKey keyProperty="file.id,file.path" keyColumn="NEW_ID,PATH" resultType="map" order="BEFORE">
SELECT NEW_ID, CONCAT(DIR, NEW_ID, '.', #{file.extension}) PATH SELECT NEW_ID, CONCAT(DIR, NEW_ID, '.', #{file.extension}) PATH
FROM ( FROM (
SELECT NVL(MAX(FILE_ID) + 1, CONCAT(THIS_DAY, '00001')) NEW_ID SELECT NVL(MAX(FILE_ID) + 1, CONCAT(NVL(THIS_DAY, DATE_FORMAT(CURRENT_DATE, '%Y%m%d')), '00001')) NEW_ID
FROM TB_FILE A, (<include refid="utility.selectThisDay" />) B FROM (<include refid="utility.selectThisDay" />) B
WHERE FILE_ID LIKE CONCAT(THIS_DAY, '%') LEFT OUTER JOIN TB_FILE A ON A.FILE_ID LIKE CONCAT(THIS_DAY, '%')
) T1, ( ) T1, (
<include refid="fileDirs" /> <include refid="fileDirs" />
WHERE INF_TYPE = #{file.infoType} WHERE INF_TYPE = #{file.infoType}

Loading…
Cancel
Save