From deb2561a0cb311838d65160276f0e285456bdeb2 Mon Sep 17 00:00:00 2001
From: weikai <123456>
Date: Fri, 22 May 2020 21:54:48 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90pc=E7=AB=AF=20=E6=96=B0=E9=97=BB?=
=?UTF-8?q?=E5=8F=91=E5=B8=83=E6=95=B0=E3=80=91-=E3=80=90=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E6=A0=A1=E9=AA=8Csql=E4=BF=AE=E6=94=B9=E3=80=91-?=
=?UTF-8?q?=EF=BC=88=E9=AD=8F=E5=87=AF=EF=BC=89-2020/05/22?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/mapper/NewsDao.xml | 37 +++++++++++--------
1 file changed, 22 insertions(+), 15 deletions(-)
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 3d6e5f7f2..c5b5823ca 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
@@ -95,25 +95,31 @@
SELECT
*
FROM
- (
- SELECT DISTINCT
- nd.NEWS_ID
- FROM
- epdc_news_department nd
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-- LEFT JOIN
+ epdc_news n
+-- ON t0.NEWS_ID = n.ID
WHERE
+ n.ID IS NOT NULL
+ AND n.DEL_FLAG = '0'
- nd.DEPT_ID IN
+ AND n.DEPT_ID IN
#{deptId}
- AND
- nd.DEL_FLAG = '0'
- GROUP BY
- nd.NEWS_ID
- ) t0
- LEFT JOIN epdc_news n ON t0.NEWS_ID = n.ID
- WHERE
- n.ID IS NOT NULL
- AND n.DEL_FLAG = '0'
AND DATE_FORMAT( n.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
@@ -127,6 +133,7 @@
AND n.ALL_DEPT_IDS like concat('%', #{gridId}, '%')
+ group by n.id
ORDER BY
n.CREATED_TIME DESC
From d10b7bd210dd4a636a17029da0d27e780bbe1b6c Mon Sep 17 00:00:00 2001
From: Jackwang
Date: Fri, 22 May 2020 22:14:13 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90PC=E9=A1=B9=E7=9B=AE=E5=8F=8A?=
=?UTF-8?q?=E8=AE=AE=E9=A2=98=E6=95=B0=E9=87=8F=E4=BF=AE=E6=94=B9=E3=80=91?=
=?UTF-8?q?-=E3=80=90sql=E8=B0=83=E6=95=B4=E3=80=91-=EF=BC=88=E7=8E=8B?=
=?UTF-8?q?=E7=AB=A5=EF=BC=89-2020/05/22?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/mapper/user/UserAnalysisDao.xml | 70 ++++++++++++++-----
1 file changed, 51 insertions(+), 19 deletions(-)
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 992e967b5..4d3dfa77e 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
@@ -141,19 +141,36 @@
@@ -662,21 +679,36 @@