时间显示格式修改
This commit is contained in:
@@ -10,6 +10,7 @@ using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||
using System.Reflection;
|
||||
using EntityFramework.Exceptions.SqlServer;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using MassTransit;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using UserTypeGroup = IRaCIS.Core.Domain.Models.UserTypeGroup;
|
||||
@@ -359,6 +360,13 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||
break;
|
||||
//添加的时候,更新审计字段也赋值
|
||||
case EntityState.Added:
|
||||
|
||||
// 仓储添加时 就有id了
|
||||
if (t.Entity is Entity entity && entity.Id == Guid.Empty)
|
||||
{
|
||||
entity.Id = NewId.NextGuid();
|
||||
}
|
||||
|
||||
if (t.Entity is IAuditAdd addEntity)
|
||||
{
|
||||
if (addEntity.CreateTime == default(DateTime))
|
||||
|
||||
Reference in New Issue
Block a user