From 6b656dae5760b0151757f5f82ef756c48f53124c Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 16 八月 2023 11:19:08 +0800
Subject: [PATCH] 111
---
server/src/main/java/doumeemes/config/shiro/ShiroRealm.java | 13 ++++++++-----
1 files changed, 8 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 9b3e2f5..ab1dcf7 100644
--- a/server/src/main/java/doumeemes/config/shiro/ShiroRealm.java
+++ b/server/src/main/java/doumeemes/config/shiro/ShiroRealm.java
@@ -37,6 +37,7 @@
import java.util.Date;
import java.util.List;
+import java.util.Objects;
/**
* 鑷畾涔塕ealm锛屽鐞嗚璇佸拰鏉冮檺
@@ -130,8 +131,10 @@
if(com == null){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ヨ处鎴峰紓甯革紒");
}
-
- if(com.getOepnValidDate().before(new Date())){
+// if(Constants.equalsInteger( com.getStatus(),Constants.ZERO) ){
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ヤ紒涓氬凡杩囩鐢紒");
+// }
+ if(com.getOepnValidDate() != null && com.getOepnValidDate().before(new Date())){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ヤ紒涓氬凡杩囦娇鐢ㄦ湁鏁堟湡锛�");
}
//濡傛灉鏄紒涓氱敤鎴�
@@ -143,9 +146,9 @@
if(cu == null){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ヤ紒涓氱敤鎴蜂笉瀛樺湪锛�");
}
- if(Constants.equalsInteger(cu.getStatus(),Constants.ONE)){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ヤ紒涓氱敤鎴峰凡绂佺敤锛�");
- }
+// if(Constants.equalsInteger(cu.getStatus(),Constants.ONE)){
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ヤ紒涓氱敤鎴峰凡绂佺敤锛�");
+// }
rootDepart = departmentExtService.getModelById(c.getCompanyId(),cu.getRootDepartId());
comDepart = departmentExtService.getModelById(c.getCompanyId(),cu.getComDepartId());
depart = departmentExtService.getModelById(c.getCompanyId(),cu.getDepartmentId());
--
Gitblit v1.9.3