Browse Source

【PC端】网格开通情况社群数优化-王公峰-2020-07-16

feature/dangjian
wanggongfeng 5 years ago
parent
commit
b1605f95f5
  1. 18
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml

18
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml

@ -234,11 +234,15 @@
<select id="selectListCommunityCount" resultType="com.elink.esua.epdc.dto.user.result.GridOpeningResultDTO">
SELECT
epgr.GRID_ID gridId,
COUNT( DISTINCT epgr.ID ) communityCount,
COUNT( DISTINCT epgrCount.ID ) communityCount,
COUNT( DISTINCT ug.user_id ) communityMemberCount,
COUNT( DISTINCT ut.ID ) communityTopicCount
FROM
esua_epdc_group.epdc_group epgr
left join esua_epdc_group.epdc_group epgrCount on epgr.id = epgrCount,id
<if test="startTime != null and endTime != null and endTime != ''">
AND DATE_FORMAT(epgrCount.CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
</if>
LEFT JOIN esua_epdc_group.epdc_user_group ug ON epgr.id = ug.group_id AND ug.DEL_FLAG = '0'
<if test="startTime != null and endTime != null and endTime != ''">
AND DATE_FORMAT(ug.CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
@ -252,9 +256,7 @@
<if test="gridIdList != null and gridIdList.size() > 0">
AND epgr.GRID_ID in <include refid="foreachGridIdList"></include>
</if>
<if test="startTime != null and endTime != null and endTime != ''">
AND DATE_FORMAT(epgr.CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
</if>
GROUP BY epgr.GRID_ID
</select>
@ -986,13 +988,7 @@
LEFT JOIN esua_epdc_group.epdc_group epgr ON find_in_set(t0.id, epgr.ALL_DEPT_IDS)
AND epgr.DEL_FLAG = '0'
AND (
epgr.STATE = '10'
<if test="operationStartTime != null and operationEndTime != null and operationEndTime != ''">
AND DATE_FORMAT(epgr.CREATED_TIME,'%Y-%m-%d') BETWEEN #{operationStartTime} AND #{operationEndTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(epgr.CREATED_TIME,'%Y-%m-%d') &lt;=#{endTime}
</if>
epgr.STATE = '10'
OR epgr.STATE = '15'
)
<if test="deptIdList != null and deptIdList.size() > 0">

Loading…
Cancel
Save