From 8634a3d14f74807cb2adbdc4cb50c57be10402a0 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 12 四月 2024 16:29:56 +0800
Subject: [PATCH] 实体类plus
---
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