|
|
@@ -0,0 +1,198 @@
|
|
|
+<?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.jjt.biz.mapper.RipaMetricsAnalyMapper">
|
|
|
+
|
|
|
+ <resultMap type="RipaMetricsAnaly" id="RipaMetricsAnalyResult">
|
|
|
+ <result property="analyId" column="ANALY_ID"/>
|
|
|
+ <result property="autoId" column="AUTO_ID"/>
|
|
|
+ <result property="algoId" column="ALGO_ID"/>
|
|
|
+ <result property="timeSwitch" column="TIME_SWITCH"/>
|
|
|
+ <result property="scheduleCycle" column="SCHEDULE_CYCLE"/>
|
|
|
+ <result property="lastTime" column="LAST_TIME"/>
|
|
|
+ <result property="alarmWitch" column="ALARM_WITCH"/>
|
|
|
+ <result property="alarmKey" column="ALARM_KEY"/>
|
|
|
+ <result property="alarmContent" column="ALARM_CONTENT"/>
|
|
|
+ <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="selectRipaMetricsAnalyVo">
|
|
|
+ select ANALY_ID, AUTO_ID, ALGO_ID, TIME_SWITCH, SCHEDULE_CYCLE, LAST_TIME, ALARM_WITCH, ALARM_KEY, ALARM_CONTENT, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK
|
|
|
+ from ripa_metrics_analy
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectRipaMetricsAnalyList" parameterType="RipaMetricsAnaly" resultMap="RipaMetricsAnalyResult">
|
|
|
+ <include refid="selectRipaMetricsAnalyVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="autoId != null ">
|
|
|
+ and AUTO_ID = #{autoId}
|
|
|
+ </if>
|
|
|
+ <if test="algoId != null ">
|
|
|
+ and ALGO_ID = #{algoId}
|
|
|
+ </if>
|
|
|
+ <if test="timeSwitch != null and timeSwitch != ''">
|
|
|
+ and TIME_SWITCH = #{timeSwitch}
|
|
|
+ </if>
|
|
|
+ <if test="scheduleCycle != null ">
|
|
|
+ and SCHEDULE_CYCLE = #{scheduleCycle}
|
|
|
+ </if>
|
|
|
+ <if test="lastTime != null ">
|
|
|
+ and LAST_TIME = #{lastTime}
|
|
|
+ </if>
|
|
|
+ <if test="alarmWitch != null and alarmWitch != ''">
|
|
|
+ and ALARM_WITCH = #{alarmWitch}
|
|
|
+ </if>
|
|
|
+ <if test="alarmKey != null and alarmKey != ''">
|
|
|
+ and ALARM_KEY = #{alarmKey}
|
|
|
+ </if>
|
|
|
+ <if test="alarmContent != null and alarmContent != ''">
|
|
|
+ and ALARM_CONTENT = #{alarmContent}
|
|
|
+ </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="selectRipaMetricsAnalyByAnalyId" parameterType="Long"
|
|
|
+ resultMap="RipaMetricsAnalyResult">
|
|
|
+ <include refid="selectRipaMetricsAnalyVo"/>
|
|
|
+ where ANALY_ID = #{analyId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertRipaMetricsAnaly" parameterType="RipaMetricsAnaly" useGeneratedKeys="true"
|
|
|
+ keyProperty="analyId">
|
|
|
+ insert into ripa_metrics_analy
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="autoId != null">AUTO_ID,
|
|
|
+ </if>
|
|
|
+ <if test="algoId != null">ALGO_ID,
|
|
|
+ </if>
|
|
|
+ <if test="timeSwitch != null and timeSwitch != ''">TIME_SWITCH,
|
|
|
+ </if>
|
|
|
+ <if test="scheduleCycle != null">SCHEDULE_CYCLE,
|
|
|
+ </if>
|
|
|
+ <if test="lastTime != null">LAST_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="alarmWitch != null">ALARM_WITCH,
|
|
|
+ </if>
|
|
|
+ <if test="alarmKey != null and alarmKey != ''">ALARM_KEY,
|
|
|
+ </if>
|
|
|
+ <if test="alarmContent != null and alarmContent != ''">ALARM_CONTENT,
|
|
|
+ </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="autoId != null">#{autoId},
|
|
|
+ </if>
|
|
|
+ <if test="algoId != null">#{algoId},
|
|
|
+ </if>
|
|
|
+ <if test="timeSwitch != null and timeSwitch != ''">#{timeSwitch},
|
|
|
+ </if>
|
|
|
+ <if test="scheduleCycle != null">#{scheduleCycle},
|
|
|
+ </if>
|
|
|
+ <if test="lastTime != null">#{lastTime},
|
|
|
+ </if>
|
|
|
+ <if test="alarmWitch != null">#{alarmWitch},
|
|
|
+ </if>
|
|
|
+ <if test="alarmKey != null and alarmKey != ''">#{alarmKey},
|
|
|
+ </if>
|
|
|
+ <if test="alarmContent != null and alarmContent != ''">#{alarmContent},
|
|
|
+ </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="updateRipaMetricsAnaly" parameterType="RipaMetricsAnaly">
|
|
|
+ update ripa_metrics_analy
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="autoId != null">AUTO_ID =
|
|
|
+ #{autoId},
|
|
|
+ </if>
|
|
|
+ <if test="algoId != null">ALGO_ID =
|
|
|
+ #{algoId},
|
|
|
+ </if>
|
|
|
+ <if test="timeSwitch != null and timeSwitch != ''">TIME_SWITCH =
|
|
|
+ #{timeSwitch},
|
|
|
+ </if>
|
|
|
+ <if test="scheduleCycle != null">SCHEDULE_CYCLE =
|
|
|
+ #{scheduleCycle},
|
|
|
+ </if>
|
|
|
+ <if test="lastTime != null">LAST_TIME =
|
|
|
+ #{lastTime},
|
|
|
+ </if>
|
|
|
+ <if test="alarmWitch != null">ALARM_WITCH =
|
|
|
+ #{alarmWitch},
|
|
|
+ </if>
|
|
|
+ <if test="alarmKey != null and alarmKey != ''">ALARM_KEY =
|
|
|
+ #{alarmKey},
|
|
|
+ </if>
|
|
|
+ <if test="alarmContent != null and alarmContent != ''">ALARM_CONTENT =
|
|
|
+ #{alarmContent},
|
|
|
+ </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 ANALY_ID = #{analyId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteRipaMetricsAnalyByAnalyId" parameterType="Long">
|
|
|
+ delete
|
|
|
+ from ripa_metrics_analy where ANALY_ID = #{analyId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteRipaMetricsAnalyByAnalyIds" parameterType="String">
|
|
|
+ delete from ripa_metrics_analy where ANALY_ID in
|
|
|
+ <foreach item="analyId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{analyId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|