From 92f037658db4a75ac1f92dc7cae9daf10f0a57eb Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 21 Jun 2022 11:18:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=89=8D=E7=AB=AF=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=9D=9E=E7=A9=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/sys/SystemParameterController.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java b/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java index 456bab17b7..5da168408c 100644 --- a/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java +++ b/backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java @@ -68,11 +68,12 @@ public class SystemParameterController { @RequiresPermissions("sysparam:read") @PostMapping("/edit/basic") public CasSaveResult editBasic(@RequestBody List systemParameter) { - int timeout = Integer.parseInt(systemParameter.stream().filter( - parameter -> parameter.getParamKey().equals("basic.frontTimeOut") - ).findFirst().get().getParamValue()); - if (timeout < 0 || timeout > 300) { //增加了合法性检验 - throw new NumberFormatException("Timeout Range Error!"); + String value = systemParameter.stream().filter(parameter -> parameter.getParamKey().equals("basic.frontTimeOut")).findFirst().get().getParamValue(); + if (StringUtils.isNotBlank(value)) { + int timeout = Integer.parseInt(value); + if (timeout < 0 || timeout > 300) { //增加了合法性检验 + throw new NumberFormatException("Timeout Range Error!"); + } } return systemParameterService.editBasic(systemParameter); }