diff --git a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java index 0f175c20..aaba69c6 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java @@ -110,7 +110,7 @@ public class DcPublishManageController extends BaseController { return toAjax(dcPublishManageService.deleteDcPublishManageByIds(ids)); } - //统计服务,今日发布渠道分析 + //统计服务,今日发布渠道分析(只统计成功) @PostMapping("/statisticsPublishManage") public AjaxResult statisticsPublishManage() { @@ -146,7 +146,7 @@ public class DcPublishManageController extends BaseController util.exportExcel(response, list, "今日发布渠道分析"); } - //统计服务,今日发布事件类型分析 + //统计服务,今日发布事件类型分析(只统计成功) @PostMapping("/eventTypePublishManage") public AjaxResult eventTypePublishManage() { @@ -177,7 +177,7 @@ public class DcPublishManageController extends BaseController util.exportExcel(response, list, "今日发布事件类型分析"); } - //统计服务,今日发布趋势分析 + //统计服务,今日发布趋势分析(只统计成功) @PostMapping("/trendsPublishManage") public AjaxResult releaseTrendsPublishManage() { @@ -219,7 +219,7 @@ public class DcPublishManageController extends BaseController util.exportExcel(response, list, "今日发布趋势分析"); } - //统计服务,月发布渠道趋势分析 + //统计服务,月发布渠道趋势分析(只统计成功的) @PostMapping("/monthTrendsPublishManage") public AjaxResult monthTrendsPublishManage(@RequestBody DcPublishManage dcPublishManage) { @@ -280,13 +280,13 @@ public class DcPublishManageController extends BaseController util.exportExcel(response, list, "月发布渠道趋势分析"); } - //统计服务,事件类型对应的发布渠道发布的数量 + //统计服务,事件类型对应的发布渠道发布的数量(只统计成功的) @PostMapping("/eventTypePublishManageSum") public AjaxResult eventTypePublishManageSum() { return AjaxResult.success(dcPublishManageService.eventTypePublishManageSum()); } - //统计服务,事件类型对应的发布渠道发布的数量按月统计 + //统计服务,事件类型对应的发布渠道发布的数量按月统计(只统计成功的) @PostMapping("/eventTypePublishManageMonth") public AjaxResult eventTypePublishManageMonth(@RequestBody DcPublishManage dcPublishManage) { diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml index 1387c9af..b4d5f45f 100644 --- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml @@ -219,6 +219,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) AS p LEFT JOIN dc_publish_manage AS m ON p.publish_channels = m.publish_channels AND DATE(m.publish_time) = CURDATE() + where m.publish_status=1 GROUP BY p.publish_channels ORDER BY p.publish_channels; @@ -238,6 +239,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" FROM dc_publish_manage LEFT JOIN dc_event on dc_publish_manage.event_id=dc_event.id where event_id is not NULL AND DATE(publish_time) = CURDATE() + and dc_publish_manage.publish_status=1 GROUP BY eventType ) AS m ON h.eventType = m.eventType ORDER BY h.eventType @@ -267,6 +269,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT HOUR(publish_time) AS hour, publish_channels, COUNT(*)AS number FROM dc_publish_manage WHERE DATE(publish_time) = CURDATE() + and dc_publish_manage.publish_status=1 GROUP BY HOUR(publish_time), publish_channels ) AS m ON h.hour = m.hour AND pc.publish_channels = m.publish_channels ORDER BY h.hour, pc.publish_channels; @@ -279,6 +282,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" FROM dc_publish_manage AS pm where MONTH(pm.publish_time) = MONTH(#{publishTime}) AND pm.publish_time is not null + and pm.publish_status =1 GROUP BY publishTime, pm.publish_channels ORDER BY publishTime @@ -303,6 +307,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" FROM dc_publish_manage LEFT JOIN dc_event on dc_publish_manage.event_id=dc_event.id where dc_event.event_type is not null + and dc_publish_manage.publish_status=1 GROUP BY dc_event.event_type,publish_channels ) AS m ON h.eventType = m.eventType AND pc.publish_channels = m.publish_channels ORDER BY h.eventType, pc.publish_channels; @@ -332,6 +337,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE YEAR(publish_time) = YEAR(CURDATE()) AND MONTH(publish_time) = MONTH(#{publishTime}) AND dc_event.event_type is not NULL + and dc_publish_manage.publish_status=1 GROUP BY eventType,publish_channels ) AS m ON h.eventType = m.eventType AND pc.publish_channels = m.publish_channels ORDER BY h.eventType, pc.publish_channels;