Selaa lähdekoodia

rename cache keys.

deason 2 vuotta sitten
vanhempi
commit
82a863ef03

+ 3 - 3
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/AuthServiceImpl.java

@@ -375,7 +375,7 @@ public class AuthServiceImpl implements AuthService {
      * @author WANGWEI
      */
     private void whenLoginError(AccountType accountType, String accountValue, String ip) {
-        String key = new StringBuilder("$_LOGIN_ERR_").append(accountType.getCode()).append("_")
+        String key = new StringBuilder(CacheConstants.CACHE_B_LOGIN_ERR).append(accountType.getCode()).append("_")
                 .append(accountValue).append("_").append(ip).toString();
 
         Integer times = redisClient.get(key, Integer.class);
@@ -398,7 +398,7 @@ public class AuthServiceImpl implements AuthService {
      * @author WANGWEI
      */
     private Integer getLoginErrorTimes(AccountType accountType, String accountValue, String ip) {
-        String key = new StringBuilder("$_LOGIN_ERR_").append(accountType.getCode()).append("_")
+        String key = new StringBuilder(CacheConstants.CACHE_B_LOGIN_ERR).append(accountType.getCode()).append("_")
                 .append(accountValue).append("_").append(ip).toString();
 
         Integer times = redisClient.get(key, Integer.class);
@@ -458,7 +458,7 @@ public class AuthServiceImpl implements AuthService {
         if (null == orgId) {
             return;
         }
-        String key = "IP_" + orgId;
+        String key = CacheConstants.CACHE_B_SECURITY_IP + orgId;
 
         String clientIp = user.getClientIp();
         if (StringUtils.isBlank(clientIp)) {