update 修改所有datetimeoffset类型为datetime

This commit is contained in:
2021-04-30 11:35:08 +08:00
parent a2589676cb
commit df2e5c51fc
29 changed files with 72 additions and 47 deletions

View File

@@ -45,12 +45,12 @@ namespace Ewide.Core.Service
/// <summary>
/// 发布时间
/// </summary>
public DateTimeOffset PublicTime { get; set; }
public DateTime PublicTime { get; set; }
/// <summary>
/// 撤回时间
/// </summary>
public DateTimeOffset CancelTime { get; set; }
public DateTime CancelTime { get; set; }
/// <summary>
/// 状态(字典 0草稿 1发布 2撤回 3删除

View File

@@ -39,6 +39,6 @@ namespace Ewide.Core.Service
/// <summary>
/// 阅读时间
/// </summary>
public DateTimeOffset ReadTime { get; set; }
public DateTime ReadTime { get; set; }
}
}

View File

@@ -20,6 +20,6 @@ namespace Ewide.Core.Service
/// <summary>
/// 阅读时间
/// </summary>
public DateTimeOffset ReadTime { get; set; }
public DateTime ReadTime { get; set; }
}
}

View File

@@ -70,7 +70,7 @@ namespace Ewide.Core.Service.Notice
await UpdatePublicInfo(notice);
// 如果是发布,则设置发布时间
if (input.Status == (int)NoticeStatus.PUBLIC)
notice.PublicTime = DateTimeOffset.Now;
notice.PublicTime = DateTime.Now;
var newItem = await notice.InsertNowAsync();
// 通知到的人
@@ -113,7 +113,7 @@ namespace Ewide.Core.Service.Notice
var notice = input.Adapt<SysNotice>();
if (input.Status == (int)NoticeStatus.PUBLIC)
{
notice.PublicTime = DateTimeOffset.Now;
notice.PublicTime = DateTime.Now;
await UpdatePublicInfo(notice);
}
await notice.UpdateAsync();
@@ -179,11 +179,11 @@ namespace Ewide.Core.Service.Notice
if (input.Status == (int)NoticeStatus.CANCEL)
{
notice.CancelTime = DateTimeOffset.Now;
notice.CancelTime = DateTime.Now;
}
else if (input.Status == (int)NoticeStatus.PUBLIC)
{
notice.PublicTime = DateTimeOffset.Now;
notice.PublicTime = DateTime.Now;
}
await notice.UpdateAsync();
}

View File

@@ -82,7 +82,7 @@ namespace Ewide.Core.Service.Notice
if (noticeUser != null)
{
noticeUser.ReadStatus = status;
noticeUser.ReadTime = DateTimeOffset.Now;
noticeUser.ReadTime = DateTime.Now;
await noticeUser.UpdateAsync();
}
}