| | |
| | | #{onlineStatus}, #{workStatus}, #{lastSeenAtUtc}, '0', sysdate(), 0) |
| | | </insert> |
| | | |
| | | <update id="updateRegisteredCabinetObservation"> |
| | | update t_detection_cabinet |
| | | set online_status = #{onlineStatus}, update_time = sysdate() |
| | | <if test="updateLastSeen">, last_seen_at_utc = #{lastSeenAtUtc}</if> |
| | | where adapter_code = #{adapterCode} |
| | | and vendor_device_type = #{devtype} and vendor_device_id = #{devid} |
| | | and del_flag = 0 and registration_status = 'REGISTERED' |
| | | </update> |
| | | |
| | | <update id="updateRegisteredChannelObservation"> |
| | | update t_detection_channel |
| | | set online_status = #{onlineStatus}, work_status = #{workStatus}, update_time = sysdate() |
| | | <if test="updateLastSeen">, last_seen_at_utc = #{lastSeenAtUtc}</if> |
| | | where adapter_code = #{adapterCode} |
| | | and devtype = #{devtype} and devid = #{devid} |
| | | and subdevid = #{subdevid} and chlid = #{chlid} |
| | | and del_flag = 0 |
| | | and exists (select 1 from t_detection_cabinet cabinet |
| | | where cabinet.cabinet_id = t_detection_channel.cabinet_id |
| | | and cabinet.del_flag = 0 and cabinet.registration_status = 'REGISTERED') |
| | | </update> |
| | | |
| | | <update id="updateDetectionCabinet" parameterType="TDetectionCabinet"> |
| | | update t_detection_cabinet |
| | | <set> |