Browse Source

社群话题组织结构查询条件调整

dev
李鹏飞 6 years ago
parent
commit
f7448db216
  1. 6
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml
  2. 3
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
  3. 3
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
  4. 27
      esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml
  5. 9
      esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/topic/TopicDao.xml

6
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 DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
</if> </if>
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND temp.grid_id = #{gridId} AND (temp.GRID_ID = #{gridId}
OR find_in_set(#{gridId},temp.ALL_DEPT_IDS))
</if> </if>
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND (find_in_set(#{streetId},temp.PARENT_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 DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
</if> </if>
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND temp.grid_id = #{gridId} AND (temp.GRID_ID = #{gridId}
OR find_in_set(#{gridId},temp.ALL_DEPT_IDS))
</if> </if>
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND find_in_set(#{streetId},temp.PARENT_DEPT_IDS) AND find_in_set(#{streetId},temp.PARENT_DEPT_IDS)

3
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 DATE_FORMAT( issue.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
</if> </if>
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND issue.GRID_ID = #{gridId} AND (issue.GRID_ID = #{gridId}
OR find_in_set(#{gridId},issue.ALL_DEPT_IDS))
</if> </if>
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND (find_in_set(#{streetId},issue.PARENT_DEPT_IDS) AND (find_in_set(#{streetId},issue.PARENT_DEPT_IDS)

3
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 DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
</if> </if>
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND item.GRID_ID = #{gridId} AND (item.GRID_ID = #{gridId}
OR find_in_set(#{gridId},item.ALL_DEPT_IDS))
</if> </if>
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND (find_in_set(#{streetId},item.PARENT_DEPT_IDS) AND (find_in_set(#{streetId},item.PARENT_DEPT_IDS)

27
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.STATE = #{state}
</if> </if>
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND gp.GRID_ID = #{gridId} AND (gp.GRID_ID = #{gridId}
OR find_in_set(#{gridId},gp.ALL_DEPT_IDS))
</if> </if>
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND gp.STREET_ID = #{streetId} AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS)
OR find_in_set(#{streetId},gp.ALL_DEPT_IDS))
</if> </if>
<if test="communityId != null and communityId != ''"> <if test="communityId != null and communityId != ''">
AND gp.COMMUNITY_ID = #{communityId} AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS)
OR find_in_set(#{communityId},gp.ALL_DEPT_IDS))
</if> </if>
ORDER BY ORDER BY
gp.GROUP_CATEGORY, gp.CREATED_TIME DESC gp.GROUP_CATEGORY, gp.CREATED_TIME DESC
@ -200,13 +203,16 @@
gp.DEL_FLAG = '0' gp.DEL_FLAG = '0'
AND gp.STATE IN ( 10, 15 ) AND gp.STATE IN ( 10, 15 )
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND gp.GRID_ID = #{gridId} AND (gp.GRID_ID = #{gridId}
OR find_in_set(#{gridId},gp.ALL_DEPT_IDS))
</if> </if>
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND gp.STREET_ID = #{streetId} AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS)
OR find_in_set(#{streetId},gp.ALL_DEPT_IDS))
</if> </if>
<if test="communityId != null and communityId != ''"> <if test="communityId != null and communityId != ''">
AND gp.COMMUNITY_ID = #{communityId} AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS)
OR find_in_set(#{communityId},gp.ALL_DEPT_IDS))
</if> </if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND DATE_FORMAT( gp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} AND DATE_FORMAT( gp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
@ -234,13 +240,16 @@
gp.DEL_FLAG = '0' gp.DEL_FLAG = '0'
AND gp.STATE IN ( 10, 15 ) AND gp.STATE IN ( 10, 15 )
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND gp.GRID_ID = #{gridId} AND (gp.GRID_ID = #{gridId}
OR find_in_set(#{gridId},gp.ALL_DEPT_IDS))
</if> </if>
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND gp.STREET_ID = #{streetId} AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS)
OR find_in_set(#{streetId},gp.ALL_DEPT_IDS))
</if> </if>
<if test="communityId != null and communityId != ''"> <if test="communityId != null and communityId != ''">
AND gp.COMMUNITY_ID = #{communityId} AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS)
OR find_in_set(#{communityId},gp.ALL_DEPT_IDS))
</if> </if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND DATE_FORMAT( gp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} AND DATE_FORMAT( gp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}

9
esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/topic/TopicDao.xml

@ -201,13 +201,16 @@
temp.DEL_FLAG = '0' temp.DEL_FLAG = '0'
AND temp.STATE IN ( 0, 5, 20 ) AND temp.STATE IN ( 0, 5, 20 )
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND temp.STREET_ID = #{streetId} AND (find_in_set(#{streetId},temp.PARENT_DEPT_IDS)
OR find_in_set(#{streetId},temp.ALL_DEPT_IDS))
</if> </if>
<if test="communityId != null and communityId != ''"> <if test="communityId != null and communityId != ''">
AND temp.COMMUNITY_ID = #{communityId} AND (find_in_set(#{communityId},temp.PARENT_DEPT_IDS)
OR find_in_set(#{communityId},temp.ALL_DEPT_IDS))
</if> </if>
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND temp.grid_id = #{gridId} AND (temp.GRID_ID = #{gridId}
OR find_in_set(#{gridId},temp.ALL_DEPT_IDS))
</if> </if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}

Loading…
Cancel
Save