|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Objects; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 自定义Realm,处理认证和权限 | 
|---|
|  |  |  | 
|---|
|  |  |  | 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(),"对不起,该企业已过使用有效期!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //如果是企业用户 | 
|---|