<?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.web.controller.business.mapper.MonitorSetSfMapper"> <resultMap type="MonitorSetSf" id="MonitorSetSfResult"> <result property="id" column="id" /> <result property="setId" column="setId" /> <result property="userId" column="userId" /> <result property="type" column="type" /> <result property="setWay" column="setWay" /> <result property="warningLevel" column="warningLevel" /> <result property="proceeding" column="proceeding" /> <result property="beginLevel" column="beginLevel" /> <result property="endLevel" column="endLevel" /> <result property="caseCon" column="caseCon" /> <result property="otherLevel" column="otherLevel" /> <result property="monitorStatus" column="monitorStatus" /> <result property="status" column="status" /> <result property="createTime" column="createTime" /> <result property="updateTime" column="updateTime" /> </resultMap> <sql id="selectMonitorSetSfVo"> select id, setId, userId, type, setWay, warningLevel, proceeding, beginLevel, endLevel, caseCon, otherLevel, monitorStatus, status, createTime, updateTime from monitor_set_sf </sql> <select id="selectMonitorSetSfList" parameterType="MonitorSetSf" resultMap="MonitorSetSfResult"> <include refid="selectMonitorSetSfVo"/> <where> <if test="id != null "> and id = #{id}</if> <if test="setId != null and setId != '' "> and setId = #{setId}</if> <if test="userId != null and userId != '' "> and userId = #{userId}</if> <if test="type != null and type != '' "> and type = #{type}</if> <if test="setWay != null and setWay != '' "> and setWay = #{setWay}</if> <if test="warningLevel != null and warningLevel != '' "> and warningLevel = #{warningLevel}</if> <if test="proceeding != null and proceeding != '' "> and proceeding = #{proceeding}</if> <if test="beginLevel != null "> and beginLevel = #{beginLevel}</if> <if test="endLevel != null "> and endLevel = #{endLevel}</if> <if test="caseCon != null and caseCon != '' "> and caseCon = #{caseCon}</if> <if test="otherLevel != null and otherLevel != '' "> and otherLevel = #{otherLevel}</if> <if test="monitorStatus != null and monitorStatus != '' "> and monitorStatus = #{monitorStatus}</if> <if test="status != null and status != '' "> and status = #{status}</if> <if test="createTime != null "> and createTime = #{createTime}</if> <if test="updateTime != null "> and updateTime = #{updateTime}</if> </where> </select> <select id="selectMonitorSetSfById" parameterType="Integer" resultMap="MonitorSetSfResult"> <include refid="selectMonitorSetSfVo"/> where id = #{id} </select> <select id="selectMonitorSetSfByUserId" resultType="com.ruoyi.web.controller.business.domain.MonitorSetSf"> select * from monitor_set_sf where userId = #{ids} </select> <insert id="insertMonitorSetSf" parameterType="MonitorSetSf" useGeneratedKeys="true" keyProperty="id"> insert into monitor_set_sf <trim prefix="(" suffix=")" suffixOverrides=","> <if test="setId != null and setId != '' ">setId,</if> <if test="userId != null and userId != '' ">userId,</if> <if test="type != null and type != '' ">type,</if> <if test="setWay != null and setWay != '' ">setWay,</if> <if test="warningLevel != null and warningLevel != '' ">warningLevel,</if> <if test="proceeding != null and proceeding != '' ">proceeding,</if> <if test="beginLevel != null ">beginLevel,</if> <if test="endLevel != null ">endLevel,</if> <if test="caseCon != null and caseCon != '' ">caseCon,</if> <if test="otherLevel != null and otherLevel != '' ">otherLevel,</if> <if test="monitorStatus != null and monitorStatus != '' ">monitorStatus,</if> <if test="status != null and status != '' ">status,</if> <if test="createTime != null ">createTime,</if> <if test="updateTime != null ">updateTime,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="setId != null and setId != '' ">#{setId},</if> <if test="userId != null and userId != '' ">#{userId},</if> <if test="type != null and type != '' ">#{type},</if> <if test="setWay != null and setWay != '' ">#{setWay},</if> <if test="warningLevel != null and warningLevel != '' ">#{warningLevel},</if> <if test="proceeding != null and proceeding != '' ">#{proceeding},</if> <if test="beginLevel != null ">#{beginLevel},</if> <if test="endLevel != null ">#{endLevel},</if> <if test="caseCon != null and caseCon != '' ">#{caseCon},</if> <if test="otherLevel != null and otherLevel != '' ">#{otherLevel},</if> <if test="monitorStatus != null and monitorStatus != '' ">#{monitorStatus},</if> <if test="status != null and status != '' ">#{status},</if> <if test="createTime != null ">#{createTime},</if> <if test="updateTime != null ">#{updateTime},</if> </trim> </insert> <update id="updateMonitorSetSf" parameterType="MonitorSetSf"> update monitor_set_sf <trim prefix="SET" suffixOverrides=","> <if test="setId != null and setId != '' ">setId = #{setId},</if> <if test="userId != null and userId != '' ">userId = #{userId},</if> <if test="type != null and type != '' ">type = #{type},</if> <if test="setWay != null and setWay != '' ">setWay = #{setWay},</if> <if test="warningLevel != null and warningLevel != '' ">warningLevel = #{warningLevel},</if> <if test="proceeding != null and proceeding != '' ">proceeding = #{proceeding},</if> <if test="beginLevel != null ">beginLevel = #{beginLevel},</if> <if test="endLevel != null ">endLevel = #{endLevel},</if> <if test="caseCon != null and caseCon != '' ">caseCon = #{caseCon},</if> <if test="otherLevel != null and otherLevel != '' ">otherLevel = #{otherLevel},</if> <if test="monitorStatus != null and monitorStatus != '' ">monitorStatus = #{monitorStatus},</if> <if test="status != null and status != '' ">status = #{status},</if> <if test="createTime != null ">createTime = #{createTime},</if> <if test="updateTime != null ">updateTime = #{updateTime},</if> </trim> where id = #{id} </update> <delete id="deleteMonitorSetSfById" parameterType="Integer"> delete from monitor_set_sf where id = #{id} </delete> <delete id="deleteMonitorSetSfByIds" parameterType="String"> delete from monitor_set_sf where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> <delete id="deleteMonitorSetSfByUserId" parameterType="String"> delete from monitor_set_sf where userId = #{userId} </delete> </mapper>