From 15e0c74b59753e03488654412cb1ad39d5b4a22b Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期六, 02 十一月 2019 16:58:10 +0800 Subject: [PATCH] add .gitignore --- 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