| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectImageResourceSecurityDetailVo"> |
| | | select id, |
| | | SELECT id, |
| | | ip, |
| | | dept_id, |
| | | alarm_category, |
| | |
| | | num, |
| | | alarm_time, |
| | | create_time |
| | | from t_image_resource_security_detail |
| | | FROM t_image_resource_security_detail |
| | | </sql> |
| | | |
| | | <select id="selectImageResourceSecurityDetailList" resultMap="ImageResourceSecurityDetailResult"> |
| | | <include refid="selectImageResourceSecurityDetailVo"/> |
| | | <select id="selectImageResourceSecurityDetailList" resultType="com.ycl.platform.domain.entity.ImageResourceSecurityDetail"> |
| | | select id, |
| | | ip, |
| | | a.dept_id, |
| | | dept_name, |
| | | alarm_category, |
| | | alarm_level, |
| | | num, |
| | | alarm_time, |
| | | a.create_time |
| | | from t_image_resource_security_detail a |
| | | LEFT JOIN sys_dept b ON a.dept_id = b.dept_id AND b.del_flag = 0 |
| | | <where> |
| | | <if test="ip != null and ip != ''">and ip = #{ip}</if> |
| | | <if test="deptId != null ">and dept_id = #{deptId}</if> |
| | | <if test="deptId != null ">and a.dept_id = #{deptId}</if> |
| | | <if test="alarmCategory != null and alarmCategory != ''">and alarm_category = #{alarmCategory}</if> |
| | | <if test="alarmLevel != null ">and alarm_level = #{alarmLevel}</if> |
| | | <if test="num != null ">and num = #{num}</if> |
| | |
| | | </select> |
| | | |
| | | <select id="selectImageResourceSecurityDetailById"> |
| | | resultMap="ImageResourceSecurityDetailResult"> |
| | | resultMap="ImageResourceSecurityDetailResult"> |
| | | <include refid="selectImageResourceSecurityDetailVo"/> |
| | | where id = #{id} |
| | | </select> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="saveBatch"> |
| | | INSERT INTO t_image_resource_security_detail (ip, dept_id, alarm_category, alarm_level, num, alarm_time, create_time) VALUES |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.ip}, #{item.deptId}, #{item.alarmCategory}, #{item.alarmLevel}, #{item.num}, #{item.alarmTime}, NOW()) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <update id="updateImageResourceSecurityDetail"> |
| | | update t_image_resource_security_detail |
| | | <trim prefix="SET" suffixOverrides=","> |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteImageResourceSecurityDetailById"> |
| | | delete |
| | | from t_image_resource_security_detail |
| | | where id = #{id} |
| | | DELETE |
| | | FROM t_image_resource_security_detail |
| | | WHERE id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteImageResourceSecurityDetailByIds"> |