|
|
|
@ -39,6 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="tel" column="tel" />
|
|
|
|
|
<result property="caretaker" column="caretaker" />
|
|
|
|
|
<result property="managementUnit" column="management_unit" />
|
|
|
|
|
<result property="deviceBrand" column="device_brand" />
|
|
|
|
|
<result property="deviceModel" column="device_model" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.fastbee.iot.model.DeviceShortOutput" id="DeviceShortResult">
|
|
|
|
@ -370,7 +372,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
d.serial_number, d.management_unit, d.caretaker, d.tel,
|
|
|
|
|
d.firmware_version, d.status, d.rssi,d.is_shadow,d.is_simulate ,d.location_way,d.things_model_value,
|
|
|
|
|
d.network_address, d.network_ip, d.longitude, d.latitude, d.active_time, d.create_time, d.update_time,
|
|
|
|
|
d.img_url,d.summary,d.remark,d.dev_params,p.guid from iot_device d
|
|
|
|
|
d.img_url,d.summary,d.remark,d.dev_params,p.guid,d.device_brand,d.device_model from iot_device d
|
|
|
|
|
left join iot_product p on p.product_id=d.product_id
|
|
|
|
|
where device_id = #{deviceId}
|
|
|
|
|
</select>
|
|
|
|
@ -537,6 +539,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="managementUnit != null">management_unit,</if>
|
|
|
|
|
<if test="caretaker != null">caretaker,</if>
|
|
|
|
|
<if test="tel != null">tel,</if>
|
|
|
|
|
<if test="deviceBrand != null">device_brand,</if>
|
|
|
|
|
<if test="deviceModel != null">device_model,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
|
|
|
@ -571,6 +575,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="managementUnit != null">#{managementUnit},</if>
|
|
|
|
|
<if test="caretaker != null">#{caretaker},</if>
|
|
|
|
|
<if test="tel != null">#{tel},</if>
|
|
|
|
|
<if test="deviceBrand != null">#{deviceBrand},</if>
|
|
|
|
|
<if test="deviceModel != null">#{deviceModel},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -630,6 +636,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="managementUnit != null">management_unit = #{managementUnit},</if>
|
|
|
|
|
<if test="caretaker != null">caretaker = #{caretaker},</if>
|
|
|
|
|
<if test="tel != null">tel = #{tel},</if>
|
|
|
|
|
<if test="deviceBrand != null">#{deviceBrand},</if>
|
|
|
|
|
<if test="deviceModel != null">#{deviceModel},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where device_id = #{deviceId}
|
|
|
|
|
</update>
|
|
|
|
@ -694,6 +702,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="managementUnit != null">management_unit = #{managementUnit},</if>
|
|
|
|
|
<if test="caretaker != null">caretaker = #{caretaker},</if>
|
|
|
|
|
<if test="tel != null">tel = #{tel},</if>
|
|
|
|
|
<if test="deviceBrand != null">#{deviceBrand},</if>
|
|
|
|
|
<if test="deviceModel != null">#{deviceModel},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where serial_number = #{serialNumber}
|
|
|
|
|
</update>
|
|
|
|
|