|
@@ -0,0 +1,108 @@
|
|
|
|
+<?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.system.mapper.BomanCameraMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="BomanCamera" id="BomanCameraResult">
|
|
|
|
+ <result property="cameraId" column="camera_id" />
|
|
|
|
+ <result property="type" column="type" />
|
|
|
|
+ <result property="cameraImage" column="camera_image" />
|
|
|
|
+ <result property="ip" column="ip" />
|
|
|
|
+ <result property="prod" column="prod" />
|
|
|
|
+ <result property="cameraAccount" column="camera_account" />
|
|
|
|
+ <result property="cameraPwd" column="camera_pwd" />
|
|
|
|
+ <result property="position" column="position" />
|
|
|
|
+ <result property="sort" column="sort" />
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectBomanCameraVo">
|
|
|
|
+ select camera_id, type, camera_image, ip, prod, camera_account, camera_pwd, position, sort, create_time, create_by, update_by, update_time from boman_camera
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectBomanCameraList" parameterType="BomanCamera" resultMap="BomanCameraResult">
|
|
|
|
+ <include refid="selectBomanCameraVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
|
+ <if test="cameraImage != null and cameraImage != ''"> and camera_image = #{cameraImage}</if>
|
|
|
|
+ <if test="ip != null and ip != ''"> and ip = #{ip}</if>
|
|
|
|
+ <if test="prod != null and prod != ''"> and prod = #{prod}</if>
|
|
|
|
+ <if test="cameraAccount != null and cameraAccount != ''"> and camera_account = #{cameraAccount}</if>
|
|
|
|
+ <if test="cameraPwd != null and cameraPwd != ''"> and camera_pwd = #{cameraPwd}</if>
|
|
|
|
+ <if test="position != null and position != ''"> and position = #{position}</if>
|
|
|
|
+ <if test="sort != null "> and sort = #{sort}</if>
|
|
|
|
+ </where>
|
|
|
|
+ order by sort asc, create_time desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectBomanCameraByCameraId" parameterType="Long" resultMap="BomanCameraResult">
|
|
|
|
+ <include refid="selectBomanCameraVo"/>
|
|
|
|
+ where camera_id = #{cameraId}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertBomanCamera" parameterType="BomanCamera" useGeneratedKeys="true" keyProperty="cameraId">
|
|
|
|
+ insert into boman_camera
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="type != null">type,</if>
|
|
|
|
+ <if test="cameraImage != null">camera_image,</if>
|
|
|
|
+ <if test="ip != null">ip,</if>
|
|
|
|
+ <if test="prod != null">prod,</if>
|
|
|
|
+ <if test="cameraAccount != null">camera_account,</if>
|
|
|
|
+ <if test="cameraPwd != null">camera_pwd,</if>
|
|
|
|
+ <if test="position != null">position,</if>
|
|
|
|
+ <if test="sort != null">sort,</if>
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
|
+ <if test="cameraImage != null">#{cameraImage},</if>
|
|
|
|
+ <if test="ip != null">#{ip},</if>
|
|
|
|
+ <if test="prod != null">#{prod},</if>
|
|
|
|
+ <if test="cameraAccount != null">#{cameraAccount},</if>
|
|
|
|
+ <if test="cameraPwd != null">#{cameraPwd},</if>
|
|
|
|
+ <if test="position != null">#{position},</if>
|
|
|
|
+ <if test="sort != null">#{sort},</if>
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateBomanCamera" parameterType="BomanCamera">
|
|
|
|
+ update boman_camera
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
|
+ <if test="cameraImage != null">camera_image = #{cameraImage},</if>
|
|
|
|
+ <if test="ip != null">ip = #{ip},</if>
|
|
|
|
+ <if test="prod != null">prod = #{prod},</if>
|
|
|
|
+ <if test="cameraAccount != null">camera_account = #{cameraAccount},</if>
|
|
|
|
+ <if test="cameraPwd != null">camera_pwd = #{cameraPwd},</if>
|
|
|
|
+ <if test="position != null">position = #{position},</if>
|
|
|
|
+ <if test="sort != null">sort = #{sort},</if>
|
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ where camera_id = #{cameraId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteBomanCameraByCameraId" parameterType="Long">
|
|
|
|
+ delete from boman_camera where camera_id = #{cameraId}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteBomanCameraByCameraIds" parameterType="String">
|
|
|
|
+ delete from boman_camera where camera_id in
|
|
|
|
+ <foreach item="cameraId" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{cameraId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|