From 9e3ec6dc23eeab6505f4deaf877479a150b3d0d5 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Fri, 7 Jul 2023 13:24:52 +0900 Subject: [PATCH] =?UTF-8?q?file=20dir=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/sql/mapper/base/file-mapper.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/resources/sql/mapper/base/file-mapper.xml b/src/main/resources/sql/mapper/base/file-mapper.xml index 00d066bb..01066d19 100644 --- a/src/main/resources/sql/mapper/base/file-mapper.xml +++ b/src/main/resources/sql/mapper/base/file-mapper.xml @@ -20,21 +20,24 @@ 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 + SELECT '100' INF_TYPE, 'violation' DIR UNION + SELECT '110' INF_TYPE, 'opinion' DIR UNION + SELECT '190' INF_TYPE, 'capture' DIR ) FILE_DIRS -SELECT A.*, REPLACE(FILE_PATH, 'C://workspace/xit/base', '') URL +SELECT A.*, FILE_PATH URL FROM TB_FILE A WHERE FILE_ID IN (#{fileID}) ORDER BY FILE_ID -SELECT A.*, REPLACE(FILE_PATH, 'C://workspace/xit/base', '') URL +SELECT A.*, FILE_PATH URL FROM TB_FILE A AND A.INF_TYPE = #{infoType}