|
@@ -87,22 +87,11 @@ public class User implements JsonSerializable {
|
|
private String salt;
|
|
private String salt;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 构建key
|
|
|
|
- *
|
|
|
|
- * @return
|
|
|
|
- * @author WANGWEI
|
|
|
|
|
|
+ * 构建用户Key(登录Session缓存KEY)
|
|
*/
|
|
*/
|
|
- public String buildKey() {
|
|
|
|
- this.key = new StringBuilder()
|
|
|
|
- .append("U_").append(userType.getCode())
|
|
|
|
- .append("_").append(rootOrgId)
|
|
|
|
- .append("_").append(userId)
|
|
|
|
- .toString();
|
|
|
|
- return this.key;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
public String getKey() {
|
|
public String getKey() {
|
|
- return key;
|
|
|
|
|
|
+ this.key = "$SS:" + (userType != null ? userType.getCode() : "") + "_" + rootOrgId + "_" + userId;
|
|
|
|
+ return this.key;
|
|
}
|
|
}
|
|
|
|
|
|
public void setKey(String key) {
|
|
public void setKey(String key) {
|