Commit 09bdea45 authored by gaoguangjing's avatar gaoguangjing

租户ID类型比较

parent fc1373dc
......@@ -105,7 +105,9 @@ public class SessionServiceImpl implements ISessionService {
* @return redisKey. 用来标识这个渠道的用户 Session 是否存在
*/
private String generateLoginPropertiesKey(Long userId, LoginProperties properties) {
if (ObjectUtils.isEmpty(properties.getTenantId()) || properties.getTenantId() == 0 || TenantUtil.TENANT_DEFAULT.equals(properties.getTenantId())) {
if (ObjectUtils.isEmpty(properties.getTenantId())) {
return Constants.Session.USER_SESSION_ID_CACHE + ":" + userId + ":" + properties.getMerchantName() + ":" + properties.getCreatedFrom();
}else if (properties.getTenantId().equals(0) || TenantUtil.TENANT_DEFAULT.equals(properties.getTenantId())) {
return Constants.Session.USER_SESSION_ID_CACHE + ":" + userId + ":" + properties.getMerchantName() + ":" + properties.getCreatedFrom();
}else {
return Constants.Session.USER_SESSION_ID_CACHE + ":" + userId + ":" + properties.getMerchantName() + ":" + properties.getCreatedFrom() + ":" + properties.getTenantId();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment