From 9864c58c9372d4a29da37268329611bac80aac31 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Sat, 14 Aug 2021 14:52:30 +0800
Subject: [PATCH] 1.统计接口调整

---
 src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
index 013d3cb..53ae13f 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -734,6 +734,12 @@
         <if test="deptid!=null and deptid!=''">
             and u.dept_id =#{deptid}
         </if>
+        <if test="type=1">
+            and to_days(u.update_time) = to_days(now());
+        </if>
+        <if test="type=2">
+            and DATE_FORMAT(u.update_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
+        </if>
         GROUP BY d.dept_name,
         j.dept_name
     </select>
@@ -752,6 +758,12 @@
         <if test="deptid!=null and deptid!=''">
             and u.departmentid =#{deptid}
         </if>
+        <if test="type=1">
+            and to_days(u.time) = to_days(now());
+        </if>
+        <if test="type=2">
+            and DATE_FORMAT(u.time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
+        </if>
         GROUP BY d.dept_name,
         j.dept_name
     </select>

--
Gitblit v1.9.3