From 9eb62258b66b55e3615d92009475cb8fa3cdf1f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Thu, 26 Mar 2026 10:31:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(shopping):=20=E4=BF=AE=E5=A4=8D=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=AF=86=E7=A0=81=E9=AA=8C=E8=AF=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 当用户未设置查看密码时直接返回验证结果 - 避免未设置密码情况下的空指针异常 - 简化密码验证流程提高代码可读性 --- .../quotation/controller/app/ShoppingController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java index 84a0caa5..7c521abb 100644 --- a/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java +++ b/nflg-mobilebroken-quotation/src/main/java/com/nflg/mobilebroken/quotation/controller/app/ShoppingController.java @@ -881,7 +881,7 @@ public class ShoppingController extends ControllerBase { Object pwd = stringRedisTemplate.opsForHash().get("quotation:password", String.valueOf(AppUserUtil.getUserId())); // VUtils.trueThrowBusinessError(Objects.isNull(pwd)).throwMessage("还未设置过查看密码"); if (Objects.isNull(pwd)) { - pwd = PASSWORDENCODER.encode("000000"); + return ApiResult.success(StrUtil.equals(password, "000000")); } if (!PASSWORDENCODER.matches(password, pwd.toString())) { return ApiResult.error("查看密码不正确");