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}