fix sys模块代码迁移

This commit is contained in:
2023-12-28 11:43:48 +08:00
parent dc5811695c
commit 611b612177
34 changed files with 542 additions and 60 deletions

View File

@@ -25,6 +25,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scheduled", "Scheduled", "{
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlhis.Basic", "Src\Dlhis.Basic\Dlhis.Basic.csproj", "{D1F81CB7-F3EF-4196-A751-468248368020}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlhis.User", "Src\Dlhis.User\Dlhis.User.csproj", "{9F9BC299-3CDD-4CCE-80CA-5FE57332B1F0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -59,6 +61,10 @@ Global
{D1F81CB7-F3EF-4196-A751-468248368020}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1F81CB7-F3EF-4196-A751-468248368020}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1F81CB7-F3EF-4196-A751-468248368020}.Release|Any CPU.Build.0 = Release|Any CPU
{9F9BC299-3CDD-4CCE-80CA-5FE57332B1F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F9BC299-3CDD-4CCE-80CA-5FE57332B1F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F9BC299-3CDD-4CCE-80CA-5FE57332B1F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F9BC299-3CDD-4CCE-80CA-5FE57332B1F0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -70,6 +76,7 @@ Global
{4C1FADD9-8AFB-4087-9E52-EE6D6523ED38} = {4EBCE46B-CE3A-4A47-9432-82A1854CA58A}
{FD8D38C5-0827-49D1-A0BA-7707FBFDA2EC} = {4EBCE46B-CE3A-4A47-9432-82A1854CA58A}
{D1F81CB7-F3EF-4196-A751-468248368020} = {4EBCE46B-CE3A-4A47-9432-82A1854CA58A}
{9F9BC299-3CDD-4CCE-80CA-5FE57332B1F0} = {57074FD8-1A2F-40C7-8476-001778A3F65D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7439494A-E2FD-4FEA-8ABF-74AE57A4A5A0}

View File

@@ -20,7 +20,7 @@ public class BusinessPlaceService : IBusinessPlaceService
_dbContext = dbContext;
}
[IgnoreTenant]
public async Task<Pagination<BusinessPlaceResponse>> GetPageAsync(BusinessPlacePageRequest request)
{
var page = await _dbContext.Queryable<CanteenBusinessPlaceEntity>()

View File

@@ -28,7 +28,7 @@ public class MealUserService : IMealUserService
public async Task AddAsync(MealUserAddRequest request)
{
//todo 获取档案信息
var entity = new CanteenUserEntity
{
UserId = request.UserId,

View File

@@ -1,8 +1,8 @@
using Dlhis.Entity.Permission.Enums;
using Dlhis.Entity.Sys.Enums;
using Kurisu.Core.DataAccess.Entity;
using SqlSugar;
namespace Dlhis.Entity.Permission.Entities;
namespace Dlhis.Entity.Sys.Entities;
/// <summary>
/// 设备权限

View File

@@ -1,8 +1,8 @@
using Dlhis.Entity.Permission.Enums;
using Dlhis.Entity.Sys.Enums;
using SqlSugar;
using SqlSugar.DbConvert;
namespace Dlhis.Entity.Permission.Entities;
namespace Dlhis.Entity.Sys.Entities;
/// <summary>
/// 菜单

View File

@@ -1,9 +1,9 @@
using Dlhis.Entity.Permission.Enums;
using Dlhis.Entity.Sys.Enums;
using Kurisu.Core.DataAccess.Entity;
using SqlSugar;
using SqlSugar.DbConvert;
namespace Dlhis.Entity.Permission.Entities;
namespace Dlhis.Entity.Sys.Entities;
/// <summary>
/// 菜单权限

View File

@@ -0,0 +1,16 @@
using SqlSugar;
namespace Dlhis.Entity.Sys.Entities;
[SugarTable(TableName = "Roles")]
public class RoleEntity
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
public string Name { get; set; }
public string NormalizedName { get; set; }
public string ConcurrencyStamp { get; set; }
}

View File

@@ -0,0 +1,38 @@
using SqlSugar;
namespace Dlhis.Entity.Sys.Entities;
[SugarTable("Users")]
public class UserEntity
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
public string UserName { get; set; }
public string NormalizedUserName { get; set; }
public string Email { get; set; }
public string NormalizedEmail { get; set; }
public bool EmailConfirmed { get; set; }
public string PasswordHash { get; set; }
public string SecurityStamp { get; set; }
public string ConcurrencyStamp { get; set; }
public string PhoneNumber { get; set; }
public string PhoneNumberConfirmed { get; set; }
public bool TwoFactorEnabled { get; set; }
public bool LockoutEnd { get; set; }
public bool LockoutEnabled { get; set; }
public int AccessFailedCount { get; set; }
}

View File

@@ -1,6 +1,6 @@
using System.ComponentModel;
namespace Dlhis.Entity.Permission.Enums;
namespace Dlhis.Entity.Sys.Enums;
/// <summary>
/// 设备权限类型

View File

@@ -1,6 +1,6 @@
using System.ComponentModel;
namespace Dlhis.Entity.Permission.Enums;
namespace Dlhis.Entity.Sys.Enums;
/// <summary>
/// 菜单类型

View File

@@ -1,6 +1,6 @@
using System.ComponentModel;
namespace Dlhis.Entity.Permission.Enums;
namespace Dlhis.Entity.Sys.Enums;
/// <summary>
/// 权限类型

View File

@@ -1,6 +1,6 @@
using System.ComponentModel;
namespace Dlhis.Entity.Permission.Enums;
namespace Dlhis.Entity.Sys.Enums;
/// <summary>
/// 平台类型

View File

@@ -1,11 +1,10 @@
using Dlhis.Entity.Permission.Enums;
using Kurisu.SqlSugar.Attributes;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using Dlhis.Sys.Menu.Services;
using Dlhis.Sys.Menu.Response;
using Dlhis.Sys.Menu.Request;
using Dlhis.Entity.Sys.Enums;
namespace Dlhis.Sys.Menu.Controllers;
@@ -40,7 +39,6 @@ public class MenusController : ControllerBase
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Transactional]
[HttpPost]
public async Task Save(SaveMenuRequest request)
{

View File

@@ -1,5 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Dlhis.Entity.Permission.Enums;
using Dlhis.Entity.Sys.Enums;
namespace Dlhis.Sys.Menu.Request;

View File

@@ -1,5 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Dlhis.Entity.Permission.Enums;
using Dlhis.Entity.Sys.Enums;
namespace Dlhis.Sys.Menu.Request;

View File

@@ -1,4 +1,4 @@
using Dlhis.Entity.Permission.Enums;
using Dlhis.Entity.Sys.Enums;
namespace Dlhis.Sys.Menu.Response;

View File

@@ -1,4 +1,5 @@
using Dlhis.Entity.Permission.Enums;

using Dlhis.Entity.Sys.Enums;
using Dlhis.Sys.Menu.Request;
using Dlhis.Sys.Menu.Response;

View File

@@ -1,5 +1,5 @@
using Dlhis.Entity.Permission.Entities;
using Dlhis.Entity.Permission.Enums;
using Dlhis.Entity.Sys.Entities;
using Dlhis.Entity.Sys.Enums;
using Dlhis.Sys.Menu.Request;
using Dlhis.Sys.Menu.Response;
using Kurisu.AspNetCore.Utils.Extensions;
@@ -23,10 +23,10 @@ public class MenuService : IMenuService
public async Task<List<MenuResponse>> GetListAsync(PlatformEnumType platform)
{
var result = await _dbContext.Queryable<MenuEntity>()
.Where(x => x.Platform == platform)
.OrderBy(x => x.Sequence)
.Select<MenuResponse>()
.ToListAsync();
.Where(x => x.Platform == platform)
.OrderBy(x => x.Sequence)
.Select<MenuResponse>()
.ToListAsync();
var top = result.Where(x => x.PCode.IsEmpty()).ToList();
foreach (var menu in top)
@@ -64,17 +64,11 @@ public class MenuService : IMenuService
{
//修改下级的PCode为当前的code
var menus = await _dbContext.Queryable<MenuEntity>().Where(x => x.PCode == beforeCode).ToListAsync();
menus.ForEach(x =>
{
x.PCode = pcode;
});
menus.ForEach(x => { x.PCode = pcode; });
//修改权限code为当前的code,避免权限丢失
var permissions = await _dbContext.Queryable<MenuPermissionEntity>().Where(x => x.Code == beforeCode).ToListAsync();
permissions.ForEach(x =>
{
x.Code = pcode;
});
permissions.ForEach(x => { x.Code = pcode; });
await _dbContext.UpdateAsync(menus);
await _dbContext.UpdateAsync(permissions);
@@ -87,9 +81,9 @@ public class MenuService : IMenuService
//清空覆盖
var permissionsToDelete = await _dbContext.Queryable<MenuPermissionEntity>()
.Where(x => x.UniqueType == request.UniqueType)
.Where(x => x.UniqueValue == request.UniqueValue)
.ToListAsync();
.Where(x => x.UniqueType == request.UniqueType)
.Where(x => x.UniqueValue == request.UniqueValue)
.ToListAsync();
//触发日志记录
await _dbContext.DeleteAsync(permissionsToDelete);
@@ -98,7 +92,6 @@ public class MenuService : IMenuService
Code = x,
UniqueType = request.UniqueType,
UniqueValue = request.UniqueValue
}).ToList();
@@ -110,24 +103,78 @@ public class MenuService : IMenuService
throw new NotImplementedException();
}
public Task<List<string>> GetAllAssignmentPermissionsAsync()
public async Task<List<string>> GetAllAssignmentPermissionsAsync()
{
throw new NotImplementedException();
var all = await GetAllAssignmentCodesAsync();
return await _dbContext.Queryable<MenuEntity>().Where(x => all.Contains(x.Code)).Select(x => x.Permission).ToListAsync();
}
public Task<List<MenuResponse>> GetCurrentMenusAsync()
public async Task<List<MenuResponse>> GetCurrentMenusAsync()
{
throw new NotImplementedException();
//我能看到的权限code,非permissions
var allCodes = await GetAllAssignmentCodesAsync();
if (!allCodes.Any())
{
return await GetListAsync(PlatformEnumType.PCAdmin);
}
var allMenus = await _dbContext.Queryable<MenuEntity>()
.Where(x => x.Platform == PlatformEnumType.PCAdmin)
.Where(x => x.Visible)
.Where(x => allCodes.Contains(x.Code))
.Select<MenuResponse>()
.ToListAsync();
//获取顶级数据
var menus = await _dbContext.Queryable<MenuEntity>()
.Where(x => x.Platform == PlatformEnumType.PCAdmin)
.Where(x => x.Visible)
.Where(x => string.IsNullOrEmpty(x.PCode))
.Select<MenuResponse>()
.ToListAsync();
foreach (var menu in menus)
{
RecursionGetNext(menu, allMenus);
}
menus.RemoveAll(x => !x.Items.Any());
return menus;
}
public Task<bool> IsPass(IEnumerable<string> p)
public async Task<bool> IsPass(IEnumerable<string> p)
{
throw new NotImplementedException();
var permissions = await GetAllAssignmentPermissionsAsync();
return permissions.Count == 0 || permissions.All(x => p.Contains(x));
}
public Task ResetAsync(List<SaveMenuRequest> request)
public async Task ResetAsync(List<SaveMenuRequest> request)
{
throw new NotImplementedException();
var menus = await _dbContext.Queryable<MenuEntity>().Where(x => x.Platform == PlatformEnumType.PCAdmin).ToListAsync();
await _dbContext.Client.Deleteable(menus).ExecuteCommandAsync();
foreach (var item in request)
{
await SaveMenuAsync(item);
if (item.Items?.Any() == true)
{
await RecursionSaveNextAsync(item.Items);
}
}
//递归处理下一级
async Task RecursionSaveNextAsync(List<SaveMenuRequest> menus)
{
foreach (var item in menus)
{
await SaveMenuAsync(item);
if (item.Items?.Any() == true)
{
await RecursionSaveNextAsync(item.Items);
}
}
}
}
@@ -145,22 +192,22 @@ public class MenuService : IMenuService
{
//检查重复code
var exists = await _dbContext.Queryable<MenuEntity>()
.Where(x => x.Code == request.Code)
.WhereIF(request.Id.HasValue, x => x.Id != request.Id).AnyAsync();
.Where(x => x.Code == request.Code)
.WhereIF(request.Id.HasValue, x => x.Id != request.Id).AnyAsync();
exists.ThrowIfTrue($"{request.Title}存在重复code");
//检查name
exists = await _dbContext.Queryable<MenuEntity>()
.Where(x => x.Name == request.Name)
.WhereIF(request.Id.HasValue, x => x.Id != request.Id).AnyAsync();
.Where(x => x.Name == request.Name)
.WhereIF(request.Id.HasValue, x => x.Id != request.Id).AnyAsync();
exists.ThrowIfTrue($"{request.Title}存在重复name");
//判断权限重复
if (request.Permission.IsPresent())
{
exists = await _dbContext.Queryable<MenuEntity>()
.Where(x => x.Permission == request.Permission && (request.MenuType == MenuEnumType.Menu || request.MenuType == MenuEnumType.Button))
.WhereIF(request.Id.HasValue, x => x.Id != request.Id).AnyAsync();
.Where(x => x.Permission == request.Permission && (request.MenuType == MenuEnumType.Menu || request.MenuType == MenuEnumType.Button))
.WhereIF(request.Id.HasValue, x => x.Id != request.Id).AnyAsync();
exists.ThrowIfTrue($"{request.Title}存在重复权限标识");
}
@@ -188,4 +235,23 @@ public class MenuService : IMenuService
}
}
}
}
private async Task<List<string>> GetAllAssignmentCodesAsync()
{
var user = await _dbContext.Queryable<UserEntity>().Where(x => x.Id == _currentUser.GetIntSubjectId()).FirstAsync();
if (user == null)
{
return new List<string>();
}
// var gP = await GetAssignmentCodesAsync(MenuPermissionTypeEnumType.Group, manager.usergrp);
//
// //user
// var uP = await GetAssignmentCodesAsync(MenuPermissionTypeEnumType.User, manager.account);
// var all = gP.Concat(uP).Distinct().ToList();
//return all;
return new List<string>();
}
}

