修改首页统计查询相关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
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:
parent
eb61f7afce
commit
22ef44a772
@ -11,7 +11,7 @@
|
|||||||
<select id="getDevice_Statistics" resultType="cn.iocoder.yudao.module.system.controller.admin.device.vo.DeviceStatistics">
|
<select id="getDevice_Statistics" resultType="cn.iocoder.yudao.module.system.controller.admin.device.vo.DeviceStatistics">
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(*) AS totalCount,
|
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
|
SUM(CASE WHEN devicestatus = 2 THEN 1 ELSE 0 END) AS offlineCount
|
||||||
FROM tb_device
|
FROM tb_device
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
DATE(vipstarttime) AS vip_date,
|
DATE(vipstarttime) AS vip_date,
|
||||||
COUNT(*) AS count
|
COUNT(*) AS count
|
||||||
FROM tb_user
|
FROM tb_device
|
||||||
<where>
|
<where>
|
||||||
isvip = 1
|
isvip = 1
|
||||||
<!-- 如果 orgid 不等于 0,则加上 orgid 条件 -->
|
<!-- 如果 orgid 不等于 0,则加上 orgid 条件 -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user