From b5864a4fd5ef36f6937503174e5fba69852f7574 Mon Sep 17 00:00:00 2001 From: yong <81541387@qq.com> Date: Mon, 4 Nov 2024 19:46:13 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E8=A1=A8=E7=BB=93=E6=9E=84=E6=97=B6=E7=9A=84=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E6=A3=80=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin.NET.Core/SqlSugar/SqlSugarSetup.cs | 142 +++++++++++++++++- 1 file changed, 134 insertions(+), 8 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs index d4d891b7..aa3cb9bd 100644 --- a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs +++ b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs @@ -4,8 +4,11 @@ // // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! +using Newtonsoft.Json; +using System.Security.Cryptography; namespace Admin.NET.Core; + public static class SqlSugarSetup { // 多租户实例 @@ -335,14 +338,17 @@ public static class SqlSugarSetup entityTypes = entityTypes.Where(u => u.GetCustomAttribute()?.configId.ToString() == config.ConfigId.ToString()).ToList(); // 自定义的库 int count = 0, sum = entityTypes.Count; - foreach (var entityType in entityTypes) + TableUpdateCheck.Single(config.ConnectionString, entityTypes).TryUpdate(() => { - Console.WriteLine($"创建表 {entityType} ({config.ConfigId} - {++count}/{sum})"); - if (entityType.GetCustomAttribute() == null) - dbProvider.CodeFirst.InitTables(entityType); - else - dbProvider.CodeFirst.SplitTables().InitTables(entityType); - } + foreach (var entityType in entityTypes) + { + Console.WriteLine($"创建表 {entityType} ({config.ConfigId} - {++count}/{sum})"); + if (entityType.GetCustomAttribute() == null) + dbProvider.CodeFirst.InitTables(entityType); + else + dbProvider.CodeFirst.SplitTables().InitTables(entityType); + } + }); } // 初始化种子数据 @@ -539,4 +545,124 @@ public static class SqlSugarSetup } } } -} \ No newline at end of file +} +public class TableUpdateCheck +{ + public TableUpdateCheck(string sqlConnectionStr = null, List tableList = null) + { + this._sqlConnectionStr = sqlConnectionStr; + this._tableList = tableList ?? new List(); + } + + public string TableName { get; set; } + public List AttributeList { get; set; } = new List(); + + public List ColumnList = new List(); + + public class TableInfColumnM + { + public string ColumnName { get; set; } + public List AttributeList { get; set; } = new List(); + } + [JsonIgnore] public List ConfigList { get; set; } = new List(); + + [JsonIgnore] private string _sqlConnectionStr; + [JsonIgnore] private string _configFilePath = null; + [JsonIgnore] + public string ConfigFilePath => _configFilePath ??= _configFilePath = + Path.Combine(System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase, @"TableHash\" + calculateHasByStr(calculateHasByStr(_sqlConnectionStr) + "0a") + ".bin"); + [JsonIgnore] private List _tableList { get; set; } = null; + + [JsonIgnore] private string _tableHashStr; + [JsonIgnore] public string TableHashStr => _tableHashStr ??= _tableHashStr = _tableList.Select(t => Parse(t).ToHash()).Aggregate((a, b) => a + "," + b); + + public bool TryUpdate(Action updateAction) + { + if (CheckUpdateTable()) + { + updateAction?.Invoke(); + UpdateTableFinish(); + return true; + } + return false; + } + + public void UpdateTableFinish() + { + Directory.CreateDirectory(Path.GetDirectoryName(ConfigFilePath)); + File.WriteAllText(ConfigFilePath, TableHashStr); + } + + public bool CheckUpdateTable() + { + try + { + if (!File.Exists(ConfigFilePath)) + { + return true; + } + var oldHashStr = File.ReadAllText(ConfigFilePath); + if (oldHashStr != TableHashStr) + { + return true; + } + return false; + } + catch (Exception e) + { + return true; + } + } + + + public static TableUpdateCheck Parse(Type type) + { + TableUpdateCheck table = new TableUpdateCheck() { TableName = type.FullName }; + table.AttributeList = type.GetAttributes(true).ToList(); + var propertyList = type.GetProperties().Where(t => t.PropertyType.IsPrimitive || t.PropertyType == typeof(string)).ToList(); + table.ColumnList = propertyList.Select(t => new TableInfColumnM() + { + ColumnName = t.Name + t.PropertyType.Name, + AttributeList = t.GetAttributes(true).ToList(), + }).ToList(); + return table; + } + + + public static TableUpdateCheck Single(string sqlConnectionStr, List tableList) => new TableUpdateCheck(sqlConnectionStr, tableList); + + public static void CheckUpdateTableFinish(string sqlConnectionStr, IEnumerable types) + { + var basePath = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase; + string filePath = Path.Combine(basePath, @"TableHash\" + calculateHasByStr(calculateHasByStr(sqlConnectionStr) + "0a") + ".bin"); + Directory.CreateDirectory(Path.GetDirectoryName(filePath)); + var newHashStr = types.Select(t => Parse(t).ToHash()).Aggregate((a, b) => a + "," + b); + File.WriteAllText(filePath, newHashStr); + } + + public string ToHash() + { + var js = JsonConvert.SerializeObject(this); + var md5 = calculateHasByStr(js); + return md5; + } + + private static string calculateHasByStr(string str) + { + using (MD5 md5 = MD5.Create()) + { + byte[] inputBytes = Encoding.UTF8.GetBytes(str); + byte[] hashBytes = md5.ComputeHash(inputBytes); + + // 将字节数组转换为十六进制字符串表示的哈希值 + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < hashBytes.Length; i++) + { + sb.Append(hashBytes[i].ToString("x2")); + } + string hash = sb.ToString(); + return hash; + } + } +} + From 66faf5c493bc47c5e56560b377f8da03022de412 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Tue, 5 Nov 2024 20:37:44 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=F0=9F=98=8E=E4=BF=AE=E5=A4=8D=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E5=85=AC=E5=91=8A=E5=AD=98=E5=9C=A8=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin.NET.Core/Admin.NET.Core.csproj | 4 +- .../Admin.NET.Core/Enum/ErrorCodeEnum.cs | 2 +- .../Service/Notice/SysNoticeService.cs | 12 ++ .../Admin.NET.Core/SqlSugar/SqlSugarSetup.cs | 142 +----------------- 4 files changed, 23 insertions(+), 137 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj index d8173c61..7c53acf3 100644 --- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj +++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj @@ -40,12 +40,12 @@ - + - + diff --git a/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs b/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs index 28d8a6f8..e004ba39 100644 --- a/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs +++ b/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs @@ -110,7 +110,7 @@ public enum ErrorCodeEnum D1012, /// - /// 所属机构不在自己的数据范围内 + /// 没有权限操作该数据 /// [ErrorCodeItemMetadata("没有权限操作该数据")] D1013, diff --git a/Admin.NET/Admin.NET.Core/Service/Notice/SysNoticeService.cs b/Admin.NET/Admin.NET.Core/Service/Notice/SysNoticeService.cs index 139bff29..b4379d10 100644 --- a/Admin.NET/Admin.NET.Core/Service/Notice/SysNoticeService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Notice/SysNoticeService.cs @@ -72,6 +72,9 @@ public class SysNoticeService : IDynamicApiController, ITransient [DisplayName("更新通知公告")] public async Task UpdateNotice(UpdateNoticeInput input) { + if (input.CreateUserId != _userManager.UserId) + throw Oops.Oh(ErrorCodeEnum.D7003); + var notice = input.Adapt(); InitNoticeInfo(notice); await _sysNoticeRep.UpdateAsync(notice); @@ -87,6 +90,12 @@ public class SysNoticeService : IDynamicApiController, ITransient [DisplayName("删除通知公告")] public async Task DeleteNotice(DeleteNoticeInput input) { + var sysNotice = await _sysNoticeRep.GetByIdAsync(input.Id); + if (sysNotice.CreateUserId != _userManager.UserId) + throw Oops.Oh(ErrorCodeEnum.D7003); + if (sysNotice.Status == NoticeStatusEnum.PUBLIC) + throw Oops.Oh(ErrorCodeEnum.D7001); + await _sysNoticeRep.DeleteAsync(u => u.Id == input.Id); await _sysNoticeUserRep.DeleteAsync(u => u.NoticeId == input.Id); @@ -100,6 +109,9 @@ public class SysNoticeService : IDynamicApiController, ITransient [DisplayName("发布通知公告")] public async Task Public(NoticeInput input) { + if (!(await _sysNoticeRep.IsAnyAsync(u => u.Id == input.Id && u.CreateUserId == _userManager.UserId))) + throw Oops.Oh(ErrorCodeEnum.D7003); + // 更新发布状态和时间 await _sysNoticeRep.UpdateAsync(u => new SysNotice() { Status = NoticeStatusEnum.PUBLIC, PublicTime = DateTime.Now }, u => u.Id == input.Id); diff --git a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs index aa3cb9bd..d4d891b7 100644 --- a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs +++ b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs @@ -4,11 +4,8 @@ // // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! -using Newtonsoft.Json; -using System.Security.Cryptography; namespace Admin.NET.Core; - public static class SqlSugarSetup { // 多租户实例 @@ -338,17 +335,14 @@ public static class SqlSugarSetup entityTypes = entityTypes.Where(u => u.GetCustomAttribute()?.configId.ToString() == config.ConfigId.ToString()).ToList(); // 自定义的库 int count = 0, sum = entityTypes.Count; - TableUpdateCheck.Single(config.ConnectionString, entityTypes).TryUpdate(() => + foreach (var entityType in entityTypes) { - foreach (var entityType in entityTypes) - { - Console.WriteLine($"创建表 {entityType} ({config.ConfigId} - {++count}/{sum})"); - if (entityType.GetCustomAttribute() == null) - dbProvider.CodeFirst.InitTables(entityType); - else - dbProvider.CodeFirst.SplitTables().InitTables(entityType); - } - }); + Console.WriteLine($"创建表 {entityType} ({config.ConfigId} - {++count}/{sum})"); + if (entityType.GetCustomAttribute() == null) + dbProvider.CodeFirst.InitTables(entityType); + else + dbProvider.CodeFirst.SplitTables().InitTables(entityType); + } } // 初始化种子数据 @@ -545,124 +539,4 @@ public static class SqlSugarSetup } } } -} -public class TableUpdateCheck -{ - public TableUpdateCheck(string sqlConnectionStr = null, List tableList = null) - { - this._sqlConnectionStr = sqlConnectionStr; - this._tableList = tableList ?? new List(); - } - - public string TableName { get; set; } - public List AttributeList { get; set; } = new List(); - - public List ColumnList = new List(); - - public class TableInfColumnM - { - public string ColumnName { get; set; } - public List AttributeList { get; set; } = new List(); - } - [JsonIgnore] public List ConfigList { get; set; } = new List(); - - [JsonIgnore] private string _sqlConnectionStr; - [JsonIgnore] private string _configFilePath = null; - [JsonIgnore] - public string ConfigFilePath => _configFilePath ??= _configFilePath = - Path.Combine(System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase, @"TableHash\" + calculateHasByStr(calculateHasByStr(_sqlConnectionStr) + "0a") + ".bin"); - [JsonIgnore] private List _tableList { get; set; } = null; - - [JsonIgnore] private string _tableHashStr; - [JsonIgnore] public string TableHashStr => _tableHashStr ??= _tableHashStr = _tableList.Select(t => Parse(t).ToHash()).Aggregate((a, b) => a + "," + b); - - public bool TryUpdate(Action updateAction) - { - if (CheckUpdateTable()) - { - updateAction?.Invoke(); - UpdateTableFinish(); - return true; - } - return false; - } - - public void UpdateTableFinish() - { - Directory.CreateDirectory(Path.GetDirectoryName(ConfigFilePath)); - File.WriteAllText(ConfigFilePath, TableHashStr); - } - - public bool CheckUpdateTable() - { - try - { - if (!File.Exists(ConfigFilePath)) - { - return true; - } - var oldHashStr = File.ReadAllText(ConfigFilePath); - if (oldHashStr != TableHashStr) - { - return true; - } - return false; - } - catch (Exception e) - { - return true; - } - } - - - public static TableUpdateCheck Parse(Type type) - { - TableUpdateCheck table = new TableUpdateCheck() { TableName = type.FullName }; - table.AttributeList = type.GetAttributes(true).ToList(); - var propertyList = type.GetProperties().Where(t => t.PropertyType.IsPrimitive || t.PropertyType == typeof(string)).ToList(); - table.ColumnList = propertyList.Select(t => new TableInfColumnM() - { - ColumnName = t.Name + t.PropertyType.Name, - AttributeList = t.GetAttributes(true).ToList(), - }).ToList(); - return table; - } - - - public static TableUpdateCheck Single(string sqlConnectionStr, List tableList) => new TableUpdateCheck(sqlConnectionStr, tableList); - - public static void CheckUpdateTableFinish(string sqlConnectionStr, IEnumerable types) - { - var basePath = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase; - string filePath = Path.Combine(basePath, @"TableHash\" + calculateHasByStr(calculateHasByStr(sqlConnectionStr) + "0a") + ".bin"); - Directory.CreateDirectory(Path.GetDirectoryName(filePath)); - var newHashStr = types.Select(t => Parse(t).ToHash()).Aggregate((a, b) => a + "," + b); - File.WriteAllText(filePath, newHashStr); - } - - public string ToHash() - { - var js = JsonConvert.SerializeObject(this); - var md5 = calculateHasByStr(js); - return md5; - } - - private static string calculateHasByStr(string str) - { - using (MD5 md5 = MD5.Create()) - { - byte[] inputBytes = Encoding.UTF8.GetBytes(str); - byte[] hashBytes = md5.ComputeHash(inputBytes); - - // 将字节数组转换为十六进制字符串表示的哈希值 - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < hashBytes.Length; i++) - { - sb.Append(hashBytes[i].ToString("x2")); - } - string hash = sb.ToString(); - return hash; - } - } -} - +} \ No newline at end of file From f1cd29e38c092f1d440d696a89b032aa292ede1e Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Tue, 5 Nov 2024 23:45:29 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=F0=9F=98=8E1=E3=80=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9E=9A=E4=B8=BE=E5=AD=97=E6=AE=B5=20=202?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E8=AE=B0=E5=BD=95=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=20=203=E3=80=81=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=BE=AE=E4=BF=A1=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin.NET.Core/Admin.NET.Core.csproj | 2 +- .../Service/Dict/Dto/DictDataInput.cs | 7 +------ .../Service/Dict/Dto/DictTypeInput.cs | 7 +------ .../Service/User/Dto/UserInput.cs | 7 +------ .../Service/Wechat/SysWechatPayService.cs | 6 +++--- .../Admin.NET.Core/Utils/BaseStatusInput.cs | 19 +++++++++++++++++++ Admin.NET/Admin.NET.Web.Core/Startup.cs | 3 +++ Web/package.json | 14 +++++++------- Web/src/api-services/models/sys-oauth-user.ts | 16 ++++++++-------- Web/src/components/table/modifyRecord.vue | 2 +- 10 files changed, 45 insertions(+), 38 deletions(-) create mode 100644 Admin.NET/Admin.NET.Core/Utils/BaseStatusInput.cs diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj index 7c53acf3..dc31b2cd 100644 --- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj +++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj @@ -41,7 +41,7 @@ - + diff --git a/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictDataInput.cs b/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictDataInput.cs index b9a1b183..fa757d05 100644 --- a/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictDataInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictDataInput.cs @@ -6,13 +6,8 @@ namespace Admin.NET.Core.Service; -public class DictDataInput : BaseIdInput +public class DictDataInput : BaseStatusInput { - /// - /// 状态 - /// - [Dict("StatusEnum")] - public StatusEnum Status { get; set; } } public class PageDictDataInput : BasePageInput diff --git a/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictTypeInput.cs b/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictTypeInput.cs index fc6327e7..f311da17 100644 --- a/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictTypeInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictTypeInput.cs @@ -6,13 +6,8 @@ namespace Admin.NET.Core.Service; -public class DictTypeInput : BaseIdInput +public class DictTypeInput : BaseStatusInput { - /// - /// 状态 - /// - [Dict("StatusEnum")] - public StatusEnum Status { get; set; } } public class PageDictTypeInput : BasePageInput diff --git a/Admin.NET/Admin.NET.Core/Service/User/Dto/UserInput.cs b/Admin.NET/Admin.NET.Core/Service/User/Dto/UserInput.cs index 8d05eacf..834a013b 100644 --- a/Admin.NET/Admin.NET.Core/Service/User/Dto/UserInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/User/Dto/UserInput.cs @@ -9,13 +9,8 @@ namespace Admin.NET.Core.Service; /// /// 设置用户状态输入参数 /// -public class UserInput : BaseIdInput +public class UserInput : BaseStatusInput { - /// - /// 状态 - /// - [Dict("StatusEnum")] - public StatusEnum Status { get; set; } } /// diff --git a/Admin.NET/Admin.NET.Core/Service/Wechat/SysWechatPayService.cs b/Admin.NET/Admin.NET.Core/Service/Wechat/SysWechatPayService.cs index 7ccfd4ea..23bd09d9 100644 --- a/Admin.NET/Admin.NET.Core/Service/Wechat/SysWechatPayService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Wechat/SysWechatPayService.cs @@ -368,7 +368,7 @@ public class SysWechatPayService : IDynamicApiController, ITransient { TransactionId = input.OutTradeNumber, OutTradeNumber = request.OutTradeNumber, - OutRefundNo = request.OutTradeNumber, //每笔付款只退一次,所以这里直接用付款单号 + OutRefundNo = request.OutTradeNumber, // 每笔付款只退一次,所以这里直接用付款单号 Reason = request.Reason, Refund = input.Refund, Total = input.Total, @@ -422,7 +422,7 @@ public class SysWechatPayService : IDynamicApiController, ITransient { MerchantId = _wechatPayOptions.MerchantId, TransactionId = transactionId, - WechatpayCertificateSerialNumber = _wechatPayOptions.MerchantCertificateSerialNumber + WechatpaySerialNumber = _wechatPayOptions.MerchantCertificateSerialNumber }; var response = await _wechatTenpayClient.ExecuteGetPayTransactionByIdAsync(request); if (response.TradeState == "SUCCESS" || response.TradeState == "CLOSED") @@ -463,7 +463,7 @@ public class SysWechatPayService : IDynamicApiController, ITransient { MerchantId = _wechatPayOptions.MerchantId, OutTradeNumber = outTradeNumber, - WechatpayCertificateSerialNumber = _wechatPayOptions.MerchantCertificateSerialNumber + WechatpaySerialNumber = _wechatPayOptions.MerchantCertificateSerialNumber, }; var response = await _wechatTenpayClient.ExecuteGetPayTransactionByOutTradeNumberAsync(request); if (response.TradeState == "SUCCESS" || response.TradeState == "CLOSED") diff --git a/Admin.NET/Admin.NET.Core/Utils/BaseStatusInput.cs b/Admin.NET/Admin.NET.Core/Utils/BaseStatusInput.cs new file mode 100644 index 00000000..00ca9fcc --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Utils/BaseStatusInput.cs @@ -0,0 +1,19 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 设置状态输入参数 +/// +public class BaseStatusInput : BaseIdInput +{ + /// + /// 状态 + /// + [Dict(nameof(StatusEnum))] + public StatusEnum Status { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Web.Core/Startup.cs b/Admin.NET/Admin.NET.Web.Core/Startup.cs index 911024fe..7850e2dc 100644 --- a/Admin.NET/Admin.NET.Web.Core/Startup.cs +++ b/Admin.NET/Admin.NET.Web.Core/Startup.cs @@ -240,6 +240,9 @@ public class Startup : AppStartup "image/svg+xml" }); }); + + // 注册虚拟文件系统服务 + services.AddVirtualFileServer(); } public void Configure(IApplicationBuilder app, IWebHostEnvironment env) diff --git a/Web/package.json b/Web/package.json index 5005df5c..4be97770 100644 --- a/Web/package.json +++ b/Web/package.json @@ -2,7 +2,7 @@ "name": "admin.net.pro", "type": "module", "version": "2.4.33", - "lastBuildTime": "2024.11.04", + "lastBuildTime": "2024.11.05", "description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架", "author": "zuohuaijun", "license": "MIT", @@ -20,7 +20,7 @@ "@microsoft/signalr": "^8.0.7", "@vue-office/docx": "^1.6.2", "@vue-office/excel": "^1.7.11", - "@vue-office/pdf": "^2.0.7", + "@vue-office/pdf": "^2.0.8", "@vueuse/core": "^11.2.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.12", @@ -35,7 +35,7 @@ "echarts-wordcloud": "^2.1.0", "element-plus": "^2.8.7", "exceljs": "^4.4.0", - "ezuikit-js": "^8.1.1-alpha.2", + "ezuikit-js": "^8.1.1-alpha.3", "gcoord": "^1.0.6", "js-cookie": "^3.0.5", "js-table2excel": "^1.1.2", @@ -71,7 +71,7 @@ "vue-router": "^4.4.5", "vue-signature-pad": "^3.0.2", "vue3-tree-org": "^4.2.2", - "vxe-pc-ui": "^4.2.38", + "vxe-pc-ui": "^4.2.40", "vxe-table": "^4.7.59", "vxe-table-plugin-element": "^4.0.4", "vxe-table-plugin-export-xlsx": "^4.0.7", @@ -85,15 +85,15 @@ "@types/node": "^20.16.5", "@types/nprogress": "^0.2.3", "@types/sortablejs": "^1.15.8", - "@typescript-eslint/eslint-plugin": "^8.12.2", - "@typescript-eslint/parser": "^8.12.2", + "@typescript-eslint/eslint-plugin": "^8.13.0", + "@typescript-eslint/parser": "^8.13.0", "@vitejs/plugin-vue": "^5.1.4", "@vitejs/plugin-vue-jsx": "^4.0.1", "@vue/compiler-sfc": "^3.5.12", "code-inspector-plugin": "^0.17.7", "eslint": "^9.14.0", "eslint-plugin-vue": "^9.29.1", - "globals": "^15.11.0", + "globals": "^15.12.0", "less": "^4.2.0", "prettier": "^3.3.3", "rollup-plugin-visualizer": "^5.12.0", diff --git a/Web/src/api-services/models/sys-oauth-user.ts b/Web/src/api-services/models/sys-oauth-user.ts index d45a42c5..5e8a0503 100644 --- a/Web/src/api-services/models/sys-oauth-user.ts +++ b/Web/src/api-services/models/sys-oauth-user.ts @@ -85,14 +85,6 @@ export interface SysOAuthUser { */ isDelete?: boolean; - /** - * 邮箱 - * - * @type {string} - * @memberof SysOAuthUser - */ - email?: string | null; - /** * 系统用户Id * @@ -155,6 +147,14 @@ export interface SysOAuthUser { */ avatar?: string | null; + /** + * 邮箱 + * + * @type {string} + * @memberof SysOAuthUser + */ + email?: string | null; + /** * 手机号码 * diff --git a/Web/src/components/table/modifyRecord.vue b/Web/src/components/table/modifyRecord.vue index 13f6e294..7f3d99ed 100644 --- a/Web/src/components/table/modifyRecord.vue +++ b/Web/src/components/table/modifyRecord.vue @@ -38,7 +38,7 @@ {{ props.data.updateTime ?? '无' }} - +