From f7448db216a1c1eec1e8a3471d55d4b3801f9a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E9=A3=9E?= Date: Fri, 29 Nov 2019 10:01:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E7=BE=A4=E8=AF=9D=E9=A2=98=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E7=BB=93=E6=9E=84=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/events/EpdcEventsDao.xml | 6 +++-- .../main/resources/mapper/issue/IssueDao.xml | 3 ++- .../main/resources/mapper/item/ItemDao.xml | 3 ++- .../main/resources/mapper/group/GroupDao.xml | 27 ++++++++++++------- .../main/resources/mapper/topic/TopicDao.xml | 9 ++++--- 5 files changed, 32 insertions(+), 16 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml index 2e1e6cd3a..c83bd412a 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml @@ -68,7 +68,8 @@ AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} - AND temp.grid_id = #{gridId} + AND (temp.GRID_ID = #{gridId} + OR find_in_set(#{gridId},temp.ALL_DEPT_IDS)) AND (find_in_set(#{streetId},temp.PARENT_DEPT_IDS) @@ -96,7 +97,8 @@ AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} - AND temp.grid_id = #{gridId} + AND (temp.GRID_ID = #{gridId} + OR find_in_set(#{gridId},temp.ALL_DEPT_IDS)) AND find_in_set(#{streetId},temp.PARENT_DEPT_IDS) diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml index 0c023ef1a..b551bc37d 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml @@ -24,7 +24,8 @@ AND DATE_FORMAT( issue.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} - AND issue.GRID_ID = #{gridId} + AND (issue.GRID_ID = #{gridId} + OR find_in_set(#{gridId},issue.ALL_DEPT_IDS)) AND (find_in_set(#{streetId},issue.PARENT_DEPT_IDS) diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml index 6de92e905..321dee8ed 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml @@ -402,7 +402,8 @@ AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} - AND item.GRID_ID = #{gridId} + AND (item.GRID_ID = #{gridId} + OR find_in_set(#{gridId},item.ALL_DEPT_IDS)) AND (find_in_set(#{streetId},item.PARENT_DEPT_IDS) diff --git a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml index 684365f26..d319fed6a 100644 --- a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml +++ b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml @@ -22,13 +22,16 @@ AND gp.STATE = #{state} - AND gp.GRID_ID = #{gridId} + AND (gp.GRID_ID = #{gridId} + OR find_in_set(#{gridId},gp.ALL_DEPT_IDS)) - AND gp.STREET_ID = #{streetId} + AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS) + OR find_in_set(#{streetId},gp.ALL_DEPT_IDS)) - AND gp.COMMUNITY_ID = #{communityId} + AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS) + OR find_in_set(#{communityId},gp.ALL_DEPT_IDS)) ORDER BY gp.GROUP_CATEGORY, gp.CREATED_TIME DESC @@ -200,13 +203,16 @@ gp.DEL_FLAG = '0' AND gp.STATE IN ( 10, 15 ) - AND gp.GRID_ID = #{gridId} + AND (gp.GRID_ID = #{gridId} + OR find_in_set(#{gridId},gp.ALL_DEPT_IDS)) - AND gp.STREET_ID = #{streetId} + AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS) + OR find_in_set(#{streetId},gp.ALL_DEPT_IDS)) - AND gp.COMMUNITY_ID = #{communityId} + AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS) + OR find_in_set(#{communityId},gp.ALL_DEPT_IDS)) AND DATE_FORMAT( gp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} @@ -234,13 +240,16 @@ gp.DEL_FLAG = '0' AND gp.STATE IN ( 10, 15 ) - AND gp.GRID_ID = #{gridId} + AND (gp.GRID_ID = #{gridId} + OR find_in_set(#{gridId},gp.ALL_DEPT_IDS)) - AND gp.STREET_ID = #{streetId} + AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS) + OR find_in_set(#{streetId},gp.ALL_DEPT_IDS)) - AND gp.COMMUNITY_ID = #{communityId} + AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS) + OR find_in_set(#{communityId},gp.ALL_DEPT_IDS)) AND DATE_FORMAT( gp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} diff --git a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/topic/TopicDao.xml b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/topic/TopicDao.xml index 84fb0cf11..f5270850d 100644 --- a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/topic/TopicDao.xml +++ b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/topic/TopicDao.xml @@ -201,13 +201,16 @@ temp.DEL_FLAG = '0' AND temp.STATE IN ( 0, 5, 20 ) - AND temp.STREET_ID = #{streetId} + AND (find_in_set(#{streetId},temp.PARENT_DEPT_IDS) + OR find_in_set(#{streetId},temp.ALL_DEPT_IDS)) - AND temp.COMMUNITY_ID = #{communityId} + AND (find_in_set(#{communityId},temp.PARENT_DEPT_IDS) + OR find_in_set(#{communityId},temp.ALL_DEPT_IDS)) - AND temp.grid_id = #{gridId} + AND (temp.GRID_ID = #{gridId} + OR find_in_set(#{gridId},temp.ALL_DEPT_IDS)) AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}