Blame view

美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IAuthSessionAppService.cs 1.71 KB
8e0c49eb   李曜臣   产品标签类别优化;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  using FoodLabeling.Application.Contracts.Dtos.AuthSession;
  using Volo.Abp.Application.Services;
  
  namespace FoodLabeling.Application.Contracts.IServices;
  
  /// <summary>
  /// 当前登录会话:菜单权限与退出(美国版 Web 管理端)
  /// </summary>
  public interface IAuthSessionAppService : IApplicationService
  {
      /// <summary>
      /// 获取当前登录用户的角色编码、权限码与可见菜单树
      /// </summary>
      /// <remarks>
      /// 与框架 <c>UserManager.GetInfoAsync</c> 一致;用户名为 <c>admin</c> 时返回全部未删除菜单(与 <c>AccountService.GetVue3Router</c> 行为对齐)。
10fd1324   李曜臣   5-17接口优化
16
17
      /// 返回体额外包含:<c>lastUpdated</c>(用户 LastModificationTime)、<c>role</c>(角色展示名,多角色英文逗号拼接)、<c>fullName</c>(姓名优先,其次昵称、用户名)。
      /// 角色名通过 <c>Role</c> 表直查(<c>RoleDbEntity</c>),避免走仓储 IDataPermission
8e0c49eb   李曜臣   产品标签类别优化;
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
      /// </remarks>
      /// <returns>用户简要信息、权限码与菜单树</returns>
      /// <response code="200">成功</response>
      /// <response code="401">未登录或令牌无效</response>
      /// <response code="500">服务器错误</response>
      Task<CurrentUserMenuPermissionsOutputDto> GetMyMenusAsync();
  
      /// <summary>
      /// 退出登录:清除服务端用户信息缓存(JWT 仍由前端丢弃)
      /// </summary>
      /// <remarks>
      /// 与框架 <c>AccountService.PostLogout</c> 一致;未登录时返回 <c>false</c>
      /// </remarks>
      /// <returns>是否执行了缓存清理(已登录为 true</returns>
      /// <response code="200">成功</response>
      /// <response code="500">服务器错误</response>
      Task<bool> LogoutAsync();
  }