jiaosong
2023-08-15 91b92422716cb4c5d0433f77fd2d6d45a69639c4
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;
/**
 * 自定义Realm,处理认证和权限
@@ -130,7 +131,9 @@
            if(com == null){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该账户异常!");
            }
            if(com.getStatus() == 0 ){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该企业已过禁用!");
            }
            if(com.getOepnValidDate().before(new Date())){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该企业已过使用有效期!");
            }