fileDir, fileUrl 분리

master
mjkhan21 4 months ago
parent f6fdb8a228
commit 1b705ab446

@ -19,8 +19,11 @@
<result property="useYN" column="USE_YN"/>
</resultMap>
<sql id="fileDir">CONCAT('files/', DIR, DATE_FORMAT(CURRENT_DATE, '%Y/%m/%d/'))</sql>
<sql id="fileUrl">FILE_PATH</sql>
<sql id="fileDirs">SELECT INF_TYPE
, CONCAT('files/', DIR, DATE_FORMAT(CURRENT_DATE, '/%Y/%m/%d/')) DIR
,<include refid="cokr.xit.base.file.dao.FileMapper.fileDir" /> DIR
FROM (
SELECT '010' INF_TYPE, 'interface/attachment/smg' DIR FROM DUAL UNION <!-- 국민 신문고 -->
SELECT '020' INF_TYPE, 'interface/attachment/saeol' DIR FROM DUAL UNION <!-- 세올 -->
@ -33,7 +36,7 @@
<sql id="selectFiles">
<if test="fileIDs != null">
SELECT A.*, FILE_PATH URL
SELECT A.*,<include refid="cokr.xit.base.file.dao.FileMapper.fileUrl" /> URL
FROM TB_FILE A
WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>)
ORDER BY FILE_ID</if>

Loading…
Cancel
Save