update base nuget package

This commit is contained in:
2019-12-27 17:28:14 +08:00
parent 7449f459a7
commit 3edb472bfb
4 changed files with 21 additions and 7 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
using Newtonsoft.Json.Serialization;
namespace YYApi.Communications
{
@@ -91,7 +90,7 @@ namespace YYApi.Communications
{
IgnoreReadOnlyProperties = true,
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
Converters = {new JsonStringEnumConverter()}
Converters = { new JsonStringEnumConverter() }
});
}
}
+4 -1
View File
@@ -15,7 +15,10 @@ namespace YYApi.Controllers
/// </summary>
public class BaseController : Controller
{
protected int LoginId => int.Parse(HttpContext.Items["LoginId"].ToString());
/// <summary>
/// 当前登录用户的ID
/// </summary>
protected int LoginId => HttpContext.Items["LoginId"] == null ? 0 : int.Parse(HttpContext.Items["LoginId"].ToString());
/// <summary>
/// 验证请求参数
+11 -1
View File
@@ -2,5 +2,15 @@
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true
},
"profiles": {
"YYApi": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
}
}
+5 -3
View File
@@ -9,7 +9,9 @@
<Description>AspNetCore一个方便的API文档,捕获异常,统一输入输出的API类库</Description>
<PackageId>YY-Tech.YYApi</PackageId>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<IncludeSymbols>true</IncludeSymbols>
<PackageVersion>0.1.2</PackageVersion>
</PropertyGroup>
<ItemGroup>
@@ -21,8 +23,8 @@
<Content Remove="Properties\launchSettings.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="5.0.0-rc4" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.0.0-rc4" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="5.0.0-rc5" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.0.0-rc5" />
</ItemGroup>
<ProjectExtensions>
<MonoDevelop>