<?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.app.patrolplan.mapper.ArdAppPatrolpointRecordImgMapper">
|
|
<resultMap type="ArdAppPatrolpointRecordImg" id="ArdAppPatrolpointRecordImgResult">
|
<result property="id" column="id" />
|
<result property="appPatrolponitRecordId" column="app_patrolponit_record_id" />
|
<result property="img" column="img" />
|
</resultMap>
|
|
<sql id="selectArdAppPatrolpointRecordImgVo">
|
select id, app_patrolponit_record_id, img from ard_app_patrolpoint_record_img
|
</sql>
|
|
<select id="selectArdAppPatrolpointRecordImgList" parameterType="ArdAppPatrolpointRecordImg" resultMap="ArdAppPatrolpointRecordImgResult">
|
<include refid="selectArdAppPatrolpointRecordImgVo"/>
|
<where>
|
<if test="appPatrolponitRecordId != null and appPatrolponitRecordId != ''"> and app_patrolponit_record_id = #{appPatrolponitRecordId}</if>
|
<if test="img != null and img != ''"> and img = #{img}</if>
|
</where>
|
</select>
|
|
<select id="selectArdAppPatrolpointRecordImgById" parameterType="String" resultMap="ArdAppPatrolpointRecordImgResult">
|
<include refid="selectArdAppPatrolpointRecordImgVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertArdAppPatrolpointRecordImg" parameterType="ArdAppPatrolpointRecordImg">
|
insert into ard_app_patrolpoint_record_img
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="appPatrolponitRecordId != null">app_patrolponit_record_id,</if>
|
<if test="img != null">img,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="appPatrolponitRecordId != null">#{appPatrolponitRecordId},</if>
|
<if test="img != null">#{img},</if>
|
</trim>
|
</insert>
|
|
<update id="updateArdAppPatrolpointRecordImg" parameterType="ArdAppPatrolpointRecordImg">
|
update ard_app_patrolpoint_record_img
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="appPatrolponitRecordId != null">app_patrolponit_record_id = #{appPatrolponitRecordId},</if>
|
<if test="img != null">img = #{img},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteArdAppPatrolpointRecordImgById" parameterType="String">
|
delete from ard_app_patrolpoint_record_img where id = #{id}
|
</delete>
|
|
<delete id="deleteArdAppPatrolpointRecordImgByIds" parameterType="String">
|
delete from ard_app_patrolpoint_record_img where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|