From 74cc5af5c9a5604cfaea37d003a8a2812e30884a Mon Sep 17 00:00:00 2001 From: Chopper Date: Wed, 14 Sep 2022 01:32:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A2=AB=E6=89=B9=E9=87=8F=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF=E5=AF=BC=E8=87=B4=E7=A3=81?= =?UTF-8?q?=E7=9B=98=E6=B2=BE=E6=BB=A1=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/lili/controller/other/CustomWordsController.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/manager-api/src/main/java/cn/lili/controller/other/CustomWordsController.java b/manager-api/src/main/java/cn/lili/controller/other/CustomWordsController.java index 8556775c2..ff2d56fb4 100644 --- a/manager-api/src/main/java/cn/lili/controller/other/CustomWordsController.java +++ b/manager-api/src/main/java/cn/lili/controller/other/CustomWordsController.java @@ -3,9 +3,7 @@ package cn.lili.controller.other; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; -import cn.lili.common.enums.ResultCode; import cn.lili.common.enums.ResultUtil; -import cn.lili.common.exception.ServiceException; import cn.lili.common.vo.PageVO; import cn.lili.common.vo.ResultMessage; import cn.lili.modules.permission.SettingKeys; @@ -60,8 +58,9 @@ public class CustomWordsController { } JSONObject jsonObject = JSONUtil.parseObj(setting.getSettingValue()); + //如果密钥不正确,返回空 if (!secretKey.equals(jsonObject.get("secretKey"))) { - throw new ServiceException(ResultCode.CUSTOM_WORDS_SECRET_KEY_ERROR); + return ""; } String res = customWordsService.deploy();