时间显示格式修改

This commit is contained in:
2022-04-21 08:56:26 +08:00
parent ca94b33d7c
commit c29cb37f8e
9 changed files with 58 additions and 26 deletions
@@ -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))