| | |
| | | } |
| | | } |
| | | |
| | | if (entityInfo.EntityValue is BaseEntity baseEntity) |
| | | if (entityInfo.EntityValue is BaseEntity entity && entityInfo.EntityValue is IBaseHistoryEntity historyEntity) |
| | | { |
| | | if (entityInfo.OperationType == DataFilterType.InsertByObject && entityInfo.PropertyName == nameof(BaseEntity.CreateDate)) |
| | | { |
| | | historyEntity.InsertTime = DateTime.Now; |
| | | } |
| | | } |
| | | else if (entityInfo.EntityValue is BaseEntity baseEntity) |
| | | { |
| | | // 鏂板鎿嶄綔 |
| | | if (entityInfo.OperationType == DataFilterType.InsertByObject && entityInfo.PropertyName == nameof(BaseEntity.CreateDate)) |
| | |
| | | baseEntity.Creater = App.User.UserName; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (entityInfo.EntityValue is IBaseHistoryEntity baseHistoryEntity) |
| | | { |
| | | if (entityInfo.OperationType == DataFilterType.InsertByObject && entityInfo.PropertyName == nameof(IBaseHistoryEntity.InsertTime)) |
| | | { |
| | | baseHistoryEntity.InsertTime = DateTime.Now; |
| | | } |
| | | } |
| | | } |