代码重构

This commit is contained in:
zhonghua1
2025-12-21 20:26:44 +08:00
parent 00b149974b
commit 6817769d4d
2 changed files with 852 additions and 465 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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);
}