liaoxujun@qq.com
2023-07-24 503795e59f02129e915f56ddc2e2830279aea87c
no message
1个文件已删除
22个文件已添加
441 ■■■■■ 已修改文件
A啥东西.txt 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocumentServiceAPI.Application.csproj 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/GlobalUsings.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/System/Dtos/Mapper.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/System/Services/ISystemService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/System/Services/SystemService.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/System/SystemAppService.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Application/applicationsettings.json 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Core/DbContext.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Core/DocumentServiceAPI.Core.csproj 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Core/DocumentServiceAPI.Core.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Core/DocumentServiceAPI.Web.Core.csproj 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Core/DocumentServiceAPI.Web.Core.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Core/Handlers/JwtHandler.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Core/Startup.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Entry/DocumentServiceAPI.Web.Entry.csproj 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Entry/Program.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Entry/Properties/launchSettings.json 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Entry/SingleFilePublish.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Entry/appsettings.Development.json 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.Web.Entry/appsettings.json 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DocumentServiceAPI.sln 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Aɶ¶«Î÷.txt
DocumentServiceAPI.Application/DocumentServiceAPI.Application.csproj
New file
@@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net6.0</TargetFramework>
        <NoWarn>1701;1702;1591</NoWarn>
        <DocumentationFile>DocumentServiceAPI.Application.xml</DocumentationFile>
        <ImplicitUsings>enable</ImplicitUsings>
    </PropertyGroup>
    <ItemGroup>
        <None Remove="applicationsettings.json" />
        <None Remove="DocumentServiceAPI.Application.xml" />
    </ItemGroup>
    <ItemGroup>
        <Content Include="applicationsettings.json">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </Content>
    </ItemGroup>
    <ItemGroup>
        <ProjectReference Include="..\DocumentServiceAPI.Core\DocumentServiceAPI.Core.csproj" />
    </ItemGroup>
    <ItemGroup>
        <Folder Include="System\Services\" />
    </ItemGroup>
</Project>
DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml
New file
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>DocumentServiceAPI.Application</name>
    </assembly>
    <members>
        <member name="T:DocumentServiceAPI.Application.SystemAppService">
            <summary>
            ç³»ç»ŸæœåŠ¡æŽ¥å£
            </summary>
        </member>
        <member name="M:DocumentServiceAPI.Application.SystemAppService.GetDescription">
            <summary>
            èŽ·å–ç³»ç»Ÿæè¿°
            </summary>
            <returns></returns>
        </member>
    </members>
