Browse Source

话题、议题列表查询sql修改

dev
尹作梅 6 years ago
parent
commit
9e9a50ca73
  1. 18
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/issue/IssueDao.xml
  2. 18
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/topic/TopicDao.xml

18
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/issue/IssueDao.xml

@ -23,16 +23,13 @@
AND ei.ISSUE_CONTENT LIKE CONCAT('%',#{issueContent},'%') AND ei.ISSUE_CONTENT LIKE CONCAT('%',#{issueContent},'%')
</if> </if>
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND (find_in_set(#{streetId},ei.PARENT_DEPT_IDS) AND find_in_set(#{streetId},ei.ALL_DEPT_IDS)
OR find_in_set(#{streetId},ei.ALL_DEPT_IDS))
</if> </if>
<if test="communityId != null and communityId != ''"> <if test="communityId != null and communityId != ''">
AND (find_in_set(#{communityId},ei.PARENT_DEPT_IDS) AND find_in_set(#{communityId},ei.ALL_DEPT_IDS)
OR find_in_set(#{communityId},ei.ALL_DEPT_IDS))
</if> </if>
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND (ei.GRID_ID = #{gridId} AND ei.GRID_ID = #{gridId}
OR find_in_set(#{gridId},ei.ALL_DEPT_IDS))
</if> </if>
<if test="startTime != null and startTime != ''"> <if test="startTime != null and startTime != ''">
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) &gt;=#{startTime} and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) &gt;=#{startTime}
@ -74,16 +71,13 @@
AND ei.ISSUE_CONTENT LIKE CONCAT('%',#{issueContent},'%') AND ei.ISSUE_CONTENT LIKE CONCAT('%',#{issueContent},'%')
</if> </if>
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND (find_in_set(#{streetId},ei.PARENT_DEPT_IDS) AND find_in_set(#{streetId},ei.ALL_DEPT_IDS)
OR find_in_set(#{streetId},ei.ALL_DEPT_IDS))
</if> </if>
<if test="communityId != null and communityId != ''"> <if test="communityId != null and communityId != ''">
AND (find_in_set(#{communityId},ei.PARENT_DEPT_IDS) AND find_in_set(#{communityId},ei.ALL_DEPT_IDS)
OR find_in_set(#{communityId},ei.ALL_DEPT_IDS))
</if> </if>
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND (ei.GRID_ID = #{gridId} AND ei.GRID_ID = #{gridId}
OR find_in_set(#{gridId},ei.ALL_DEPT_IDS))
</if> </if>
<if test="startTime != null and startTime != ''"> <if test="startTime != null and startTime != ''">
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) &gt;=#{startTime} and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) &gt;=#{startTime}

18
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/topic/TopicDao.xml

@ -22,16 +22,13 @@
and et.TOPIC_CONTENT like concat('%', #{topicContent}, '%') and et.TOPIC_CONTENT like concat('%', #{topicContent}, '%')
</if> </if>
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND (find_in_set(#{streetId},et.PARENT_DEPT_IDS) AND find_in_set(#{streetId},et.ALL_DEPT_IDS)
OR find_in_set(#{streetId},et.ALL_DEPT_IDS))
</if> </if>
<if test="communityId != null and communityId != ''"> <if test="communityId != null and communityId != ''">
AND (find_in_set(#{communityId},et.PARENT_DEPT_IDS) AND find_in_set(#{communityId},et.ALL_DEPT_IDS)
OR find_in_set(#{communityId},et.ALL_DEPT_IDS))
</if> </if>
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND (et.GRID_ID = #{gridId} AND et.GRID_ID = #{gridId}
OR find_in_set(#{gridId},et.ALL_DEPT_IDS))
</if> </if>
<if test="startTime != null and startTime != ''"> <if test="startTime != null and startTime != ''">
and DATE_FORMAT( et.CREATED_TIME, '%Y-%m-%d' ) &gt;=#{startTime} and DATE_FORMAT( et.CREATED_TIME, '%Y-%m-%d' ) &gt;=#{startTime}
@ -68,16 +65,13 @@
and et.TOPIC_CONTENT like concat('%', #{topicContent}, '%') and et.TOPIC_CONTENT like concat('%', #{topicContent}, '%')
</if> </if>
<if test="streetId != null and streetId != ''"> <if test="streetId != null and streetId != ''">
AND (find_in_set(#{streetId},et.PARENT_DEPT_IDS) AND find_in_set(#{streetId},et.ALL_DEPT_IDS)
OR find_in_set(#{streetId},et.ALL_DEPT_IDS))
</if> </if>
<if test="communityId != null and communityId != ''"> <if test="communityId != null and communityId != ''">
AND (find_in_set(#{communityId},et.PARENT_DEPT_IDS) AND find_in_set(#{communityId},et.ALL_DEPT_IDS)
OR find_in_set(#{communityId},et.ALL_DEPT_IDS))
</if> </if>
<if test="gridId != null and gridId != ''"> <if test="gridId != null and gridId != ''">
AND (et.GRID_ID = #{gridId} AND et.GRID_ID = #{gridId}
OR find_in_set(#{gridId},et.ALL_DEPT_IDS))
</if> </if>
<if test="startTime != null and startTime != ''"> <if test="startTime != null and startTime != ''">
and DATE_FORMAT( et.CREATED_TIME, '%Y-%m-%d' ) &gt;=#{startTime} and DATE_FORMAT( et.CREATED_TIME, '%Y-%m-%d' ) &gt;=#{startTime}

Loading…
Cancel
Save