|
@@ -24,6 +24,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
@@ -79,6 +80,11 @@ public class LoginService extends ServiceImpl<PersonnelMapper, Personnel> {
|
|
|
if (personnel.getPersonnelStatus() != 1) {
|
|
|
return Response.error(ResponseEnum.PERSONNEL_STATUS_ERROR);
|
|
|
}
|
|
|
+ //判断登陆人所属的租户是否过期(截止日期与当前时间比较)
|
|
|
+ if (tenant.getDeadLine().compareTo(new Date()) < 0) {
|
|
|
+ return Response.error(ResponseEnum.TENANT_DEADLINE_ERROR);
|
|
|
+ }
|
|
|
+
|
|
|
//Sa-token 登录方法 登录后 生成Token 如果集成了Redis的话 会自动存入Redis
|
|
|
StpUtil.login(personnel.getId());
|
|
|
//填充数据
|