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