From 5b38785b33b06d877101ef639ca5d5e675c85b4d Mon Sep 17 00:00:00 2001 From: looper3339 <736321739@qq.com> Date: 星期六, 25 五月 2019 17:11:55 +0800 Subject: [PATCH] change float to flex layout --- src/main/java/com/cloud/count/dao/CountDao.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/cloud/count/dao/CountDao.java b/src/main/java/com/cloud/count/dao/CountDao.java index 44b6e6d..134c1c9 100644 --- a/src/main/java/com/cloud/count/dao/CountDao.java +++ b/src/main/java/com/cloud/count/dao/CountDao.java @@ -23,8 +23,8 @@ * @return */ // @Select("select COALESCE(sum(enters),0) from people where timestamp BETWEEN #{begin} AND #{end}") - @Select("SELECT COALESCE(p2.enters-p1.enters,0) FROM (SELECT enters from people where timestamp BETWEEN #{begin} AND #{end} ORDER BY id ASC LIMIT 1)p1,(SELECT enters from people where timestamp BETWEEN #{begin} AND #{end} ORDER BY id DESC LIMIT 1)p2") - Integer countInPeople(@Param("begin") long begin,@Param("end") long end); + @Select("SELECT COALESCE(p2.enters-p1.enters,0) FROM (SELECT enters from people where dateStr=#{todayStr} and timestamp BETWEEN #{begin} AND #{end} ORDER BY id ASC LIMIT 1)p1,(SELECT enters from people where dateStr=#{todayStr} and timestamp BETWEEN #{begin} AND #{end} ORDER BY id DESC LIMIT 1)p2") + Integer countInPeople(@Param("begin") long begin,@Param("end") long end,@Param("todayStr") String todayStr); /** * 缁熻鍑哄幓浜烘暟 @@ -32,8 +32,8 @@ * @return */ // @Select("select COALESCE(sum(exits),0) from people where timestamp BETWEEN #{begin} AND #{end}") - @Select("SELECT COALESCE(p2.exits-p1.exits,0) FROM (SELECT exits from people where timestamp BETWEEN #{begin} AND #{end} ORDER BY id ASC LIMIT 1)p1,(SELECT exits from people where timestamp BETWEEN #{begin} AND #{end} ORDER BY id DESC LIMIT 1)p2") - Integer countOutPeople( @Param("begin") long begin,@Param("end") long end); + @Select("SELECT COALESCE(p2.exits-p1.exits,0) FROM (SELECT exits from people where dateStr=#{todayStr} and timestamp BETWEEN #{begin} AND #{end} ORDER BY id ASC LIMIT 1)p1,(SELECT exits from people where dateStr=#{todayStr} and timestamp BETWEEN #{begin} AND #{end} ORDER BY id DESC LIMIT 1)p2") + Integer countOutPeople( @Param("begin") long begin,@Param("end") long end,@Param("todayStr") String todayStr); /** * 鎻掑叆涓�鏉eople鏁版嵁 -- Gitblit v1.8.0