From fc9a006aa1816be5af7bda2abb6f8e4876d37c6e Mon Sep 17 00:00:00 2001 From: leebj Date: Fri, 28 Jun 2024 09:12:59 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EC=8A=A4=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/sql/mapper/base/file-mapper.xml | 16 ++++++++++------ 1 file changed, 10 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 66efa49..357b61d 100644 --- a/src/main/resources/sql/mapper/base/file-mapper.xml +++ b/src/main/resources/sql/mapper/base/file-mapper.xml @@ -104,17 +104,21 @@ AND ${by} = #{term} -/* 파일 등록(fileMapper.insertFile) */ + +/* 파일 등록(fileMapper.insertFile) */ -SELECT NEW_ID, CONCAT(DIR, NEW_ID, '.', #{file.extension}) PATH +SELECT NEW_ID + , CONCAT(DIR, NEW_ID, '.', #{file.extension}) PATH FROM ( SELECT NVL(MAX(FILE_ID) + 1, CONCAT(THIS_DAY, '00001')) NEW_ID - FROM () B LEFT OUTER JOIN - TB_FILE A ON FILE_ID LIKE CONCAT(THIS_DAY, '%') - ) T1, ( + FROM () B + LEFT OUTER JOIN TB_FILE A ON FILE_ID LIKE CONCAT(THIS_DAY, '%') + ) T1 + , ( WHERE INF_TYPE = #{file.infoType} - ) T2 + ) T2 + INSERT INTO TB_FILE ( FILE_ID , INF_TYPE