|
@@ -5,221 +5,240 @@
|
|
|
<mapper namespace="com.jjt.biz.mapper.BizObjMcMapper">
|
|
|
|
|
|
<resultMap type="BizObjMc" id="BizObjMcResult">
|
|
|
- <result property="mcId" column="MC_ID"/>
|
|
|
- <result property="objId" column="OBJ_ID"/>
|
|
|
- <result property="metricsId" column="METRICS_ID"/>
|
|
|
- <result property="metricsCode" column="METRICS_CODE"/>
|
|
|
- <result property="alarmLow" column="ALARM_LOW"/>
|
|
|
- <result property="alarmMid" column="ALARM_MID"/>
|
|
|
- <result property="alarmHigh" column="ALARM_HIGH"/>
|
|
|
- <result property="event" column="EVENT"/>
|
|
|
- <result property="dataExp" column="DATA_EXP"/>
|
|
|
- <result property="findKey" column="FIND_KEY"/>
|
|
|
- <result property="findRule" column="FIND_RULE"/>
|
|
|
- <result property="findFlag" column="FIND_FLAG"/>
|
|
|
- <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"/>
|
|
|
+ <result property="mcId" column="MC_ID"/>
|
|
|
+ <result property="objId" column="OBJ_ID"/>
|
|
|
+ <result property="metricsId" column="METRICS_ID"/>
|
|
|
+ <result property="metricsName" column="METRICS_NAME"/>
|
|
|
+ <result property="metricsCode" column="METRICS_CODE"/>
|
|
|
+ <result property="alarmLow" column="ALARM_LOW"/>
|
|
|
+ <result property="alarmMid" column="ALARM_MID"/>
|
|
|
+ <result property="alarmHigh" column="ALARM_HIGH"/>
|
|
|
+ <result property="event" column="EVENT"/>
|
|
|
+ <result property="dataExp" column="DATA_EXP"/>
|
|
|
+ <result property="findKey" column="FIND_KEY"/>
|
|
|
+ <result property="findRule" column="FIND_RULE"/>
|
|
|
+ <result property="findFlag" column="FIND_FLAG"/>
|
|
|
+ <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="selectBizObjMcVo">
|
|
|
- select MC_ID, OBJ_ID, METRICS_ID, METRICS_CODE, ALARM_LOW, ALARM_MID, ALARM_HIGH, EVENT, DATA_EXP, FIND_KEY, FIND_RULE, FIND_FLAG, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK
|
|
|
+ select MC_ID,
|
|
|
+ OBJ_ID,
|
|
|
+ METRICS_ID,
|
|
|
+ METRICS_NAME,
|
|
|
+ METRICS_CODE,
|
|
|
+ ALARM_LOW,
|
|
|
+ ALARM_MID,
|
|
|
+ ALARM_HIGH,
|
|
|
+ EVENT,
|
|
|
+ DATA_EXP,
|
|
|
+ FIND_KEY,
|
|
|
+ FIND_RULE,
|
|
|
+ FIND_FLAG,
|
|
|
+ CREATE_BY,
|
|
|
+ CREATE_TIME,
|
|
|
+ UPDATE_BY,
|
|
|
+ UPDATE_TIME,
|
|
|
+ REMARK
|
|
|
from biz_obj_mc
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectBizObjMcList" parameterType="BizObjMc" resultMap="BizObjMcResult">
|
|
|
<include refid="selectBizObjMcVo"/>
|
|
|
<where>
|
|
|
- <if test="objId != null ">
|
|
|
- and OBJ_ID = #{objId}
|
|
|
- </if>
|
|
|
- <if test="metricsId != null ">
|
|
|
- and METRICS_ID = #{metricsId}
|
|
|
- </if>
|
|
|
- <if test="metricsCode != null and metricsCode != ''">
|
|
|
- and METRICS_CODE = #{metricsCode}
|
|
|
- </if>
|
|
|
- <if test="alarmLow != null and alarmLow != ''">
|
|
|
- and ALARM_LOW = #{alarmLow}
|
|
|
- </if>
|
|
|
- <if test="alarmMid != null and alarmMid != ''">
|
|
|
- and ALARM_MID = #{alarmMid}
|
|
|
- </if>
|
|
|
- <if test="alarmHigh != null and alarmHigh != ''">
|
|
|
- and ALARM_HIGH = #{alarmHigh}
|
|
|
- </if>
|
|
|
- <if test="event != null and event != ''">
|
|
|
- and EVENT = #{event}
|
|
|
- </if>
|
|
|
- <if test="dataExp != null and dataExp != ''">
|
|
|
- and DATA_EXP = #{dataExp}
|
|
|
- </if>
|
|
|
- <if test="findKey != null and findKey != ''">
|
|
|
- and FIND_KEY = #{findKey}
|
|
|
- </if>
|
|
|
- <if test="findRule != null and findRule != ''">
|
|
|
- and FIND_RULE = #{findRule}
|
|
|
- </if>
|
|
|
- <if test="findFlag != null and findFlag != ''">
|
|
|
- and FIND_FLAG = #{findFlag}
|
|
|
- </if>
|
|
|
- <if test="createBy != null and createBy != ''">
|
|
|
- and CREATE_BY = #{createBy}
|
|
|
- </if>
|
|
|
- <if test="createTime != null ">
|
|
|
- and CREATE_TIME = #{createTime}
|
|
|
- </if>
|
|
|
- <if test="updateBy != null and updateBy != ''">
|
|
|
- and UPDATE_BY = #{updateBy}
|
|
|
- </if>
|
|
|
- <if test="updateTime != null ">
|
|
|
- and UPDATE_TIME = #{updateTime}
|
|
|
- </if>
|
|
|
- <if test="remark != null and remark != ''">
|
|
|
- and REMARK = #{remark}
|
|
|
- </if>
|
|
|
+ <if test="objId != null ">
|
|
|
+ and OBJ_ID = #{objId}
|
|
|
+ </if>
|
|
|
+ <if test="metricsId != null ">
|
|
|
+ and METRICS_ID = #{metricsId}
|
|
|
+ </if>
|
|
|
+ <if test="metricsCode != null and metricsCode != ''">
|
|
|
+ and METRICS_CODE = #{metricsCode}
|
|
|
+ </if>
|
|
|
+ <if test="alarmLow != null and alarmLow != ''">
|
|
|
+ and ALARM_LOW = #{alarmLow}
|
|
|
+ </if>
|
|
|
+ <if test="alarmMid != null and alarmMid != ''">
|
|
|
+ and ALARM_MID = #{alarmMid}
|
|
|
+ </if>
|
|
|
+ <if test="alarmHigh != null and alarmHigh != ''">
|
|
|
+ and ALARM_HIGH = #{alarmHigh}
|
|
|
+ </if>
|
|
|
+ <if test="event != null and event != ''">
|
|
|
+ and EVENT = #{event}
|
|
|
+ </if>
|
|
|
+ <if test="dataExp != null and dataExp != ''">
|
|
|
+ and DATA_EXP = #{dataExp}
|
|
|
+ </if>
|
|
|
+ <if test="findKey != null and findKey != ''">
|
|
|
+ and FIND_KEY = #{findKey}
|
|
|
+ </if>
|
|
|
+ <if test="findRule != null and findRule != ''">
|
|
|
+ and FIND_RULE = #{findRule}
|
|
|
+ </if>
|
|
|
+ <if test="findFlag != null and findFlag != ''">
|
|
|
+ and FIND_FLAG = #{findFlag}
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null and createBy != ''">
|
|
|
+ and CREATE_BY = #{createBy}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null ">
|
|
|
+ and CREATE_TIME = #{createTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null and updateBy != ''">
|
|
|
+ and UPDATE_BY = #{updateBy}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null ">
|
|
|
+ and UPDATE_TIME = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and REMARK = #{remark}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectBizObjMcByMcId" parameterType="Long"
|
|
|
resultMap="BizObjMcResult">
|
|
|
- <include refid="selectBizObjMcVo"/>
|
|
|
- where MC_ID = #{mcId}
|
|
|
+ <include refid="selectBizObjMcVo"/>
|
|
|
+ where MC_ID = #{mcId}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertBizObjMc" parameterType="BizObjMc" useGeneratedKeys="true"
|
|
|
keyProperty="mcId">
|
|
|
insert into biz_obj_mc
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="objId != null">OBJ_ID,
|
|
|
- </if>
|
|
|
- <if test="metricsId != null">METRICS_ID,
|
|
|
- </if>
|
|
|
- <if test="metricsCode != null">METRICS_CODE,
|
|
|
- </if>
|
|
|
- <if test="alarmLow != null">ALARM_LOW,
|
|
|
- </if>
|
|
|
- <if test="alarmMid != null">ALARM_MID,
|
|
|
- </if>
|
|
|
- <if test="alarmHigh != null">ALARM_HIGH,
|
|
|
- </if>
|
|
|
- <if test="event != null">EVENT,
|
|
|
- </if>
|
|
|
- <if test="dataExp != null">DATA_EXP,
|
|
|
- </if>
|
|
|
- <if test="findKey != null">FIND_KEY,
|
|
|
- </if>
|
|
|
- <if test="findRule != null">FIND_RULE,
|
|
|
- </if>
|
|
|
- <if test="findFlag != null">FIND_FLAG,
|
|
|
- </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>
|
|
|
+ <if test="objId != null">OBJ_ID,
|
|
|
+ </if>
|
|
|
+ <if test="metricsId != null">METRICS_ID,
|
|
|
+ </if>
|
|
|
+ <if test="metricsCode != null">METRICS_CODE,
|
|
|
+ </if>
|
|
|
+ <if test="alarmLow != null">ALARM_LOW,
|
|
|
+ </if>
|
|
|
+ <if test="alarmMid != null">ALARM_MID,
|
|
|
+ </if>
|
|
|
+ <if test="alarmHigh != null">ALARM_HIGH,
|
|
|
+ </if>
|
|
|
+ <if test="event != null">EVENT,
|
|
|
+ </if>
|
|
|
+ <if test="dataExp != null">DATA_EXP,
|
|
|
+ </if>
|
|
|
+ <if test="findKey != null">FIND_KEY,
|
|
|
+ </if>
|
|
|
+ <if test="findRule != null">FIND_RULE,
|
|
|
+ </if>
|
|
|
+ <if test="findFlag != null">FIND_FLAG,
|
|
|
+ </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="objId != null">#{objId},
|
|
|
- </if>
|
|
|
- <if test="metricsId != null">#{metricsId},
|
|
|
- </if>
|
|
|
- <if test="metricsCode != null">#{metricsCode},
|
|
|
- </if>
|
|
|
- <if test="alarmLow != null">#{alarmLow},
|
|
|
- </if>
|
|
|
- <if test="alarmMid != null">#{alarmMid},
|
|
|
- </if>
|
|
|
- <if test="alarmHigh != null">#{alarmHigh},
|
|
|
- </if>
|
|
|
- <if test="event != null">#{event},
|
|
|
- </if>
|
|
|
- <if test="dataExp != null">#{dataExp},
|
|
|
- </if>
|
|
|
- <if test="findKey != null">#{findKey},
|
|
|
- </if>
|
|
|
- <if test="findRule != null">#{findRule},
|
|
|
- </if>
|
|
|
- <if test="findFlag != null">#{findFlag},
|
|
|
- </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>
|
|
|
+ <if test="objId != null">#{objId},
|
|
|
+ </if>
|
|
|
+ <if test="metricsId != null">#{metricsId},
|
|
|
+ </if>
|
|
|
+ <if test="metricsCode != null">#{metricsCode},
|
|
|
+ </if>
|
|
|
+ <if test="alarmLow != null">#{alarmLow},
|
|
|
+ </if>
|
|
|
+ <if test="alarmMid != null">#{alarmMid},
|
|
|
+ </if>
|
|
|
+ <if test="alarmHigh != null">#{alarmHigh},
|
|
|
+ </if>
|
|
|
+ <if test="event != null">#{event},
|
|
|
+ </if>
|
|
|
+ <if test="dataExp != null">#{dataExp},
|
|
|
+ </if>
|
|
|
+ <if test="findKey != null">#{findKey},
|
|
|
+ </if>
|
|
|
+ <if test="findRule != null">#{findRule},
|
|
|
+ </if>
|
|
|
+ <if test="findFlag != null">#{findFlag},
|
|
|
+ </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="updateBizObjMc" parameterType="BizObjMc">
|
|
|
update biz_obj_mc
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="objId != null">OBJ_ID =
|
|
|
- #{objId},
|
|
|
- </if>
|
|
|
- <if test="metricsId != null">METRICS_ID =
|
|
|
- #{metricsId},
|
|
|
- </if>
|
|
|
- <if test="metricsCode != null">METRICS_CODE =
|
|
|
- #{metricsCode},
|
|
|
- </if>
|
|
|
- <if test="alarmLow != null">ALARM_LOW =
|
|
|
- #{alarmLow},
|
|
|
- </if>
|
|
|
- <if test="alarmMid != null">ALARM_MID =
|
|
|
- #{alarmMid},
|
|
|
- </if>
|
|
|
- <if test="alarmHigh != null">ALARM_HIGH =
|
|
|
- #{alarmHigh},
|
|
|
- </if>
|
|
|
- <if test="event != null">EVENT =
|
|
|
- #{event},
|
|
|
- </if>
|
|
|
- <if test="dataExp != null">DATA_EXP =
|
|
|
- #{dataExp},
|
|
|
- </if>
|
|
|
- <if test="findKey != null">FIND_KEY =
|
|
|
- #{findKey},
|
|
|
- </if>
|
|
|
- <if test="findRule != null">FIND_RULE =
|
|
|
- #{findRule},
|
|
|
- </if>
|
|
|
- <if test="findFlag != null">FIND_FLAG =
|
|
|
- #{findFlag},
|
|
|
- </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>
|
|
|
+ <if test="objId != null">OBJ_ID =
|
|
|
+ #{objId},
|
|
|
+ </if>
|
|
|
+ <if test="metricsId != null">METRICS_ID =
|
|
|
+ #{metricsId},
|
|
|
+ </if>
|
|
|
+ <if test="metricsCode != null">METRICS_CODE =
|
|
|
+ #{metricsCode},
|
|
|
+ </if>
|
|
|
+ <if test="alarmLow != null">ALARM_LOW =
|
|
|
+ #{alarmLow},
|
|
|
+ </if>
|
|
|
+ <if test="alarmMid != null">ALARM_MID =
|
|
|
+ #{alarmMid},
|
|
|
+ </if>
|
|
|
+ <if test="alarmHigh != null">ALARM_HIGH =
|
|
|
+ #{alarmHigh},
|
|
|
+ </if>
|
|
|
+ <if test="event != null">EVENT =
|
|
|
+ #{event},
|
|
|
+ </if>
|
|
|
+ <if test="dataExp != null">DATA_EXP =
|
|
|
+ #{dataExp},
|
|
|
+ </if>
|
|
|
+ <if test="findKey != null">FIND_KEY =
|
|
|
+ #{findKey},
|
|
|
+ </if>
|
|
|
+ <if test="findRule != null">FIND_RULE =
|
|
|
+ #{findRule},
|
|
|
+ </if>
|
|
|
+ <if test="findFlag != null">FIND_FLAG =
|
|
|
+ #{findFlag},
|
|
|
+ </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 MC_ID = #{mcId}
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteBizObjMcByMcId" parameterType="Long">
|
|
|
delete
|
|
|
- from biz_obj_mc where MC_ID = #{mcId}
|
|
|
+ from biz_obj_mc
|
|
|
+ where MC_ID = #{mcId}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteBizObjMcByMcIds" parameterType="String">
|