qinchulong
2025-05-27 c020f31a67fc5aa5644511bddff075f7ecc85234
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs
@@ -228,9 +228,12 @@
        {
            foreach (PropertyInfo property in properties)
            {
                SugarColumn sugarColumn = property.GetCustomAttribute<SugarColumn>();
                if (sugarColumn.IsPrimaryKey)
                    return property.Name;
                SugarColumn? sugarColumn = property.GetCustomAttribute<SugarColumn>();
                if (sugarColumn != null)
                {
                    if (sugarColumn.IsPrimaryKey)
                        return property.Name;
                }
            }
            return null;
        }