|
|
@ -41,11 +41,11 @@ public class LoginService |
|
|
public User login(String username, String password) |
|
|
public User login(String username, String password) |
|
|
{ |
|
|
{ |
|
|
// 验证码校验
|
|
|
// 验证码校验
|
|
|
// if (!StringUtils.isEmpty(ServletUtils.getRequest().getAttribute(ShiroConstants.CURRENT_CAPTCHA)))
|
|
|
if (!StringUtils.isEmpty(ServletUtils.getRequest().getAttribute(ShiroConstants.CURRENT_CAPTCHA))) |
|
|
// {
|
|
|
{ |
|
|
// AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
|
|
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"))); |
|
|
// throw new CaptchaException();
|
|
|
throw new CaptchaException(); |
|
|
// }
|
|
|
} |
|
|
// 用户名或密码为空 错误
|
|
|
// 用户名或密码为空 错误
|
|
|
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) |
|
|
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) |
|
|
{ |
|
|
{ |
|
|
|