开发监控看板组管理CRUD
设计告警阈值配置功能
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
<?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.tongran.rocketmq.mapper.RmAlarmThresholdMapper">
|
||||
|
||||
<resultMap type="RmAlarmThreshold" id="RmAlarmThresholdResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="alarmType" column="alarm_type" />
|
||||
<result property="conditionItem" column="condition_item" />
|
||||
<result property="compareOperator" column="compare_operator" />
|
||||
<result property="thresholdValue" column="threshold_value" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmAlarmThresholdVo">
|
||||
select id, alarm_type, condition_item, compare_operator, threshold_value, create_by, create_time, update_by, update_time, remark from rm_alarm_threshold
|
||||
</sql>
|
||||
|
||||
<select id="selectRmAlarmThresholdList" parameterType="RmAlarmThreshold" resultMap="RmAlarmThresholdResult">
|
||||
<include refid="selectRmAlarmThresholdVo"/>
|
||||
<where>
|
||||
<if test="alarmType != null and alarmType != ''"> and alarm_type = #{alarmType}</if>
|
||||
<if test="conditionItem != null and conditionItem != ''"> and condition_item = #{conditionItem}</if>
|
||||
<if test="compareOperator != null and compareOperator != ''"> and compare_operator = #{compareOperator}</if>
|
||||
<if test="thresholdValue != null "> and threshold_value = #{thresholdValue}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRmAlarmThresholdById" parameterType="Long" resultMap="RmAlarmThresholdResult">
|
||||
<include refid="selectRmAlarmThresholdVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRmAlarmThreshold" parameterType="RmAlarmThreshold" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rm_alarm_threshold
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="alarmType != null and alarmType != ''">alarm_type,</if>
|
||||
<if test="conditionItem != null and conditionItem != ''">condition_item,</if>
|
||||
<if test="compareOperator != null and compareOperator != ''">compare_operator,</if>
|
||||
<if test="thresholdValue != null">threshold_value,</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>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="alarmType != null and alarmType != ''">#{alarmType},</if>
|
||||
<if test="conditionItem != null and conditionItem != ''">#{conditionItem},</if>
|
||||
<if test="compareOperator != null and compareOperator != ''">#{compareOperator},</if>
|
||||
<if test="thresholdValue != null">#{thresholdValue},</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>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRmAlarmThreshold" parameterType="RmAlarmThreshold">
|
||||
update rm_alarm_threshold
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="alarmType != null and alarmType != ''">alarm_type = #{alarmType},</if>
|
||||
<if test="conditionItem != null and conditionItem != ''">condition_item = #{conditionItem},</if>
|
||||
<if test="compareOperator != null and compareOperator != ''">compare_operator = #{compareOperator},</if>
|
||||
<if test="thresholdValue != null">threshold_value = #{thresholdValue},</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>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRmAlarmThresholdById" parameterType="Long">
|
||||
delete from rm_alarm_threshold where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRmAlarmThresholdByIds" parameterType="String">
|
||||
delete from rm_alarm_threshold where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user