代码重构
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,10 @@
|
||||
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>
|
||||
@@ -13,4 +16,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user