View File

@@ -1,18 +1,21 @@
using Kurisu.AspNetCore.Startup;
using Kurisu.Startup;
class Program
namespace Dlhis.Sys
{
static void Main(string[] args)
class Program
{
KurisuHost.Run<Startup>(true, args);
static void Main(string[] args)
{
KurisuHost.Run<Startup>(true, args);
}
}
}
public class Startup : DefaultStartup
{
public Startup(IConfiguration configuration) : base(configuration)
public class Startup : DefaultStartup
{
public Startup(IConfiguration configuration) : base(configuration)
{
}
}
}

View File

@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Compile Remove="log\**" />
<Content Remove="log\**" />
<EmbeddedResource Remove="log\**" />
<None Remove="log\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Kurisu.AspNetCore" Version="0.4.7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Dlhis.Entity\Dlhis.Entity.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,27 @@
using Dlhis.User.Identity.Request;
using Dlhis.User.Identity.Response;
using Dlhis.User.Identity.Services;
using Kurisu.Core.DataAccess.Dto;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.User.Identity.Controllers;
[Authorize(Roles = "admin")]
[Route("api/[controller]")]
[ApiController]
public class RolesController : ControllerBase
{
private readonly IRoleService _roleService;
public RolesController(IRoleService roleService)
{
_roleService = roleService;
}
[HttpGet]
public async Task<Pagination<RoleRespone>> GetPageAsync(RolePageRequest request)
{
return await _roleService.GetPageAsync(request);
}
}

