package com.sandu.ximon.admin.context;
|
|
import cn.hutool.core.util.StrUtil;
|
import lombok.experimental.UtilityClass;
|
|
/**
|
* 管理员访问客户Holder
|
*
|
* @author chenjiantian
|
*/
|
@UtilityClass
|
public class CustomerInspectContextHolder {
|
|
/**
|
// * 支持父子线程之间的数据传递
|
// */
|
// private final ThreadLocal<String> THREAD_LOCAL_TENANT = new ThreadLocal<>();
|
//
|
// /**
|
// * TTL 设置客户ID<br/>
|
// *
|
// */
|
// public void setCustomerId(String tenantId) {
|
// THREAD_LOCAL_TENANT.set(tenantId);
|
// }
|
//
|
// /**
|
// * 获取TTL中的客户ID
|
// *
|
// * @return String
|
// */
|
// public Long getCustomerId() {
|
// String s = THREAD_LOCAL_TENANT.get();
|
// if(StrUtil.isNotBlank(s)){
|
// return Long.parseLong(s);
|
// }
|
// return null;
|
// }
|
//
|
// /**
|
// * 清除Id
|
// */
|
// public void clear() {
|
// THREAD_LOCAL_TENANT.remove();
|
// }
|
}
|