jhprjv2/ruoyi-quartz/src/main/resources/mapper/quartz/DevPitmonitSouthsmosThresho...

151 lines
8.6 KiB
XML

<?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.quartz.mapper.DevPitmonitSouthsmosThresholdMapper">
<resultMap type="DevPitmonitSouthsmosThreshold" id="DevPitmonitSouthsmosThresholdResult">
<result property="id" column="id" />
<result property="cfgId" column="cfgId" />
<result property="srvId" column="srvId" />
<result property="alarmInfo" column="alarmInfo" />
<result property="alarmName" column="alarmName" />
<result property="intervalA" column="intervalA" />
<result property="intervalB" column="intervalB" />
<result property="level" column="level" />
<result property="monitorElementId" column="monitorElementId" />
<result property="monitorItemId" column="monitorItemId" />
<result property="monitorItemName" column="monitorItemName" />
<result property="tgId" column="tgId" />
<result property="threshold" column="threshold" />
<result property="type" column="type" />
<result property="unit" column="unit" />
<result property="state" column="state" />
<result property="remark" column="remark" />
<result property="isDel" column="is_del" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectDevPitmonitSouthsmosThresholdVo">
select id, cfgId, srvId, alarmInfo, alarmName, intervalA, intervalB, level, monitorElementId, monitorItemId, monitorItemName, tgId, threshold, type, unit, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_threshold
</sql>
<select id="selectDevPitmonitSouthsmosThresholdList" parameterType="DevPitmonitSouthsmosThreshold" resultMap="DevPitmonitSouthsmosThresholdResult">
<include refid="selectDevPitmonitSouthsmosThresholdVo"/>
<where>
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
<if test="srvId != null "> and srvId = #{srvId}</if>
<if test="alarmInfo != null and alarmInfo != ''"> and alarmInfo = #{alarmInfo}</if>
<if test="alarmName != null and alarmName != ''"> and alarmName like concat('%', #{alarmName}, '%')</if>
<if test="intervalA != null "> and intervalA = #{intervalA}</if>
<if test="intervalB != null "> and intervalB = #{intervalB}</if>
<if test="level != null "> and level = #{level}</if>
<if test="monitorElementId != null "> and monitorElementId = #{monitorElementId}</if>
<if test="monitorItemId != null "> and monitorItemId = #{monitorItemId}</if>
<if test="monitorItemName != null and monitorItemName != ''"> and monitorItemName like concat('%', #{monitorItemName}, '%')</if>
<if test="tgId != null "> and tgId = #{tgId}</if>
<if test="threshold != null and threshold != ''"> and threshold = #{threshold}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="state != null "> and state = #{state}</if>
<if test="isDel != null "> and is_del = #{isDel}</if>
</where>
</select>
<select id="selectDevPitmonitSouthsmosThresholdById" parameterType="Long" resultMap="DevPitmonitSouthsmosThresholdResult">
<include refid="selectDevPitmonitSouthsmosThresholdVo"/>
where id = #{id}
</select>
<insert id="insertDevPitmonitSouthsmosThreshold" parameterType="DevPitmonitSouthsmosThreshold" useGeneratedKeys="true" keyProperty="id">
insert into dev_pitmonit_southsmos_threshold
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cfgId != null">cfgId,</if>
<if test="srvId != null">srvId,</if>
<if test="alarmInfo != null">alarmInfo,</if>
<if test="alarmName != null">alarmName,</if>
<if test="intervalA != null">intervalA,</if>
<if test="intervalB != null">intervalB,</if>
<if test="level != null">level,</if>
<if test="monitorElementId != null">monitorElementId,</if>
<if test="monitorItemId != null">monitorItemId,</if>
<if test="monitorItemName != null">monitorItemName,</if>
<if test="tgId != null">tgId,</if>
<if test="threshold != null">threshold,</if>
<if test="type != null">type,</if>
<if test="unit != null">unit,</if>
<if test="state != null">state,</if>
<if test="remark != null">remark,</if>
<if test="isDel != null">is_del,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cfgId != null">#{cfgId},</if>
<if test="srvId != null">#{srvId},</if>
<if test="alarmInfo != null">#{alarmInfo},</if>
<if test="alarmName != null">#{alarmName},</if>
<if test="intervalA != null">#{intervalA},</if>
<if test="intervalB != null">#{intervalB},</if>
<if test="level != null">#{level},</if>
<if test="monitorElementId != null">#{monitorElementId},</if>
<if test="monitorItemId != null">#{monitorItemId},</if>
<if test="monitorItemName != null">#{monitorItemName},</if>
<if test="tgId != null">#{tgId},</if>
<if test="threshold != null">#{threshold},</if>
<if test="type != null">#{type},</if>
<if test="unit != null">#{unit},</if>
<if test="state != null">#{state},</if>
<if test="remark != null">#{remark},</if>
<if test="isDel != null">#{isDel},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateDevPitmonitSouthsmosThreshold" parameterType="DevPitmonitSouthsmosThreshold">
update dev_pitmonit_southsmos_threshold
<trim prefix="SET" suffixOverrides=",">
<if test="cfgId != null">cfgId = #{cfgId},</if>
<if test="srvId != null">srvId = #{srvId},</if>
<if test="alarmInfo != null">alarmInfo = #{alarmInfo},</if>
<if test="alarmName != null">alarmName = #{alarmName},</if>
<if test="intervalA != null">intervalA = #{intervalA},</if>
<if test="intervalB != null">intervalB = #{intervalB},</if>
<if test="level != null">level = #{level},</if>
<if test="monitorElementId != null">monitorElementId = #{monitorElementId},</if>
<if test="monitorItemId != null">monitorItemId = #{monitorItemId},</if>
<if test="monitorItemName != null">monitorItemName = #{monitorItemName},</if>
<if test="tgId != null">tgId = #{tgId},</if>
<if test="threshold != null">threshold = #{threshold},</if>
<if test="type != null">type = #{type},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="state != null">state = #{state},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDevPitmonitSouthsmosThresholdById" parameterType="Long">
delete from dev_pitmonit_southsmos_threshold where id = #{id}
</delete>
<delete id="deleteDevPitmonitSouthsmosThresholdByIds" parameterType="String">
delete from dev_pitmonit_southsmos_threshold where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>