【7.6.0】【sys】【auth】更新loginUser字段

pull/57/head
fengshuonan 2023-06-17 21:36:33 +08:00
parent 3ee653df95
commit dc3dc115eb
3 changed files with 8 additions and 269 deletions

View File

@ -24,19 +24,10 @@
*/ */
package cn.stylefeng.roses.kernel.auth.api.pojo.login; package cn.stylefeng.roses.kernel.auth.api.pojo.login;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.stylefeng.roses.kernel.auth.api.enums.DataScopeTypeEnum;
import cn.stylefeng.roses.kernel.auth.api.pojo.login.basic.SimpleRoleInfo;
import cn.stylefeng.roses.kernel.auth.api.pojo.login.basic.SimpleUserInfo;
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription; import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.*;
/** /**
* *
@ -56,138 +47,21 @@ public class LoginUser implements Serializable {
private Long userId; private Long userId;
/** /**
* * 访appId
*/ */
@ChineseDescription("账号") @ChineseDescription("当前用户正在访问的appId")
private String account; private Long currentAppId;
/** /**
* true- * id访
*/ */
@ChineseDescription("超级管理员标识true-是超级管理员") @ChineseDescription("当前用户激活的组织机构id正在以哪个身份访问系统")
private Boolean superAdmin; private Long currentOrgId;
/** /**
* * token
*/ */
@ChineseDescription("用户基本信息") @ChineseDescription("用户的token")
private SimpleUserInfo simpleUserInfo;
/**
*
*/
@ChineseDescription("用户角色信息")
private List<SimpleRoleInfo> simpleRoleInfoList;
/**
* /id
*/
@ChineseDescription("公司/组织id")
private Long organizationId;
/**
*
*/
@ChineseDescription("职务信息")
private Long positionId;
/**
*
*/
@ChineseDescription("用户数据范围枚举")
private Set<DataScopeTypeEnum> dataScopeTypeEnums;
/**
*
*/
@ChineseDescription("用户数据范围用户信息")
private Set<Long> dataScopeUserIds;
/**
*
*/
@ChineseDescription("用户数据范围组织信息")
private Set<Long> dataScopeOrganizationIds;
/**
*
*/
@ChineseDescription("可用资源集合")
private Set<String> resourceUrls;
/**
*
*/
@ChineseDescription("用户拥有的按钮编码集合")
private Set<String> buttonCodes;
/**
*
*/
@ChineseDescription("登录的时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date loginTime;
/**
* tokentoken
*/
@ChineseDescription("用户的token当返回用户会话信息时候回带token")
private String token; private String token;
/**
* DictMap
*/
@ChineseDescription("其他信息Dict为Map的拓展")
private Dict otherInfos;
/**
* ws-url
*/
@ChineseDescription("用户的ws-url")
private String wsUrl;
/**
* url
*/
@ChineseDescription("用户头像url")
private String avatarUrl;
/**
* chineseenglish
* <p>
* languages
* <p>
*
*/
@ChineseDescription("当前用户语种的标识")
private String tranLanguageCode = RuleConstants.CHINESE_TRAN_LANGUAGE_CODE;
/**
*
*/
@ChineseDescription("租户的编码")
private String tenantCode;
/**
* CC
*/
@ChineseDescription("是否是C端用户")
private Boolean customerFlag = false;
/**
* 1- 2-3-
*/
@ChineseDescription("用户拥有的菜单类型1-前台 2-后台3-所有")
private Integer menuType;
public String getWsUrl() {
if (ObjectUtil.isEmpty(this.wsUrl)) {
return "";
}
Map<String, String> params = new HashMap<>(1);
params.put("token", this.token);
return StrUtil.format(this.wsUrl, params);
}
} }

View File

@ -1,53 +0,0 @@
/*
* Copyright [2020-2030] [https://www.stylefeng.cn]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* GunsAPACHE LICENSE 2.0使
*
* 1.LICENSE
* 2.Guns
* 3.
* 4. https://gitee.com/stylefeng/guns
* 5. https://gitee.com/stylefeng/guns
* 6.
*/
package cn.stylefeng.roses.kernel.auth.api.pojo.login.basic;
import lombok.Data;
/**
*
*
* @author fengshuonan
* @since 2020/12/26 18:14
*/
@Data
public class SimpleRoleInfo {
/**
*
*/
private Long roleId;
/**
*
*/
private String roleName;
/**
*
*/
private String roleCode;
}

View File

@ -1,82 +0,0 @@
/*
* Copyright [2020-2030] [https://www.stylefeng.cn]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* GunsAPACHE LICENSE 2.0使
*
* 1.LICENSE
* 2.Guns
* 3.
* 4. https://gitee.com/stylefeng/guns
* 5. https://gitee.com/stylefeng/guns
* 6.
*/
package cn.stylefeng.roses.kernel.auth.api.pojo.login.basic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
*
*
* @author fengshuonan
* @since 2020/12/26 18:14
*/
@Data
public class SimpleUserInfo {
/**
*
*/
private String nickName;
/**
*
*/
private String realName;
/**
*
*/
private Long avatar;
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date birthday;
/**
* M-F-
*/
private String sex;
/**
*
*/
private String email;
/**
*
*/
private String phone;
/**
*
*/
private String tel;
}