From f1b1b7703122adbc46db9f058ea5a3aafb70f378 Mon Sep 17 00:00:00 2001 From: leebj Date: Tue, 21 May 2024 14:47:45 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EA=B4=80=EB=A0=A8SQL?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EB=A1=9C=EC=BB=AC=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=ED=95=98=EB=93=9C=EC=BD=94=EB=94=A9=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/sql/mapper/base/file-mapper.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/resources/sql/mapper/base/file-mapper.xml b/src/main/resources/sql/mapper/base/file-mapper.xml index 6ffcda4..a0e3d64 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 FROM DUAL UNION SELECT '01' INF_TYPE, 'document/' DIR FROM DUAL UNION - SELECT '02' INF_TYPE, 'article/' DIR FROM DUAL - ) FILE_DIRS + SELECT '02' INF_TYPE, 'article/' DIR FROM DUAL UNION + + SELECT '100' INF_TYPE, 'attachment/dsuse' DIR FROM DUAL + SELECT '110' INF_TYPE, 'document/dsuse' DIR FROM DUAL + ) 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}