修改首页统计查询相关sql
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled

This commit is contained in:
lxd 2025-09-03 16:42:07 +08:00
parent eb61f7afce
commit 22ef44a772
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@
<select id="getDevice_Statistics" resultType="cn.iocoder.yudao.module.system.controller.admin.device.vo.DeviceStatistics">
SELECT
COUNT(*) AS totalCount,
SUM(CASE WHEN devicestatus = 1 THEN 1 ELSE 0 END) AS onlineCount,
SUM(CASE WHEN isvip = 1 THEN 1 ELSE 0 END) AS onlineCount,
SUM(CASE WHEN devicestatus = 2 THEN 1 ELSE 0 END) AS offlineCount
FROM tb_device
<where>

View File

@ -37,7 +37,7 @@
SELECT
DATE(vipstarttime) AS vip_date,
COUNT(*) AS count
FROM tb_user
FROM tb_device
<where>
isvip = 1
<!-- 如果 orgid 不等于 0则加上 orgid 条件 -->