</doc>
DocumentServiceAPI.Application/GlobalUsings.cs
New file
@@ -0,0 +1,15 @@
global using Furion;
global using Furion.DataEncryption;
global using Furion.DataValidation;
global using Furion.DependencyInjection;
global using Furion.DynamicApiController;
global using Furion.Extensions;
global using Furion.FriendlyException;
global using Furion.Logging;
global using Mapster;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Http;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.CodeAnalysis;
global using System.ComponentModel.DataAnnotations;
global using SqlSugar;
DocumentServiceAPI.Application/System/Dtos/Mapper.cs
New file
@@ -0,0 +1,8 @@
namespace DocumentServiceAPI.Application;
public class Mapper : IRegister
{
    public void Register(TypeAdapterConfig config)
    {
    }
}
DocumentServiceAPI.Application/System/Services/ISystemService.cs
New file
@@ -0,0 +1,6 @@
namespace DocumentServiceAPI.Application;
public interface ISystemService
{
    string GetDescription();
}
DocumentServiceAPI.Application/System/Services/SystemService.cs
New file
@@ -0,0 +1,9 @@
namespace DocumentServiceAPI.Application;
public class SystemService : ISystemService, ITransient
{
    public string GetDescription()
    {
        return "让 .NET å¼€å‘更简单,更通用,更流行。";
    }
}
DocumentServiceAPI.Application/System/SystemAppService.cs
New file
@@ -0,0 +1,22 @@
namespace DocumentServiceAPI.Application;
/// <summary>
/// ç³»ç»ŸæœåŠ¡æŽ¥å£
/// </summary>
public class SystemAppService : IDynamicApiController
{
    private readonly ISystemService _systemService;
    public SystemAppService(ISystemService systemService)
    {
        _systemService = systemService;
    }
    /// <summary>
    /// èŽ·å–ç³»ç»Ÿæè¿°
    /// </summary>
    /// <returns></returns>
    public string GetDescription()
    {
        return _systemService.GetDescription();
    }
}
DocumentServiceAPI.Application/applicationsettings.json
New file
@@ -0,0 +1,31 @@
{
  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
  "SpecificationDocumentSettings": {
    "DocumentTitle": "Furion | è§„范化接口",
    "GroupOpenApiInfos": [
      {
        "Group": "Default",
        "Title": "规范化接口演示",
        "Description": "让 .NET å¼€å‘更简单,更通用,更流行。",
        "Version": "1.0.0",
        "TermsOfService": "http://furion.baiqian.ltd",
        "Contact": {
          "Name": "百小僧",
          "Url": "https://gitee.com/monksoul",
          "Email": "monksoul@outlook.com"
        },
        "License": {
          "Name": "Apache-2.0",
          "Url": "https://gitee.com/dotnetchina/Furion/blob/rc1/LICENSE"
        }
      }
    ]
  },
  "CorsAccessorSettings": {
    "WithExposedHeaders": [
      "access-token",
      "x-access-token",
      "environment"
    ]
  }
}
DocumentServiceAPI.Core/DbContext.cs
New file
@@ -0,0 +1,22 @@
using Furion;
using SqlSugar;
using System.Collections.Generic;
namespace DocumentServiceAPI.Core;
/// <summary>
/// æ•°æ®åº“上下文对象
/// </summary>
public static class DbContext
{
    /// <summary>
    /// SqlSugar æ•°æ®åº“实例
    /// </summary>
    public static readonly SqlSugarScope Instance = new(
        // è¯»å– appsettings.json ä¸­çš„ ConnectionConfigs é…ç½®èŠ‚ç‚¹
        App.GetConfig<List<ConnectionConfig>>("ConnectionConfigs")
        , db =>
        {
            // è¿™é‡Œé…ç½®å…¨å±€äº‹ä»¶ï¼Œæ¯”如拦截执行 SQL
        });
}
DocumentServiceAPI.Core/DocumentServiceAPI.Core.csproj
New file
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net6.0</TargetFramework>
        <NoWarn>1701;1702;1591</NoWarn>
        <DocumentationFile>DocumentServiceAPI.Core.xml</DocumentationFile>
    </PropertyGroup>
    <ItemGroup>
        <None Remove="DocumentServiceAPI.Core.xml" />
    </ItemGroup>
    <ItemGroup>
        <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.8.8.38" />
        <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.8.8.38" />
        <PackageReference Include="Furion.Pure" Version="4.8.8.38" />
        <PackageReference Include="SqlSugarCore" Version="5.1.4.89" />
    </ItemGroup>
</Project>
DocumentServiceAPI.Core/DocumentServiceAPI.Core.xml
New file
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>DocumentServiceAPI.Core</name>
    </assembly>
    <members>
        <member name="T:DocumentServiceAPI.Core.DbContext">
            <summary>
            æ•°æ®åº“上下文对象
            </summary>
        </member>
        <member name="F:DocumentServiceAPI.Core.DbContext.Instance">
            <summary>
            SqlSugar æ•°æ®åº“实例
            </summary>
        </member>
    </members>
</doc>
DocumentServiceAPI.Web.Core/DocumentServiceAPI.Web.Core.csproj
New file
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net6.0</TargetFramework>
        <NoWarn>1701;1702;1591</NoWarn>
        <DocumentationFile>DocumentServiceAPI.Web.Core.xml</DocumentationFile>
    </PropertyGroup>
    <ItemGroup>
        <None Remove="DocumentServiceAPI.Web.Core.xml" />
    </ItemGroup>
    <ItemGroup>
        <ProjectReference Include="..\DocumentServiceAPI.Application\DocumentServiceAPI.Application.csproj" />
    </ItemGroup>
</Project>
DocumentServiceAPI.Web.Core/DocumentServiceAPI.Web.Core.xml
New file
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>DocumentServiceAPI.Web.Core</name>
    </assembly>
    <members>
    </members>
