|
|
@ -118,6 +118,12 @@ public class LoginController extends BaseController {
|
|
|
|
// 登录成功后获取权限,这里面会设置到缓存
|
|
|
|
// 登录成功后获取权限,这里面会设置到缓存
|
|
|
|
// authLoginService.listRuleByAdminId(authAdmin.getId());
|
|
|
|
// authLoginService.listRuleByAdminId(authAdmin.getId());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// cn.hutool.core.date.DateUtil.between(authAdmin.getLastUpdatePwdTime() == null ?
|
|
|
|
|
|
|
|
if (cn.hutool.core.date.DateUtil.between(authAdmin.getLastUpdatePwdTime() == null ? cn.hutool.core.date.DateUtil.date() : authAdmin.getLastUpdatePwdTime()
|
|
|
|
|
|
|
|
, cn.hutool.core.date.DateUtil.date(), DateUnit.DAY) >= 90) {
|
|
|
|
|
|
|
|
return ResultVOUtils.error(509, "密码已过期,请修改密码");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> claims = new HashMap<>();
|
|
|
|
Map<String, Object> claims = new HashMap<>();
|
|
|
|
claims.put("admin_id", authAdmin.getId());
|
|
|
|
claims.put("admin_id", authAdmin.getId());
|
|
|
|
String token = JwtUtils.createToken(claims, 86400L); // 一天后过期
|
|
|
|
String token = JwtUtils.createToken(claims, 86400L); // 一天后过期
|
|
|
@ -132,7 +138,7 @@ public class LoginController extends BaseController {
|
|
|
|
loginResponse.setDept(authAdmin.getLocDeptCode());
|
|
|
|
loginResponse.setDept(authAdmin.getLocDeptCode());
|
|
|
|
loginResponse.setDeptName(authAdmin.getDeptName());
|
|
|
|
loginResponse.setDeptName(authAdmin.getDeptName());
|
|
|
|
loginResponse.setNeedChangePwd(cn.hutool.core.date.DateUtil.between(authAdmin.getLastUpdatePwdTime() == null ? cn.hutool.core.date.DateUtil.date() : authAdmin.getLastUpdatePwdTime()
|
|
|
|
loginResponse.setNeedChangePwd(cn.hutool.core.date.DateUtil.between(authAdmin.getLastUpdatePwdTime() == null ? cn.hutool.core.date.DateUtil.date() : authAdmin.getLastUpdatePwdTime()
|
|
|
|
, cn.hutool.core.date.DateUtil.date(), DateUnit.DAY) >= 90);
|
|
|
|
, cn.hutool.core.date.DateUtil.date(), DateUnit.DAY) >= 60);
|
|
|
|
logininforService.recordLogininfor(authAdmin.getEmployeeName(), Constant.LOGIN_SUCCESS, "登录成功!", request);
|
|
|
|
logininforService.recordLogininfor(authAdmin.getEmployeeName(), Constant.LOGIN_SUCCESS, "登录成功!", request);
|
|
|
|
|
|
|
|
|
|
|
|
return ResultVOUtils.success(loginResponse);
|
|
|
|
return ResultVOUtils.success(loginResponse);
|
|
|
|