创建时间判定添加

This commit is contained in:
2026-01-04 17:47:55 +08:00
parent 062dcf0488
commit 734efba764

View File

@@ -13,7 +13,7 @@ namespace Infrastructure
var types = source?.GetType();
if (types == null || context == null) return source;
BindingFlags flag = BindingFlags.Public | BindingFlags.IgnoreCase | BindingFlags.Instance;
types.GetProperty("CreatedTime", flag)?.SetValue(source, DateTime.Now, null);
types.GetProperty("CreateTime", flag)?.SetValue(source, DateTime.Now, null);
types.GetProperty("AddTime", flag)?.SetValue(source, DateTime.Now, null);
types.GetProperty("CreateBy", flag)?.SetValue(source, context.GetName(), null);