refactor: 抽象操作日志模块
This commit is contained in:
@@ -120,25 +120,6 @@
|
||||
临时服务,之后用其他模块代替
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.GlobalSetting.TempService.PostLoginAsync">
|
||||
<summary>
|
||||
登录
|
||||
</summary>
|
||||
<returns></returns>
|
||||
<exception cref="T:System.NotImplementedException"></exception>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.GlobalSetting.TempService.PostLogged">
|
||||
<summary>
|
||||
判断是否有登录
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.GlobalSetting.TempService.PostlogOut">
|
||||
<summary>
|
||||
退出登录
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.GlobalSetting.TempService.GetUserInfoByIdAsync(System.Int64)">
|
||||
<summary>
|
||||
获取用户信息
|
||||
|
||||
@@ -14,43 +14,43 @@ namespace Yi.BBS.Application.GlobalSetting
|
||||
[AppService]
|
||||
public class TempService : ApplicationService, IAutoApiService
|
||||
{
|
||||
/// <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);
|
||||
}
|
||||
///// <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);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否有登录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("/api/account/logged")]
|
||||
public Task<bool> PostLogged()
|
||||
{
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
///// <summary>
|
||||
///// 判断是否有登录
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//[Route("/api/account/logged")]
|
||||
//public Task<bool> PostLogged()
|
||||
//{
|
||||
// return Task.FromResult(true);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 退出登录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("/api/account/logout")]
|
||||
public Task PostlogOut()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
///// <summary>
|
||||
///// 退出登录
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//[Route("/api/account/logout")]
|
||||
//public Task PostlogOut()
|
||||
//{
|
||||
// return Task.CompletedTask;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户信息
|
||||
|
||||
@@ -10,6 +10,7 @@ using Yi.Framework.Core.Autofac;
|
||||
using Yi.RBAC.Application;
|
||||
using Yi.Framework.AspNetCore;
|
||||
using Yi.Framework.Data.Json;
|
||||
using Yi.Framework.OperLog;
|
||||
|
||||
namespace Yi.BBS.Web
|
||||
{
|
||||
@@ -31,7 +32,8 @@ namespace Yi.BBS.Web
|
||||
{
|
||||
//NETServiceTest所在程序集添加进动态api配置
|
||||
opt.CreateConventional(typeof(YiBBSApplicationModule).Assembly, option => option.RootPath = string.Empty);
|
||||
//opt.CreateConventional(typeof(YiRBACApplicationModule).Assembly, option => option.RootPath = string.Empty);
|
||||
opt.CreateConventional(typeof(YiRBACApplicationModule).Assembly, option => option.RootPath = string.Empty);
|
||||
opt.CreateConventional(typeof(YiFrameworkOperLogModule).Assembly, option => option.RootPath = string.Empty);
|
||||
});
|
||||
|
||||
//添加swagger
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"DbConnOptions": {
|
||||
"Url": "DataSource=yi-sqlsugar-dev.db",
|
||||
"DbType": "Sqlite",
|
||||
"EnabledDbSeed": false,
|
||||
"EnabledDbSeed": true,
|
||||
"EnabledReadWrite": false,
|
||||
"EnabledCodeFirst": true,
|
||||
"EntityAssembly": null,
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user