feat: NAS登录

This commit is contained in:
裴浩宇 2024-05-28 09:09:38 +08:00
parent cc3f07fbf1
commit 88c746f896
2 changed files with 34 additions and 21 deletions

View File

@ -111,6 +111,7 @@ public class SysLoginController {
Set<String> roles = permissionService.getRolePermission(user); Set<String> roles = permissionService.getRolePermission(user);
// 权限集合 // 权限集合
Set<String> permissions = permissionService.getMenuPermission(user); Set<String> permissions = permissionService.getMenuPermission(user);
if ("01".equals(user.getUserType())) {
try { try {
// get请求获取群晖token // get请求获取群晖token
// 使用UriComponentsBuilder构建带有查询参数的URL // 使用UriComponentsBuilder构建带有查询参数的URL
@ -134,6 +135,7 @@ public class SysLoginController {
} catch (RestClientException e) { } catch (RestClientException e) {
logger.error("请求群晖token失败异常信息", e); logger.error("请求群晖token失败异常信息", e);
} }
}
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ajax.put("user", user); ajax.put("user", user);
ajax.put("roles", roles); ajax.put("roles", roles);

View File

@ -43,6 +43,9 @@ public class SysUser extends BaseEntity {
@Excel(name = "登录名称") @Excel(name = "登录名称")
private String userName; private String userName;
// 用户类型
private String userType;
/** /**
* 用户昵称 * 用户昵称
*/ */
@ -191,6 +194,14 @@ public class SysUser extends BaseEntity {
this.deptId = deptId; this.deptId = deptId;
} }
public String getUserType() {
return userType;
}
public void setUserType(String userType) {
this.userType = userType;
}
@Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符") @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
public String getNickName() { public String getNickName() {
return nickName; return nickName;