|
|
|
@ -19,9 +19,12 @@
|
|
|
|
|
<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 UNION <!-- 국민 신문고 -->
|
|
|
|
|
SELECT '020' INF_TYPE, 'interface/attachment/saeol' DIR UNION <!-- 세올 -->
|
|
|
|
@ -48,7 +51,7 @@ SELECT A.FILE_ID
|
|
|
|
|
, A.USE_YN
|
|
|
|
|
, A.REG_DT
|
|
|
|
|
, A.RGTR
|
|
|
|
|
, A.FILE_PATH AS URL
|
|
|
|
|
,<include refid="cokr.xit.base.file.dao.FileMapper.fileUrl" /> AS URL
|
|
|
|
|
FROM TB_FILE A
|
|
|
|
|
WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>)
|
|
|
|
|
ORDER BY FILE_ID
|
|
|
|
@ -68,7 +71,7 @@ SELECT A.FILE_ID
|
|
|
|
|
, A.USE_YN
|
|
|
|
|
, A.REG_DT
|
|
|
|
|
, A.RGTR
|
|
|
|
|
, A.FILE_PATH AS URL
|
|
|
|
|
,<include refid="cokr.xit.base.file.dao.FileMapper.fileUrl" /> AS URL
|
|
|
|
|
FROM TB_FILE A
|
|
|
|
|
<where>
|
|
|
|
|
<if test="infoType != null"> AND A.INF_TYPE = #{infoType}</if>
|
|
|
|
|