|
|
@ -19,8 +19,11 @@
|
|
|
|
<result property="useYN" column="USE_YN"/>
|
|
|
|
<result property="useYN" column="USE_YN"/>
|
|
|
|
</resultMap>
|
|
|
|
</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
|
|
|
|
<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 (
|
|
|
|
FROM (
|
|
|
|
SELECT '010' INF_TYPE, 'interface/attachment/smg' DIR FROM DUAL UNION <!-- 국민 신문고 -->
|
|
|
|
SELECT '010' INF_TYPE, 'interface/attachment/smg' DIR FROM DUAL UNION <!-- 국민 신문고 -->
|
|
|
|
SELECT '020' INF_TYPE, 'interface/attachment/saeol' DIR FROM DUAL UNION <!-- 세올 -->
|
|
|
|
SELECT '020' INF_TYPE, 'interface/attachment/saeol' DIR FROM DUAL UNION <!-- 세올 -->
|
|
|
@ -33,7 +36,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectFiles">
|
|
|
|
<sql id="selectFiles">
|
|
|
|
<if test="fileIDs != null">
|
|
|
|
<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
|
|
|
|
FROM TB_FILE A
|
|
|
|
WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>)
|
|
|
|
WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>)
|
|
|
|
ORDER BY FILE_ID</if>
|
|
|
|
ORDER BY FILE_ID</if>
|
|
|
|