mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 17:05:55 +08:00
多租户测试调整
This commit is contained in:
@@ -38,9 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select category_id, category_name
|
||||
from iot_category
|
||||
<where>
|
||||
<if test="categoryName != null and categoryName != ''"> and category_name = #{categoryName}</if>
|
||||
<if test="tenantName != null and tenantName != ''"> and tenant_name = #{tenantName} or is_sys = 1</if>
|
||||
<if test="isSys != null "> and is_sys = #{isSys}</if>
|
||||
<if test="tenantId != null and tenantId != ''"> and (tenant_id = #{tenantId} or is_sys = 1)</if>
|
||||
</where>
|
||||
order by order_num
|
||||
</select>
|
||||
|
||||
@@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="remark" column="remark" />
|
||||
<result property="imgUrl" column="img_url" />
|
||||
<result property="summary" column="summary" />
|
||||
<result property="isOwner" column="is_owner" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.ruoyi.iot.model.DeviceShortOutput" id="DeviceShortResult">
|
||||
@@ -50,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="locationWay" column="location_way" />
|
||||
<result property="thingsModelValue" column="things_model_value" />
|
||||
<result property="imgUrl" column="img_url" />
|
||||
<result property="isOwner" column="is_owner" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.ruoyi.iot.model.DeviceAllShortOutput" id="DeviceAllShortResult">
|
||||
@@ -67,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="networkAddress" column="network_address" />
|
||||
<result property="longitude" column="longitude" />
|
||||
<result property="latitude" column="latitude" />
|
||||
<result property="isOwner" column="is_owner" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.ruoyi.iot.model.ProductAuthenticateModel" id="DeviceAuthenticateResult">
|
||||
@@ -153,13 +156,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectDeviceListByGroup" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceResult">
|
||||
select d.device_id, d.device_name, d.product_name, d.user_name, d.serial_number, d.firmware_version, d.status,d.rssi,d.is_shadow ,
|
||||
d.location_way, d.active_time,d.network_address,d.longitude,latitude
|
||||
d.location_way, d.active_time,d.network_address,d.longitude,d.latitude,u.is_owner
|
||||
from iot_device d
|
||||
inner join iot_device_user u on u.device_id = d.device_id
|
||||
<where>
|
||||
<if test="userId != null "> and u.user_id = #{userId}</if>
|
||||
<if test="deviceName != null and deviceName != ''"> and d.device_name like concat('%', #{deviceName}, '%')</if>
|
||||
<if test="productId != null "> and d.product_id = #{productId}</if>
|
||||
<if test="deviceName != null and deviceName != ''"> and d.device_name like concat('%', #{deviceName}, '%')</if>
|
||||
<if test="productName != null and productName != ''"> and d.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="serialNumber != null and serialNumber != ''"> and d.serial_number = #{serialNumber}</if>
|
||||
<if test="status != null "> and d.status = #{status}</if>
|
||||
@@ -172,7 +175,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectAllDeviceShortList" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceAllShortResult">
|
||||
select d.device_id, d.device_name, d.product_name, d.user_name, d.serial_number, d.firmware_version, d.status,d.rssi,d.is_shadow ,
|
||||
d.location_way, d.active_time,d.network_address,d.longitude,latitude
|
||||
d.location_way, d.active_time,d.network_address,d.longitude,d.latitude,u.is_owner
|
||||
from iot_device d
|
||||
inner join iot_device_user u on u.device_id = d.device_id
|
||||
<where>
|
||||
@@ -195,7 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select d.device_id, d.device_name, d.product_id, d.product_name,
|
||||
d.user_id, d.user_name, d.tenant_id, d.tenant_name, d.serial_number,
|
||||
d.firmware_version, d.status,d.rssi,d.is_shadow ,d.location_way,
|
||||
d.things_model_value, d.active_time,d.img_url,u.user_id
|
||||
d.things_model_value, d.active_time,d.img_url,u.is_owner
|
||||
from iot_device d
|
||||
inner join iot_device_user u on u.device_id = d.device_id
|
||||
<if test="groupId != null and groupId !=0 "> left join iot_device_group g on g.device_id=d.device_id </if>
|
||||
|
||||
Reference in New Issue
Block a user