mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-22 03:39:37 +08:00
118 lines
6.4 KiB
XML
118 lines
6.4 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.ics.admin.mapper.RepairAttachMapper">
|
||
|
|
||
|
<resultMap type="com.ics.admin.domain.RepairAttach" id="RepairAttachResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="repairId" column="repair_id" />
|
||
|
<result property="nodeId" column="node_id" />
|
||
|
<result property="originalFilename" column="original_filename" />
|
||
|
<result property="filename" column="filename" />
|
||
|
<result property="url" column="url" />
|
||
|
<result property="fileSize" column="filesize" />
|
||
|
<result property="ext1" column="ext1" />
|
||
|
<result property="ext2" column="ext2" />
|
||
|
<result property="ext3" column="ext3" />
|
||
|
<result property="deleteFlag" column="delete_flag" />
|
||
|
<result property="createBy" column="create_by" />
|
||
|
<result property="createTime" column="create_time" />
|
||
|
<result property="updateBy" column="update_by" />
|
||
|
<result property="updateTime" column="update_time" />
|
||
|
<result property="tenantId" column="tenant_id" />
|
||
|
<result property="parkId" column="park_id" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectRepairAttachVo">
|
||
|
SELECT id, repair_id, node_id, original_filename, filename, url, filesize, ext1, ext2, ext3, delete_flag, create_by, create_time, update_by, update_time, tenant_id, park_id FROM ics_repair_attach
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectRepairAttachList" parameterType="RepairAttach" resultMap="RepairAttachResult">
|
||
|
<include refid="selectRepairAttachVo"/>
|
||
|
<where>
|
||
|
<if test="originalFilename != null and originalFilename != ''"> AND original_filename LIKE CONCAT('%', #{originalFilename}, '%')</if>
|
||
|
<if test="filename != null and filename != ''"> AND filename LIKE CONCAT('%', #{filename}, '%')</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectRepairAttachById" parameterType="Long" resultMap="RepairAttachResult">
|
||
|
<include refid="selectRepairAttachVo"/>
|
||
|
WHERE id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertRepairAttach" parameterType="RepairAttach" useGeneratedKeys="true" keyProperty="id">
|
||
|
INSERT INTO ics_repair_attach
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="repairId != null ">repair_id,</if>
|
||
|
<if test="nodeId != null ">node_id,</if>
|
||
|
<if test="originalFilename != null and originalFilename != ''">original_filename,</if>
|
||
|
<if test="filename != null and filename != ''">filename,</if>
|
||
|
<if test="url != null and url != ''">url,</if>
|
||
|
<if test="filesize != null ">filesize,</if>
|
||
|
<if test="ext1 != null and ext1 != ''">ext1,</if>
|
||
|
<if test="ext2 != null and ext2 != ''">ext2,</if>
|
||
|
<if test="ext3 != null and ext3 != ''">ext3,</if>
|
||
|
<if test="deleteFlag != null and deleteFlag != ''">delete_flag,</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="tenantId != null ">tenant_id,</if>
|
||
|
<if test="parkId != null ">park_id,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="repairId != null ">#{repairId},</if>
|
||
|
<if test="nodeId != null ">#{nodeId},</if>
|
||
|
<if test="originalFilename != null and originalFilename != ''">#{originalFilename},</if>
|
||
|
<if test="filename != null and filename != ''">#{filename},</if>
|
||
|
<if test="url != null and url != ''">#{url},</if>
|
||
|
<if test="filesize != null ">#{filesize},</if>
|
||
|
<if test="ext1 != null and ext1 != ''">#{ext1},</if>
|
||
|
<if test="ext2 != null and ext2 != ''">#{ext2},</if>
|
||
|
<if test="ext3 != null and ext3 != ''">#{ext3},</if>
|
||
|
<if test="deleteFlag != null and deleteFlag != ''">#{deleteFlag},</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="tenantId != null ">#{tenantId},</if>
|
||
|
<if test="parkId != null ">#{parkId},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateRepairAttach" parameterType="RepairAttach">
|
||
|
UPDATE ics_repair_attach
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="repairId != null ">repair_id = #{repairId},</if>
|
||
|
<if test="nodeId != null ">node_id = #{nodeId},</if>
|
||
|
<if test="originalFilename != null and originalFilename != ''">original_filename = #{originalFilename},</if>
|
||
|
<if test="filename != null and filename != ''">filename = #{filename},</if>
|
||
|
<if test="url != null and url != ''">url = #{url},</if>
|
||
|
<if test="filesize != null ">filesize = #{filesize},</if>
|
||
|
<if test="ext1 != null and ext1 != ''">ext1 = #{ext1},</if>
|
||
|
<if test="ext2 != null and ext2 != ''">ext2 = #{ext2},</if>
|
||
|
<if test="ext3 != null and ext3 != ''">ext3 = #{ext3},</if>
|
||
|
<if test="deleteFlag != null and deleteFlag != ''">delete_flag = #{deleteFlag},</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="tenantId != null ">tenant_id = #{tenantId},</if>
|
||
|
<if test="parkId != null ">park_id = #{parkId},</if>
|
||
|
</trim>
|
||
|
WHERE id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteRepairAttachById" parameterType="Long">
|
||
|
DELETE FROM ics_repair_attach WHERE id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteRepairAttachByIds" parameterType="String">
|
||
|
DELETE FROM ics_repair_attach where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|