From e52d85bddcf7597991a59293d00caba1ff5e4133 Mon Sep 17 00:00:00 2001 From: xjm Date: Fri, 26 Jan 2024 09:31:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/xyt/controller/WaterQualityController.java | 10 +++++----- .../xyt/service/impl/WaterQualityServiceImpl.java | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gunshi/project/xyt/controller/WaterQualityController.java b/src/main/java/com/gunshi/project/xyt/controller/WaterQualityController.java index 27fdd28..52d7c80 100644 --- a/src/main/java/com/gunshi/project/xyt/controller/WaterQualityController.java +++ b/src/main/java/com/gunshi/project/xyt/controller/WaterQualityController.java @@ -69,15 +69,15 @@ public class WaterQualityController { } @Operation(summary = "水质监测数据导出") - - - @GetMapping("/export") - public void export(WaterQualityPageSo waterQualityPageSo, HttpServletResponse response) { + @PostMapping("/export") + public void export( + @Validated({QueryPage.class, QueryTimeRange.class}) @RequestBody(required = true) + WaterQualityPageSo waterQualityPageSo, HttpServletResponse response) { waterqualityService.export(waterQualityPageSo, response); } @Operation(summary = "水质监测数据导入") - @GetMapping("/import") + @PostMapping("/import") public R importExcel(@RequestParam("file") MultipartFile file) { if (file.isEmpty()) { return R.error(400, "请选择上传文件"); diff --git a/src/main/java/com/gunshi/project/xyt/service/impl/WaterQualityServiceImpl.java b/src/main/java/com/gunshi/project/xyt/service/impl/WaterQualityServiceImpl.java index 58f5267..f59e470 100644 --- a/src/main/java/com/gunshi/project/xyt/service/impl/WaterQualityServiceImpl.java +++ b/src/main/java/com/gunshi/project/xyt/service/impl/WaterQualityServiceImpl.java @@ -52,8 +52,6 @@ public class WaterQualityServiceImpl extends BaseOrderDao page(WaterQualityPageSo pageQueryCriteria) { - requireNonNull(pageQueryCriteria, "pageQueryCriteria should not be null"); - LambdaQueryWrapper query = Wrappers.lambdaQuery(); DateTimeRangeSo timeSo = pageQueryCriteria.getTimeSo();