View File

@@ -0,0 +1,32 @@
using Dlhis.User.Identity.Request;
using Dlhis.User.Identity.Response;
using Dlhis.User.Identity.Services;
using Kurisu.Core.DataAccess.Dto;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.User.Identity.Controllers;
[Authorize(Roles = "admin")]
[Route("api/[controller]")]
[ApiController]
public class UsersController : ControllerBase
{
private readonly IUserService _userService;
public UsersController(IUserService userService)
{
_userService = userService;
}
/// <summary>
/// 用户分页
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpGet("page")]
public async Task<Pagination<UserResponse>> GetPageAsync([FromQuery] UserPageRequest request)
{
return await _userService.GetPageAsync(request);
}
}

View File

@@ -0,0 +1,7 @@
using Kurisu.Core.DataAccess.Dto;
namespace Dlhis.User.Identity.Request;
public class RolePageRequest : PageDto
{
}

View File

@@ -0,0 +1,7 @@
using Kurisu.Core.DataAccess.Dto;
namespace Dlhis.User.Identity.Request;
public class UserPageRequest : PageDto
{
}

View File

@@ -0,0 +1,10 @@
namespace Dlhis.User.Identity.Response;
public class RoleRespone
{
public int Id { get; set; }
public string Name { get; set; }
public string NormalizedName { get; set; }
}

