<?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.alarmpoints.well.mapper.ArdWellGuideCameraMapper">
|
|
<resultMap type="ArdWellGuideCamera" id="ArdWellGuideCameraResult">
|
<result property="id" column="id" />
|
<result property="cameraId" column="camera_id" />
|
<result property="p1" column="p1" />
|
<result property="t1" column="t1" />
|
<result property="z1" column="z1" />
|
<result property="p2" column="p2" />
|
<result property="t2" column="t2" />
|
<result property="z2" column="z2" />
|
<result property="wellId" column="well_id" />
|
</resultMap>
|
|
<sql id="selectArdWellGuideCameraVo">
|
select id, camera_id, p1, t1, z1, p2, t2, z2, well_id from ard_well_guide_camera
|
</sql>
|
|
<select id="selectArdWellGuideCameraList" parameterType="ArdWellGuideCamera" resultMap="ArdWellGuideCameraResult">
|
<include refid="selectArdWellGuideCameraVo"/>
|
<where>
|
<if test="cameraId != null and cameraId != ''"> and camera_id = #{cameraId}</if>
|
<if test="p1 != null "> and p1 = #{p1}</if>
|
<if test="t1 != null "> and t1 = #{t1}</if>
|
<if test="z1 != null "> and z1 = #{z1}</if>
|
<if test="p2 != null "> and p2 = #{p2}</if>
|
<if test="t2 != null "> and t2 = #{t2}</if>
|
<if test="z2 != null "> and z2 = #{z2}</if>
|
<if test="wellId != null and wellId != ''"> and well_id = #{wellId}</if>
|
</where>
|
</select>
|
|
<select id="selectArdWellGuideCameraById" parameterType="String" resultMap="ArdWellGuideCameraResult">
|
<include refid="selectArdWellGuideCameraVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertArdWellGuideCamera" parameterType="ArdWellGuideCamera">
|
insert into ard_well_guide_camera
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="cameraId != null">camera_id,</if>
|
<if test="p1 != null">p1,</if>
|
<if test="t1 != null">t1,</if>
|
<if test="z1 != null">z1,</if>
|
<if test="p2 != null">p2,</if>
|
<if test="t2 != null">t2,</if>
|
<if test="z2 != null">z2,</if>
|
<if test="wellId != null">well_id,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="cameraId != null">#{cameraId},</if>
|
<if test="p1 != null">#{p1},</if>
|
<if test="t1 != null">#{t1},</if>
|
<if test="z1 != null">#{z1},</if>
|
<if test="p2 != null">#{p2},</if>
|
<if test="t2 != null">#{t2},</if>
|
<if test="z2 != null">#{z2},</if>
|
<if test="wellId != null">#{wellId},</if>
|
</trim>
|
</insert>
|
|
<update id="updateArdWellGuideCamera" parameterType="ArdWellGuideCamera">
|
update ard_well_guide_camera
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="cameraId != null">camera_id = #{cameraId},</if>
|
<if test="p1 != null">p1 = #{p1},</if>
|
<if test="t1 != null">t1 = #{t1},</if>
|
<if test="z1 != null">z1 = #{z1},</if>
|
<if test="p2 != null">p2 = #{p2},</if>
|
<if test="t2 != null">t2 = #{t2},</if>
|
<if test="z2 != null">z2 = #{z2},</if>
|
<if test="wellId != null">well_id = #{wellId},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteArdWellGuideCameraById" parameterType="String">
|
delete from ard_well_guide_camera where id = #{id}
|
</delete>
|
|
<delete id="deleteArdWellGuideCameraByIds" parameterType="String">
|
delete from ard_well_guide_camera where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|