yeg
2026-08-29 d2b53841c31b82df4f71b800ad18a323694c10d7
ruoyi-system/src/main/resources/mapper/system/TDetectionCabinetMapper.xml
@@ -109,6 +109,28 @@
         #{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>