Files
smartDriveEE/src/main/java/com/rj/mapper/DeviceManagementMapper.java
2025-12-21 20:26:44 +08:00

30 lines
952 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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