View File

@@ -0,0 +1,28 @@
namespace Dlhis.User.Identity.Response;
public class UserResponse
{
public int Id { get; set; }
public string UserName { get; set; }
public string NormalizedUserName { get; set; }
public string Email { get; set; }
public string NormalizedEmail { get; set; }
public bool EmailConfirmed { get; set; }
public string PhoneNumber { get; set; }
public string PhoneNumberConfirmed { get; set; }
public bool TwoFactorEnabled { get; set; }
public bool LockoutEnd { get; set; }
public bool LockoutEnabled { get; set; }
public int AccessFailedCount { get; set; }
}

View File

@@ -0,0 +1,10 @@
using Dlhis.User.Identity.Request;
using Dlhis.User.Identity.Response;
using Kurisu.Core.DataAccess.Dto;
namespace Dlhis.User.Identity.Services;
public interface IRoleService : IScopeDependency
{
Task<Pagination<RoleRespone>> GetPageAsync(RolePageRequest request);
}

View File

@@ -0,0 +1,12 @@
using Dlhis.User.Identity.Request;
using Dlhis.User.Identity.Response;
using Kurisu.Core.DataAccess.Dto;
namespace Dlhis.User.Identity.Services;
public interface IUserService : IScopeDependency
{
Task<Pagination<UserResponse>> GetPageAsync(UserPageRequest request);
Task ResetAccessFailedCountAsync(int id);
}

