1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?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.zoniot.wg.dao.DeviceMapper">
- <select id="findDeviceIdByWaterMeterNo" resultType="java.lang.Long">
- select id from sc_device where status = 1 and customer_id = #{customerId} and water_meter_no = #{meterNo}
- </select>
- <!--auto generated Code-->
- <update id="updateByPrimaryKeySelective">
- UPDATE sc_device
- <set>
- <if test="device.deviceNo != null"> device_no = #{device.deviceNo,jdbcType=VARCHAR},</if>
- <if test="device.deviceType != null"> device_type = #{device.deviceType,jdbcType=BIGINT},</if>
- <if test="device.sysId != null"> sys_id = #{device.sysId,jdbcType=BIGINT},</if>
- <if test="device.siteId != null"> site_id = #{device.siteId,jdbcType=BIGINT},</if>
- <if test="device.buildingId != null"> building_id = #{device.buildingId,jdbcType=BIGINT},</if>
- <if test="device.floor != null"> `floor` = #{device.floor,jdbcType=INTEGER},</if>
- <if test="device.locDesc != null"> loc_desc = #{device.locDesc,jdbcType=VARCHAR},</if>
- <if test="device.relatedDeviceNo != null"> related_device_no = #{device.relatedDeviceNo,jdbcType=BIGINT},</if>
- <if test="device.manufacturerId != null"> manufacturer_id = #{device.manufacturerId,jdbcType=BIGINT},</if>
- <if test="device.deviceStatus != null"> device_status = #{device.deviceStatus,jdbcType=INTEGER},</if>
- <if test="device.status != null"> `status` = #{device.status,jdbcType=INTEGER},</if>
- <if test="device.isTag != null"> is_tag = #{device.isTag,jdbcType=INTEGER},</if>
- <if test="device.xCoordinates != null"> x_coordinates = #{device.xCoordinates,jdbcType=DECIMAL},</if>
- <if test="device.yCoordinates != null"> y_coordinates = #{device.yCoordinates,jdbcType=DECIMAL},</if>
- <if test="device.updateBy != null"> update_by = #{device.updateBy,jdbcType=VARCHAR},</if>
- <if test="device.dateUpdate != null"> date_update = #{device.dateUpdate,jdbcType=TIMESTAMP},</if>
- <if test="device.planId != null"> plan_id = #{device.planId,jdbcType=INTEGER},</if>
- <if test="device.waterMeterNo != null"> water_meter_no = #{device.waterMeterNo,jdbcType=VARCHAR},</if>
- <if test="device.waterMeterFileNo != null"> water_meter_file_no = #{device.waterMeterFileNo,jdbcType=VARCHAR},</if>
- <if test="device.customerId != null"> customer_id = #{device.customerId,jdbcType=INTEGER},</if>
- <if test="device.udipId != null"> udip_id = #{device.udipId,jdbcType=VARCHAR},</if>
- <if test="device.registerStatus != null"> register_status = #{device.registerStatus,jdbcType=INTEGER},</if>
- <if test="device.syncStatus != null"> sync_status = #{device.syncStatus,jdbcType=INTEGER},</if>
- <if test="device.sealNo != null"> seal_no = #{device.sealNo,jdbcType=VARCHAR}</if>
- </set>
- WHERE id = #{device.id,jdbcType=BIGINT}
- </update>
- </mapper>
|