From 5a85f52f32ad29841a02eaf265fa6dff459ee9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=85=95=E4=B8=8B?= <484014559@qq.com> Date: Tue, 20 Aug 2024 14:01:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=8E=B7=E5=BE=97=E5=8E=BB=E5=B9=B4?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E5=BE=80=E5=89=8D=E6=8E=A8=E5=8D=81=E5=A4=A9?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/saledata/SaleDataApi.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/saledata/SaleDataApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/saledata/SaleDataApi.java index d7cbe87e4..8b5f6e07e 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/saledata/SaleDataApi.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/admin/saledata/SaleDataApi.java @@ -11,6 +11,8 @@ import javax.annotation.Resource; import java.math.BigDecimal; import java.util.List; import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @@ -40,7 +42,14 @@ public class SaleDataApi { @GetMapping("/lastyear/{startTime}") @Operation(summary = "获得去年日期往前推十天的数据") public List> lastyearNum(@PathVariable("startTime") String startTime) { - return saleDataService.findCheckticketcountBytime(startTime); + String resultStr = startTime.replaceAll("-", ""); + // 正则表达式匹配 yyyyMMdd 格式 + Pattern pattern = Pattern.compile("^\\d{8}$"); + Matcher matcher = pattern.matcher(resultStr); + if (matcher.matches()){ + return saleDataService.findCheckticketcountBytime(resultStr); + } + return null; } @GetMapping("/gender") -- 2.45.2 From 10604c90c06593a39f56ed2cfc4359a8a9a5082c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=85=95=E4=B8=8B?= <484014559@qq.com> Date: Tue, 20 Aug 2024 14:47:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacenter/controller/app/checkticket/CheckTicketApi.java | 2 +- .../controller/app/transitionflight/TransitionFlightApi.java | 2 +- .../controller/app/vehicleaccess/VehicleAccessApi.java | 2 +- .../module/datacenter/controller/app/weather/WeatherApi.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/checkticket/CheckTicketApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/checkticket/CheckTicketApi.java index 81dbc89b2..e27863bed 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/checkticket/CheckTicketApi.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/checkticket/CheckTicketApi.java @@ -15,7 +15,7 @@ import java.util.Map; */ @Tag(name = "大屏服务 - 检票") @RestController -@RequestMapping("/datacenter/checkticket") +@RequestMapping("/checkticket") @Validated public class CheckTicketApi { @Resource diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/transitionflight/TransitionFlightApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/transitionflight/TransitionFlightApi.java index 0fc0be96d..f90ad047b 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/transitionflight/TransitionFlightApi.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/transitionflight/TransitionFlightApi.java @@ -21,7 +21,7 @@ import java.net.URL; */ @Tag(name = "大屏服务 - 车辆过渡情况") @RestController -@RequestMapping("/datacenter/h5/transitionFlight") +@RequestMapping("/h5/transitionFlight") @Validated public class TransitionFlightApi { //智慧票务,检票系统:车辆过渡情况(南日) diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/VehicleAccessApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/VehicleAccessApi.java index 61c93326e..7911dc32b 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/VehicleAccessApi.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/VehicleAccessApi.java @@ -24,7 +24,7 @@ import java.util.Optional; @Tag(name = "大屏服务 - 停车场接口") @RestController -@RequestMapping("/datacenter/h5/vehicleAccess") +@RequestMapping("/h5/vehicleAccess") public class VehicleAccessApi { @Autowired diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/weather/WeatherApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/weather/WeatherApi.java index ed2d3b43c..030b508e7 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/weather/WeatherApi.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/weather/WeatherApi.java @@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController; */ @Tag(name = "大屏服务 - 天气接口") @RestController -@RequestMapping("/datacenter/h5/weather") +@RequestMapping("/h5/weather") @Validated public class WeatherApi { @GetMapping(value = "/getWeather") -- 2.45.2