|
|
|
@ -30,6 +30,14 @@ |
|
|
|
<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"> |
|
|
|
<!-- |
|
|
|
@ -105,8 +113,36 @@ |
|
|
|
id, device_id, device_sn, type_id, wsclient_id, space_id, device_name, remark, building_id, |
|
|
|
asset_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 |
|
|
|
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 |
|
|
|
@ -126,13 +162,15 @@ |
|
|
|
order by ${orderByClause} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |
|
|
|
<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> |
|
|
|
@ -169,8 +207,8 @@ |
|
|
|
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 |
|
|
|
) |
|
|
|
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}, |
|
|
|
@ -178,8 +216,8 @@ |
|
|
|
#{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} |
|
|
|
) |
|
|
|
#{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"> |
|
|
|
<!-- |
|
|
|
@ -260,6 +298,12 @@ |
|
|
|
<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"> |
|
|
|
@ -331,6 +375,12 @@ |
|
|
|
<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"> |
|
|
|
@ -422,11 +472,53 @@ |
|
|
|
<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}, |
|
|
|
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 |
|
|
|
@ -456,7 +548,8 @@ |
|
|
|
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} |
|
|
|
retain_alert = #{record.retainAlert,jdbcType=INTEGER}, |
|
|
|
unit = #{record.unit,jdbcType=VARCHAR} |
|
|
|
<if test="_parameter != null"> |
|
|
|
<include refid="Update_By_Example_Where_Clause" /> |
|
|
|
</if> |
|
|
|
@ -537,9 +630,48 @@ |
|
|
|
<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}, |
|
|
|
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 |
|
|
|
@ -568,7 +700,8 @@ |
|
|
|
data_provider_id = #{dataProviderId,jdbcType=BIGINT}, |
|
|
|
gateway_info_id = #{gatewayInfoId,jdbcType=BIGINT}, |
|
|
|
alarm_level = #{alarmLevel,jdbcType=INTEGER}, |
|
|
|
retain_alert = #{retainAlert,jdbcType=INTEGER} |
|
|
|
retain_alert = #{retainAlert,jdbcType=INTEGER}, |
|
|
|
unit = #{unit,jdbcType=VARCHAR} |
|
|
|
where id = #{id,jdbcType=INTEGER} |
|
|
|
</update> |
|
|
|
</mapper> |