diff --git a/src/main/resources/sql/mapper/base/department-mapper.xml b/src/main/resources/sql/mapper/base/department-mapper.xml
index 799fab6..ab7a1c0 100644
--- a/src/main/resources/sql/mapper/base/department-mapper.xml
+++ b/src/main/resources/sql/mapper/base/department-mapper.xml
@@ -41,8 +41,7 @@
AND SGG_CD = #{sggID}
AND INST_CD = #{instCode}
AND DEPT_CD IN (#{deptID})
- AND USE_YN = 'Y'
-
+ AND USE_YN = 'Y'
diff --git a/src/main/resources/sql/mapper/base/file-mapper.xml b/src/main/resources/sql/mapper/base/file-mapper.xml
index 357b61d..caff7b8 100644
--- a/src/main/resources/sql/mapper/base/file-mapper.xml
+++ b/src/main/resources/sql/mapper/base/file-mapper.xml
@@ -19,9 +19,16 @@
+CONCAT(#{addsFileRootPath}, DIR, DATE_FORMAT(CURRENT_DATE, '%Y/%m/%d/'))
+(CASE
+ WHEN REPLACE(FILE_PATH,#{type},'/files/') LIKE '_:%'
+ THEN SUBSTR(REPLACE(FILE_PATH,#{type},'/files/'),3)
+ ELSE REPLACE(FILE_PATH,#{type},'/files/')
+ END)
+
SELECT INF_TYPE
- , CONCAT(#{addsFileRootPath}, DIR, DATE_FORMAT(CURRENT_DATE, '/%Y/%m/%d/')) DIR
+ , DIR
FROM (
SELECT '00' INF_TYPE, 'attachment' DIR FROM DUAL UNION
SELECT '01' INF_TYPE, 'document' DIR FROM DUAL UNION
@@ -47,11 +54,7 @@ SELECT A.FILE_ID
, A.USE_YN
, A.REG_DT
, A.RGTR
- , (CASE
- WHEN REPLACE(FILE_PATH,#{type},'/files/') LIKE '_:%'
- THEN SUBSTR(REPLACE(FILE_PATH,#{type},'/files/'),3)
- ELSE REPLACE(FILE_PATH,#{type},'/files/')
- END) AS URL
+ , AS URL
FROM TB_FILE A
WHERE FILE_ID IN (#{fileID})
ORDER BY FILE_ID
@@ -71,11 +74,7 @@ SELECT A.FILE_ID
, A.USE_YN
, A.REG_DT
, A.RGTR
- , (CASE
- WHEN REPLACE(FILE_PATH,#{type},'/files/') LIKE '_:%'
- THEN SUBSTR(REPLACE(FILE_PATH,#{type},'/files/'),3)
- ELSE REPLACE(FILE_PATH,#{type},'/files/')
- END) AS URL
+ , AS URL
FROM TB_FILE A
AND A.INF_TYPE = #{infoType}