diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml index de646727f..aa68b0e19 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml @@ -120,16 +120,19 @@ SELECT #{gridId} gridId - LEFT JOIN esua_epdc_news.epdc_news nne ON t.gridId = nne.DEPT_ID AND nne.DEL_FLAG = '0' - LEFT JOIN esua_epdc_news.epdc_notice nnn ON t.gridId = nnn.DEPT_ID AND nnn.DEL_FLAG = '0' - LEFT JOIN esua_epdc_events.epdc_events eee ON t.gridId = eee.GRID_ID AND eee.DEL_FLAG = '0' AND eee.EVENT_STATE = '4' - where 1=1 + LEFT JOIN esua_epdc_news.epdc_news nne ON FIND_IN_SET(t.gridId,nne.ALL_DEPT_IDS) AND nne.DEL_FLAG = '0' AND DATE_FORMAT(nne.CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime} + + LEFT JOIN esua_epdc_news.epdc_notice nnn ON t.gridId = nnn.DEPT_ID AND nnn.DEL_FLAG = '0' + AND DATE_FORMAT(nnn.CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime} + + LEFT JOIN esua_epdc_events.epdc_events eee ON t.gridId = eee.GRID_ID AND eee.DEL_FLAG = '0' AND eee.EVENT_STATE = '4' + AND DATE_FORMAT(eee.CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime} - GROUP BY + GROUP BY t.gridId @@ -163,7 +166,13 @@ FROM esua_epdc_group.epdc_group epgr LEFT JOIN esua_epdc_group.epdc_user_group ug ON epgr.id = ug.group_id AND ug.DEL_FLAG = '0' + + AND DATE_FORMAT(ug.CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime} + LEFT JOIN esua_epdc_group.epdc_topic ut ON epgr.id = ut.group_id AND ut.DEL_FLAG = '0' + + AND DATE_FORMAT(ut.CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime} + WHERE epgr.DEL_FLAG = '0' AND ( epgr.STATE = '10' OR epgr.STATE = '15' ) @@ -624,38 +633,54 @@ @@ -689,6 +714,12 @@ ) LEFT JOIN esua_epdc_group.epdc_topic ug ON epgr.id = ug.group_id AND ug.DEL_FLAG = '0' + + AND ug.CREATED_TIME BETWEEN #{operationStartTime} AND #{operationEndTime} + + + and ug.CREATED_TIME <=#{endTime} + GROUP BY t0.id ORDER BY 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 389b0d692..926af166d 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 @@ -193,10 +193,13 @@ ( temp.BROWSE_NUM + temp.COMMENT_NUM ) AS participantsNum, temp.STATE FROM - epdc_topic temp + epdc_group epgr + left join + epdc_topic temp ON epgr.id = temp.group_id AND temp.DEL_FLAG = '0' WHERE temp.DEL_FLAG = '0' - AND temp.STATE IN ( 0, 5, 20) + AND temp.STATE IN ( 0, 5,10,15,20) + and epgr.DEL_FLAG = '0' AND ( epgr.STATE = '10' OR epgr.STATE = '15' ) AND temp.GRID_ID in @@ -219,6 +222,7 @@ OR find_in_set(#{gridId},temp.ALL_DEPT_IDS)) + AND DATE_FORMAT( epgr.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} @@ -227,6 +231,7 @@ AND temp.TOPIC_CONTENT like concat('%', trim(#{keyword}), '%') + GROUP BY temp.ID ORDER BY temp.CREATED_TIME DESC diff --git a/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/service/impl/NewsServiceImpl.java b/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/service/impl/NewsServiceImpl.java index fb7bf42bb..409a84da9 100644 --- a/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/service/impl/NewsServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/service/impl/NewsServiceImpl.java @@ -480,8 +480,8 @@ public class NewsServiceImpl extends BaseServiceImpl implem public PageData allPage(Map params) { UserDetail user = SecurityUser.getUser(); List deptIdList = user.getDeptIdList(); - params.put("deptIdList", deptIdList); IPage page = getPage(params); + params.put("deptIdList", deptIdList); List newsDaoList = baseDao.selectAllPage(params); return new PageData<>(newsDaoList, page.getTotal()); } @@ -542,4 +542,4 @@ public class NewsServiceImpl extends BaseServiceImpl implem return entities; } -} \ No newline at end of file +} diff --git a/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/resources/mapper/NewsDao.xml b/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/resources/mapper/NewsDao.xml index 7d6d5e76e..3d6e5f7f2 100644 --- a/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/resources/mapper/NewsDao.xml +++ b/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/resources/mapper/NewsDao.xml @@ -110,7 +110,7 @@ GROUP BY nd.NEWS_ID ) t0 - LEFT JOIN epdc_news n ON find_in_set(t0.NEWS_ID, n.ALL_DEPT_IDS) + LEFT JOIN epdc_news n ON t0.NEWS_ID = n.ID WHERE n.ID IS NOT NULL AND n.DEL_FLAG = '0' @@ -129,7 +129,6 @@ ORDER BY n.CREATED_TIME DESC -