|
@@ -5,6 +5,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
+import com.zhongzheng.common.utils.ToolsUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -60,7 +61,7 @@ public class RedisCache
|
|
|
{
|
|
|
String unionKey = key;
|
|
|
if(Validator.isNotEmpty(ServletUtils.getRequest())){
|
|
|
- String tenantId = ServletUtils.getRequest().getHeader("TenantId");
|
|
|
+ String tenantId = ToolsUtils.getTenantId();
|
|
|
if(Validator.isNotEmpty(tenantId)){
|
|
|
unionKey = tenantId + key;
|
|
|
}
|
|
@@ -111,7 +112,7 @@ public class RedisCache
|
|
|
ValueOperations<String, T> operation = redisTemplate.opsForValue();
|
|
|
String unionKey = key;
|
|
|
if(Validator.isNotEmpty(ServletUtils.getRequest())){
|
|
|
- String tenantId = ServletUtils.getRequest().getHeader("TenantId");
|
|
|
+ String tenantId = ToolsUtils.getTenantId();
|
|
|
if(Validator.isNotEmpty(tenantId)){
|
|
|
unionKey = tenantId + key;
|
|
|
}
|