From c88dc8873fb1472df983e2f8d47dd3d29cd4b8b5 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 15:33:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=81=B5=E6=B4=BB=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/org/IcHouseDao.xml | 4 ++-- .../src/main/resources/mapper/user/IcResiUserDao.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index 41f39be8ec..e2dacf96e8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -24,7 +24,7 @@ ic_house h LEFT JOIN ic_neighbor_hood n ON h.NEIGHBOR_HOOD_ID = n.id WHERE - h.CREATED_TIME < DATE_SUB( CURDATE(), INTERVAL 1 DAY ) + h.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) ) t ON t.GRID_ID = g.ID @@ -46,7 +46,7 @@ FROM customer_grid g LEFT JOIN ic_neighbor_hood n ON n.GRID_ID = g.id - AND n.CREATED_TIME < DATE_SUB( CURDATE(), INTERVAL 1 DAY ) + AND n.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) AND g.CUSTOMER_ID = #{customerId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml index 54d5f37b7e..e83103a79a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -14,7 +14,7 @@ ic_resi_user WHERE del_flag = '0' - AND CREATED_TIME < DATE_SUB( CURDATE(), INTERVAL 1 DAY ) + AND CREATED_TIME <= DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) GROUP BY CUSTOMER_ID, AGENCY_ID