😎1、统一URL参数租户tid命名 2、增加rezero默认模板内容(Admin.NET 实体模板) 3、升级依赖
This commit is contained in:
parent
883bb18b16
commit
d907507cd9
@ -56,7 +56,7 @@
|
||||
<PackageReference Include="SSH.NET" Version="2024.2.0" />
|
||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.6.0.2" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1204" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1205" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
//// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
////
|
||||
//// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
////
|
||||
//// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
//using Admin.NET.Core;
|
||||
//using ReZero.SuperAPI;
|
||||
|
||||
//namespace Admin.NET.Plugin.ReZero;
|
||||
|
||||
///// <summary>
|
||||
///// 超级API文件模板表种子数据
|
||||
///// </summary>
|
||||
//public class ZeroTemplateSeedData : ISqlSugarEntitySeedData<ZeroTemplate>
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 种子数据
|
||||
// /// </summary>
|
||||
// /// <returns></returns>
|
||||
// public IEnumerable<ZeroTemplate> HasData()
|
||||
// {
|
||||
// return
|
||||
// [
|
||||
// // Admin.NET 实体模板
|
||||
// new ZeroTemplate
|
||||
// {
|
||||
// Id=1300000000101,
|
||||
// TypeId=TemplateType.Entity,
|
||||
// Title="Admin.NET 实体模板",
|
||||
// TemplateContent="// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\r\n//\r\n// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\r\n//\r\n// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!\r\n\r\nnamespace Admin.NET.Application;\r\n\r\n/// <summary>\r\n/// {{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\r\n///</summary>\r\n[SugarTable(null, \"{{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\")]\r\npublic class {{Model.ClassName}} : EntityBase\r\n{\r\n<% foreach (var item in Model.PropertyGens) {\r\n var isPrimaryKey = item.IsPrimaryKey ? \",IsPrimaryKey = true\" : \"\";\r\n var isIdentity = item.IsIdentity ? \",IsIdentity = true\" : \"\"; \r\n var isIgnore=(item.IsIgnore?\",IsIgnore = true\":\"\");\r\n var isJson=item.IsJson?\",IsJson= true\":\"\" ; \r\n var stringValue=item.PropertyType==\"string\"?\"= null!;\":\"\";//C#低版本改模版\r\n%> \r\n /// <summary>\r\n /// {{item.Description}}\r\n ///</summary>\r\n [SugarColumn(ColumnDescription = \"{{item.Description}}\" {{isPrimaryKey+isIdentity+isIgnore+isJson}}) ]\r\n public {{item.PropertyType}} {{item.PropertyName}} { get; set; } {{stringValue}}\r\n<%} %>\r\n}\r\n \r\n",
|
||||
// TemplateContentStyle="csharp",
|
||||
// Url="C:\\Admin.NET.Entity\\{0}.cs",
|
||||
// SortId=100,
|
||||
// CreateTime=DateTime.Parse("2025-03-15 00:00:00")
|
||||
// },
|
||||
// // Admin.NET 接口模板
|
||||
// new ZeroTemplate
|
||||
// {
|
||||
// Id=1300000000201,
|
||||
// TypeId=TemplateType.Api,
|
||||
// Title="Admin.NET 接口模板",
|
||||
// TemplateContent="// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\r\n//\r\n// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\r\n//\r\n// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!\r\n\r\nnamespace Admin.NET.Application;\r\n\r\n/// <summary>\r\n/// {{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\r\n///</summary>\r\n[SugarTable(null, \"{{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\")]\r\npublic class {{Model.ClassName}} : EntityBase\r\n{\r\n<% foreach (var item in Model.PropertyGens) {\r\n var isPrimaryKey = item.IsPrimaryKey ? \",IsPrimaryKey = true\" : \"\";\r\n var isIdentity = item.IsIdentity ? \",IsIdentity = true\" : \"\"; \r\n var isIgnore=(item.IsIgnore?\",IsIgnore = true\":\"\");\r\n var isJson=item.IsJson?\",IsJson= true\":\"\" ; \r\n var stringValue=item.PropertyType==\"string\"?\"= null!;\":\"\";//C#低版本改模版\r\n%> \r\n /// <summary>\r\n /// {{item.Description}}\r\n ///</summary>\r\n [SugarColumn(ColumnDescription = \"{{item.Description}}\" {{isPrimaryKey+isIdentity+isIgnore+isJson}}) ]\r\n public {{item.PropertyType}} {{item.PropertyName}} { get; set; } {{stringValue}}\r\n<%} %>\r\n}\r\n \r\n",
|
||||
// TemplateContentStyle="csharp",
|
||||
// Url="C:\\Admin.NET.Service\\{0}.cs",
|
||||
// SortId=100,
|
||||
// CreateTime=DateTime.Parse("2025-03-15 00:00:00")
|
||||
// },
|
||||
// ];
|
||||
// }
|
||||
//}
|
||||
@ -0,0 +1,44 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using ReZero.SuperAPI;
|
||||
|
||||
namespace Admin.NET.Plugin.ReZero.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化Admin.NET默认模板
|
||||
/// </summary>
|
||||
public class RezeroTemplate
|
||||
{
|
||||
public static void InitTemplate()
|
||||
{
|
||||
// Admin.NET 实体模板
|
||||
var entiyTemplate = new ZeroTemplate
|
||||
{
|
||||
Id = 1300000000100,
|
||||
TypeId = TemplateType.Entity,
|
||||
Title = "Admin.NET 实体模板",
|
||||
TemplateContent = "// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\r\n//\r\n// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\r\n//\r\n// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!\r\n\r\nnamespace Admin.NET.Application;\r\n\r\n/// <summary>\r\n/// {{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\r\n///</summary>\r\n[SugarTable(null, \"{{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\")]\r\npublic class {{Model.ClassName}} : EntityBase\r\n{\r\n<% foreach (var item in Model.PropertyGens) {\r\n var isPrimaryKey = item.IsPrimaryKey ? \",IsPrimaryKey = true\" : \"\";\r\n var isIdentity = item.IsIdentity ? \",IsIdentity = true\" : \"\"; \r\n var isIgnore=(item.IsIgnore?\",IsIgnore = true\":\"\");\r\n var isJson=item.IsJson?\",IsJson= true\":\"\" ; \r\n var stringValue=item.PropertyType==\"string\"?\"= null!;\":\"\";//C#低版本改模版\r\n%> \r\n /// <summary>\r\n /// {{item.Description}}\r\n ///</summary>\r\n [SugarColumn(ColumnDescription = \"{{item.Description}}\" {{isPrimaryKey+isIdentity+isIgnore+isJson}}) ]\r\n public {{item.PropertyType}} {{item.PropertyName}} { get; set; } {{stringValue}}\r\n<%} %>\r\n}\r\n \r\n",
|
||||
TemplateContentStyle = "csharp",
|
||||
Url = "C:\\Admin.NET.Entity\\{0}.cs",
|
||||
SortId = 100,
|
||||
CreateTime = DateTime.Parse("2025-03-15 00:00:00")
|
||||
};
|
||||
//// Admin.NET 接口模板
|
||||
//var serviceTemplate = new ZeroTemplate
|
||||
//{
|
||||
// Id = 1300000000200,
|
||||
// TypeId = TemplateType.Api,
|
||||
// Title = "Admin.NET 实体模板",
|
||||
// TemplateContent = "// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\r\n//\r\n// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\r\n//\r\n// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!\r\n\r\nnamespace Admin.NET.Application;\r\n\r\n/// <summary>\r\n/// {{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\r\n///</summary>\r\n[SugarTable(null, \"{{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\")]\r\npublic class {{Model.ClassName}} : EntityBase\r\n{\r\n<% foreach (var item in Model.PropertyGens) {\r\n var isPrimaryKey = item.IsPrimaryKey ? \",IsPrimaryKey = true\" : \"\";\r\n var isIdentity = item.IsIdentity ? \",IsIdentity = true\" : \"\"; \r\n var isIgnore=(item.IsIgnore?\",IsIgnore = true\":\"\");\r\n var isJson=item.IsJson?\",IsJson= true\":\"\" ; \r\n var stringValue=item.PropertyType==\"string\"?\"= null!;\":\"\";//C#低版本改模版\r\n%> \r\n /// <summary>\r\n /// {{item.Description}}\r\n ///</summary>\r\n [SugarColumn(ColumnDescription = \"{{item.Description}}\" {{isPrimaryKey+isIdentity+isIgnore+isJson}}) ]\r\n public {{item.PropertyType}} {{item.PropertyName}} { get; set; } {{stringValue}}\r\n<%} %>\r\n}\r\n \r\n",
|
||||
// TemplateContentStyle = "csharp",
|
||||
// Url = "C:\\Admin.NET.Service\\{0}.cs",
|
||||
// SortId = 200,
|
||||
// CreateTime = DateTime.Parse("2025-03-15 00:00:00")
|
||||
//};
|
||||
ZeroDb.Db.Storageable(entiyTemplate).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
@ -50,6 +50,9 @@ public class Startup : AppStartup
|
||||
{
|
||||
api.EnableSuperApi(superAPIOption);
|
||||
});
|
||||
|
||||
// 初始化Admin.NET默认模板
|
||||
RezeroTemplate.InitTemplate();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
"echarts": "^5.6.0",
|
||||
"echarts-gl": "^2.0.9",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "^2.9.6",
|
||||
"element-plus": "^2.9.7",
|
||||
"exceljs": "^4.4.0",
|
||||
"ezuikit-js": "^8.1.7",
|
||||
"gcoord": "^1.0.7",
|
||||
@ -46,7 +46,7 @@
|
||||
"jsplumb": "^2.15.6",
|
||||
"jwchat": "^2.0.3",
|
||||
"lodash-es": "^4.17.21",
|
||||
"md-editor-v3": "^5.4.2",
|
||||
"md-editor-v3": "^5.4.3",
|
||||
"mitt": "^3.0.1",
|
||||
"monaco-editor": "^0.52.2",
|
||||
"mqtt": "^5.10.4",
|
||||
@ -71,12 +71,12 @@
|
||||
"vue-grid-layout": "3.0.0-beta1",
|
||||
"vue-i18n": "^11.1.2",
|
||||
"vue-json-pretty": "^2.4.0",
|
||||
"vue-plugin-hiprint": "^0.0.59-beta2",
|
||||
"vue-plugin-hiprint": "^0.0.59-beta4",
|
||||
"vue-router": "^4.5.0",
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-flag-icons": "^0.0.3",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vxe-pc-ui": "^4.4.20",
|
||||
"vxe-pc-ui": "^4.4.21",
|
||||
"vxe-table": "^4.11.28",
|
||||
"vxe-table-plugin-element": "^4.0.4",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.7",
|
||||
|
||||
@ -137,7 +137,7 @@ export const useThemeConfig = defineStore('themeConfig', {
|
||||
// 网站主标题(菜单导航、浏览器当前网页标题)
|
||||
globalTitle: 'Admin.NET.Pro',
|
||||
// 网站副标题(登录页顶部文字)
|
||||
globalViceTitle: 'Admin.NET.Pro',
|
||||
globalViceTitle: 'Admin.NET',
|
||||
// 网站副标题(登录页顶部文字)
|
||||
globalViceTitleMsg: '站在巨人肩膀上的 .NET 通用权限开发框架',
|
||||
// 版权和备案文字
|
||||
|
||||
@ -229,7 +229,7 @@ const onSignIn = async () => {
|
||||
const publicKey = window.__env__.VITE_SM_PUBLIC_KEY;
|
||||
const password = sm2.doEncrypt(state.ruleForm.password, publicKey, 1);
|
||||
|
||||
const tenantid = route.query.tenantid ?? 0;
|
||||
const tenantid = route.query.tid ?? 0;
|
||||
const [err, res] = await feature(getAPI(SysAuthApi).apiSysAuthLoginPost({ ...state.ruleForm, password: password, tenantId: Number(tenantid) }));
|
||||
if (err) {
|
||||
getCaptcha(); // 重新获取验证码
|
||||
|
||||
Loading…
Reference in New Issue
Block a user