fix 配置处理
This commit is contained in:
13
Src/Dlhis.Sys.Api/Dlhis.Sys.Api.csproj
Normal file
13
Src/Dlhis.Sys.Api/Dlhis.Sys.Api.csproj
Normal file
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>disable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Kurisu.RemoteCall" Version="0.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
37
Src/Dlhis.Sys.Api/ITenantApi.cs
Normal file
37
Src/Dlhis.Sys.Api/ITenantApi.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Dlhis.User.Api.Response;
|
||||
using Kurisu.Core.Result;
|
||||
using Kurisu.RemoteCall.Attributes;
|
||||
|
||||
namespace Dlhis.User.Api;
|
||||
|
||||
/// <summary>
|
||||
/// 租户Api
|
||||
/// </summary>
|
||||
[EnableRemoteClient(Name = "sys-service", BaseUrl = "${InternalRequest:SysRequestUrl}")]
|
||||
public interface ITenantApi
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取所有租户
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Auth]
|
||||
[Get("/api/tenants/list")]
|
||||
Task<DefaultApiResult<List<TenantResponse>>> GetTenantsAsync();
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有租户(内部使用)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Get("/api/tenants/list-internal")]
|
||||
Task<DefaultApiResult<List<TenantResponse>>> GetTenantsInternalAsync();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据code获取租户信息
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
[Auth]
|
||||
[Get("/api/tenants/single")]
|
||||
Task<DefaultApiResult<TenantResponse>> GetTenantByCodeAsync(string code);
|
||||
}
|
||||
13
Src/Dlhis.Sys.Api/IUserApi.cs
Normal file
13
Src/Dlhis.Sys.Api/IUserApi.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Dlhis.User.Api.Response;
|
||||
using Kurisu.Core.Result;
|
||||
using Kurisu.RemoteCall.Attributes;
|
||||
|
||||
namespace Dlhis.User.Api;
|
||||
|
||||
[EnableRemoteClient(Name = "sys-service", BaseUrl = "${InternalRequest:SysRequestUrl}")]
|
||||
public interface IUserApi
|
||||
{
|
||||
[Auth]
|
||||
[Get("/api/users")]
|
||||
Task<DefaultApiResult<UserResponse>> GetUserByIdAsync(int id);
|
||||
}
|
||||
10
Src/Dlhis.Sys.Api/Response/TenantResponse.cs
Normal file
10
Src/Dlhis.Sys.Api/Response/TenantResponse.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Dlhis.User.Api.Response;
|
||||
|
||||
public class TenantResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Code { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
}
|
||||
28
Src/Dlhis.Sys.Api/Response/UserResponse.cs
Normal file
28
Src/Dlhis.Sys.Api/Response/UserResponse.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
namespace Dlhis.User.Api.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 bool PhoneNumberConfirmed { get; set; }
|
||||
|
||||
public bool TwoFactorEnabled { get; set; }
|
||||
|
||||
public DateTime? LockoutEnd { get; set; }
|
||||
|
||||
public bool LockoutEnabled { get; set; }
|
||||
|
||||
public int AccessFailedCount { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user