|
@@ -6,14 +6,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<resultMap type="WarnManage" id="WarnManageResult">
|
|
|
<result property="warnId" column="warn_id" />
|
|
|
- <result property="warnType" column="warn_type" />
|
|
|
- <result property="warnSign" column="warn_sign" />
|
|
|
+ <result property="equipmentIp" column="equipment_ip" />
|
|
|
+ <result property="equipmentName" column="equipment_name" />
|
|
|
<result property="channelId" column="channel_id" />
|
|
|
+ <result property="channelNum" column="channel_num" />
|
|
|
+ <result property="algorithmType" column="algorithm_type" />
|
|
|
+ <result property="parameterSet" column="parameter_set" />
|
|
|
<result property="videoAddress" column="video_address" />
|
|
|
- <result property="reportAddress" column="report_address" />
|
|
|
+ <result property="warnImage" column="warn_image" />
|
|
|
<result property="reportStatus" column="report_status" />
|
|
|
<result property="warnTime" column="warn_time" />
|
|
|
- <result property="warnImage" column="warn_image" />
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
<result property="createBy" column="create_by" />
|
|
|
<result property="createTime" column="create_time" />
|
|
@@ -23,20 +25,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectWarnManageVo">
|
|
|
- select warn_id, warn_type, warn_sign, channel_id, video_address, report_address, report_status, warn_time, warn_image, del_flag, create_by, create_time, update_by, update_time, remark from warn_manage
|
|
|
+ select warn_id, equipment_ip, equipment_name, channel_id, channel_num, algorithm_type, parameter_set, video_address, warn_image, report_status, warn_time, del_flag, create_by, create_time, update_by, update_time, remark from warn_manage
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectWarnManageList" parameterType="WarnManage" resultMap="WarnManageResult">
|
|
|
<include refid="selectWarnManageVo"/>
|
|
|
<where>
|
|
|
- <if test="warnType != null and warnType != ''"> and warn_type = #{warnType}</if>
|
|
|
- <if test="warnSign != null and warnSign != ''"> and warn_sign = #{warnSign}</if>
|
|
|
+ <if test="equipmentIp != null and equipmentIp != ''"> and equipment_ip = #{equipmentIp}</if>
|
|
|
+ <if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
|
|
|
<if test="channelId != null "> and channel_id = #{channelId}</if>
|
|
|
+ <if test="channelNum != null and channelNum != ''"> and channel_num = #{channelNum}</if>
|
|
|
+ <if test="algorithmType != null and algorithmType != ''"> and algorithm_type = #{algorithmType}</if>
|
|
|
+ <if test="parameterSet != null and parameterSet != ''"> and parameter_set = #{parameterSet}</if>
|
|
|
<if test="videoAddress != null and videoAddress != ''"> and video_address = #{videoAddress}</if>
|
|
|
- <if test="reportAddress != null and reportAddress != ''"> and report_address = #{reportAddress}</if>
|
|
|
+ <if test="warnImage != null and warnImage != ''"> and warn_image = #{warnImage}</if>
|
|
|
<if test="reportStatus != null and reportStatus != ''"> and report_status = #{reportStatus}</if>
|
|
|
<if test="warnTime != null "> and warn_time = #{warnTime}</if>
|
|
|
- <if test="warnImage != null and warnImage != ''"> and warn_image = #{warnImage}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -48,14 +52,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<insert id="insertWarnManage" parameterType="WarnManage" useGeneratedKeys="true" keyProperty="warnId">
|
|
|
insert into warn_manage
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="warnType != null">warn_type,</if>
|
|
|
- <if test="warnSign != null">warn_sign,</if>
|
|
|
+ <if test="equipmentIp != null and equipmentIp != ''">equipment_ip,</if>
|
|
|
+ <if test="equipmentName != null and equipmentName != ''">equipment_name,</if>
|
|
|
<if test="channelId != null">channel_id,</if>
|
|
|
+ <if test="channelNum != null and channelNum != ''">channel_num,</if>
|
|
|
+ <if test="algorithmType != null and algorithmType != ''">algorithm_type,</if>
|
|
|
+ <if test="parameterSet != null and parameterSet != ''">parameter_set,</if>
|
|
|
<if test="videoAddress != null">video_address,</if>
|
|
|
- <if test="reportAddress != null">report_address,</if>
|
|
|
+ <if test="warnImage != null">warn_image,</if>
|
|
|
<if test="reportStatus != null">report_status,</if>
|
|
|
<if test="warnTime != null">warn_time,</if>
|
|
|
- <if test="warnImage != null">warn_image,</if>
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
<if test="createTime != null">create_time,</if>
|
|
@@ -64,14 +70,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="remark != null">remark,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="warnType != null">#{warnType},</if>
|
|
|
- <if test="warnSign != null">#{warnSign},</if>
|
|
|
+ <if test="equipmentIp != null and equipmentIp != ''">#{equipmentIp},</if>
|
|
|
+ <if test="equipmentName != null and equipmentName != ''">#{equipmentName},</if>
|
|
|
<if test="channelId != null">#{channelId},</if>
|
|
|
+ <if test="channelNum != null and channelNum != ''">#{channelNum},</if>
|
|
|
+ <if test="algorithmType != null and algorithmType != ''">#{algorithmType},</if>
|
|
|
+ <if test="parameterSet != null and parameterSet != ''">#{parameterSet},</if>
|
|
|
<if test="videoAddress != null">#{videoAddress},</if>
|
|
|
- <if test="reportAddress != null">#{reportAddress},</if>
|
|
|
+ <if test="warnImage != null">#{warnImage},</if>
|
|
|
<if test="reportStatus != null">#{reportStatus},</if>
|
|
|
<if test="warnTime != null">#{warnTime},</if>
|
|
|
- <if test="warnImage != null">#{warnImage},</if>
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
@@ -84,14 +92,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<update id="updateWarnManage" parameterType="WarnManage">
|
|
|
update warn_manage
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="warnType != null">warn_type = #{warnType},</if>
|
|
|
- <if test="warnSign != null">warn_sign = #{warnSign},</if>
|
|
|
+ <if test="equipmentIp != null and equipmentIp != ''">equipment_ip = #{equipmentIp},</if>
|
|
|
+ <if test="equipmentName != null and equipmentName != ''">equipment_name = #{equipmentName},</if>
|
|
|
<if test="channelId != null">channel_id = #{channelId},</if>
|
|
|
+ <if test="channelNum != null and channelNum != ''">channel_num = #{channelNum},</if>
|
|
|
+ <if test="algorithmType != null and algorithmType != ''">algorithm_type = #{algorithmType},</if>
|
|
|
+ <if test="parameterSet != null and parameterSet != ''">parameter_set = #{parameterSet},</if>
|
|
|
<if test="videoAddress != null">video_address = #{videoAddress},</if>
|
|
|
- <if test="reportAddress != null">report_address = #{reportAddress},</if>
|
|
|
+ <if test="warnImage != null">warn_image = #{warnImage},</if>
|
|
|
<if test="reportStatus != null">report_status = #{reportStatus},</if>
|
|
|
<if test="warnTime != null">warn_time = #{warnTime},</if>
|
|
|
- <if test="warnImage != null">warn_image = #{warnImage},</if>
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|