Files
Yi.Admin/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/GlobalSetting/TempService.cs

77 lines
2.7 KiB
C#
Raw Normal View History

2023-01-25 17:48:48 +08:00
using Yi.BBS.Application.Contracts.GlobalSetting;
2023-02-22 19:21:21 +08:00
using Cike.AutoWebApi.Setting;
2023-01-25 17:48:48 +08:00
using Yi.BBS.Domain.GlobalSetting.Entities;
using Yi.Framework.Ddd.Services;
using Microsoft.AspNetCore.Mvc;
using Yi.BBS.Application.Contracts.GlobalSetting.Dtos.Temp;
using Yi.BBS.Domain.Shared;
namespace Yi.BBS.Application.GlobalSetting
{
/// <summary>
///临时服务,之后用其他模块代替
/// </summary>
[AppService]
public class TempService : ApplicationService, IAutoApiService
{
2023-02-22 16:49:24 +08:00
///// <summary>
///// 登录
///// </summary>
///// <returns></returns>
///// <exception cref="NotImplementedException"></exception>
//[Route("/api/account/login")]
//public Task<LoginDto> PostLoginAsync()
//{
// bool loginSucces = true;
// if (!loginSucces)
// {
// throw new UserFriendlyException("登录失败", (int)BbsHttpStatusEnum.LoginFailed, "用户或者密码错误");
// }
// var dto = new LoginDto("token");
// dto.User = new LoginUserInfoDto { Icon = "", Id = 0, Level = 1, UserName = "橙子" };
// return Task.FromResult(dto);
//}
2023-01-25 17:48:48 +08:00
2023-02-22 16:49:24 +08:00
///// <summary>
///// 判断是否有登录
///// </summary>
///// <returns></returns>
//[Route("/api/account/logged")]
//public Task<bool> PostLogged()
//{
// return Task.FromResult(true);
//}
2023-01-25 17:48:48 +08:00
2023-02-22 16:49:24 +08:00
///// <summary>
///// 退出登录
///// </summary>
///// <returns></returns>
//[Route("/api/account/logout")]
//public Task PostlogOut()
//{
// return Task.CompletedTask;
//}
2023-01-25 17:48:48 +08:00
/// <summary>
/// 获取用户信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[Route("/api/account/user/{id}")]
public Task<List<ActionJwtDto>> GetUserInfoByIdAsync(long id)
{
var dto = new List<ActionJwtDto>();
dto.Add(new ActionJwtDto { Router = "/index", ActionName = "首页" });
2023-01-27 16:21:35 +08:00
//dto.Add(new ActionJwtDto { Router = "/admLable", ActionName = "标签管理" });
2023-01-25 17:48:48 +08:00
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
return Task.FromResult(dto);
}
}
}