|
@ -1,6 +1,7 @@ |
|
|
package com.epmet.commons.tools.utils; |
|
|
package com.epmet.commons.tools.utils; |
|
|
|
|
|
|
|
|
import com.alibaba.ttl.TransmittableThreadLocal; |
|
|
import com.alibaba.ttl.TransmittableThreadLocal; |
|
|
|
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
import java.util.HashMap; |
|
@ -53,6 +54,38 @@ public class EpmetRequestHolder { |
|
|
return stringStringMap.get(headerName.toLowerCase()); |
|
|
return stringStringMap.get(headerName.toLowerCase()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 当前登录人客户id |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
public static String getLoginUserCustomerId() { |
|
|
|
|
|
return getHeader(AppClientConstant.CUSTOMER_ID); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 当前登录人user_id |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
public static String getLoginUserId() { |
|
|
|
|
|
return getHeader(AppClientConstant.USER_ID); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 当前登录人app |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
public static String getLoginUserApp() { |
|
|
|
|
|
return getHeader(AppClientConstant.APP); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 当前登录人client |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
public static String getLoginUserClient() { |
|
|
|
|
|
return getHeader(AppClientConstant.CLIENT); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取所有 |
|
|
* 获取所有 |
|
|
* @return |
|
|
* @return |
|
|