From d8eb5be4de73496290d34cb71499acff3f2129ac Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Sat, 15 Jun 2024 16:42:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=9C=8D=E5=8A=A1=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcFileDownloadController.java | 32 ++++++++++--------- .../mapper/business/DcPublishManageMapper.xml | 6 ++-- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcFileDownloadController.java b/zc-business/src/main/java/com/zc/business/controller/DcFileDownloadController.java index 369a3afb..a93c64d1 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcFileDownloadController.java +++ b/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()); } } + } diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml index 441e7ca8..fde73636 100644 --- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml +++ b/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; @@ -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;