From 65d26bd2be023009c3617ba5ee0ddb85442e86b6 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 29 八月 2023 08:57:27 +0800
Subject: [PATCH] redis缓存session

---
 server/src/main/java/doumeemes/config/shiro/ShiroRealm.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/server/src/main/java/doumeemes/config/shiro/ShiroRealm.java b/server/src/main/java/doumeemes/config/shiro/ShiroRealm.java
index e130db9..c15fc49 100644
--- a/server/src/main/java/doumeemes/config/shiro/ShiroRealm.java
+++ b/server/src/main/java/doumeemes/config/shiro/ShiroRealm.java
@@ -44,7 +44,7 @@
  * @author Eva.Caesar Liu
  * @date 2022/04/18 18:12
  */
-@Component
+//@Component
 public class ShiroRealm extends AuthorizingRealm {
 
     @Lazy
@@ -125,14 +125,14 @@
             per.setType(Constants.PlatType.admin);
         }else{
             if(authenticationToken.getCompanyId() == null){
-                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝璇ヨ处鎴峰紓甯革紒");
+                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝璇ヨ处鎴峰垹闄わ紒");
             }
             com = companyExtService.getModelById(authenticationToken.getCompanyId());
-            if(com == null){
-                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ヨ处鎴峰紓甯革紒");
+            if(com == null || Constants.equalsInteger( com.getDeleted(),Constants.ONE)){
+                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ヨ处鎴峰垹闄わ紒璇疯仈绯荤鐞嗗憳");
             }
             if(Constants.equalsInteger( com.getStatus(),Constants.ZERO) ){
-                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ヤ紒涓氬凡杩囩鐢紒");
+                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ヤ紒涓氬凡绂佺敤锛�");
             }
             if(com.getOepnValidDate() != null && com.getOepnValidDate().before(new Date())){
                 throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ヤ紒涓氬凡杩囦娇鐢ㄦ湁鏁堟湡锛�");

--
Gitblit v1.9.3