|
|
@ -121,13 +121,15 @@ public class SysLoginService
|
|
|
|
TDoctor tDoctor = tDoctorMapper.selectTDoctorByPhone(username);
|
|
|
|
TDoctor tDoctor = tDoctorMapper.selectTDoctorByPhone(username);
|
|
|
|
if (Objects.isNull(tDoctor) || "2".equals(tDoctor.getDelFlag())) {
|
|
|
|
if (Objects.isNull(tDoctor) || "2".equals(tDoctor.getDelFlag())) {
|
|
|
|
// 未注册或已删除 返回flag app跳完善信息页面
|
|
|
|
// 未注册或已删除 返回flag app跳完善信息页面
|
|
|
|
log.info("user no register.");
|
|
|
|
log.info("user {} no register.", username);
|
|
|
|
|
|
|
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.not.exists")));
|
|
|
|
ajax.put("flag", false);
|
|
|
|
ajax.put("flag", false);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
SysUser sysUser = userService.selectUserByUserName(username);
|
|
|
|
SysUser sysUser = userService.selectUserByUserName(username);
|
|
|
|
// 验证密码
|
|
|
|
// 验证密码
|
|
|
|
if (!SecurityUtils.matchesPassword(password, sysUser.getPassword())) {
|
|
|
|
if (!SecurityUtils.matchesPassword(password, sysUser.getPassword())) {
|
|
|
|
log.info("登录用户:{} 密码不正确.", username);
|
|
|
|
log.info("登录用户:{} 密码不正确.", username);
|
|
|
|
|
|
|
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match")));
|
|
|
|
throw new ServiceException("登录失败!");
|
|
|
|
throw new ServiceException("登录失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
LoginUser loginUser = new LoginUser();
|
|
|
|
LoginUser loginUser = new LoginUser();
|
|
|
@ -143,7 +145,7 @@ public class SysLoginService
|
|
|
|
ajax.put("flag", true);
|
|
|
|
ajax.put("flag", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ajax.put(Constants.REQUEST_FROM, "app");
|
|
|
|
ajax.put(Constants.REQUEST_FROM, "app");
|
|
|
|
log.info("login result is {}", ajax);
|
|
|
|
log.info("login user is '{}' result is '{}'",username, ajax);
|
|
|
|
return ajax;
|
|
|
|
return ajax;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|