|
|
@ -20,21 +20,24 @@
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="fileDirs">SELECT INF_TYPE
|
|
|
|
<sql id="fileDirs">SELECT INF_TYPE
|
|
|
|
, CONCAT('C://workspace/xit/base/files/', DIR, DATE_FORMAT(CURRENT_DATE, '%Y/%m/%d/')) DIR
|
|
|
|
, CONCAT('files/', DIR, DATE_FORMAT(CURRENT_DATE, '/%Y/%m/%d/')) DIR
|
|
|
|
FROM (
|
|
|
|
FROM (
|
|
|
|
SELECT '00' INF_TYPE, 'attachment/' DIR UNION
|
|
|
|
SELECT '010' INF_TYPE, 'smg' DIR UNION <!-- 국민 신문고 -->
|
|
|
|
SELECT '01' INF_TYPE, 'document/' DIR UNION
|
|
|
|
SELECT '020' INF_TYPE, 'saeol' DIR UNION <!-- 세올 -->
|
|
|
|
SELECT '02' INF_TYPE, 'article/' DIR
|
|
|
|
SELECT '030' INF_TYPE, 'epost' DIR UNION <!-- epost -->
|
|
|
|
|
|
|
|
SELECT '100' INF_TYPE, 'violation' DIR UNION <!-- 단속 정보 -->
|
|
|
|
|
|
|
|
SELECT '110' INF_TYPE, 'opinion' DIR UNION <!-- 의견 진술 -->
|
|
|
|
|
|
|
|
SELECT '190' INF_TYPE, 'capture' DIR <!-- 캡쳐용 동영상 -->
|
|
|
|
) FILE_DIRS</sql>
|
|
|
|
) FILE_DIRS</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectFiles">
|
|
|
|
<sql id="selectFiles">
|
|
|
|
<if test="fileIDs != null">
|
|
|
|
<if test="fileIDs != null">
|
|
|
|
SELECT A.*, REPLACE(FILE_PATH, 'C://workspace/xit/base', '') URL
|
|
|
|
SELECT A.*, FILE_PATH 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>
|
|
|
|
<if test="fileIDs == null"><include refid="utility.paging-prefix" />
|
|
|
|
<if test="fileIDs == null"><include refid="utility.paging-prefix" />
|
|
|
|
SELECT A.*, REPLACE(FILE_PATH, 'C://workspace/xit/base', '') URL
|
|
|
|
SELECT A.*, FILE_PATH URL
|
|
|
|
FROM TB_FILE A
|
|
|
|
FROM TB_FILE A
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="infoType != null"> AND A.INF_TYPE = #{infoType}</if>
|
|
|
|
<if test="infoType != null"> AND A.INF_TYPE = #{infoType}</if>
|
|
|
|