From 32f014afe2d7b27a77ce767cd70cf052014c008f Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 7 Jun 2022 16:39:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/org/IcHouseDao.xml | 12 +++++------- 1 file changed, 5 insertions(+), 7 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 de4b58c7f7..297d15dbd3 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 @@ -104,23 +104,21 @@ SELECT n.ID as NEIGHBOURHOODS_ID, n.NEIGHBOR_HOOD_NAME, - g.CUSTOMER_ID, + n.CUSTOMER_ID, g.id AS GRID_ID, g.PID, g.PIDS, 1 AS neighbourhoodsCount FROM ic_neighbor_hood n - LEFT JOIN customer_grid g ON n.GRID_ID = g.id + LEFT JOIN customer_grid g ON n.GRID_ID = g.id and g.DEL_FLAG = '0' AND n.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) - AND n.DEL_FLAG = '0' - WHERE - g.DEL_FLAG = '0' + WHERE n.DEL_FLAG = '0' - AND g.CUSTOMER_ID = #{customerId} + AND n.CUSTOMER_ID = #{customerId} GROUP BY - g.CUSTOMER_ID; + n.CUSTOMER_ID,n.ID;