package com.rj.mapper; import com.baomidou.mybatisplus.annotation.InterceptorIgnore; import com.rj.entity.DeviceManagement; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; /** *

* 设备管理表 Mapper 接口 *

* * @author 李中华 ,spllzh * @since 2025-08-07 */ public interface DeviceManagementMapper extends BaseMapper { /** * 根据设备编号查询设备信息(绕过多租户拦截器) * 用于在不知道租户ID的情况下,根据设备编号查询设备所属的租户 * * @param deviceCode 设备编号 * @return 设备管理信息 */ @InterceptorIgnore(tenantLine = "true") @Select("SELECT * FROM device_management WHERE device_code = #{deviceCode} LIMIT 1") DeviceManagement selectByDeviceCodeIgnoreTenant(@Param("deviceCode") String deviceCode); }