From 54751428b2b245d806974ea02d70430d1c08bf41 Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Wed, 9 Dec 2020 17:35:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E7=94=A8=E6=88=B7=E6=80=BB?= =?UTF-8?q?=E6=98=AF=E6=8F=90=E7=A4=BA=E2=80=9C=E6=89=8B=E6=9C=BA=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81=E9=94=99=E8=AF=AF=E2=80=9D=20#2081?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/system/controller/SysUserController.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java index a5499641..d0e81dc6 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java @@ -889,8 +889,12 @@ public class SysUserController { return result; } } - - if (!smscode.equals(code)) { + if(null == code){ + result.setMessage("手机验证码失效,请重新获取"); + result.setSuccess(false); + return result; + } + if (!smscode.equals(code.toString())) { result.setMessage("手机验证码错误"); result.setSuccess(false); return result; @@ -1039,7 +1043,7 @@ public class SysUserController { if (oConvertUtils.isEmpty(token)) { username = JwtUtil.getUserNameByToken(request); } else { - username = JwtUtil.getUsername(token); + username = JwtUtil.getUsername(token); } log.info(" ------ 通过令牌获取部分用户信息,当前用户: " + username);