租户只能查看自己的产品、固件、分组和产品下设备以及系统定义的物模型和分类

This commit is contained in:
kerwincui
2022-06-04 13:19:15 +08:00
parent dad1d22d69
commit f8eb314bd0
9 changed files with 19 additions and 28 deletions

View File

@@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="tenantId != null "> and (tenant_id = #{tenantId} or is_sys = 1)</if>
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
<if test="tenantName != null and tenantName != ''"> and tenant_name like concat('%', #{tenantName}, '%')</if>
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
<if test="status != null "> and status = #{status}</if>

View File

@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="firmwareName != null and firmwareName != ''"> and firmware_name like concat('%', #{firmwareName}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="tenantId != null and tenantId != ''"> and (tenant_id = #{tenantId} or is_sys = 1)</if>
<if test="tenantId != null and tenantId != ''"> and tenant_id = #{tenantId}</if>
</where>
order by create_time desc
</select>

View File

@@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null "> and status = #{status}</if>
<if test="deviceType != null "> and device_type = #{deviceType}</if>
<if test="networkMethod != null "> and network_method = #{networkMethod}</if>
<if test="tenantId != null and tenantId != 0"> and (tenant_id = #{tenantId} or is_sys = 1)</if>
<if test="tenantId != null and tenantId != 0"> and tenant_id = #{tenantId}</if>
</where>
order by create_time desc
</select>