From b320b3e34ca532a5a7f60e953057ecb79cb01baa Mon Sep 17 00:00:00 2001 From: yjxx <1055683039@qq.com> Date: Thu, 24 Oct 2024 15:13:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../expressdistributionsystem/controller/CommonController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/jty/expressdistributionsystem/controller/CommonController.java b/src/main/java/jty/expressdistributionsystem/controller/CommonController.java index 320ade6..1f6e86b 100644 --- a/src/main/java/jty/expressdistributionsystem/controller/CommonController.java +++ b/src/main/java/jty/expressdistributionsystem/controller/CommonController.java @@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.*; import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; +import java.util.Objects; import java.util.Optional; import java.util.concurrent.TimeUnit; @@ -67,7 +68,7 @@ public class CommonController { return new Result<>(401, "账号或者密码错误", ""); } User user = optionalUser.get(); - if(userLoginByAccountDTO.getMark() != user.getMark()) { + if(!Objects.equals(userLoginByAccountDTO.getMark(), user.getMark())) { return new Result<>(401, "请选择正确身份", ""); } if (user.getDisabled() == 1) {