| | |
| | | <result property="assignTime" column="assign_time"/> |
| | | <result property="tDSA" column="tds_a"/> |
| | | <result property="tDSP" column="tds_p"/> |
| | | <result property="repairFlag" column="repair_flag"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.ruoyi.iot.model.DeviceShortOutput" id="DeviceShortResult"> |
| | |
| | | summary, |
| | | remark, |
| | | tds_p, |
| | | tds_a |
| | | tds_a, |
| | | repair_flag |
| | | from iot_device |
| | | </sql> |
| | | |
| | |
| | | active_time, |
| | | img_url, |
| | | tds_p, |
| | | tds_a |
| | | tds_a, |
| | | repair_flag |
| | | from iot_device |
| | | </sql> |
| | | |
| | |
| | | select d.device_id, d.device_name, d.product_id, d.product_name, d.user_id, d.user_name, d.tenant_id, |
| | | d.tenant_name, |
| | | d.serial_number, d.firmware_version, d.status,d.is_shadow ,d.location_way,d.active_time, |
| | | d.img_url,a.device_id,d.tds_p,d.tds_a |
| | | d.img_url,a.device_id,d.tds_p,d.tds_a,d.repair_flag |
| | | as auth_device_id |
| | | from iot_device d |
| | | left join iot_product_authorize a on a.device_id=d.device_id |
| | |
| | | |
| | | <select id="selectDeviceListByGroup" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceResult"> |
| | | select d.device_id, d.device_name, d.product_name, d.user_name, d.serial_number, d.firmware_version, |
| | | d.status,d.rssi,d.is_shadow ,d.tds_p,d.tds_a, |
| | | d.status,d.rssi,d.is_shadow ,d.tds_p,d.tds_a,d.repair_flag, |
| | | d.location_way, d.active_time,d.network_address,d.longitude,d.latitude,max(u.is_owner) as is_owner |
| | | from iot_device d |
| | | inner join iot_device_user u on u.device_id = d.device_id |
| | |
| | | |
| | | <select id="selectAllDeviceShortList" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceAllShortResult"> |
| | | select d.device_id, d.device_name, d.product_name, d.user_name, d.serial_number, d.firmware_version, |
| | | d.status,d.rssi,d.is_shadow ,d.tds_p,d.tds_a, |
| | | d.status,d.rssi,d.is_shadow ,d.tds_p,d.tds_a,d.repair_flag, |
| | | d.location_way, d.active_time,d.network_address,d.longitude,d.latitude,max(u.is_owner) as is_owner |
| | | from iot_device d |
| | | inner join iot_device_user u on u.device_id = d.device_id |
| | |
| | | select d.device_id, d.device_name, d.product_id, d.product_name, |
| | | d.user_id, d.user_name, d.tenant_id, su.nick_name tenant_name, d.serial_number, |
| | | d.firmware_version, d.status,d.rssi,d.is_shadow ,d.location_way, |
| | | d.things_model_value,d.assign_time, d.active_time,d.img_url,max(u.is_owner) as is_owner,d.tds_p,d.tds_a |
| | | d.things_model_value,d.assign_time, d.active_time,d.img_url,max(u.is_owner) as |
| | | is_owner,d.tds_p,d.tds_a,d.repair_flag |
| | | from iot_device d |
| | | inner join iot_device_user u on u.device_id = d.device_id |
| | | inner join sys_user su on su.user_id = d.tenant_id |
| | |
| | | <if test="summary != null">summary,</if> |
| | | <if test="tDSP != null">tds_p,</if> |
| | | <if test="tDSA != null">tds_a,</if> |
| | | <if test="repairFlag != null">repair_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="deviceName != null and deviceName != ''">#{deviceName},</if> |
| | |
| | | <if test="summary != null">#{summary},</if> |
| | | <if test="tDSP != null">#{tDSP},</if> |
| | | <if test="tDSA != null">#{tDSA},</if> |
| | | <if test="repairFlag != null">#{repairFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="assignTime != null">assign_time = #{assignTime},</if> |
| | | <if test="tDSP != null ">tds_p = #{tDSP},</if> |
| | | <if test="tDSA != null ">tds_a = #{tDSA},</if> |
| | | <if test="repairFlag != null">repair_flag = #{repairFlag},</if> |
| | | </trim> |
| | | where device_id = #{deviceId} |
| | | </update> |
| | |
| | | <if test="assignTime != null">assign_time = #{assignTime},</if> |
| | | <if test="tDSP != null ">tds_p = #{tDSP},</if> |
| | | <if test="tDSA != null ">tds_a = #{tDSA},</if> |
| | | <if test="repairFlag != null">repair_flag = #{repairFlag},</if> |
| | | </trim> |
| | | where serial_number = #{serialNumber} |
| | | </update> |