|
|
@ -19,9 +19,16 @@
|
|
|
|
<result property="useYN" column="USE_YN"/>
|
|
|
|
<result property="useYN" column="USE_YN"/>
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="fileDir">CONCAT(#{addsFileRootPath}, DIR, DATE_FORMAT(CURRENT_DATE, '%Y/%m/%d/'))</sql>
|
|
|
|
|
|
|
|
<sql id="fileUrl">(CASE
|
|
|
|
|
|
|
|
WHEN REPLACE(FILE_PATH,#{type},'/files/') LIKE '_:%'
|
|
|
|
|
|
|
|
THEN SUBSTR(REPLACE(FILE_PATH,#{type},'/files/'),3)
|
|
|
|
|
|
|
|
ELSE REPLACE(FILE_PATH,#{type},'/files/')
|
|
|
|
|
|
|
|
END)</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="fileDirs">
|
|
|
|
<sql id="fileDirs">
|
|
|
|
SELECT INF_TYPE
|
|
|
|
SELECT INF_TYPE
|
|
|
|
, CONCAT(#{addsFileRootPath}, DIR, DATE_FORMAT(CURRENT_DATE, '/%Y/%m/%d/')) DIR
|
|
|
|
,<include refid="cokr.xit.base.file.dao.FileMapper.fileDir" /> DIR
|
|
|
|
FROM (
|
|
|
|
FROM (
|
|
|
|
SELECT '00' INF_TYPE, 'attachment' DIR FROM DUAL UNION
|
|
|
|
SELECT '00' INF_TYPE, 'attachment' DIR FROM DUAL UNION
|
|
|
|
SELECT '01' INF_TYPE, 'document' 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.USE_YN
|
|
|
|
, A.REG_DT
|
|
|
|
, A.REG_DT
|
|
|
|
, A.RGTR
|
|
|
|
, A.RGTR
|
|
|
|
, (CASE
|
|
|
|
,<include refid="cokr.xit.base.file.dao.FileMapper.fileUrl" /> AS URL
|
|
|
|
WHEN REPLACE(FILE_PATH,#{type},'/files/') LIKE '_:%'
|
|
|
|
|
|
|
|
THEN SUBSTR(REPLACE(FILE_PATH,#{type},'/files/'),3)
|
|
|
|
|
|
|
|
ELSE REPLACE(FILE_PATH,#{type},'/files/')
|
|
|
|
|
|
|
|
END) AS URL
|
|
|
|
|
|
|
|
FROM TB_FILE A
|
|
|
|
FROM TB_FILE A
|
|
|
|
WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>)
|
|
|
|
WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>)
|
|
|
|
ORDER BY FILE_ID
|
|
|
|
ORDER BY FILE_ID
|
|
|
@ -71,11 +74,7 @@ SELECT A.FILE_ID
|
|
|
|
, A.USE_YN
|
|
|
|
, A.USE_YN
|
|
|
|
, A.REG_DT
|
|
|
|
, A.REG_DT
|
|
|
|
, A.RGTR
|
|
|
|
, A.RGTR
|
|
|
|
, (CASE
|
|
|
|
,<include refid="cokr.xit.base.file.dao.FileMapper.fileUrl" /> AS URL
|
|
|
|
WHEN REPLACE(FILE_PATH,#{type},'/files/') LIKE '_:%'
|
|
|
|
|
|
|
|
THEN SUBSTR(REPLACE(FILE_PATH,#{type},'/files/'),3)
|
|
|
|
|
|
|
|
ELSE REPLACE(FILE_PATH,#{type},'/files/')
|
|
|
|
|
|
|
|
END) AS URL
|
|
|
|
|
|
|
|
FROM TB_FILE A
|
|
|
|
FROM TB_FILE A
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="infoType != null"> AND A.INF_TYPE = #{infoType}</if>
|
|
|
|
<if test="infoType != null"> AND A.INF_TYPE = #{infoType}</if>
|
|
|
|