|
@@ -75,14 +75,14 @@ public class LoginService extends ServiceImpl<PersonnelMapper, Personnel> {
|
|
|
}
|
|
|
//判断登录人所属的租户是否启用 以及 登录人账号本身是否是启用的
|
|
|
Tenant tenant = tenantService.getById(personnel.getTenantId());
|
|
|
- if (tenant.getTenantStatus() != 1) {
|
|
|
+ if (tenant.getTenantStatus() != null && tenant.getTenantStatus() != 1) {
|
|
|
return Response.error(ResponseEnum.TENANT_STATUS_ERROR);
|
|
|
}
|
|
|
- if (personnel.getPersonnelStatus() != 1) {
|
|
|
+ if (personnel.getPersonnelStatus() != null && personnel.getPersonnelStatus() != 1) {
|
|
|
return Response.error(ResponseEnum.PERSONNEL_STATUS_ERROR);
|
|
|
}
|
|
|
//判断登陆人所属的租户是否过期(截止日期与当前时间比较)
|
|
|
- if (tenant.getDeadLine().compareTo(new Date()) < 0) {
|
|
|
+ if (tenant.getDeadLine() != null && tenant.getDeadLine().compareTo(new Date()) < 0) {
|
|
|
return Response.error(ResponseEnum.TENANT_DEADLINE_ERROR);
|
|
|
}
|
|
|
|