satoken增加获取用户名方法
This commit is contained in:
@@ -123,7 +123,7 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
||||
}
|
||||
}
|
||||
|
||||
StpKit.USER.login(user.getId(), shopInfo.getId(), isStaff ? MyStpLogic.LoginType.STAFF :MyStpLogic.LoginType.MANAGER, user.getIsAdmin());
|
||||
StpKit.USER.login(user.getId(), user.getAccount(), shopInfo.getId(), isStaff ? MyStpLogic.LoginType.STAFF :MyStpLogic.LoginType.MANAGER, user.getIsAdmin());
|
||||
// 查询角色
|
||||
List<SysRole> roleList = sysRoleService.getByUserId(user.getId());
|
||||
List<String> roleNames = roleList.stream().map(SysRole::getName).collect(Collectors.toList());
|
||||
|
||||
@@ -64,7 +64,7 @@ public class UserAuthorizationServiceImpl implements UserAuthorizationService {
|
||||
userInfo.setLastLoginTime(DateUtil.date().toLocalDateTime());
|
||||
userInfoService.saveOrUpdate(userInfo);
|
||||
// StpKit.USER.login(userInfo.getId());
|
||||
StpKit.USER.login(userInfo.getId(), null, MyStpLogic.LoginType.USER, false);
|
||||
StpKit.USER.login(userInfo.getId(), openId, null, MyStpLogic.LoginType.USER, false);
|
||||
return new LoginTokenDTO(StpKit.USER.getTokenValue(), userInfo);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user