file dir 수정

main
mjkhan21 1 year ago
parent 4db7b366e9
commit 9e3ec6dc23

@ -20,21 +20,24 @@
</resultMap>
<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 (
SELECT '00' INF_TYPE, 'attachment/' DIR UNION
SELECT '01' INF_TYPE, 'document/' DIR UNION
SELECT '02' INF_TYPE, 'article/' DIR
SELECT '010' INF_TYPE, 'smg' DIR UNION <!-- 국민 신문고 -->
SELECT '020' INF_TYPE, 'saeol' DIR UNION <!-- 세올 -->
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>
<sql id="selectFiles">
<if test="fileIDs != null">
SELECT A.*, REPLACE(FILE_PATH, 'C://workspace/xit/base', '') URL
SELECT A.*, FILE_PATH URL
FROM TB_FILE A
WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>)
ORDER BY FILE_ID</if>
<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
<where>
<if test="infoType != null"> AND A.INF_TYPE = #{infoType}</if>

Loading…
Cancel
Save