1
dengjunjie
2025-06-19 fbc6fae6c793220d0b67ac603ce9bbf22837de79
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/ObjectExtension.cs
@@ -1,5 +1,4 @@
锘縰sing SqlSugar;
using System;
锘縰sing System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
@@ -26,9 +25,8 @@
            PropertyInfo[] propertyInfos = typeof(T).GetProperties(BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance);
            foreach (var property in propertyInfos)
            {
                object value = null;
                if (!dic.TryGetValue(property.Name, out value))
                if (!dic.TryGetValue(property.Name, out value))
                {
                    if (!dic.TryGetValue(property.Name.FirstLetterToUpper(), out value))
                    {
@@ -38,11 +36,6 @@
                        }
                    }
                };
                SugarColumn? sugarColumn = property.GetCustomAttribute<SugarColumn>();
                if (sugarColumn != null && sugarColumn.IsIdentity && (value == null || value.Equals("")))
                {
                    continue;
                }
                property.SetValue(model, value?.ToString().ChangeType(property.PropertyType));
            }
            return model;