update 修改所有datetimeoffset类型为datetime
This commit is contained in:
@@ -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删除)
|
||||
|
||||
@@ -39,6 +39,6 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 阅读时间
|
||||
/// </summary>
|
||||
public DateTimeOffset ReadTime { get; set; }
|
||||
public DateTime ReadTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,6 @@ namespace Ewide.Core.Service
|
||||
/// <summary>
|
||||
/// 阅读时间
|
||||
/// </summary>
|
||||
public DateTimeOffset ReadTime { get; set; }
|
||||
public DateTime ReadTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user