From 15f56cdd29e1f9a989ded5af2bae95f50998ad16 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期三, 03 四月 2024 14:26:29 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml index 5db47cf..e75c2f6 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml @@ -225,4 +225,28 @@ #{id} </foreach> </delete> + + <select id="getVideoCount" resultType="java.util.Map"> + SELECT count(*) AS totalPosts, + IFNULL(SUM(IF(on_state = 1, 1, 0)), 0) AS totalMembers, + IFNULL(SUM(IF(on_state = 2, 1, 0)), 0) AS postsPercentage, + IFNULL(SUM(IF(default_order = 1, 1, 0)), 0) AS totalViews, + -1 as noStore, + -1 as partStore, + IFNULL(ROUND(SUM(IF(on_state = 1, 1, 0)) / count(*) * 100, 2), 0) as viewsPercentage, + -1 as totalFace, + -1 as totalCar + FROM t_monitor + WHERE camera_fun_type like concat('%', #{cameraFunType}, '%') + </select> + + <select id="recoveryException" resultType="java.util.Map"> + SELECT count(*) AS totalPosts, + IFNULL(SUM(IF(on_state = 1, 1, 0)), 0) AS totalMembers, + IFNULL(SUM(IF(on_state = 2, 1, 0)), 0) AS postsPercentage, + IFNULL(SUM(IF(default_order = 1, 1, 0)), 0) AS totalViews, + IFNULL(ROUND(SUM(IF(on_state = 1, 1, 0)) / count(*) * 100, 2), 0) as viewsPercentage + FROM t_monitor + WHERE recovery = 1 + </select> </mapper> -- Gitblit v1.8.0