|
|
|
|
<?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.techsor.datacenter.business.dao.auto.DeviceInfoMapper">
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.techsor.datacenter.business.model.DeviceInfo">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
|
|
<result column="device_id" jdbcType="VARCHAR" property="deviceId" />
|
|
|
|
|
<result column="device_sn" jdbcType="VARCHAR" property="deviceSn" />
|
|
|
|
|
<result column="type_id" jdbcType="INTEGER" property="typeId" />
|
|
|
|
|
<result column="wsclient_id" jdbcType="INTEGER" property="wsclientId" />
|
|
|
|
|
<result column="space_id" jdbcType="BIGINT" property="spaceId" />
|
|
|
|
|
<result column="device_name" jdbcType="VARCHAR" property="deviceName" />
|
|
|
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
|
|
<result column="building_id" jdbcType="BIGINT" property="buildingId" />
|
|
|
|
|
<result column="asset_id" jdbcType="BIGINT" property="assetId" />
|
|
|
|
|
<result column="gateway_client_id" jdbcType="INTEGER" property="gatewayClientId" />
|
|
|
|
|
<result column="flag" jdbcType="INTEGER" property="flag" />
|
|
|
|
|
<result column="company_id" jdbcType="BIGINT" property="companyId" />
|
|
|
|
|
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
|
|
|
|
|
<result column="created_timestamp" jdbcType="TIMESTAMP" property="createdTimestamp" />
|
|
|
|
|
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
|
|
|
|
|
<result column="updated_timestamp" jdbcType="BIGINT" property="updatedTimestamp" />
|
|
|
|
|
<result column="project_id" jdbcType="BIGINT" property="projectId" />
|
|
|
|
|
<result column="floor_id" jdbcType="BIGINT" property="floorId" />
|
|
|
|
|
<result column="monitoring_point_name" jdbcType="VARCHAR" property="monitoringPointName" />
|
|
|
|
|
<result column="monitoring_point_category_id" jdbcType="BIGINT" property="monitoringPointCategoryId" />
|
|
|
|
|
<result column="data_provider_id" jdbcType="BIGINT" property="dataProviderId" />
|
|
|
|
|
<result column="gateway_info_id" jdbcType="BIGINT" property="gatewayInfoId" />
|
|
|
|
|
<result column="alarm_level" jdbcType="INTEGER" property="alarmLevel" />
|
|
|
|
|
<result column="retain_alert" jdbcType="INTEGER" property="retainAlert" />
|
|
|
|
|
<result column="unit" jdbcType="VARCHAR" property="unit" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.techsor.datacenter.business.model.DeviceInfo">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
<result column="data_mapping" jdbcType="LONGVARCHAR" property="dataMapping" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Example_Where_Clause">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
<where>
|
|
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
|
|
<if test="criteria.valid">
|
|
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="criterion.noValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.singleValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.betweenValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
|
</choose>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
<where>
|
|
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
|
|
<if test="criteria.valid">
|
|
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="criterion.noValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.singleValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.betweenValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
|
</choose>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
id, device_id, device_sn, type_id, wsclient_id, space_id, device_name, remark, building_id,
|
|
|
|
|
asset_id, gateway_client_id, flag, company_id, created_by, created_timestamp, updated_by,
|
|
|
|
|
updated_timestamp, project_id, floor_id, monitoring_point_name, monitoring_point_category_id,
|
|
|
|
|
data_provider_id, gateway_info_id, alarm_level, retain_alert, unit
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Blob_Column_List">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
data_mapping
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByExampleWithBLOBs" parameterType="com.techsor.datacenter.business.model.DeviceInfoExample" resultMap="ResultMapWithBLOBs">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
|
</if>
|
|
|
|
|
'true' as QUERYID,
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
,
|
|
|
|
|
<include refid="Blob_Column_List" />
|
|
|
|
|
from device_info
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderByClause != null">
|
|
|
|
|
order by ${orderByClause}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByExample" parameterType="com.techsor.datacenter.business.model.DeviceInfoExample" resultMap="BaseResultMap">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
|
</if>
|
|
|
|
|
'true' as QUERYID,
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from device_info
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderByClause != null">
|
|
|
|
|
order by ${orderByClause}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
,
|
|
|
|
|
<include refid="Blob_Column_List" />
|
|
|
|
|
from device_info
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
delete from device_info
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</delete>
|
|
|
|
|
<delete id="deleteByExample" parameterType="com.techsor.datacenter.business.model.DeviceInfoExample">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
delete from device_info
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</delete>
|
|
|
|
|
<insert id="insert" parameterType="com.techsor.datacenter.business.model.DeviceInfo">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
|
|
|
|
SELECT LAST_INSERT_ID()
|
|
|
|
|
</selectKey>
|
|
|
|
|
insert into device_info (device_id, device_sn, type_id,
|
|
|
|
|
wsclient_id, space_id, device_name,
|
|
|
|
|
remark, building_id, asset_id,
|
|
|
|
|
gateway_client_id, flag, company_id,
|
|
|
|
|
created_by, created_timestamp, updated_by,
|
|
|
|
|
updated_timestamp, project_id, floor_id,
|
|
|
|
|
monitoring_point_name, monitoring_point_category_id,
|
|
|
|
|
data_provider_id, gateway_info_id, alarm_level,
|
|
|
|
|
retain_alert, unit, data_mapping
|
|
|
|
|
)
|
|
|
|
|
values (#{deviceId,jdbcType=VARCHAR}, #{deviceSn,jdbcType=VARCHAR}, #{typeId,jdbcType=INTEGER},
|
|
|
|
|
#{wsclientId,jdbcType=INTEGER}, #{spaceId,jdbcType=BIGINT}, #{deviceName,jdbcType=VARCHAR},
|
|
|
|
|
#{remark,jdbcType=VARCHAR}, #{buildingId,jdbcType=BIGINT}, #{assetId,jdbcType=BIGINT},
|
|
|
|
|
#{gatewayClientId,jdbcType=INTEGER}, #{flag,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT},
|
|
|
|
|
#{createdBy,jdbcType=BIGINT}, #{createdTimestamp,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT},
|
|
|
|
|
#{updatedTimestamp,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{floorId,jdbcType=BIGINT},
|
|
|
|
|
#{monitoringPointName,jdbcType=VARCHAR}, #{monitoringPointCategoryId,jdbcType=BIGINT},
|
|
|
|
|
#{dataProviderId,jdbcType=BIGINT}, #{gatewayInfoId,jdbcType=BIGINT}, #{alarmLevel,jdbcType=INTEGER},
|
|
|
|
|
#{retainAlert,jdbcType=INTEGER}, #{unit,jdbcType=VARCHAR}, #{dataMapping,jdbcType=LONGVARCHAR}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertSelective" parameterType="com.techsor.datacenter.business.model.DeviceInfo">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
|
|
|
|
SELECT LAST_INSERT_ID()
|
|
|
|
|
</selectKey>
|
|
|
|
|
insert into device_info
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="deviceId != null">
|
|
|
|
|
device_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deviceSn != null">
|
|
|
|
|
device_sn,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="typeId != null">
|
|
|
|
|
type_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="wsclientId != null">
|
|
|
|
|
wsclient_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spaceId != null">
|
|
|
|
|
space_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deviceName != null">
|
|
|
|
|
device_name,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remark != null">
|
|
|
|
|
remark,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="buildingId != null">
|
|
|
|
|
building_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="assetId != null">
|
|
|
|
|
asset_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="gatewayClientId != null">
|
|
|
|
|
gateway_client_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="flag != null">
|
|
|
|
|
flag,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
company_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdBy != null">
|
|
|
|
|
created_by,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdTimestamp != null">
|
|
|
|
|
created_timestamp,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updatedBy != null">
|
|
|
|
|
updated_by,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updatedTimestamp != null">
|
|
|
|
|
updated_timestamp,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="projectId != null">
|
|
|
|
|
project_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="floorId != null">
|
|
|
|
|
floor_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="monitoringPointName != null">
|
|
|
|
|
monitoring_point_name,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="monitoringPointCategoryId != null">
|
|
|
|
|
monitoring_point_category_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dataProviderId != null">
|
|
|
|
|
data_provider_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="gatewayInfoId != null">
|
|
|
|
|
gateway_info_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="alarmLevel != null">
|
|
|
|
|
alarm_level,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="retainAlert != null">
|
|
|
|
|
retain_alert,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="unit != null">
|
|
|
|
|
unit,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dataMapping != null">
|
|
|
|
|
data_mapping,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="deviceId != null">
|
|
|
|
|
#{deviceId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deviceSn != null">
|
|
|
|
|
#{deviceSn,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="typeId != null">
|
|
|
|
|
#{typeId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="wsclientId != null">
|
|
|
|
|
#{wsclientId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spaceId != null">
|
|
|
|
|
#{spaceId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deviceName != null">
|
|
|
|
|
#{deviceName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remark != null">
|
|
|
|
|
#{remark,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="buildingId != null">
|
|
|
|
|
#{buildingId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="assetId != null">
|
|
|
|
|
#{assetId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="gatewayClientId != null">
|
|
|
|
|
#{gatewayClientId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="flag != null">
|
|
|
|
|
#{flag,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
#{companyId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdBy != null">
|
|
|
|
|
#{createdBy,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdTimestamp != null">
|
|
|
|
|
#{createdTimestamp,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updatedBy != null">
|
|
|
|
|
#{updatedBy,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updatedTimestamp != null">
|
|
|
|
|
#{updatedTimestamp,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="projectId != null">
|
|
|
|
|
#{projectId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="floorId != null">
|
|
|
|
|
#{floorId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="monitoringPointName != null">
|
|
|
|
|
#{monitoringPointName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="monitoringPointCategoryId != null">
|
|
|
|
|
#{monitoringPointCategoryId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dataProviderId != null">
|
|
|
|
|
#{dataProviderId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="gatewayInfoId != null">
|
|
|
|
|
#{gatewayInfoId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="alarmLevel != null">
|
|
|
|
|
#{alarmLevel,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="retainAlert != null">
|
|
|
|
|
#{retainAlert,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="unit != null">
|
|
|
|
|
#{unit,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dataMapping != null">
|
|
|
|
|
#{dataMapping,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="countByExample" parameterType="com.techsor.datacenter.business.model.DeviceInfoExample" resultType="java.lang.Long">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
select count(*) from device_info
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
update device_info
|
|
|
|
|
<set>
|
|
|
|
|
<if test="record.id != null">
|
|
|
|
|
id = #{record.id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.deviceId != null">
|
|
|
|
|
device_id = #{record.deviceId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.deviceSn != null">
|
|
|
|
|
device_sn = #{record.deviceSn,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.typeId != null">
|
|
|
|
|
type_id = #{record.typeId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.wsclientId != null">
|
|
|
|
|
wsclient_id = #{record.wsclientId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.spaceId != null">
|
|
|
|
|
space_id = #{record.spaceId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.deviceName != null">
|
|
|
|
|
device_name = #{record.deviceName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.remark != null">
|
|
|
|
|
remark = #{record.remark,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.buildingId != null">
|
|
|
|
|
building_id = #{record.buildingId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.assetId != null">
|
|
|
|
|
asset_id = #{record.assetId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.gatewayClientId != null">
|
|
|
|
|
gateway_client_id = #{record.gatewayClientId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.flag != null">
|
|
|
|
|
flag = #{record.flag,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.companyId != null">
|
|
|
|
|
company_id = #{record.companyId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.createdBy != null">
|
|
|
|
|
created_by = #{record.createdBy,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.createdTimestamp != null">
|
|
|
|
|
created_timestamp = #{record.createdTimestamp,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.updatedBy != null">
|
|
|
|
|
updated_by = #{record.updatedBy,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.updatedTimestamp != null">
|
|
|
|
|
updated_timestamp = #{record.updatedTimestamp,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.projectId != null">
|
|
|
|
|
project_id = #{record.projectId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.floorId != null">
|
|
|
|
|
floor_id = #{record.floorId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.monitoringPointName != null">
|
|
|
|
|
monitoring_point_name = #{record.monitoringPointName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.monitoringPointCategoryId != null">
|
|
|
|
|
monitoring_point_category_id = #{record.monitoringPointCategoryId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.dataProviderId != null">
|
|
|
|
|
data_provider_id = #{record.dataProviderId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.gatewayInfoId != null">
|
|
|
|
|
gateway_info_id = #{record.gatewayInfoId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.alarmLevel != null">
|
|
|
|
|
alarm_level = #{record.alarmLevel,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.retainAlert != null">
|
|
|
|
|
retain_alert = #{record.retainAlert,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.unit != null">
|
|
|
|
|
unit = #{record.unit,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.dataMapping != null">
|
|
|
|
|
data_mapping = #{record.dataMapping,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
update device_info
|
|
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
|
|
|
device_id = #{record.deviceId,jdbcType=VARCHAR},
|
|
|
|
|
device_sn = #{record.deviceSn,jdbcType=VARCHAR},
|
|
|
|
|
type_id = #{record.typeId,jdbcType=INTEGER},
|
|
|
|
|
wsclient_id = #{record.wsclientId,jdbcType=INTEGER},
|
|
|
|
|
space_id = #{record.spaceId,jdbcType=BIGINT},
|
|
|
|
|
device_name = #{record.deviceName,jdbcType=VARCHAR},
|
|
|
|
|
remark = #{record.remark,jdbcType=VARCHAR},
|
|
|
|
|
building_id = #{record.buildingId,jdbcType=BIGINT},
|
|
|
|
|
asset_id = #{record.assetId,jdbcType=BIGINT},
|
|
|
|
|
gateway_client_id = #{record.gatewayClientId,jdbcType=INTEGER},
|
|
|
|
|
flag = #{record.flag,jdbcType=INTEGER},
|
|
|
|
|
company_id = #{record.companyId,jdbcType=BIGINT},
|
|
|
|
|
created_by = #{record.createdBy,jdbcType=BIGINT},
|
|
|
|
|
created_timestamp = #{record.createdTimestamp,jdbcType=TIMESTAMP},
|
|
|
|
|
updated_by = #{record.updatedBy,jdbcType=BIGINT},
|
|
|
|
|
updated_timestamp = #{record.updatedTimestamp,jdbcType=BIGINT},
|
|
|
|
|
project_id = #{record.projectId,jdbcType=BIGINT},
|
|
|
|
|
floor_id = #{record.floorId,jdbcType=BIGINT},
|
|
|
|
|
monitoring_point_name = #{record.monitoringPointName,jdbcType=VARCHAR},
|
|
|
|
|
monitoring_point_category_id = #{record.monitoringPointCategoryId,jdbcType=BIGINT},
|
|
|
|
|
data_provider_id = #{record.dataProviderId,jdbcType=BIGINT},
|
|
|
|
|
gateway_info_id = #{record.gatewayInfoId,jdbcType=BIGINT},
|
|
|
|
|
alarm_level = #{record.alarmLevel,jdbcType=INTEGER},
|
|
|
|
|
retain_alert = #{record.retainAlert,jdbcType=INTEGER},
|
|
|
|
|
unit = #{record.unit,jdbcType=VARCHAR},
|
|
|
|
|
data_mapping = #{record.dataMapping,jdbcType=LONGVARCHAR}
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByExample" parameterType="map">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
update device_info
|
|
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
|
|
|
device_id = #{record.deviceId,jdbcType=VARCHAR},
|
|
|
|
|
device_sn = #{record.deviceSn,jdbcType=VARCHAR},
|
|
|
|
|
type_id = #{record.typeId,jdbcType=INTEGER},
|
|
|
|
|
wsclient_id = #{record.wsclientId,jdbcType=INTEGER},
|
|
|
|
|
space_id = #{record.spaceId,jdbcType=BIGINT},
|
|
|
|
|
device_name = #{record.deviceName,jdbcType=VARCHAR},
|
|
|
|
|
remark = #{record.remark,jdbcType=VARCHAR},
|
|
|
|
|
building_id = #{record.buildingId,jdbcType=BIGINT},
|
|
|
|
|
asset_id = #{record.assetId,jdbcType=BIGINT},
|
|
|
|
|
gateway_client_id = #{record.gatewayClientId,jdbcType=INTEGER},
|
|
|
|
|
flag = #{record.flag,jdbcType=INTEGER},
|
|
|
|
|
company_id = #{record.companyId,jdbcType=BIGINT},
|
|
|
|
|
created_by = #{record.createdBy,jdbcType=BIGINT},
|
|
|
|
|
created_timestamp = #{record.createdTimestamp,jdbcType=TIMESTAMP},
|
|
|
|
|
updated_by = #{record.updatedBy,jdbcType=BIGINT},
|
|
|
|
|
updated_timestamp = #{record.updatedTimestamp,jdbcType=BIGINT},
|
|
|
|
|
project_id = #{record.projectId,jdbcType=BIGINT},
|
|
|
|
|
floor_id = #{record.floorId,jdbcType=BIGINT},
|
|
|
|
|
monitoring_point_name = #{record.monitoringPointName,jdbcType=VARCHAR},
|
|
|
|
|
monitoring_point_category_id = #{record.monitoringPointCategoryId,jdbcType=BIGINT},
|
|
|
|
|
data_provider_id = #{record.dataProviderId,jdbcType=BIGINT},
|
|
|
|
|
gateway_info_id = #{record.gatewayInfoId,jdbcType=BIGINT},
|
|
|
|
|
alarm_level = #{record.alarmLevel,jdbcType=INTEGER},
|
|
|
|
|
retain_alert = #{record.retainAlert,jdbcType=INTEGER},
|
|
|
|
|
unit = #{record.unit,jdbcType=VARCHAR}
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.techsor.datacenter.business.model.DeviceInfo">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
update device_info
|
|
|
|
|
<set>
|
|
|
|
|
<if test="deviceId != null">
|
|
|
|
|
device_id = #{deviceId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deviceSn != null">
|
|
|
|
|
device_sn = #{deviceSn,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="typeId != null">
|
|
|
|
|
type_id = #{typeId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="wsclientId != null">
|
|
|
|
|
wsclient_id = #{wsclientId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spaceId != null">
|
|
|
|
|
space_id = #{spaceId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deviceName != null">
|
|
|
|
|
device_name = #{deviceName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remark != null">
|
|
|
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="buildingId != null">
|
|
|
|
|
building_id = #{buildingId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="assetId != null">
|
|
|
|
|
asset_id = #{assetId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="gatewayClientId != null">
|
|
|
|
|
gateway_client_id = #{gatewayClientId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="flag != null">
|
|
|
|
|
flag = #{flag,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyId != null">
|
|
|
|
|
company_id = #{companyId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdBy != null">
|
|
|
|
|
created_by = #{createdBy,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdTimestamp != null">
|
|
|
|
|
created_timestamp = #{createdTimestamp,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updatedBy != null">
|
|
|
|
|
updated_by = #{updatedBy,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updatedTimestamp != null">
|
|
|
|
|
updated_timestamp = #{updatedTimestamp,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="projectId != null">
|
|
|
|
|
project_id = #{projectId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="floorId != null">
|
|
|
|
|
floor_id = #{floorId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="monitoringPointName != null">
|
|
|
|
|
monitoring_point_name = #{monitoringPointName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="monitoringPointCategoryId != null">
|
|
|
|
|
monitoring_point_category_id = #{monitoringPointCategoryId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dataProviderId != null">
|
|
|
|
|
data_provider_id = #{dataProviderId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="gatewayInfoId != null">
|
|
|
|
|
gateway_info_id = #{gatewayInfoId,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="alarmLevel != null">
|
|
|
|
|
alarm_level = #{alarmLevel,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="retainAlert != null">
|
|
|
|
|
retain_alert = #{retainAlert,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="unit != null">
|
|
|
|
|
unit = #{unit,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dataMapping != null">
|
|
|
|
|
data_mapping = #{dataMapping,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.techsor.datacenter.business.model.DeviceInfo">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
update device_info
|
|
|
|
|
set device_id = #{deviceId,jdbcType=VARCHAR},
|
|
|
|
|
device_sn = #{deviceSn,jdbcType=VARCHAR},
|
|
|
|
|
type_id = #{typeId,jdbcType=INTEGER},
|
|
|
|
|
wsclient_id = #{wsclientId,jdbcType=INTEGER},
|
|
|
|
|
space_id = #{spaceId,jdbcType=BIGINT},
|
|
|
|
|
device_name = #{deviceName,jdbcType=VARCHAR},
|
|
|
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
|
building_id = #{buildingId,jdbcType=BIGINT},
|
|
|
|
|
asset_id = #{assetId,jdbcType=BIGINT},
|
|
|
|
|
gateway_client_id = #{gatewayClientId,jdbcType=INTEGER},
|
|
|
|
|
flag = #{flag,jdbcType=INTEGER},
|
|
|
|
|
company_id = #{companyId,jdbcType=BIGINT},
|
|
|
|
|
created_by = #{createdBy,jdbcType=BIGINT},
|
|
|
|
|
created_timestamp = #{createdTimestamp,jdbcType=TIMESTAMP},
|
|
|
|
|
updated_by = #{updatedBy,jdbcType=BIGINT},
|
|
|
|
|
updated_timestamp = #{updatedTimestamp,jdbcType=BIGINT},
|
|
|
|
|
project_id = #{projectId,jdbcType=BIGINT},
|
|
|
|
|
floor_id = #{floorId,jdbcType=BIGINT},
|
|
|
|
|
monitoring_point_name = #{monitoringPointName,jdbcType=VARCHAR},
|
|
|
|
|
monitoring_point_category_id = #{monitoringPointCategoryId,jdbcType=BIGINT},
|
|
|
|
|
data_provider_id = #{dataProviderId,jdbcType=BIGINT},
|
|
|
|
|
gateway_info_id = #{gatewayInfoId,jdbcType=BIGINT},
|
|
|
|
|
alarm_level = #{alarmLevel,jdbcType=INTEGER},
|
|
|
|
|
retain_alert = #{retainAlert,jdbcType=INTEGER},
|
|
|
|
|
unit = #{unit,jdbcType=VARCHAR},
|
|
|
|
|
data_mapping = #{dataMapping,jdbcType=LONGVARCHAR}
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.techsor.datacenter.business.model.DeviceInfo">
|
|
|
|
|
<!--
|
|
|
|
|
WARNING - @mbg.generated
|
|
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
|
-->
|
|
|
|
|
update device_info
|
|
|
|
|
set device_id = #{deviceId,jdbcType=VARCHAR},
|
|
|
|
|
device_sn = #{deviceSn,jdbcType=VARCHAR},
|
|
|
|
|
type_id = #{typeId,jdbcType=INTEGER},
|
|
|
|
|
wsclient_id = #{wsclientId,jdbcType=INTEGER},
|
|
|
|
|
space_id = #{spaceId,jdbcType=BIGINT},
|
|
|
|
|
device_name = #{deviceName,jdbcType=VARCHAR},
|
|
|
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
|
building_id = #{buildingId,jdbcType=BIGINT},
|
|
|
|
|
asset_id = #{assetId,jdbcType=BIGINT},
|
|
|
|
|
gateway_client_id = #{gatewayClientId,jdbcType=INTEGER},
|
|
|
|
|
flag = #{flag,jdbcType=INTEGER},
|
|
|
|
|
company_id = #{companyId,jdbcType=BIGINT},
|
|
|
|
|
created_by = #{createdBy,jdbcType=BIGINT},
|
|
|
|
|
created_timestamp = #{createdTimestamp,jdbcType=TIMESTAMP},
|
|
|
|
|
updated_by = #{updatedBy,jdbcType=BIGINT},
|
|
|
|
|
updated_timestamp = #{updatedTimestamp,jdbcType=BIGINT},
|
|
|
|
|
project_id = #{projectId,jdbcType=BIGINT},
|
|
|
|
|
floor_id = #{floorId,jdbcType=BIGINT},
|
|
|
|
|
monitoring_point_name = #{monitoringPointName,jdbcType=VARCHAR},
|
|
|
|
|
monitoring_point_category_id = #{monitoringPointCategoryId,jdbcType=BIGINT},
|
|
|
|
|
data_provider_id = #{dataProviderId,jdbcType=BIGINT},
|
|
|
|
|
gateway_info_id = #{gatewayInfoId,jdbcType=BIGINT},
|
|
|
|
|
alarm_level = #{alarmLevel,jdbcType=INTEGER},
|
|
|
|
|
retain_alert = #{retainAlert,jdbcType=INTEGER},
|
|
|
|
|
unit = #{unit,jdbcType=VARCHAR}
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
</mapper>
|