From 45ab1ee91876bfc3c88130e8ef97a2c6c9a20072 Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Tue, 20 Jul 2021 16:34:19 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E5=8E=BB=E9=99=A4=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E5=89=8D=E7=BC=80"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 290b1613 --- .../user/VolunteerPointsAnalysisDao.xml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/VolunteerPointsAnalysisDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/VolunteerPointsAnalysisDao.xml index a4e18b02..3863f027 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/VolunteerPointsAnalysisDao.xml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/VolunteerPointsAnalysisDao.xml @@ -10,8 +10,8 @@ IFNULL(COUNT( DISTINCT v.ID ), 0) AS volunteerNum, IFNULL(SUM( l.POINTS ), 0) AS volunteerPoints FROM - esua_epdc_user.epdc_volunteer_dept d - LEFT JOIN esua_epdc_user.epdc_volunteer_info v ON v.VOLUNTEER_DEPT_ID = d.ID + js_esua_epdc_user.epdc_volunteer_dept d + LEFT JOIN js_esua_epdc_user.epdc_volunteer_info v ON v.VOLUNTEER_DEPT_ID = d.ID AND v.DEL_FLAG = '0' AND v.AUDIT_STATUS IN ( '0', '1' ) @@ -20,7 +20,7 @@ and DATE_FORMAT( v.REGIST_TIME, '%Y-%m-%d' ) <=#{endTime} - LEFT JOIN esua_epdc_points.epdc_points_logs l ON l.USER_ID = v.USER_ID + LEFT JOIN js_esua_epdc_points.epdc_points_logs l ON l.USER_ID = v.USER_ID AND l.DEL_FLAG = '0' AND l.BEHAVIOR_CODE = 'join_act' @@ -65,10 +65,10 @@ v.VOLUNTEER_SIGNATURE, v.ADDRESS FROM - esua_epdc_user.epdc_volunteer_info v - LEFT JOIN esua_epdc_user.epdc_volunteer_tag_relation r ON r.VOLUNTEER_ID = v.ID + js_esua_epdc_user.epdc_volunteer_info v + LEFT JOIN js_esua_epdc_user.epdc_volunteer_tag_relation r ON r.VOLUNTEER_ID = v.ID AND r.DEL_FLAG = '0' - LEFT JOIN esua_epdc_user.epdc_volunteer_tag t ON t.ID = r.TAG_ID + LEFT JOIN js_esua_epdc_user.epdc_volunteer_tag t ON t.ID = r.TAG_ID WHERE v.DEL_FLAG = '0' AND v.AUDIT_STATUS IN ( '0', '1' ) @@ -80,7 +80,7 @@ and DATE_FORMAT( v.REGIST_TIME, '%Y-%m-%d' ) <=#{endTime} ) tmp - LEFT JOIN esua_epdc_points.epdc_points_logs l ON l.USER_ID = tmp.USER_ID + LEFT JOIN js_esua_epdc_points.epdc_points_logs l ON l.USER_ID = tmp.USER_ID AND l.DEL_FLAG = '0' AND l.BEHAVIOR_CODE = 'join_act' @@ -105,10 +105,10 @@ ELSE ai.`TITLE` END AS actName, l.`OPERATION_TIME` - FROM `esua_epdc_points`.`epdc_points_logs` l - LEFT JOIN `esua_epdc_mutuality`.`epdc_act_user_points_log` aup on aup.`ID`= l.`REFERENCE_ID` - LEFT JOIN `esua_epdc_mutuality`.`epdc_act_user_relation` aur on aur.`ID`= aup.`ACT_USER_ID` - LEFT JOIN `esua_epdc_mutuality`.`epdc_act_info` ai on ai.`ID`= aur.`ACT_ID` + FROM `js_esua_epdc_points`.`epdc_points_logs` l + LEFT JOIN `js_esua_epdc_mutuality`.`epdc_act_user_points_log` aup on aup.`ID`= l.`REFERENCE_ID` + LEFT JOIN `js_esua_epdc_mutuality`.`epdc_act_user_relation` aur on aur.`ID`= aup.`ACT_USER_ID` + LEFT JOIN `js_esua_epdc_mutuality`.`epdc_act_info` ai on ai.`ID`= aur.`ACT_ID` WHERE l.`DEL_FLAG`= '0' AND l.`BEHAVIOR_CODE`= 'join_act' AND l.USER_ID = #{userId}