Browse Source

公众服务统计去除失败

develop
wangsixiang 3 months ago
parent
commit
2dd3cad76d
  1. 12
      zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
  2. 6
      zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml

12
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)); return toAjax(dcPublishManageService.deleteDcPublishManageByIds(ids));
} }
//统计服务,今日发布渠道分析 //统计服务,今日发布渠道分析(只统计成功)
@PostMapping("/statisticsPublishManage") @PostMapping("/statisticsPublishManage")
public AjaxResult statisticsPublishManage() public AjaxResult statisticsPublishManage()
{ {
@ -146,7 +146,7 @@ public class DcPublishManageController extends BaseController
util.exportExcel(response, list, "今日发布渠道分析"); util.exportExcel(response, list, "今日发布渠道分析");
} }
//统计服务,今日发布事件类型分析 //统计服务,今日发布事件类型分析(只统计成功)
@PostMapping("/eventTypePublishManage") @PostMapping("/eventTypePublishManage")
public AjaxResult eventTypePublishManage() public AjaxResult eventTypePublishManage()
{ {
@ -177,7 +177,7 @@ public class DcPublishManageController extends BaseController
util.exportExcel(response, list, "今日发布事件类型分析"); util.exportExcel(response, list, "今日发布事件类型分析");
} }
//统计服务,今日发布趋势分析 //统计服务,今日发布趋势分析(只统计成功)
@PostMapping("/trendsPublishManage") @PostMapping("/trendsPublishManage")
public AjaxResult releaseTrendsPublishManage() public AjaxResult releaseTrendsPublishManage()
{ {
@ -219,7 +219,7 @@ public class DcPublishManageController extends BaseController
util.exportExcel(response, list, "今日发布趋势分析"); util.exportExcel(response, list, "今日发布趋势分析");
} }
//统计服务,月发布渠道趋势分析 //统计服务,月发布渠道趋势分析(只统计成功的)
@PostMapping("/monthTrendsPublishManage") @PostMapping("/monthTrendsPublishManage")
public AjaxResult monthTrendsPublishManage(@RequestBody DcPublishManage dcPublishManage) public AjaxResult monthTrendsPublishManage(@RequestBody DcPublishManage dcPublishManage)
{ {
@ -280,13 +280,13 @@ public class DcPublishManageController extends BaseController
util.exportExcel(response, list, "月发布渠道趋势分析"); util.exportExcel(response, list, "月发布渠道趋势分析");
} }
//统计服务,事件类型对应的发布渠道发布的数量 //统计服务,事件类型对应的发布渠道发布的数量(只统计成功的)
@PostMapping("/eventTypePublishManageSum") @PostMapping("/eventTypePublishManageSum")
public AjaxResult eventTypePublishManageSum() public AjaxResult eventTypePublishManageSum()
{ {
return AjaxResult.success(dcPublishManageService.eventTypePublishManageSum()); return AjaxResult.success(dcPublishManageService.eventTypePublishManageSum());
} }
//统计服务,事件类型对应的发布渠道发布的数量按月统计 //统计服务,事件类型对应的发布渠道发布的数量按月统计(只统计成功的)
@PostMapping("/eventTypePublishManageMonth") @PostMapping("/eventTypePublishManageMonth")
public AjaxResult eventTypePublishManageMonth(@RequestBody DcPublishManage dcPublishManage) public AjaxResult eventTypePublishManageMonth(@RequestBody DcPublishManage dcPublishManage)
{ {

6
zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml

@ -219,6 +219,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) AS p ) AS p
LEFT JOIN dc_publish_manage AS m ON p.publish_channels = m.publish_channels LEFT JOIN dc_publish_manage AS m ON p.publish_channels = m.publish_channels
AND DATE(m.publish_time) = CURDATE() AND DATE(m.publish_time) = CURDATE()
where m.publish_status=1
GROUP BY p.publish_channels GROUP BY p.publish_channels
ORDER BY p.publish_channels; ORDER BY p.publish_channels;
</select> </select>
@ -238,6 +239,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM dc_publish_manage FROM dc_publish_manage
LEFT JOIN dc_event on dc_publish_manage.event_id=dc_event.id LEFT JOIN dc_event on dc_publish_manage.event_id=dc_event.id
where event_id is not NULL AND DATE(publish_time) = CURDATE() where event_id is not NULL AND DATE(publish_time) = CURDATE()
and dc_publish_manage.publish_status=1
GROUP BY eventType GROUP BY eventType
) AS m ON h.eventType = m.eventType ) AS m ON h.eventType = m.eventType
ORDER BY h.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 SELECT HOUR(publish_time) AS hour, publish_channels, COUNT(*)AS number
FROM dc_publish_manage FROM dc_publish_manage
WHERE DATE(publish_time) = CURDATE() WHERE DATE(publish_time) = CURDATE()
and dc_publish_manage.publish_status=1
GROUP BY HOUR(publish_time), publish_channels GROUP BY HOUR(publish_time), publish_channels
) AS m ON h.hour = m.hour AND pc.publish_channels = m.publish_channels ) AS m ON h.hour = m.hour AND pc.publish_channels = m.publish_channels
ORDER BY h.hour, pc.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 FROM dc_publish_manage AS pm
where MONTH(pm.publish_time) = MONTH(#{publishTime}) where MONTH(pm.publish_time) = MONTH(#{publishTime})
AND pm.publish_time is not null AND pm.publish_time is not null
and pm.publish_status =1
GROUP BY publishTime, pm.publish_channels GROUP BY publishTime, pm.publish_channels
ORDER BY publishTime ORDER BY publishTime
</select> </select>
@ -303,6 +307,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM dc_publish_manage FROM dc_publish_manage
LEFT JOIN dc_event on dc_publish_manage.event_id=dc_event.id LEFT JOIN dc_event on dc_publish_manage.event_id=dc_event.id
where dc_event.event_type is not null where dc_event.event_type is not null
and dc_publish_manage.publish_status=1
GROUP BY dc_event.event_type,publish_channels GROUP BY dc_event.event_type,publish_channels
) AS m ON h.eventType = m.eventType AND pc.publish_channels = m.publish_channels ) AS m ON h.eventType = m.eventType AND pc.publish_channels = m.publish_channels
ORDER BY h.eventType, pc.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()) WHERE YEAR(publish_time) = YEAR(CURDATE())
AND MONTH(publish_time) = MONTH(#{publishTime}) AND MONTH(publish_time) = MONTH(#{publishTime})
AND dc_event.event_type is not NULL AND dc_event.event_type is not NULL
and dc_publish_manage.publish_status=1
GROUP BY eventType,publish_channels GROUP BY eventType,publish_channels
) AS m ON h.eventType = m.eventType AND pc.publish_channels = m.publish_channels ) AS m ON h.eventType = m.eventType AND pc.publish_channels = m.publish_channels
ORDER BY h.eventType, pc.publish_channels; ORDER BY h.eventType, pc.publish_channels;

Loading…
Cancel
Save