
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.takensoft.taken_bi_manager.common.file.dao.FileDAO">
<insert id="fileManagerInsert" parameterType="FileManage">
<!-- file manager insert -->
INSERT INTO bi_manager.cmmn_file_manager(
file_manager_id
, file_type
, content_type
)VALUES(
#{fileManagerId}
, #{fileType}
, #{contentType}
)
</insert>
<insert id="fileInsert" parameterType="CmmnFile">
<!-- file manager insert -->
INSERT INTO bi_manager.cmmn_file(
file_id
, "name"
, mask_name
, "size"
, content_type
, full_path
, sub_path
, extention
, creat_dt
, file_manager_id
)VALUES(
#{fileId}
, #{name}
, #{maskName}
, #{size}
, #{contentType}
, #{fullPath}
, #{subPath}
, #{extention}
, now()
, #{fileManagerId}
)
</insert>
<resultMap id="cmmnFileMap" type="CmmnFile">
<result column="file_id" property="fileId"/>
<result column="name" property="name"/>
<result column="mask_name" property="maskName"/>
<result column="size" property="size"/>
<result column="content_type" property="contentType"/>
<result column="full_path" property="fullPath"/>
<result column="sub_path" property="subPath"/>
<result column="extention" property="extention"/>
<result column="creat_dt" property="creatDt"/>
<result column="file_manager_id" property="fileManagerId"/>
</resultMap>
<select id="cmmnfileSelect" parameterType="java.lang.String" resultMap="cmmnFileMap">
<!-- componentListSelect -->
SELECT
file_id
, "name"
, mask_name
, "size"
, content_type
, full_path
, sub_path
, extention
, creat_dt
, file_manager_id
FROM bi_manager.cmmn_file
WHERE file_manager_id = #{fileManagerId}
</select>
<delete id="cmmnfileDelete" parameterType="CustomPageVO" >
<!-- cmmn_file 삭제 -->
DELETE FROM bi_manager.cmmn_file
WHERE file_manager_id=#{fileManagerId}
</delete>
<delete id="fileManagerDelete" parameterType="CustomPageVO" >
<!-- file_manager 삭제 -->
DELETE FROM bi_manager.cmmn_file_manager
WHERE file_manager_id=#{fileManagerId}
</delete>
<select id="cmmnfilesSelect" parameterType="String" resultMap="cmmnFileMap">
SELECT
file_id
, "name"
, mask_name
, "size"
, content_type
, full_path
, sub_path
, extention
, creat_dt
, file_manager_id
FROM bi_manager.cmmn_file
WHERE file_manager_id = #{fileManagerId}
</select>
<!-- 연결된 파일 삭제 -->
<delete id="deleteCmmnFileToDataSetPost" parameterType="String">
DELETE FROM cmmn_file
WHERE file_manager_id = #{fileManagerId}
</delete>
<!-- 연결된 파일 매니저 삭제 -->
<delete id="deleteFileManagerToDataSetPost" parameterType="String">
DELETE FROM cmmn_file_manager
WHERE file_manager_id = #{fileManagerId}
</delete>
</mapper>