diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
index 0d9d77e1..909a4bf5 100644
--- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
+++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
@@ -28,9 +28,9 @@
-
-
-
+
+
+
diff --git a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarExtension.cs b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarExtension.cs
index e457a99d..7a3ead78 100644
--- a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarExtension.cs
+++ b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarExtension.cs
@@ -4,7 +4,6 @@
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
-using NewLife.IO;
using NewLife.Reflection;
using System.Text.Json;
@@ -437,7 +436,7 @@ public static class SqlSugarExtension
if (handleBefore != null) foreach (var sd in seedData) handleBefore(sd);
dbProvider.QueryFilter.ClearAndBackup();
- int total, insertCount = 0, updateCount = 0;
+ int total = 0, insertCount = 0, updateCount = 0;
if (entityType.GetCustomAttribute(true) != null)
{
// 拆分表的操作需要实体类型,而通过反射很难实现
@@ -457,13 +456,10 @@ public static class SqlSugarExtension
// 按主键进行批量增加和更新
if (entityInfo.Columns.Any(u => u.IsPrimarykey))
{
- // 先修改再插入,否则会更新修改时间字段
var storage = dbProvider.StorageableByObject(seedDataList).ToStorage();
if (seedType.GetCustomAttribute() == null) // 有忽略更新种子特性时则不更新
- {
updateCount = storage.AsUpdateable.IgnoreColumns(entityInfo.Columns.Where(u => u.PropertyInfo.GetCustomAttribute() != null)
.Select(u => u.PropertyName).ToArray()).ExecuteCommand();
- }
insertCount = storage.AsInsertable.ExecuteCommand();
}
// 无主键则只进行插入
diff --git a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs
index 8bac2ba8..27936fc0 100644
--- a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs
+++ b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs
@@ -623,17 +623,18 @@ public static class SqlSugarSetup
if (entityType.GetCustomAttribute() != null)
db = iTenant.GetConnectionScope(SqlSugarConst.MainConfigId);
+ // 按主键进行批量增加和更新
if (entityInfo.Columns.Any(u => u.IsPrimarykey))
{
- // 按主键进行批量增加和更新
var storage = db.StorageableByObject(seedData).ToStorage();
- storage.AsInsertable.ExecuteCommand();
if (seedType.GetCustomAttribute() == null) // 有忽略更新种子特性时则不更新
- storage.AsUpdateable.IgnoreColumns(entityInfo.Columns.Where(c => c.PropertyInfo.GetCustomAttribute() != null).Select(c => c.PropertyName).ToArray()).ExecuteCommand();
+ storage.AsUpdateable.IgnoreColumns(entityInfo.Columns.Where(c => c.PropertyInfo.GetCustomAttribute() != null)
+ .Select(c => c.PropertyName).ToArray()).ExecuteCommand();
+ storage.AsInsertable.ExecuteCommand();
}
+ // 无主键则只进行插入
else
{
- // 无主键则只进行插入
if (!db.Queryable(entityInfo.DbTableName, entityInfo.DbTableName).Any())
db.InsertableByObject(seedData).ExecuteCommand();
}
diff --git a/Admin.NET/Admin.NET.Test/Admin.NET.Test.csproj b/Admin.NET/Admin.NET.Test/Admin.NET.Test.csproj
index 0913f3ec..ecab317e 100644
--- a/Admin.NET/Admin.NET.Test/Admin.NET.Test.csproj
+++ b/Admin.NET/Admin.NET.Test/Admin.NET.Test.csproj
@@ -14,8 +14,8 @@
-
-
+
+
compile
diff --git a/Web/package.json b/Web/package.json
index b518fcf6..efbf2faf 100644
--- a/Web/package.json
+++ b/Web/package.json
@@ -2,7 +2,7 @@
"name": "admin.net.pro",
"type": "module",
"version": "2.4.33",
- "lastBuildTime": "2025.09.15",
+ "lastBuildTime": "2025.09.16",
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
"author": "zuohuaijun",
"license": "MIT",
@@ -81,8 +81,8 @@
"vue-router": "^4.5.1",
"vue-signature-pad": "^3.0.2",
"vue3-tree-org": "^4.2.2",
- "vxe-pc-ui": "^4.9.29",
- "vxe-table": "^4.16.11",
+ "vxe-pc-ui": "^4.9.30",
+ "vxe-table": "^4.16.12",
"xe-utils": "^3.7.9",
"xlsx-js-style": "^1.2.0"
},
@@ -90,11 +90,11 @@
"@iconify/vue": "^5.0.0",
"@plugin-web-update-notification/vite": "^2.0.2",
"@types/lodash-es": "^4.17.12",
- "@types/node": "^22.18.3",
+ "@types/node": "^22.18.4",
"@types/nprogress": "^0.2.3",
"@types/sortablejs": "^1.15.8",
- "@typescript-eslint/eslint-plugin": "^8.43.0",
- "@typescript-eslint/parser": "^8.43.0",
+ "@typescript-eslint/eslint-plugin": "^8.44.0",
+ "@typescript-eslint/parser": "^8.44.0",
"@vitejs/plugin-vue": "^6.0.1",
"@vitejs/plugin-vue-jsx": "^5.1.1",
"@vue/compiler-sfc": "^3.5.21",