From ec018e5b11206d48ca4ebd7639555944d82cc74f Mon Sep 17 00:00:00 2001
From: liujiaqiang <1448951783@qq.com>
Date: Tue, 13 Jun 2023 18:28:45 +0800
Subject: [PATCH] =?UTF-8?q?=E6=89=80=E6=9C=89model=E4=B8=AD=20string?=
=?UTF-8?q?=E6=94=B9=E4=B8=BAstring=3F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
24Hour/.config/dotnet-tools.json | 12 ++++++++++
24Hour/24Hour.csproj | 4 ++++
24Hour/24Hour.csproj.user | 1 +
24Hour/Controllers/LoginController.cs | 2 +-
24Hour/Program.cs | 20 ++++++++++++++++-
.../PublishProfiles/FolderProfile.pubxml | 21 ++++++++++++++++++
.../PublishProfiles/FolderProfile.pubxml.user | 11 ++++++++++
.../SystemModel/App_Sys_DepartInput.cs | 10 ++++-----
Elight.Logic/SystemModel/App_Sys_MenuInput.cs | 16 +++++++-------
Elight.Logic/SystemModel/App_Sys_RoleInput.cs | 6 ++---
.../SystemModel/App_Sys_RoleMenuInput.cs | 6 ++---
.../SystemModel/App_Sys_RoleUserInput.cs | 6 ++---
Elight.Logic/SystemModel/App_Sys_UnitInput.cs | 10 ++++-----
Elight.Logic/SystemModel/App_Sys_UnitTree.cs | 18 +++++++--------
Elight.Logic/SystemModel/App_Sys_UserInput.cs | 22 +++++++++----------
Elight.Utility/Paging.cs | 4 ++--
16 files changed, 118 insertions(+), 51 deletions(-)
create mode 100644 24Hour/.config/dotnet-tools.json
create mode 100644 24Hour/Properties/PublishProfiles/FolderProfile.pubxml
create mode 100644 24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user
diff --git a/24Hour/.config/dotnet-tools.json b/24Hour/.config/dotnet-tools.json
new file mode 100644
index 0000000..34c3e19
--- /dev/null
+++ b/24Hour/.config/dotnet-tools.json
@@ -0,0 +1,12 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "dotnet-ef": {
+ "version": "7.0.5",
+ "commands": [
+ "dotnet-ef"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/24Hour/24Hour.csproj b/24Hour/24Hour.csproj
index 1e713dd..a8d24c6 100644
--- a/24Hour/24Hour.csproj
+++ b/24Hour/24Hour.csproj
@@ -7,6 +7,10 @@
_24Hour
+
+ E:\Code\24Hour.Service\24Hour\24Hour.xml
+
+
diff --git a/24Hour/24Hour.csproj.user b/24Hour/24Hour.csproj.user
index e4f6e71..044b8de 100644
--- a/24Hour/24Hour.csproj.user
+++ b/24Hour/24Hour.csproj.user
@@ -3,5 +3,6 @@
MvcControllerEmptyScaffolder
root/Common/MVC/Controller
+ E:\Code\24Hour.Service\24Hour\Properties\PublishProfiles\FolderProfile.pubxml
\ No newline at end of file
diff --git a/24Hour/Controllers/LoginController.cs b/24Hour/Controllers/LoginController.cs
index adfe8bc..ffc84a4 100644
--- a/24Hour/Controllers/LoginController.cs
+++ b/24Hour/Controllers/LoginController.cs
@@ -17,7 +17,7 @@ namespace _24Hour.Controllers
/// 登录
///
[ApiController]
- [Route("api/Login")]
+ [Route("api/APP")]
public class LoginController : ControllerBase
{
private readonly IConfiguration _configuration;
diff --git a/24Hour/Program.cs b/24Hour/Program.cs
index de60b1e..53b4e84 100644
--- a/24Hour/Program.cs
+++ b/24Hour/Program.cs
@@ -2,6 +2,7 @@ using Elight.Logic;
using Elight.Utility;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.JwtBearer;
+using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.IdentityModel.Tokens;
@@ -23,8 +24,25 @@ builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(c =>
{
- c.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
+ c.SwaggerDoc("v1", new OpenApiInfo { Title = "24小时一体机 API", Version = "v1" });
+ c.CustomOperationIds(apiDesc =>
+ {
+ var controllerAction = apiDesc.ActionDescriptor as ControllerActionDescriptor;
+ return controllerAction?.ControllerName + "-" + controllerAction?.ActionName;
+ });
+
+ c.ResolveConflictingActions(apiDescription => apiDescription.First());
+ c.CustomSchemaIds(x => x.FullName);
+ c.DocInclusionPredicate((docName, description) => true);
+ var xmlFiles = Directory.GetFiles(Path.Combine(AppContext.BaseDirectory, "xml"), "*.xml");
+ if (xmlFiles.Length > 0)
+ {
+ foreach (var xmlFile in xmlFiles)
+ {
+ c.IncludeXmlComments(xmlFile, true);
+ }
+ }
//添加Jwt验证设置
c.AddSecurityRequirement(new OpenApiSecurityRequirement()
{
diff --git a/24Hour/Properties/PublishProfiles/FolderProfile.pubxml b/24Hour/Properties/PublishProfiles/FolderProfile.pubxml
new file mode 100644
index 0000000..d1ba2f5
--- /dev/null
+++ b/24Hour/Properties/PublishProfiles/FolderProfile.pubxml
@@ -0,0 +1,21 @@
+锘
+
+
+
+ true
+ false
+ true
+ Release
+ Any CPU
+ FileSystem
+ C:\Users\Administrator\Desktop\涓浣撴満
+ FileSystem
+ <_TargetId>Folder
+
+ net6.0
+ 9cc60d58-cc75-4bf7-a854-3220e725cd8c
+ false
+
+
\ No newline at end of file
diff --git a/24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user b/24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user
new file mode 100644
index 0000000..ae10230
--- /dev/null
+++ b/24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -0,0 +1,11 @@
+锘
+
+
+
+ <_PublishTargetUrl>C:\Users\Administrator\Desktop\涓浣撴満
+ True|2023-06-13T10:05:11.2568840Z;False|2023-06-13T18:04:56.9546003+08:00;
+
+
+
\ No newline at end of file
diff --git a/Elight.Logic/SystemModel/App_Sys_DepartInput.cs b/Elight.Logic/SystemModel/App_Sys_DepartInput.cs
index 3ffebf8..a542621 100644
--- a/Elight.Logic/SystemModel/App_Sys_DepartInput.cs
+++ b/Elight.Logic/SystemModel/App_Sys_DepartInput.cs
@@ -15,29 +15,29 @@ namespace Elight.Logic.SystemModel
/// 琛ㄩ噷鐢ㄦ埛鍞竴鏍囪瘑绗︼紝鑷闀縄d
///
[DataMember]
- public string Id { get; set; }
+ public string? Id { get; set; }
///
/// 鍗曚綅Id
///
[DataMember]
- public string unitId { get; set; }
+ public string? unitId { get; set; }
///
/// 閮ㄩ棬缂栫爜
///
[DataMember]
- public string departCode { get; set; }
+ public string? departCode { get; set; }
///
/// 閮ㄩ棬鍚嶇О
///
[DataMember]
- public string departname { get; set; }
+ public string? departname { get; set; }
///
/// 閮ㄩ棬绠绉
///
[DataMember]
- public string departjc { get; set; }
+ public string? departjc { get; set; }
}
}
diff --git a/Elight.Logic/SystemModel/App_Sys_MenuInput.cs b/Elight.Logic/SystemModel/App_Sys_MenuInput.cs
index a0f3e68..236297f 100644
--- a/Elight.Logic/SystemModel/App_Sys_MenuInput.cs
+++ b/Elight.Logic/SystemModel/App_Sys_MenuInput.cs
@@ -15,47 +15,47 @@ namespace Elight.Logic.SystemModel
/// 琛ㄩ噷鐢ㄦ埛鍞竴鏍囪瘑绗︼紝鑷闀縄d
///
[DataMember]
- public string Id { get; set; }
+ public string? Id { get; set; }
///
/// 鐖剁骇
///
[DataMember]
- public string pid { get; set; }
+ public string? pid { get; set; }
///
/// 璺緞
///
[DataMember]
- public string path { get; set; }
+ public string? path { get; set; }
///
/// 鑿滃崟鍚嶇О
///
[DataMember]
- public string name { get; set; }
+ public string? name { get; set; }
///
/// 椤甸潰缁勪欢璺緞
///
[DataMember]
- public string component { get; set; }
+ public string? component { get; set; }
///
/// 鐩存帴璺宠浆璺緞
///
[DataMember]
- public string redirect { get; set; }
+ public string? redirect { get; set; }
///
/// 椤甸潰鏍囬
///
[DataMember]
- public string title { get; set; }
+ public string? title { get; set; }
///
/// 鏄惁闅愯棌瀛愯彍鍗
///
[DataMember]
- public bool hideChildrenInMenu { get; set; }
+ public bool? hideChildrenInMenu { get; set; }
///
/// 鍥炬爣
diff --git a/Elight.Logic/SystemModel/App_Sys_RoleInput.cs b/Elight.Logic/SystemModel/App_Sys_RoleInput.cs
index fdd232d..7b1bad5 100644
--- a/Elight.Logic/SystemModel/App_Sys_RoleInput.cs
+++ b/Elight.Logic/SystemModel/App_Sys_RoleInput.cs
@@ -16,19 +16,19 @@ namespace Elight.Logic.SystemModel
/// 琛ㄩ噷鐢ㄦ埛鍞竴鏍囪瘑绗︼紝鑷闀縄d
///
[DataMember]
- public string Id { get; set; }
+ public string? Id { get; set; }
///
/// 鍗曚綅缂栫爜
///
[DataMember]
- public string unitCode { get; set; }
+ public string? unitCode { get; set; }
///
/// 瑙掕壊鍚嶇О
///
[DataMember]
- public string name { get; set; }
+ public string? name { get; set; }
}
}
diff --git a/Elight.Logic/SystemModel/App_Sys_RoleMenuInput.cs b/Elight.Logic/SystemModel/App_Sys_RoleMenuInput.cs
index d772d29..22aa4b9 100644
--- a/Elight.Logic/SystemModel/App_Sys_RoleMenuInput.cs
+++ b/Elight.Logic/SystemModel/App_Sys_RoleMenuInput.cs
@@ -13,19 +13,19 @@ namespace Elight.Logic.SystemModel
public class App_Sys_RoleMenuInput : Paging
{
[DataMember]
- public string Id { get; set; }
+ public string? Id { get; set; }
///
/// 瑙掕壊Id
///
[DataMember]
- public string roleId { get; set; }
+ public string? roleId { get; set; }
///
/// 鑿滃崟Id
///
[DataMember]
- public string menuId { get; set; }
+ public string? menuId { get; set; }
}
}
diff --git a/Elight.Logic/SystemModel/App_Sys_RoleUserInput.cs b/Elight.Logic/SystemModel/App_Sys_RoleUserInput.cs
index f86e17e..a4f0591 100644
--- a/Elight.Logic/SystemModel/App_Sys_RoleUserInput.cs
+++ b/Elight.Logic/SystemModel/App_Sys_RoleUserInput.cs
@@ -15,19 +15,19 @@ namespace Elight.Logic.SystemModel
/// 琛ㄩ噷鐢ㄦ埛鍞竴鏍囪瘑绗︼紝鑷闀縄d
///
[DataMember]
- public string Id { get; set; }
+ public string? Id { get; set; }
///
/// 鍗曚綅缂栫爜
///
[DataMember]
- public string roleId { get; set; }
+ public string? roleId { get; set; }
///
/// 瑙掕壊鐢ㄦ埛Id
///
[DataMember]
- public string roleuserId { get; set; }
+ public string? roleuserId { get; set; }
}
}
diff --git a/Elight.Logic/SystemModel/App_Sys_UnitInput.cs b/Elight.Logic/SystemModel/App_Sys_UnitInput.cs
index c76f415..a8f2554 100644
--- a/Elight.Logic/SystemModel/App_Sys_UnitInput.cs
+++ b/Elight.Logic/SystemModel/App_Sys_UnitInput.cs
@@ -15,29 +15,29 @@ namespace Elight.Logic.SystemModel
/// 琛ㄩ噷鐢ㄦ埛鍞竴鏍囪瘑绗︼紝鑷闀縄d
///
[DataMember]
- public string Id { get; set; }
+ public string? Id { get; set; }
///
/// 鐖剁骇
///
[DataMember]
- public string pid { get; set; }
+ public string? pid { get; set; }
///
/// 鍗曚綅缂栫爜
///
[DataMember]
- public string unitCode { get; set; }
+ public string? unitCode { get; set; }
///
/// 鍗曚綅鍚嶇О
///
[DataMember]
- public string unitname { get; set; }
+ public string? unitname { get; set; }
///
/// 鍗曚綅绠绉
///
[DataMember]
- public string unitjc { get; set; }
+ public string? unitjc { get; set; }
}
}
diff --git a/Elight.Logic/SystemModel/App_Sys_UnitTree.cs b/Elight.Logic/SystemModel/App_Sys_UnitTree.cs
index d608967..7c4b199 100644
--- a/Elight.Logic/SystemModel/App_Sys_UnitTree.cs
+++ b/Elight.Logic/SystemModel/App_Sys_UnitTree.cs
@@ -18,48 +18,48 @@ namespace Elight.Logic.SystemModel
///
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
[DataMember]
- public string Id { get; set; }
+ public string? Id { get; set; }
///
/// 鐖剁骇
///
[DataMember]
- public string pid { get; set; }
+ public string? pid { get; set; }
///
/// 鍗曚綅缂栫爜
///
[DataMember]
- public string unitCode { get; set; }
+ public string? unitCode { get; set; }
///
/// 鍗曚綅鍚嶇О
///
[DataMember]
- public string unitname { get; set; }
+ public string? unitname { get; set; }
///
/// 鍗曚綅绠绉
///
[DataMember]
- public string unitjc { get; set; }
+ public string? unitjc { get; set; }
///
/// 鏄惁鍒犻櫎 0鍚︼紝1鏄
///
[DataMember]
- public int IsDelete { get; set; }
+ public int? IsDelete { get; set; }
///
/// 鍒涘缓浜篒d
///
[DataMember]
- public string createuserId { get; set; }
+ public string? createuserId { get; set; }
///
/// 鍒涘缓浜
///
[DataMember]
- public string createusername { get; set; }
+ public string? createusername { get; set; }
///
/// 鍒涘缓鏃堕棿
///
@@ -67,7 +67,7 @@ namespace Elight.Logic.SystemModel
public DateTime? createtime { get; set; } = DateTime.Now;
[SqlSugar.SugarColumn(IsIgnore = true)]
- public List Child { get; set; }
+ public List? Child { get; set; }
}
}
diff --git a/Elight.Logic/SystemModel/App_Sys_UserInput.cs b/Elight.Logic/SystemModel/App_Sys_UserInput.cs
index 6812e5d..e878f74 100644
--- a/Elight.Logic/SystemModel/App_Sys_UserInput.cs
+++ b/Elight.Logic/SystemModel/App_Sys_UserInput.cs
@@ -15,61 +15,61 @@ namespace Elight.Logic.SystemModel
/// 琛ㄩ噷鐢ㄦ埛鍞竴鏍囪瘑绗︼紝鑷闀縄d
///
[DataMember]
- public string Id { get; set; }
+ public string? Id { get; set; }
///
/// 鍗曚綅缂栫爜
///
[DataMember]
- public string unitCode { get; set; }
+ public string? unitCode { get; set; }
///
/// 閮ㄩ棬
///
[DataMember]
- public string department { get; set; }
+ public string? department { get; set; }
///
/// 瀵嗙爜
///
[DataMember]
- public string Password { get; set; }
+ public string? Password { get; set; }
///
/// 鍚嶇О
///
[DataMember]
- public string name { get; set; }
+ public string? name { get; set; }
///
/// 鑱屽姟
///
[DataMember]
- public string duties { get; set; }
+ public string? duties { get; set; }
///
/// 鐢佃瘽鍙风爜
///
[DataMember]
- public string phone { get; set; }
+ public string? phone { get; set; }
///
/// 韬唤
///
[DataMember]
- public string identity { get; set; }
+ public string? identity { get; set; }
///
/// 韬唤璇佸彿鐮
///
[DataMember]
- public string cardId { get; set; }
+ public string? cardId { get; set; }
///
/// 寰俊Id
///
[DataMember]
- public string wechatId { get; set; }
+ public string? wechatId { get; set; }
///
/// 璐﹀彿绫诲瀷0锛氱郴缁燂紝1锛欰PP
@@ -93,7 +93,7 @@ namespace Elight.Logic.SystemModel
/// 澶村儚鍦板潃
///
[DataMember]
- public string photo { get; set; }
+ public string? photo { get; set; }
///
/// 鎬у埆 0:濂 1:鐢
diff --git a/Elight.Utility/Paging.cs b/Elight.Utility/Paging.cs
index c979b6c..03d8a75 100644
--- a/Elight.Utility/Paging.cs
+++ b/Elight.Utility/Paging.cs
@@ -102,13 +102,13 @@ namespace Elight.Utility.Code
/// 鎺掑簭鍚
///
[DataMember]
- public string SortName { get; set; }
+ public string? SortName { get; set; }
///
/// 鎺掑簭鏂瑰紡
///
[DataMember]
- public string SortType { get; set; }
+ public string? SortType { get; set; }
///
/// 瀹炲悕鏁伴噺