mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
fix(多数据源): 报错修改
This commit is contained in:
@@ -127,6 +127,22 @@
|
||||
<version>8.1.1.49</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>8.4.1.jre8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.5.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<version>19.3.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -297,7 +297,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectDeviceProductAlertCount" parameterType="com.fastbee.iot.domain.Device" resultType="com.fastbee.iot.model.DeviceStatistic">
|
||||
select
|
||||
<!--设备数量-->
|
||||
(select count(distinct d.device_id,d.user_id)
|
||||
(select count(distinct concat(d.device_id, '|', d.tenant_id))
|
||||
from iot_device d
|
||||
inner join iot_device_user u on u.device_id = d.device_id
|
||||
<where>
|
||||
@@ -307,7 +307,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
) as deviceCount,
|
||||
|
||||
<!--在线设备数量-->
|
||||
(select count(distinct d.device_id,d.user_id)
|
||||
(select count(distinct concat(d.device_id, '|', d.tenant_id))
|
||||
from iot_device d
|
||||
inner join iot_device_user u on u.device_id = d.device_id
|
||||
<where>
|
||||
@@ -320,7 +320,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
(
|
||||
<!--普通用户查询设备中的产品数量-->
|
||||
<if test="userId != null and userId != 0">
|
||||
select count(distinct product_id)
|
||||
select count(product_id)
|
||||
from iot_device
|
||||
where user_id = #{userId}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user