mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-23 05:49:37 +08:00
109 lines
5.9 KiB
XML
109 lines
5.9 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.meeting.RepairDeviceMapper">
|
||
|
|
||
|
<resultMap type="com.ics.admin.domain.RepairDevice" id="RepairDeviceResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="name" column="name" />
|
||
|
<result property="brand" column="brand" />
|
||
|
<result property="specification" column="specification" />
|
||
|
<result property="picUrl" column="pic_url" />
|
||
|
<result property="fileUrl" column="file_url" />
|
||
|
<result property="remark" column="remark" />
|
||
|
<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" />
|
||
|
<result property="typeId" column="type_id" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectRepairDeviceVo">
|
||
|
SELECT id, name, brand, specification, pic_url, file_url, remark,type_id, delete_flag, create_by, create_time, update_by, update_time, tenant_id, park_id FROM ics_repair_device
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectRepairDeviceList" parameterType="RepairDevice" resultMap="RepairDeviceResult">
|
||
|
<include refid="selectRepairDeviceVo"/>
|
||
|
<where>
|
||
|
<if test="name != null and name != ''"> AND name LIKE CONCAT('%', #{name}, '%')</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectRepairDeviceById" parameterType="Long" resultMap="RepairDeviceResult">
|
||
|
<include refid="selectRepairDeviceVo"/>
|
||
|
WHERE id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertRepairDevice" parameterType="RepairDevice" useGeneratedKeys="true" keyProperty="id">
|
||
|
INSERT INTO ics_repair_device
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="name != null and name != ''">name,</if>
|
||
|
<if test="brand != null and brand != ''">brand,</if>
|
||
|
<if test="specification != null and specification != ''">specification,</if>
|
||
|
<if test="picUrl != null and picUrl != ''">pic_url,</if>
|
||
|
<if test="fileUrl != null and fileUrl != ''">file_url,</if>
|
||
|
<if test="remark != null and remark != ''">remark,</if>
|
||
|
<if test="typeId != null and typeId != ''">type_id,</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="name != null and name != ''">#{name},</if>
|
||
|
<if test="brand != null and brand != ''">#{brand},</if>
|
||
|
<if test="specification != null and specification != ''">#{specification},</if>
|
||
|
<if test="picUrl != null and picUrl != ''">#{picUrl},</if>
|
||
|
<if test="typeId != null and typeId != ''">#{typeId},</if>
|
||
|
<if test="fileUrl != null and fileUrl != ''">#{fileUrl},</if>
|
||
|
<if test="remark != null and remark != ''">#{remark},</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="updateRepairDevice" parameterType="RepairDevice">
|
||
|
UPDATE ics_repair_device
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="name != null and name != ''">name = #{name},</if>
|
||
|
<if test="brand != null and brand != ''">brand = #{brand},</if>
|
||
|
<if test="specification != null and specification != ''">specification = #{specification},</if>
|
||
|
<if test="picUrl != null and picUrl != ''">pic_url = #{picUrl},</if>
|
||
|
<if test="fileUrl != null and fileUrl != ''">file_url = #{fileUrl},</if>
|
||
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||
|
<if test="typeId != null and typeId != ''">type_id = #{typeId},</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="deleteRepairDeviceById" parameterType="Long">
|
||
|
DELETE FROM ics_repair_device WHERE id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteRepairDeviceByIds" parameterType="String">
|
||
|
DELETE FROM ics_repair_device where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|