|
@@ -0,0 +1,290 @@
|
|
|
|
|
+<?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.sckw.slope.detection.dao.mysql.KwsReportDataMapper">
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.sckw.slope.detection.model.dos.mysql.KwsReportData">
|
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
|
+ <!--@Table kws_report_data-->
|
|
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
|
|
+ <result column="template_id" jdbcType="BIGINT" property="templateId" />
|
|
|
|
|
+ <result column="project_id" jdbcType="BIGINT" property="projectId" />
|
|
|
|
|
+ <result column="project_name" jdbcType="VARCHAR" property="projectName" />
|
|
|
|
|
+ <result column="device_id" jdbcType="BIGINT" property="deviceId" />
|
|
|
|
|
+ <result column="device_name" jdbcType="VARCHAR" property="deviceName" />
|
|
|
|
|
+ <result column="sn_code" jdbcType="VARCHAR" property="snCode" />
|
|
|
|
|
+ <result column="alias" jdbcType="VARCHAR" property="alias" />
|
|
|
|
|
+ <result column="model_id" jdbcType="BIGINT" property="modelId" />
|
|
|
|
|
+ <result column="model_name" jdbcType="VARCHAR" property="modelName" />
|
|
|
|
|
+ <result column="device_type" jdbcType="VARCHAR" property="deviceType" />
|
|
|
|
|
+ <result column="device_label" jdbcType="VARCHAR" property="deviceLabel" />
|
|
|
|
|
+ <result column="lat" jdbcType="VARCHAR" property="lat" />
|
|
|
|
|
+ <result column="lng" jdbcType="VARCHAR" property="lng" />
|
|
|
|
|
+ <result column="alt" jdbcType="VARCHAR" property="alt" />
|
|
|
|
|
+ <result column="alarm_type" jdbcType="INTEGER" property="alarmType" />
|
|
|
|
|
+ <result column="alarm_title" jdbcType="VARCHAR" property="alarmTitle" />
|
|
|
|
|
+ <result column="content" jdbcType="VARCHAR" property="content" />
|
|
|
|
|
+ <result column="items" jdbcType="VARCHAR" property="items" />
|
|
|
|
|
+ <result column="alarm_time" jdbcType="TIMESTAMP" property="alarmTime" />
|
|
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
|
+ id, template_id, project_id, project_name, device_id, device_name, sn_code, `alias`,
|
|
|
|
|
+ model_id, model_name, device_type, device_label, lat, lng, alt, alarm_type, alarm_title,
|
|
|
|
|
+ content, items, alarm_time, create_time
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
|
|
+ from kws_report_data
|
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
|
+ delete from kws_report_data
|
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <insert id="insert" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsReportData">
|
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
|
+ insert into kws_report_data (id, template_id, project_id,
|
|
|
|
|
+ project_name, device_id, device_name,
|
|
|
|
|
+ sn_code, `alias`, model_id,
|
|
|
|
|
+ model_name, device_type, device_label,
|
|
|
|
|
+ lat, lng, alt, alarm_type,
|
|
|
|
|
+ alarm_title, content, items,
|
|
|
|
|
+ alarm_time, create_time)
|
|
|
|
|
+ values (#{id,jdbcType=BIGINT}, #{templateId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
|
|
|
|
|
+ #{projectName,jdbcType=VARCHAR}, #{deviceId,jdbcType=BIGINT}, #{deviceName,jdbcType=VARCHAR},
|
|
|
|
|
+ #{snCode,jdbcType=VARCHAR}, #{alias,jdbcType=VARCHAR}, #{modelId,jdbcType=BIGINT},
|
|
|
|
|
+ #{modelName,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR}, #{deviceLabel,jdbcType=VARCHAR},
|
|
|
|
|
+ #{lat,jdbcType=VARCHAR}, #{lng,jdbcType=VARCHAR}, #{alt,jdbcType=VARCHAR}, #{alarmType,jdbcType=INTEGER},
|
|
|
|
|
+ #{alarmTitle,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{items,jdbcType=VARCHAR},
|
|
|
|
|
+ #{alarmTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsReportData">
|
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
|
+ insert into kws_report_data
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="id != null">
|
|
|
|
|
+ id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="templateId != null">
|
|
|
|
|
+ template_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="projectId != null">
|
|
|
|
|
+ project_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="projectName != null">
|
|
|
|
|
+ project_name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceId != null">
|
|
|
|
|
+ device_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceName != null">
|
|
|
|
|
+ device_name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="snCode != null">
|
|
|
|
|
+ sn_code,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alias != null">
|
|
|
|
|
+ `alias`,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="modelId != null">
|
|
|
|
|
+ model_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="modelName != null">
|
|
|
|
|
+ model_name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceType != null">
|
|
|
|
|
+ device_type,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceLabel != null">
|
|
|
|
|
+ device_label,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lat != null">
|
|
|
|
|
+ lat,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lng != null">
|
|
|
|
|
+ lng,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alt != null">
|
|
|
|
|
+ alt,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alarmType != null">
|
|
|
|
|
+ alarm_type,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alarmTitle != null">
|
|
|
|
|
+ alarm_title,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="content != null">
|
|
|
|
|
+ content,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="items != null">
|
|
|
|
|
+ items,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alarmTime != null">
|
|
|
|
|
+ alarm_time,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ create_time,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="id != null">
|
|
|
|
|
+ #{id,jdbcType=BIGINT},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="templateId != null">
|
|
|
|
|
+ #{templateId,jdbcType=BIGINT},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="projectId != null">
|
|
|
|
|
+ #{projectId,jdbcType=BIGINT},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="projectName != null">
|
|
|
|
|
+ #{projectName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceId != null">
|
|
|
|
|
+ #{deviceId,jdbcType=BIGINT},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceName != null">
|
|
|
|
|
+ #{deviceName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="snCode != null">
|
|
|
|
|
+ #{snCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alias != null">
|
|
|
|
|
+ #{alias,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="modelId != null">
|
|
|
|
|
+ #{modelId,jdbcType=BIGINT},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="modelName != null">
|
|
|
|
|
+ #{modelName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceType != null">
|
|
|
|
|
+ #{deviceType,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceLabel != null">
|
|
|
|
|
+ #{deviceLabel,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lat != null">
|
|
|
|
|
+ #{lat,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lng != null">
|
|
|
|
|
+ #{lng,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alt != null">
|
|
|
|
|
+ #{alt,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alarmType != null">
|
|
|
|
|
+ #{alarmType,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alarmTitle != null">
|
|
|
|
|
+ #{alarmTitle,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="content != null">
|
|
|
|
|
+ #{content,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="items != null">
|
|
|
|
|
+ #{items,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alarmTime != null">
|
|
|
|
|
+ #{alarmTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsReportData">
|
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
|
+ update kws_report_data
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test="templateId != null">
|
|
|
|
|
+ template_id = #{templateId,jdbcType=BIGINT},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="projectId != null">
|
|
|
|
|
+ project_id = #{projectId,jdbcType=BIGINT},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="projectName != null">
|
|
|
|
|
+ project_name = #{projectName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceId != null">
|
|
|
|
|
+ device_id = #{deviceId,jdbcType=BIGINT},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceName != null">
|
|
|
|
|
+ device_name = #{deviceName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="snCode != null">
|
|
|
|
|
+ sn_code = #{snCode,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alias != null">
|
|
|
|
|
+ `alias` = #{alias,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="modelId != null">
|
|
|
|
|
+ model_id = #{modelId,jdbcType=BIGINT},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="modelName != null">
|
|
|
|
|
+ model_name = #{modelName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceType != null">
|
|
|
|
|
+ device_type = #{deviceType,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="deviceLabel != null">
|
|
|
|
|
+ device_label = #{deviceLabel,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lat != null">
|
|
|
|
|
+ lat = #{lat,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lng != null">
|
|
|
|
|
+ lng = #{lng,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alt != null">
|
|
|
|
|
+ alt = #{alt,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alarmType != null">
|
|
|
|
|
+ alarm_type = #{alarmType,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alarmTitle != null">
|
|
|
|
|
+ alarm_title = #{alarmTitle,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="content != null">
|
|
|
|
|
+ content = #{content,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="items != null">
|
|
|
|
|
+ items = #{items,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="alarmTime != null">
|
|
|
|
|
+ alarm_time = #{alarmTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </set>
|
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsReportData">
|
|
|
|
|
+ <!--@mbg.generated-->
|
|
|
|
|
+ update kws_report_data
|
|
|
|
|
+ set template_id = #{templateId,jdbcType=BIGINT},
|
|
|
|
|
+ project_id = #{projectId,jdbcType=BIGINT},
|
|
|
|
|
+ project_name = #{projectName,jdbcType=VARCHAR},
|
|
|
|
|
+ device_id = #{deviceId,jdbcType=BIGINT},
|
|
|
|
|
+ device_name = #{deviceName,jdbcType=VARCHAR},
|
|
|
|
|
+ sn_code = #{snCode,jdbcType=VARCHAR},
|
|
|
|
|
+ `alias` = #{alias,jdbcType=VARCHAR},
|
|
|
|
|
+ model_id = #{modelId,jdbcType=BIGINT},
|
|
|
|
|
+ model_name = #{modelName,jdbcType=VARCHAR},
|
|
|
|
|
+ device_type = #{deviceType,jdbcType=VARCHAR},
|
|
|
|
|
+ device_label = #{deviceLabel,jdbcType=VARCHAR},
|
|
|
|
|
+ lat = #{lat,jdbcType=VARCHAR},
|
|
|
|
|
+ lng = #{lng,jdbcType=VARCHAR},
|
|
|
|
|
+ alt = #{alt,jdbcType=VARCHAR},
|
|
|
|
|
+ alarm_type = #{alarmType,jdbcType=INTEGER},
|
|
|
|
|
+ alarm_title = #{alarmTitle,jdbcType=VARCHAR},
|
|
|
|
|
+ content = #{content,jdbcType=VARCHAR},
|
|
|
|
|
+ items = #{items,jdbcType=VARCHAR},
|
|
|
|
|
+ alarm_time = #{alarmTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
|
+ </update>
|
|
|
|
|
+</mapper>
|