diff --git a/blade-biz-common/src/main/java/org/springblade/common/component/MockLoginService.java b/blade-biz-common/src/main/java/org/springblade/common/component/MockLoginService.java index 3e55ad416..36e271271 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/component/MockLoginService.java +++ b/blade-biz-common/src/main/java/org/springblade/common/component/MockLoginService.java @@ -4,6 +4,7 @@ import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpResponse; import com.alibaba.fastjson.JSONObject; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springblade.common.constant.LauncherConstant; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; @@ -14,9 +15,11 @@ import java.util.Objects; @Component @AllArgsConstructor +@Slf4j public class MockLoginService { private final Environment environment; public JSONObject mockToken(String tenantId,String account) { + log.info("mockToken >>> tenantId={} account={} ",tenantId,account); String url = "http://" + LauncherConstant.loginAddr(Objects.requireNonNull(environment.getActiveProfiles()[0])) + "/blade-auth/oauth/token"; HttpRequest urlRequest = HttpRequest.post(url); // urlRequest.header("Authorization", "Basic c2FiZXI6c2FiZXJfc2VjcmV0"); diff --git a/blade-biz-common/src/main/java/org/springblade/common/utils/DefaultUserTokenConfig.java b/blade-biz-common/src/main/java/org/springblade/common/utils/DefaultUserTokenConfig.java new file mode 100644 index 000000000..d66a8dea0 --- /dev/null +++ b/blade-biz-common/src/main/java/org/springblade/common/utils/DefaultUserTokenConfig.java @@ -0,0 +1,8 @@ +package org.springblade.common.utils; + +public class DefaultUserTokenConfig { + /** + * 默认用户的token 超时时间 + */ + public static final Long EXPIRE_TIME = 7 *24 * 60 * 60 * 1000L; +} diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/JobAnnotationAspect.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/JobAnnotationAspect.java index bd8f9adae..916f40a5d 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/JobAnnotationAspect.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/aspect/JobAnnotationAspect.java @@ -11,6 +11,7 @@ import org.aspectj.lang.annotation.Aspect; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.constant.LauncherConstant; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -75,7 +76,7 @@ public class JobAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/ChangeAsyncAnnotationAspect.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/ChangeAsyncAnnotationAspect.java index ee6874ad0..45447e53b 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/ChangeAsyncAnnotationAspect.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/ChangeAsyncAnnotationAspect.java @@ -11,6 +11,7 @@ import org.aspectj.lang.reflect.MethodSignature; import org.springblade.common.annotations.ChangeAsync; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -80,7 +81,7 @@ public class ChangeAsyncAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/JobAnnotationAspect.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/JobAnnotationAspect.java index 223dbf174..87627721f 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/JobAnnotationAspect.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/aspect/JobAnnotationAspect.java @@ -11,6 +11,7 @@ import org.aspectj.lang.annotation.Aspect; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.constant.LauncherConstant; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -74,7 +75,7 @@ public class JobAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-business/src/main/java/com/logpm/business/aspect/ChangeAsyncAnnotationAspect.java b/blade-service/logpm-business/src/main/java/com/logpm/business/aspect/ChangeAsyncAnnotationAspect.java index cfe9aa07b..8a99f6095 100644 --- a/blade-service/logpm-business/src/main/java/com/logpm/business/aspect/ChangeAsyncAnnotationAspect.java +++ b/blade-service/logpm-business/src/main/java/com/logpm/business/aspect/ChangeAsyncAnnotationAspect.java @@ -11,6 +11,7 @@ import org.aspectj.lang.reflect.MethodSignature; import org.springblade.common.annotations.ChangeAsync; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -80,7 +81,7 @@ public class ChangeAsyncAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/interceptor/LocalServerLoginAccountsInterceptor.java index 2fc1a3960..7b22a992f 100644 --- a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/interceptor/LocalServerLoginAccountsInterceptor.java @@ -6,6 +6,7 @@ import lombok.extern.log4j.Log4j2; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -51,7 +52,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/ChangeAsyncAnnotationAspect.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/ChangeAsyncAnnotationAspect.java index c14214b2e..a02eb9cd9 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/ChangeAsyncAnnotationAspect.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/ChangeAsyncAnnotationAspect.java @@ -12,6 +12,7 @@ import org.springblade.common.annotations.ChangeAsync; import org.springblade.common.annotations.LogpmAsync; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -82,7 +83,7 @@ public class ChangeAsyncAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/JobAnnotationAspect.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/JobAnnotationAspect.java index a573c35cf..0e4d422ba 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/JobAnnotationAspect.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/aspect/JobAnnotationAspect.java @@ -8,6 +8,7 @@ import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -69,7 +70,7 @@ public class JobAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/aspect/JobAnnotationAspect.java b/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/aspect/JobAnnotationAspect.java index 3489986ce..c2892d60f 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/aspect/JobAnnotationAspect.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/aspect/JobAnnotationAspect.java @@ -11,6 +11,7 @@ import org.aspectj.lang.annotation.Aspect; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.constant.LauncherConstant; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -74,7 +75,7 @@ public class JobAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/interceptor/FactoryAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/interceptor/FactoryAccountsInterceptor.java index d08b6f928..8d0927a3b 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/interceptor/FactoryAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/interceptor/FactoryAccountsInterceptor.java @@ -14,6 +14,7 @@ import lombok.extern.log4j.Log4j2; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -119,7 +120,7 @@ public class FactoryAccountsInterceptor implements HandlerInterceptor { data = bladeRedis.get(key); if (Objects.isNull(data)) { data = mockLoginService.mockToken(tenantId, account); - bladeRedis.setEx(key, data, 2591990L); + bladeRedis.setEx(key, data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/interceptor/LocalServerLoginAccountsInterceptor.java index 92315b80c..68ae32942 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/interceptor/LocalServerLoginAccountsInterceptor.java @@ -8,6 +8,7 @@ import lombok.extern.log4j.Log4j2; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -72,7 +73,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/interceptor/LocalServerLoginAccountsInterceptor.java index 6f7eb3152..4ddb86c08 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/interceptor/LocalServerLoginAccountsInterceptor.java @@ -9,6 +9,7 @@ import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.constant.LauncherConstant; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -55,7 +56,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-mengtian/src/main/java/com/logpm/factorydata/mengtian/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-mengtian/src/main/java/com/logpm/factorydata/mengtian/interceptor/LocalServerLoginAccountsInterceptor.java index a4a353f76..ad0f9dd10 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-mengtian/src/main/java/com/logpm/factorydata/mengtian/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-mengtian/src/main/java/com/logpm/factorydata/mengtian/interceptor/LocalServerLoginAccountsInterceptor.java @@ -6,6 +6,7 @@ import lombok.extern.log4j.Log4j2; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -50,7 +51,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/java/com/logpm/factorydata/mwh/aspect/JobAnnotationAspect.java b/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/java/com/logpm/factorydata/mwh/aspect/JobAnnotationAspect.java index 5ff1abce6..6d1dcbff5 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/java/com/logpm/factorydata/mwh/aspect/JobAnnotationAspect.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/java/com/logpm/factorydata/mwh/aspect/JobAnnotationAspect.java @@ -8,6 +8,7 @@ import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -69,7 +70,7 @@ public class JobAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/java/com/logpm/factorydata/mwh/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/java/com/logpm/factorydata/mwh/interceptor/LocalServerLoginAccountsInterceptor.java index 924d06775..22aa5131e 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/java/com/logpm/factorydata/mwh/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/java/com/logpm/factorydata/mwh/interceptor/LocalServerLoginAccountsInterceptor.java @@ -9,6 +9,7 @@ import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.constant.LauncherConstant; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -55,7 +56,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/aspect/JobAnnotationAspect.java b/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/aspect/JobAnnotationAspect.java index 981288d42..0920a6010 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/aspect/JobAnnotationAspect.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/aspect/JobAnnotationAspect.java @@ -11,6 +11,7 @@ import org.aspectj.lang.annotation.Aspect; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.constant.LauncherConstant; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -74,7 +75,7 @@ public class JobAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/interceptor/LocalServerLoginAccountsInterceptor.java index f63b4f636..92742c1ba 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/interceptor/LocalServerLoginAccountsInterceptor.java @@ -9,6 +9,7 @@ import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.constant.LauncherConstant; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -55,7 +56,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-oupai/src/main/java/com/logpm/factorydata/oupai/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-oupai/src/main/java/com/logpm/factorydata/oupai/interceptor/LocalServerLoginAccountsInterceptor.java index 1e4984d62..a941261b0 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-oupai/src/main/java/com/logpm/factorydata/oupai/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-oupai/src/main/java/com/logpm/factorydata/oupai/interceptor/LocalServerLoginAccountsInterceptor.java @@ -6,6 +6,7 @@ import lombok.extern.log4j.Log4j2; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -50,7 +51,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-pan/src/main/java/com/logpm/factorydata/pan/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-pan/src/main/java/com/logpm/factorydata/pan/interceptor/LocalServerLoginAccountsInterceptor.java index 819d5bb26..97dd13ea9 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-pan/src/main/java/com/logpm/factorydata/pan/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-pan/src/main/java/com/logpm/factorydata/pan/interceptor/LocalServerLoginAccountsInterceptor.java @@ -6,6 +6,7 @@ import lombok.extern.log4j.Log4j2; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -50,7 +51,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/aspect/JobAnnotationAspect.java b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/aspect/JobAnnotationAspect.java index 78816e387..a2e73d8ba 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/aspect/JobAnnotationAspect.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/aspect/JobAnnotationAspect.java @@ -8,6 +8,7 @@ import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -69,7 +70,7 @@ public class JobAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/FactoryAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/FactoryAccountsInterceptor.java index 31740be1b..d42490e88 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/FactoryAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/FactoryAccountsInterceptor.java @@ -12,6 +12,7 @@ import lombok.extern.log4j.Log4j2; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -118,7 +119,7 @@ public class FactoryAccountsInterceptor implements HandlerInterceptor { data = bladeRedis.get(key); if (Objects.isNull(data)) { data = mockLoginService.mockToken(tenantId, account); - bladeRedis.setEx(key, data, 2591990L); + bladeRedis.setEx(key, data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java index 478bfe92f..5247b3727 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java @@ -8,6 +8,7 @@ import lombok.extern.log4j.Log4j2; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -72,7 +73,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/interceptor/LocalServerLoginAccountsInterceptor.java index 74e209f02..d13cdfbad 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/interceptor/LocalServerLoginAccountsInterceptor.java @@ -9,6 +9,7 @@ import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.constant.LauncherConstant; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -55,7 +56,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/aspect/JobAnnotationAspect.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/aspect/JobAnnotationAspect.java index a038cc1a0..3915c261a 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/aspect/JobAnnotationAspect.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/aspect/JobAnnotationAspect.java @@ -8,6 +8,7 @@ import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -67,7 +68,7 @@ public class JobAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/LocalServerLoginAccountsInterceptor.java index 58f9dc95c..c74c640d3 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/LocalServerLoginAccountsInterceptor.java @@ -9,6 +9,7 @@ import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.constant.LauncherConstant; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -55,7 +56,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/aspect/JobAnnotationAspect.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/aspect/JobAnnotationAspect.java index 12df4b310..0103501ee 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/aspect/JobAnnotationAspect.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/aspect/JobAnnotationAspect.java @@ -11,6 +11,7 @@ import org.aspectj.lang.annotation.Aspect; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.constant.LauncherConstant; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -74,7 +75,7 @@ public class JobAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/interceptor/LocalServerLoginAccountsInterceptor.java index 2bc52908f..3bc5075d8 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/interceptor/LocalServerLoginAccountsInterceptor.java @@ -9,6 +9,7 @@ import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.constant.LauncherConstant; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -57,7 +58,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/aspect/JobAnnotationAspect.java b/blade-service/logpm-report/src/main/java/com/logpm/report/aspect/JobAnnotationAspect.java index 2b1b888cf..c02235d62 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/aspect/JobAnnotationAspect.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/aspect/JobAnnotationAspect.java @@ -8,6 +8,7 @@ import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -67,7 +68,7 @@ public class JobAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-report/src/main/java/com/logpm/report/interceptor/LocalServerLoginAccountsInterceptor.java index 3ebef4fcb..b71c28680 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/interceptor/LocalServerLoginAccountsInterceptor.java @@ -6,6 +6,7 @@ import lombok.extern.log4j.Log4j2; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -51,7 +52,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/DeliveryDataServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/DeliveryDataServiceImpl.java index 6c377e7dc..c2e45910d 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/DeliveryDataServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/DeliveryDataServiceImpl.java @@ -23,8 +23,12 @@ public class DeliveryDataServiceImpl implements IDeliveryDataService { public DeliveryDataVO getDeliveryAllData(Integer isYear) { DeliveryDataVO deliveryDataVO = new DeliveryDataVO(); - String startTime = isYear.equals(1) ? LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-01-01 00:00:00")) : null; - String endTime = isYear.equals(1) ? LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-12-31 23:59:59")) : null; + String startTime = isYear.equals(1) + ? LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-01-01 00:00:00")) + : LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-01 00:00:00")) ; + String endTime = isYear.equals(1) + ? LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-12-31 23:59:59")) + : LocalDateTime.now().plusMonths(1).format(DateTimeFormatter.ofPattern("yyyy-MM-01 00:00:00")); DeliveryDataVO deliveryAllData = deliveryDataMapper.getDeliveryAllData(startTime, endTime); DeliveryDataVO delivery2CData = deliveryDataMapper.getDelivery2CData(startTime, endTime); diff --git a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/aspect/JobAnnotationAspect.java b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/aspect/JobAnnotationAspect.java index 7d47d7041..015f28727 100644 --- a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/aspect/JobAnnotationAspect.java +++ b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/aspect/JobAnnotationAspect.java @@ -8,6 +8,7 @@ import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -69,7 +70,7 @@ public class JobAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/aspect/ChangeAsyncAnnotationAspect.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/aspect/ChangeAsyncAnnotationAspect.java index be3e04955..ffc8a8017 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/aspect/ChangeAsyncAnnotationAspect.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/aspect/ChangeAsyncAnnotationAspect.java @@ -11,6 +11,7 @@ import org.aspectj.lang.reflect.MethodSignature; import org.springblade.common.annotations.ChangeAsync; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; import org.springblade.core.redis.lock.RedisLockClient; @@ -80,7 +81,7 @@ public class ChangeAsyncAnnotationAspect { data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/interceptor/LocalServerLoginAccountsInterceptor.java index 42cdfa643..e4054ea3e 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/interceptor/LocalServerLoginAccountsInterceptor.java @@ -6,6 +6,7 @@ import lombok.extern.log4j.Log4j2; import org.springblade.common.cache.CacheNames; import org.springblade.common.component.MockLoginService; import org.springblade.common.exception.CustomerException; +import org.springblade.common.utils.DefaultUserTokenConfig; import org.springblade.common.wrapper.CustomHttpServletRequestWrapper; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.lock.LockType; @@ -48,7 +49,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt data =bladeRedis.get(key); if(Objects.isNull(data)){ data = mockLoginService.mockToken(tenantId,account); - bladeRedis.setEx(key,data,2591990L); + bladeRedis.setEx(key,data, DefaultUserTokenConfig.EXPIRE_TIME); redisLockClient.unLock(lockKey, LockType.FAIR); } }