Browse Source

统计服务数据问题

develop
wangsixiang 6 months ago
parent
commit
d8eb5be4de
  1. 32
      zc-business/src/main/java/com/zc/business/controller/DcFileDownloadController.java
  2. 6
      zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml

32
zc-business/src/main/java/com/zc/business/controller/DcFileDownloadController.java

@ -1,31 +1,30 @@
package com.zc.business.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.config.ServerConfig;
import com.zc.business.domain.DcFileDownload;
import com.zc.business.service.IDcFileDownloadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.zc.business.domain.DcFileDownload;
import com.zc.business.service.IDcFileDownloadService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.framework.config.ServerConfig;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 文件管理Controller
@ -33,9 +32,11 @@ import org.springframework.web.multipart.MultipartFile;
* @author ruoyi
* @date 2024-06-12
*/
@RestController
@RequestMapping("/business/download")
public class DcFileDownloadController extends BaseController {
@Autowired
private IDcFileDownloadService dcFileDownloadService;
@Autowired
@ -126,4 +127,5 @@ public class DcFileDownloadController extends BaseController {
return AjaxResult.error(e.getMessage());
}
}
}

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

@ -304,7 +304,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number
FROM dc_publish_manage
LEFT JOIN dc_event on dc_publish_manage.event_id=dc_event.id
GROUP BY dc_event.event_type
where dc_event.event_type is not null
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;
</select>
@ -330,9 +331,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN (
SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number
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 YEAR(publish_time) = YEAR(CURDATE())
AND MONTH(publish_time) = MONTH(#{publishTime})
AND dc_event.event_type is not NULL
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;

Loading…
Cancel
Save