219 lines
7.8 KiB
XML
219 lines
7.8 KiB
XML
<?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.ruoyi.sip.mapper.OmsFileLogMapper">
|
|
|
|
<resultMap type="com.ruoyi.sip.domain.OmsFileLog" id="OmsFileLogMap">
|
|
<result property="id" column="id"/>
|
|
<result property="newFilename" column="new_filename"/>
|
|
<result property="fileName" column="file_name"/>
|
|
<result property="filePath" column="file_path"/>
|
|
<result property="fileSize" column="file_size"/>
|
|
<result property="fileType" column="file_type"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="remark" column="remark"/>
|
|
</resultMap>
|
|
|
|
<!-- 基本字段 -->
|
|
<sql id="Base_Column_List">
|
|
id, new_filename, file_name, file_path, file_size, file_type, create_by, create_time, update_by, update_time, remark
|
|
</sql>
|
|
|
|
<!--通过实体作为筛选条件查询-->
|
|
<select id="queryAll" resultMap="OmsFileLogMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from oms_file_log
|
|
<where>
|
|
<if test="id != null">
|
|
and id = #{id}
|
|
</if>
|
|
<if test="idList != null">
|
|
and id in (
|
|
<foreach item="item" index="index" collection="idList" separator=",">
|
|
#{item}
|
|
</foreach>
|
|
)
|
|
</if>
|
|
<if test="newFilename != null and newFilename != ''">
|
|
and new_filename = #{newFilename}
|
|
</if>
|
|
<if test="fileName != null and fileName != ''">
|
|
and file_name = #{fileName}
|
|
</if>
|
|
<if test="filePath != null and filePath != ''">
|
|
and file_path = #{filePath}
|
|
</if>
|
|
<if test="fileSize != null">
|
|
and file_size = #{fileSize}
|
|
</if>
|
|
<if test="fileType != null and fileType != ''">
|
|
and file_type = #{fileType}
|
|
</if>
|
|
<if test="createBy != null and createBy != ''">
|
|
and create_by = #{createBy}
|
|
</if>
|
|
<if test="createTime != null">
|
|
and create_time = #{createTime}
|
|
</if>
|
|
<if test="updateBy != null and updateBy != ''">
|
|
and update_by = #{updateBy}
|
|
</if>
|
|
<if test="updateTime != null">
|
|
and update_time = #{updateTime}
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
and remark = #{remark}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
|
|
<!--根据ID查详情-->
|
|
<select id="queryById" parameterType="Integer" resultMap="OmsFileLogMap">
|
|
SELECT
|
|
<include refid="Base_Column_List" />
|
|
FROM oms_file_log
|
|
WHERE id = #{id} LIMIT 1
|
|
</select>
|
|
|
|
|
|
<!--新增所有列-->
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
INSERT INTO oms_file_log
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="newFilename != null and newFilename != ''">
|
|
new_filename,
|
|
</if>
|
|
<if test="fileName != null and fileName != ''">
|
|
file_name,
|
|
</if>
|
|
<if test="filePath != null and filePath != ''">
|
|
file_path,
|
|
</if>
|
|
<if test="fileSize != null">
|
|
file_size,
|
|
</if>
|
|
<if test="fileType != null and fileType != ''">
|
|
file_type,
|
|
</if>
|
|
<if test="createBy != null and createBy != ''">
|
|
create_by,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="updateBy != null and updateBy != ''">
|
|
update_by,
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time,
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
remark,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="newFilename != null and newFilename != ''">
|
|
#{newFilename},
|
|
</if>
|
|
<if test="fileName != null and fileName != ''">
|
|
#{fileName},
|
|
</if>
|
|
<if test="filePath != null and filePath != ''">
|
|
#{filePath},
|
|
</if>
|
|
<if test="fileSize != null">
|
|
#{fileSize},
|
|
</if>
|
|
<if test="fileType != null and fileType != ''">
|
|
#{fileType},
|
|
</if>
|
|
<if test="createBy != null and createBy != ''">
|
|
#{createBy},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime},
|
|
</if>
|
|
<if test="updateBy != null and updateBy != ''">
|
|
#{updateBy},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
#{updateTime},
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
#{remark},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<insert id="insertBatch">
|
|
INSERT INTO oms_file_log
|
|
(new_filename,file_name,file_path,file_size,file_type,create_by,
|
|
create_time, update_by, update_time, remark,project_id)
|
|
|
|
values
|
|
<foreach item="item" index="index" collection="list" separator="," open="(" close=")">
|
|
#{item.newFilename}, #{item.fileName}, #{item.filePath}, #{item.fileSize}, #{item.fileType},
|
|
#{item.createBy},
|
|
#{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark},#{item.projectId}
|
|
</foreach>
|
|
</insert>
|
|
|
|
<!--通过主键修改数据-->
|
|
<update id="update">
|
|
UPDATE oms_file_log
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="newFilename != null and newFilename != ''">
|
|
new_filename = #{newFilename},
|
|
</if>
|
|
<if test="fileName != null and fileName != ''">
|
|
file_name = #{fileName},
|
|
</if>
|
|
<if test="filePath != null and filePath != ''">
|
|
file_path = #{filePath},
|
|
</if>
|
|
<if test="fileSize != null">
|
|
file_size = #{fileSize},
|
|
</if>
|
|
<if test="fileType != null and fileType != ''">
|
|
file_type = #{fileType},
|
|
</if>
|
|
<if test="createBy != null and createBy != ''">
|
|
create_by = #{createBy},
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time = #{createTime},
|
|
</if>
|
|
<if test="updateBy != null and updateBy != ''">
|
|
update_by = #{updateBy},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time = #{updateTime},
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
remark = #{remark},
|
|
</if>
|
|
</trim>
|
|
WHERE id = #{id}
|
|
</update>
|
|
|
|
<!--通过主键删除-->
|
|
<delete id="deleteById">
|
|
DELETE FROM oms_file_log WHERE id = #{id}
|
|
</delete>
|
|
|
|
<!--通过id批量删除-->
|
|
<delete id="batchRemove">
|
|
delete from oms_file_log where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper>
|
|
|
|
|
|
|