|
@@ -47,4 +47,20 @@ public class LoginRuleServiceImpl implements LoginRuleService {
|
|
|
log.info("refreshLoginRule end...");
|
|
|
}
|
|
|
|
|
|
-}
|
|
|
+ @Override
|
|
|
+ public boolean isLoginRuleWhite(Long rootOrgId) {
|
|
|
+ if (rootOrgId == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ LoginRuleCacheBean cacheBean = redisClient.get(CACHE_KEY_LOGIN_RULE, String.valueOf(rootOrgId), LoginRuleCacheBean.class);
|
|
|
+ if (cacheBean != null && cacheBean.getWhite()) {
|
|
|
+ log.info("LoginRule white = true, rootOrgId = " + rootOrgId);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ log.info("LoginRule white = false, rootOrgId = " + rootOrgId);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|