|
|
@@ -19,6 +19,43 @@
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
<!--@mbg.generated-->
|
|
|
+ <select id="selectByDevicesId" parameterType="java.lang.String" resultType="java.util.Map">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ select count(id) as count,pid,type
|
|
|
+ from kws_alarm
|
|
|
+ where 1 = 1
|
|
|
+ <if test="devicesId != null and devicesId.size()>0">
|
|
|
+ AND pid IN
|
|
|
+ <foreach collection="devicesId" open="(" close=")" item="item" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ group by pid,type
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ delete from kws_alarm
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsAlarm">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ insert into kws_alarm (id, pid, title,
|
|
|
+ val, content, `level`,
|
|
|
+ `type`, lat, lng, alt,
|
|
|
+ create_time, trigger_times, `status`
|
|
|
+ )
|
|
|
+ values (#{id,jdbcType=BIGINT}, #{pid,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR},
|
|
|
+ #{val,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER},
|
|
|
+ #{type,jdbcType=INTEGER}, #{lat,jdbcType=VARCHAR}, #{lng,jdbcType=VARCHAR}, #{alt,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{triggerTimes,jdbcType=INTEGER}, #{status,jdbcType=TINYINT}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsAlarm">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ insert into kws_alarm
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
id,
|
|
|
title,
|
|
|
`level`,
|