Kaynağa Gözat

!1800 update Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs.
Merge pull request !1800 from Lzh666/N/A

zuohuaijun 1 yıl önce
ebeveyn
işleme
5fa321157c

+ 1 - 1
Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs

@@ -575,7 +575,7 @@ public static class SqlSugarSetup
         foreach (var data in seedData)
         {
             var idProperty = data.GetType().GetProperty(nameof(EntityBaseId.Id));
-            if (idProperty == null) continue;
+            if (idProperty == null || idProperty.PropertyType != typeof(Int64)) continue;
 
             var idValue = idProperty.GetValue(data);
             if (idValue == null || idValue.ToString() == "0" || string.IsNullOrWhiteSpace(idValue.ToString()))