</doc>
DocumentServiceAPI.Web.Core/Handlers/JwtHandler.cs
New file
@@ -0,0 +1,16 @@
using Furion.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using System.Threading.Tasks;
namespace DocumentServiceAPI.Web.Core;
public class JwtHandler : AppAuthorizeHandler
{
    public override Task<bool> PipelineAsync(AuthorizationHandlerContext context, DefaultHttpContext httpContext)
    {
        // è¿™é‡Œå†™æ‚¨çš„æŽˆæƒåˆ¤æ–­é€»è¾‘,授权通过返回 true,否则返回 false
        return Task.FromResult(true);
    }
}
DocumentServiceAPI.Web.Core/Startup.cs
New file
@@ -0,0 +1,45 @@
using Furion;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace DocumentServiceAPI.Web.Core;
public class Startup : AppStartup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddConsoleFormatter();
        services.AddJwt<JwtHandler>();
        services.AddCorsAccessor();
        services.AddControllers()
                .AddInjectWithUnifyResult();
    }
    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }
        app.UseHttpsRedirection();
        app.UseRouting();
        app.UseCorsAccessor();
        app.UseAuthentication();
        app.UseAuthorization();
        app.UseInject(string.Empty);
        app.UseEndpoints(endpoints =>
        {
            endpoints.MapControllers();
        });
    }
}
DocumentServiceAPI.Web.Entry/DocumentServiceAPI.Web.Entry.csproj
New file
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
    <PropertyGroup>
        <TargetFramework>net6.0</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
        <PublishReadyToRunComposite>true</PublishReadyToRunComposite>
    </PropertyGroup>
    <ItemGroup>
        <ProjectReference Include="..\DocumentServiceAPI.Web.Core\DocumentServiceAPI.Web.Core.csproj" />
    </ItemGroup>
    <ProjectExtensions>
        <VisualStudio>
            <UserProperties properties_4launchsettings_1json__JsonSchema="" />
        </VisualStudio>
    </ProjectExtensions>
</Project>
DocumentServiceAPI.Web.Entry/Program.cs
New file
@@ -0,0 +1 @@
Serve.Run(RunOptions.Default.WithArgs(args));
DocumentServiceAPI.Web.Entry/Properties/launchSettings.json
New file
@@ -0,0 +1,31 @@
{
  "$schema": "http://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:53785",
      "sslPort": 44342
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "launchUrl": "",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "DocumentServiceAPI.Web.Entry": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "launchUrl": "",
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}
DocumentServiceAPI.Web.Entry/SingleFilePublish.cs
New file
@@ -0,0 +1,22 @@
using Furion;
using System.Reflection;
namespace DocumentServiceAPI.Web.Entry;
public class SingleFilePublish : ISingleFilePublish
{
    public Assembly[] IncludeAssemblies()
    {
        return Array.Empty<Assembly>();
    }
    public string[] IncludeAssemblyNames()
    {
        return new[]
        {
            "DocumentServiceAPI.Application",
            "DocumentServiceAPI.Core",
            "DocumentServiceAPI.Web.Core"
        };
    }
}
DocumentServiceAPI.Web.Entry/appsettings.Development.json
New file
@@ -0,0 +1,10 @@
{
  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning",
      "Microsoft.EntityFrameworkCore": "Information"
    }
  }
}
DocumentServiceAPI.Web.Entry/appsettings.json
New file
@@ -0,0 +1,18 @@
{
  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning",
      "Microsoft.EntityFrameworkCore": "Information"
    }
  },
  "AllowedHosts": "*",
  "ConnectionConfigs": [
    {
      "ConnectionString": "Data Source=./Furion.db",
      "DbType": "Sqlite",
      "IsAutoCloseConnection": true
    }
  ]
}
DocumentServiceAPI.sln
New file
@@ -0,0 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32519.111
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentServiceAPI.Application", "DocumentServiceAPI.Application\DocumentServiceAPI.Application.csproj", "{AB699EE9-43A8-46F2-A855-04A26DE63372}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentServiceAPI.Web.Core", "DocumentServiceAPI.Web.Core\DocumentServiceAPI.Web.Core.csproj", "{9D14BB78-DA2A-4040-B9DB-5A515B599181}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentServiceAPI.Core", "DocumentServiceAPI.Core\DocumentServiceAPI.Core.csproj", "{4FB30091-15C7-4FD9-AB7D-266814F360F5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentServiceAPI.Web.Entry", "DocumentServiceAPI.Web.Entry\DocumentServiceAPI.Web.Entry.csproj", "{C8D99F52-EDC7-411F-8300-6DB14BF59E8C}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {AB699EE9-43A8-46F2-A855-04A26DE63372}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {AB699EE9-43A8-46F2-A855-04A26DE63372}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {AB699EE9-43A8-46F2-A855-04A26DE63372}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {AB699EE9-43A8-46F2-A855-04A26DE63372}.Release|Any CPU.Build.0 = Release|Any CPU
        {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Release|Any CPU.Build.0 = Release|Any CPU
        {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Release|Any CPU.Build.0 = Release|Any CPU
        {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
        SolutionGuid = {B2073C2C-0FD3-452B-8047-8134D68E12CE}
    EndGlobalSection
EndGlobal