package com.ruoyi.system.mapper; import java.time.Instant; import java.util.List; import org.apache.ibatis.annotations.Param; import com.ruoyi.system.domain.TDetectionCabinet; import com.ruoyi.system.domain.TDetectionChannel; import com.ruoyi.system.domain.TDeviceAdapter; public interface TDeviceAdapterMapper { List selectDeviceAdapterList(TDeviceAdapter query); List selectEnabledDeviceAdapters(); TDeviceAdapter selectDeviceAdapterById(Long adapterId); TDeviceAdapter selectDeviceAdapterByCode(String adapterCode); int insertDeviceAdapter(TDeviceAdapter adapter); int updateDeviceAdapter(TDeviceAdapter adapter); int updateDeviceAdapterStatus(@Param("adapterId") Long adapterId, @Param("status") String status, @Param("updateBy") String updateBy); int updateDiscoverySuccess(@Param("adapterId") Long adapterId, @Param("observedAt") Instant observedAt); int updateDiscoveryFailure(@Param("adapterId") Long adapterId, @Param("errorCode") String errorCode, @Param("errorMessage") String errorMessage); Long selectCabinetIdByIdentity(@Param("adapterId") Long adapterId, @Param("devtype") Integer devtype, @Param("devid") Integer devid); int insertDetectedCabinet(TDetectionCabinet cabinet); int updateDetectedCabinet(TDetectionCabinet cabinet); int upsertDetectedChannel(TDetectionChannel channel); List selectDetectionChannelsByAdapterId(Long adapterId); }