|
@@ -15,6 +15,7 @@ import cn.com.qmth.examcloud.core.basic.service.OrgService;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.LoginRuleForm;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.LoginRuleForm;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.LoginRuleInfo;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.LoginRuleInfo;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.LoginRuleQuery;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.LoginRuleQuery;
|
|
|
|
+import cn.com.qmth.examcloud.support.CacheConstants;
|
|
import cn.com.qmth.examcloud.support.filestorage.FileStorageUtil;
|
|
import cn.com.qmth.examcloud.support.filestorage.FileStorageUtil;
|
|
import cn.com.qmth.examcloud.web.filestorage.FileStoragePathEnvInfo;
|
|
import cn.com.qmth.examcloud.web.filestorage.FileStoragePathEnvInfo;
|
|
import cn.com.qmth.examcloud.web.filestorage.YunPathInfo;
|
|
import cn.com.qmth.examcloud.web.filestorage.YunPathInfo;
|
|
@@ -37,11 +38,6 @@ public class LoginRuleServiceImpl implements LoginRuleService {
|
|
|
|
|
|
private static final Logger LOG = LoggerFactory.getLogger(LoginRuleServiceImpl.class);
|
|
private static final Logger LOG = LoggerFactory.getLogger(LoginRuleServiceImpl.class);
|
|
|
|
|
|
- /**
|
|
|
|
- * “登录规则”的缓存KEY前缀
|
|
|
|
- */
|
|
|
|
- private static final String LOGIN_RULE_CACHE_KEY_PREFIX = "$LOGIN_RULE:";
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* ../resources/aliyun.xml siteId
|
|
* ../resources/aliyun.xml siteId
|
|
*/
|
|
*/
|
|
@@ -179,7 +175,7 @@ public class LoginRuleServiceImpl implements LoginRuleService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- String cacheKey = LOGIN_RULE_CACHE_KEY_PREFIX + type.name();
|
|
|
|
|
|
+ String cacheKey = CacheConstants.CACHE_B_LOGIN_RULE + type.name();
|
|
redisClient.set(cacheKey, values);
|
|
redisClient.set(cacheKey, values);
|
|
|
|
|
|
if (LoginRuleType.GEETEST_LOGIN == type) {
|
|
if (LoginRuleType.GEETEST_LOGIN == type) {
|
|
@@ -217,7 +213,7 @@ public class LoginRuleServiceImpl implements LoginRuleService {
|
|
throw new StatusException("400400", "规则类型不能为空");
|
|
throw new StatusException("400400", "规则类型不能为空");
|
|
}
|
|
}
|
|
|
|
|
|
- String cacheKey = LOGIN_RULE_CACHE_KEY_PREFIX + type.name();
|
|
|
|
|
|
+ String cacheKey = CacheConstants.CACHE_B_LOGIN_RULE + type.name();
|
|
Map<String, Boolean> values = redisClient.get(cacheKey, HashMap.class);
|
|
Map<String, Boolean> values = redisClient.get(cacheKey, HashMap.class);
|
|
if (MapUtils.isEmpty(values)) {
|
|
if (MapUtils.isEmpty(values)) {
|
|
LOG.warn(String.format("LoginRule not exist, type = %s, rootOrgId = %s", rootOrgId, type.name()));
|
|
LOG.warn(String.format("LoginRule not exist, type = %s, rootOrgId = %s", rootOrgId, type.name()));
|