View File

@@ -0,0 +1,41 @@
using Dlhis.Entity.Sys.Entities;
using Dlhis.User.Identity.Request;
using Dlhis.User.Identity.Response;
using Kurisu.AspNetCore.Utils.Extensions;
using Kurisu.Core.DataAccess.Dto;
using Kurisu.SqlSugar.Extensions;
using Kurisu.SqlSugar.Services;
namespace Dlhis.User.Identity.Services.Implements;
public class UserService : IUserService
{
private readonly IDbContext _dbContext;
public UserService(IDbContext dbContext)
{
_dbContext = dbContext;
}
public async Task<Pagination<UserResponse>> GetPageAsync(UserPageRequest request)
{
return await _dbContext.Queryable<UserEntity>()
.WhereIF(request.Search.IsPresent(), x => x.UserName.Contains(request.Search)
|| x.NormalizedUserName.Contains(request.Search)
|| x.Email.Contains(request.Search)
|| x.NormalizedEmail.Contains(request.Search)
|| x.PhoneNumber.Contains(request.Search)
)
.Select<UserResponse>()
.ToPageListAsync(request);
}
public async Task ResetAccessFailedCountAsync(int id)
{
var user = await _dbContext.Queryable<UserEntity>().Where(x => x.Id == id).FirstAsync();
user.ThrowIfNull("用户不存在,无法重置");
user.AccessFailedCount = 0;
await _dbContext.UpdateAsync(user);
}
}

21
Src/Dlhis.User/Program.cs Normal file
View File

@@ -0,0 +1,21 @@
using Kurisu.AspNetCore.Startup;
using Kurisu.Startup;
namespace Dlhis.User
{
class Program
{
static void Main(string[] args)
{
KurisuHost.Run<Startup>(true, args);
}
}
public class Startup : DefaultStartup
{
public Startup(IConfiguration configuration) : base(configuration)
{
}
}
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"Dlhis.User": {
"commandName": "Project",
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5010",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@@ -0,0 +1,14 @@
using Kurisu.AspNetCore.Startup;
using Kurisu.SqlSugar.Extensions;
namespace Dlhis.User;
public class SqlSugarPack : BaseAppPack
{
public override bool IsBeforeUseRouting { get; }
public override void ConfigureServices(IServiceCollection services)
{
services.AddSqlSugar();
}
}

View File

@@ -0,0 +1,35 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"InternalRequest": {
"CommonRequestUrl": "http://localhost:5001"
},
"SwaggerOptions": {
"Enable": true,
"Authority": "https://yikatong.isawesome.cn/oauth2",
"ClientId": "4fb184324eac4180",
"ClientSecret": "8ac8f235152f1524",
"Scopes": {
"openid": "openid",
"profile": "profile",
"role": "role",
"yikatong": "yikatong"
}
},
"IdentityServerOptions": {
"Authority": "https://yikatong.isawesome.cn/oauth2",
"RequireHttpsMetadata": true,
"Issuer": "identity.isawesome.cn",
"Audience": "",
"Pat": {
"Enable": false,
"Scheme": "token",
"ClientId": "reference",
"ClientSecret": "123456"
}
}
}

View File

@@ -0,0 +1,73 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"SqlSugarOptions": {
"DefaultConnectionString": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=identity;charset=utf8mb4;",
"SlaveConnectionString": [],
"Timeout": 30,
"SlowSqlTime": 1,
"EnableSqlLog": true
},
"SwaggerOptions": {
"Enable": true,
"Authority": "http://identity.oauth.svc.cluster.local",
"ClientId": "4fb184324eac4180",
"ClientSecret": "8ac8f235152f1524",
"Scopes": {
"openid": "openid",
"profile": "profile",
"role": "role",
"yikatong": "yikatong"
}
},
"IdentityServerOptions": {
"Authority": "http://identity.oauth.svc.cluster.local",
"RequireHttpsMetadata": false,
"Issuer": "identity.isawesome.cn",
"Audience": "",
"Pat": {
"Enable": false,
"Scheme": "token",
"ClientId": "reference",
"ClientSecret": "123456"
}
},
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"System": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"WriteTo": [
{
"Name": "Async",
"Args": {
"configure": [
{
"Name": "Console",
"Args": {
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] [{SourceContext}] {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "log/log.txt",
"rollingInterval": "Hour"
}
}
]
}
}
]
}
}