add
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package com.qiaoba.common.redis.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.qiaoba.common.base.constants.BaseConstant;
|
||||
import com.qiaoba.common.base.constants.TenantConstant;
|
||||
import com.qiaoba.common.base.context.BaseContext;
|
||||
@ -258,7 +257,7 @@ public class RedisServiceImpl implements RedisService {
|
||||
public String addTenantPrefix(String key) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(TenantConstant.TENANT_KEY_PREFIX).append(BaseContext.getTenantId()).append(BaseConstant.COLON_JOIN_STR).append(key);
|
||||
log.debug(StrUtil.format("拼接后的RedisKey: {}", sb.toString()));
|
||||
log.debug("拼接后的RedisKey: {}", sb.toString());
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@ -266,7 +265,7 @@ public class RedisServiceImpl implements RedisService {
|
||||
public String removeTenantPrefix(String key) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(TenantConstant.TENANT_KEY_PREFIX).append(BaseContext.getTenantId()).append(BaseConstant.COLON_JOIN_STR);
|
||||
log.debug(StrUtil.format("去除拼接后的RedisKey: {}", key.replace(sb.toString(), "")));
|
||||
log.debug("去除拼接后的RedisKey: {}", key.replace(sb.toString(), ""));
|
||||
return key.replace(sb.toString(), "");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user