update 修改所有datetimeoffset类型为datetime
This commit is contained in:
@@ -16,8 +16,8 @@ namespace Ewide.Application.Service.HouseProjectInfo.Dto
|
|||||||
public string AreaID { get; set; }
|
public string AreaID { get; set; }
|
||||||
public string AreaName { get; set; }
|
public string AreaName { get; set; }
|
||||||
public int Type { get; set; }
|
public int Type { get; set; }
|
||||||
public DateTimeOffset? CreatedTime { get; set; }
|
public DateTime? CreatedTime { get; set; }
|
||||||
public DateTimeOffset? UpdatedTime { get; set; }
|
public DateTime? UpdatedTime { get; set; }
|
||||||
public string CreatedUserId { get; set; }
|
public string CreatedUserId { get; set; }
|
||||||
public string CreatedUserName { get; set; }
|
public string CreatedUserName { get; set; }
|
||||||
public string UpdatedUserId { get; set; }
|
public string UpdatedUserId { get; set; }
|
||||||
@@ -34,7 +34,7 @@ namespace Ewide.Application.Service.HouseProjectInfo.Dto
|
|||||||
public string Note { get; set; }
|
public string Note { get; set; }
|
||||||
|
|
||||||
public int Type { get; set; }
|
public int Type { get; set; }
|
||||||
public DateTimeOffset? UpdatedTime { get; set; }
|
public DateTime? UpdatedTime { get; set; }
|
||||||
public string UpdatedUserId { get; set; }
|
public string UpdatedUserId { get; set; }
|
||||||
public string UpdatedUserName { get; set; }
|
public string UpdatedUserName { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ namespace Ewide.Application.Service.HouseProjectInfo.Dto
|
|||||||
public string AreaID { get; set; }
|
public string AreaID { get; set; }
|
||||||
public string AreaName { get; set; }
|
public string AreaName { get; set; }
|
||||||
public int Type { get; set; }
|
public int Type { get; set; }
|
||||||
public DateTimeOffset? CreatedTime { get; set; }
|
public DateTime CreatedTime { get; set; }
|
||||||
public DateTimeOffset? UpdatedTime { get; set; }
|
public DateTime UpdatedTime { get; set; }
|
||||||
public string CreatedUserId { get; set; }
|
public string CreatedUserId { get; set; }
|
||||||
public string CreatedUserName { get; set; }
|
public string CreatedUserName { get; set; }
|
||||||
public string UpdatedUserId { get; set; }
|
public string UpdatedUserId { get; set; }
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ namespace Ewide.Core
|
|||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("创建时间")]
|
[Comment("创建时间")]
|
||||||
public virtual DateTimeOffset? CreatedTime { get; set; }
|
public virtual DateTime? CreatedTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更新时间
|
/// 更新时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("更新时间")]
|
[Comment("更新时间")]
|
||||||
public virtual DateTimeOffset? UpdatedTime { get; set; }
|
public virtual DateTime? UpdatedTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建者Id
|
/// 创建者Id
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace Ewide.Core
|
|||||||
/// 操作时间
|
/// 操作时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("操作时间")]
|
[Comment("操作时间")]
|
||||||
public DateTimeOffset CreatedTime { get; set; }
|
public DateTime CreatedTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 操作人Id
|
/// 操作人Id
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ namespace Ewide.Core
|
|||||||
/// 操作时间
|
/// 操作时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("操作时间")]
|
[Comment("操作时间")]
|
||||||
public DateTimeOffset OpTime { get; set; }
|
public DateTime OpTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 操作人
|
/// 操作人
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace Ewide.Core
|
|||||||
/// 访问时间
|
/// 访问时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("访问时间")]
|
[Comment("访问时间")]
|
||||||
public DateTimeOffset VisTime { get; set; }
|
public DateTime VisTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 访问人
|
/// 访问人
|
||||||
|
|||||||
@@ -59,13 +59,13 @@ namespace Ewide.Core
|
|||||||
/// 发布时间
|
/// 发布时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("发布时间")]
|
[Comment("发布时间")]
|
||||||
public DateTimeOffset PublicTime { get; set; }
|
public DateTime PublicTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 撤回时间
|
/// 撤回时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("撤回时间")]
|
[Comment("撤回时间")]
|
||||||
public DateTimeOffset CancelTime { get; set; }
|
public DateTime CancelTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 状态(字典 0草稿 1发布 2撤回 3删除)
|
/// 状态(字典 0草稿 1发布 2撤回 3删除)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace Ewide.Core
|
|||||||
/// 阅读时间
|
/// 阅读时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("阅读时间")]
|
[Comment("阅读时间")]
|
||||||
public DateTimeOffset ReadTime { get; set; }
|
public DateTime ReadTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 状态(字典 0未读 1已读)
|
/// 状态(字典 0未读 1已读)
|
||||||
|
|||||||
@@ -30,14 +30,14 @@ namespace Ewide.Core
|
|||||||
/// 开始时间
|
/// 开始时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("开始时间")]
|
[Comment("开始时间")]
|
||||||
public DateTimeOffset BeginTime { get; set; } = DateTimeOffset.Now;
|
public DateTime BeginTime { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 结束时间
|
/// 结束时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <example>null</example>
|
/// <example>null</example>
|
||||||
[Comment("结束时间")]
|
[Comment("结束时间")]
|
||||||
public DateTimeOffset? EndTime { get; set; }
|
public DateTime? EndTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cron表达式
|
/// Cron表达式
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace Ewide.Core
|
|||||||
/// 生日
|
/// 生日
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("生日")]
|
[Comment("生日")]
|
||||||
public DateTimeOffset Birthday { get; set; }
|
public DateTime? Birthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 性别-男_1、女_2
|
/// 性别-男_1、女_2
|
||||||
@@ -93,7 +93,7 @@ namespace Ewide.Core
|
|||||||
/// 最后登录时间
|
/// 最后登录时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("最后登录时间")]
|
[Comment("最后登录时间")]
|
||||||
public DateTimeOffset LastLoginTime { get; set; }
|
public DateTime LastLoginTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 管理员类型-超级管理员_1、非管理员_2
|
/// 管理员类型-超级管理员_1、非管理员_2
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ namespace Ewide.Core
|
|||||||
//Param = JsonSerializerUtility.Serialize(context.ActionArguments),
|
//Param = JsonSerializerUtility.Serialize(context.ActionArguments),
|
||||||
//Result = JsonSerializerUtility.Serialize(actionContext.Result),
|
//Result = JsonSerializerUtility.Serialize(actionContext.Result),
|
||||||
ElapsedTime = sw.ElapsedMilliseconds,
|
ElapsedTime = sw.ElapsedMilliseconds,
|
||||||
OpTime = DateTimeOffset.Now,
|
OpTime = DateTime.Now,
|
||||||
Account = httpContext.User?.FindFirstValue(ClaimConst.CLAINM_ACCOUNT)
|
Account = httpContext.User?.FindFirstValue(ClaimConst.CLAINM_ACCOUNT)
|
||||||
};
|
};
|
||||||
await sysOpLog.InsertAsync();
|
await sysOpLog.InsertAsync();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace Ewide.Core
|
|||||||
{
|
{
|
||||||
return new[]
|
return new[]
|
||||||
{
|
{
|
||||||
new SysTimer{Id="971bc338-0c03-46d4-8113-c7738d54ea18", JobName="百度api", JobGroup="默认分组", BeginTime=DateTimeOffset.Parse("2021-03-21 00:00:00+08:00"), Interval=30, TriggerType=TriggerTypeEnum.Simple, RequestUrl="https://www.baidu.com", RequestType=RequestTypeEnum.Post, IsDeleted=false }, // 142307070910556
|
new SysTimer{Id="971bc338-0c03-46d4-8113-c7738d54ea18", JobName="百度api", JobGroup="默认分组", BeginTime=DateTime.Parse("2021-03-21 00:00:00+08:00"), Interval=30, TriggerType=TriggerTypeEnum.Simple, RequestUrl="https://www.baidu.com", RequestType=RequestTypeEnum.Post, IsDeleted=false }, // 142307070910556
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ namespace Ewide.Core
|
|||||||
{
|
{
|
||||||
return new[]
|
return new[]
|
||||||
{
|
{
|
||||||
new SysUser{Id="d0ead3dc-5096-4e15-bc6d-f640be5301ec", Account="superAdmin", Name="superAdmin", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.SuperAdmin, Birthday=DateTimeOffset.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=1, IsDeleted=false }, // 142307070910551
|
new SysUser{Id="d0ead3dc-5096-4e15-bc6d-f640be5301ec", Account="superAdmin", Name="superAdmin", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.SuperAdmin, Birthday=DateTime.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=1, IsDeleted=false }, // 142307070910551
|
||||||
new SysUser{Id="5398fb9a-2209-4ce7-a2c1-b6a983e502b5", Account="admin", Name="admin", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.SuperAdmin, Birthday=DateTimeOffset.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=2, IsDeleted=false }, // 142307070910552
|
new SysUser{Id="5398fb9a-2209-4ce7-a2c1-b6a983e502b5", Account="admin", Name="admin", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.SuperAdmin, Birthday=DateTime.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=2, IsDeleted=false }, // 142307070910552
|
||||||
new SysUser{Id="16a74726-e156-499f-9942-0e0e24ad0c3f", Account="zuohuaijun", Name="zuohuaijun", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.None, Birthday=DateTimeOffset.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=1, IsDeleted=false } // 142307070910553
|
new SysUser{Id="16a74726-e156-499f-9942-0e0e24ad0c3f", Account="zuohuaijun", Name="zuohuaijun", Password="e10adc3949ba59abbe56e057f20f883e", AdminType=AdminType.None, Birthday=DateTime.Parse("1986-07-26 00:00:00"), Phone="18020030720", Sex=1, IsDeleted=false } // 142307070910553
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,10 +115,14 @@ namespace Ewide.Core.Service
|
|||||||
var httpContext = App.GetService<IHttpContextAccessor>().HttpContext;
|
var httpContext = App.GetService<IHttpContextAccessor>().HttpContext;
|
||||||
var loginOutput = user.Adapt<LoginOutput>();
|
var loginOutput = user.Adapt<LoginOutput>();
|
||||||
|
|
||||||
loginOutput.LastLoginTime = user.LastLoginTime = DateTimeOffset.Now;
|
loginOutput.LastLoginTime = user.LastLoginTime = DateTime.Now;
|
||||||
var ip = httpContext.Request.Headers["X-Real-IP"].FirstOrDefault();
|
var ip = httpContext.Request.Headers["X-Real-IP"].FirstOrDefault();
|
||||||
loginOutput.LastLoginIp = user.LastLoginIp = string.IsNullOrEmpty(user.LastLoginIp) ? httpContext.GetRemoteIpAddressToIPv4() : ip;
|
loginOutput.LastLoginIp = user.LastLoginIp = string.IsNullOrEmpty(user.LastLoginIp) ? httpContext.GetRemoteIpAddressToIPv4() : ip;
|
||||||
|
///如果真实ip为空的话,就获取客户端主机IPv4地址
|
||||||
|
if (string.IsNullOrEmpty(ip))
|
||||||
|
{
|
||||||
|
loginOutput.LastLoginIp = httpContext.GetRemoteIpAddressToIPv4();
|
||||||
|
}
|
||||||
//var ipInfo = IpTool.Search(loginOutput.LastLoginIp);
|
//var ipInfo = IpTool.Search(loginOutput.LastLoginIp);
|
||||||
//loginOutput.LastLoginAddress = ipInfo.Country + ipInfo.Province + ipInfo.City + "[" + ipInfo.NetworkOperator + "][" + ipInfo.Latitude + ipInfo.Longitude + "]";
|
//loginOutput.LastLoginAddress = ipInfo.Country + ipInfo.Province + ipInfo.City + "[" + ipInfo.NetworkOperator + "][" + ipInfo.Latitude + ipInfo.Longitude + "]";
|
||||||
|
|
||||||
@@ -174,14 +178,34 @@ namespace Ewide.Core.Service
|
|||||||
{
|
{
|
||||||
_httpContextAccessor.SignoutToSwagger();
|
_httpContextAccessor.SignoutToSwagger();
|
||||||
//_httpContextAccessor.HttpContext.Response.Headers["access-token"] = "invalid token";
|
//_httpContextAccessor.HttpContext.Response.Headers["access-token"] = "invalid token";
|
||||||
|
var user = _userManager.User;
|
||||||
|
var userId = user.Id;
|
||||||
|
|
||||||
|
var httpContext = App.GetService<IHttpContextAccessor>().HttpContext;
|
||||||
|
var loginOutput = user.Adapt<LoginOutput>();
|
||||||
|
|
||||||
|
|
||||||
|
var ip = httpContext.Request.Headers["X-Real-IP"];
|
||||||
|
var LastLoginIp = user.LastLoginIp = string.IsNullOrEmpty(user.LastLoginIp) ? httpContext.GetRemoteIpAddressToIPv4() : ip;
|
||||||
|
var clent = Parser.GetDefault().Parse(httpContext.Request.Headers["User-Agent"]);
|
||||||
|
loginOutput.LastLoginBrowser = clent.UA.Family + clent.UA.Major;
|
||||||
|
///如果真实ip为空的话,就获取客户端主机IPv4地址
|
||||||
|
if (string.IsNullOrEmpty(ip))
|
||||||
|
{
|
||||||
|
LastLoginIp = httpContext.GetRemoteIpAddressToIPv4();
|
||||||
|
}
|
||||||
// 增加退出日志
|
// 增加退出日志
|
||||||
await new SysLogVis
|
await new SysLogVis
|
||||||
{
|
{
|
||||||
Name = "退出",
|
Name = "退出",
|
||||||
|
VisTime = DateTime.Now,
|
||||||
Success = true,
|
Success = true,
|
||||||
Message = "退出成功",
|
Message = "退出成功",
|
||||||
VisType = 2
|
VisType = 2,
|
||||||
|
Browser = loginOutput.LastLoginBrowser,
|
||||||
|
Os = loginOutput.LastLoginOs,
|
||||||
|
Ip = LastLoginIp,
|
||||||
|
Account = loginOutput.Account
|
||||||
}.InsertAsync();
|
}.InsertAsync();
|
||||||
|
|
||||||
await Task.CompletedTask;
|
await Task.CompletedTask;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace Ewide.Core.Service
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生日
|
/// 生日
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTimeOffset Birthday { get; set; }
|
public DateTime? Birthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 性别(字典 1男 2女)
|
/// 性别(字典 1男 2女)
|
||||||
@@ -73,7 +73,7 @@ namespace Ewide.Core.Service
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最后登陆时间
|
/// 最后登陆时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTimeOffset LastLoginTime { get; set; }
|
public DateTime LastLoginTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最后登陆地址
|
/// 最后登陆地址
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace Ewide.Core.Service
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 操作时间
|
/// 操作时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTimeOffset OpTime { get; set; }
|
public DateTime OpTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 操作人
|
/// 操作人
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace Ewide.Core.Service
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 访问时间
|
/// 访问时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTimeOffset VisTime { get; set; }
|
public DateTime VisTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 访问人
|
/// 访问人
|
||||||
|
|||||||
@@ -45,12 +45,12 @@ namespace Ewide.Core.Service
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发布时间
|
/// 发布时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTimeOffset PublicTime { get; set; }
|
public DateTime PublicTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 撤回时间
|
/// 撤回时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTimeOffset CancelTime { get; set; }
|
public DateTime CancelTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 状态(字典 0草稿 1发布 2撤回 3删除)
|
/// 状态(字典 0草稿 1发布 2撤回 3删除)
|
||||||
|
|||||||
@@ -39,6 +39,6 @@ namespace Ewide.Core.Service
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 阅读时间
|
/// 阅读时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTimeOffset ReadTime { get; set; }
|
public DateTime ReadTime { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ namespace Ewide.Core.Service
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 阅读时间
|
/// 阅读时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTimeOffset ReadTime { get; set; }
|
public DateTime ReadTime { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace Ewide.Core.Service.Notice
|
|||||||
await UpdatePublicInfo(notice);
|
await UpdatePublicInfo(notice);
|
||||||
// 如果是发布,则设置发布时间
|
// 如果是发布,则设置发布时间
|
||||||
if (input.Status == (int)NoticeStatus.PUBLIC)
|
if (input.Status == (int)NoticeStatus.PUBLIC)
|
||||||
notice.PublicTime = DateTimeOffset.Now;
|
notice.PublicTime = DateTime.Now;
|
||||||
var newItem = await notice.InsertNowAsync();
|
var newItem = await notice.InsertNowAsync();
|
||||||
|
|
||||||
// 通知到的人
|
// 通知到的人
|
||||||
@@ -113,7 +113,7 @@ namespace Ewide.Core.Service.Notice
|
|||||||
var notice = input.Adapt<SysNotice>();
|
var notice = input.Adapt<SysNotice>();
|
||||||
if (input.Status == (int)NoticeStatus.PUBLIC)
|
if (input.Status == (int)NoticeStatus.PUBLIC)
|
||||||
{
|
{
|
||||||
notice.PublicTime = DateTimeOffset.Now;
|
notice.PublicTime = DateTime.Now;
|
||||||
await UpdatePublicInfo(notice);
|
await UpdatePublicInfo(notice);
|
||||||
}
|
}
|
||||||
await notice.UpdateAsync();
|
await notice.UpdateAsync();
|
||||||
@@ -179,11 +179,11 @@ namespace Ewide.Core.Service.Notice
|
|||||||
|
|
||||||
if (input.Status == (int)NoticeStatus.CANCEL)
|
if (input.Status == (int)NoticeStatus.CANCEL)
|
||||||
{
|
{
|
||||||
notice.CancelTime = DateTimeOffset.Now;
|
notice.CancelTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
else if (input.Status == (int)NoticeStatus.PUBLIC)
|
else if (input.Status == (int)NoticeStatus.PUBLIC)
|
||||||
{
|
{
|
||||||
notice.PublicTime = DateTimeOffset.Now;
|
notice.PublicTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
await notice.UpdateAsync();
|
await notice.UpdateAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace Ewide.Core.Service.Notice
|
|||||||
if (noticeUser != null)
|
if (noticeUser != null)
|
||||||
{
|
{
|
||||||
noticeUser.ReadStatus = status;
|
noticeUser.ReadStatus = status;
|
||||||
noticeUser.ReadTime = DateTimeOffset.Now;
|
noticeUser.ReadTime = DateTime.Now;
|
||||||
await noticeUser.UpdateAsync();
|
await noticeUser.UpdateAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,13 +24,13 @@ namespace Ewide.Core.Service
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 开始时间
|
/// 开始时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTimeOffset BeginTime { get; set; } = DateTimeOffset.Now;
|
public DateTime BeginTime { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 结束时间
|
/// 结束时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <example>null</example>
|
/// <example>null</example>
|
||||||
public DateTimeOffset? EndTime { get; set; }
|
public DateTime? EndTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cron表达式
|
/// Cron表达式
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace Ewide.Core.Service
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生日
|
/// 生日
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual DateTimeOffset Birthday { get; set; }
|
public virtual DateTime? Birthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 性别-男_1、女_2
|
/// 性别-男_1、女_2
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ namespace Ewide.Core.Service
|
|||||||
|
|
||||||
var user = input.Adapt<SysUser>();
|
var user = input.Adapt<SysUser>();
|
||||||
await user.UpdateExcludeAsync(new[] { nameof(SysUser.Password), nameof(SysUser.Status), nameof(SysUser.AdminType) }, true);
|
await user.UpdateExcludeAsync(new[] { nameof(SysUser.Password), nameof(SysUser.Status), nameof(SysUser.AdminType) }, true);
|
||||||
|
user.UpdateIncludeNow(new[] { nameof(SysUser.Birthday) });
|
||||||
input.SysEmpParam.Id = user.Id.ToString();
|
input.SysEmpParam.Id = user.Id.ToString();
|
||||||
// 更新员工及附属机构职位信息
|
// 更新员工及附属机构职位信息
|
||||||
await _sysEmpService.AddOrUpdate(input.SysEmpParam);
|
await _sysEmpService.AddOrUpdate(input.SysEmpParam);
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ namespace Ewide.Core
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private static string GetRunTime()
|
private static string GetRunTime()
|
||||||
{
|
{
|
||||||
return FormatTime((long)(DateTimeOffset.Now - Process.GetCurrentProcess().StartTime).TotalMilliseconds);
|
return FormatTime((long)(DateTime.Now - Process.GetCurrentProcess().StartTime).TotalMilliseconds);
|
||||||
//return DateTimeUtil.FormatTime(Environment.TickCount);
|
//return DateTimeUtil.FormatTime(Environment.TickCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ namespace Ewide.EntityFramework.Core
|
|||||||
if (entity.State == EntityState.Added)
|
if (entity.State == EntityState.Added)
|
||||||
{
|
{
|
||||||
obj.Id = Guid.NewGuid().ToString();
|
obj.Id = Guid.NewGuid().ToString();
|
||||||
obj.CreatedTime = DateTimeOffset.Now;
|
obj.CreatedTime = DateTime.Now;
|
||||||
if (!string.IsNullOrEmpty(userId))
|
if (!string.IsNullOrEmpty(userId))
|
||||||
{
|
{
|
||||||
obj.CreatedUserId = userId;
|
obj.CreatedUserId = userId;
|
||||||
@@ -122,7 +122,7 @@ namespace Ewide.EntityFramework.Core
|
|||||||
}
|
}
|
||||||
else if (entity.State == EntityState.Modified)
|
else if (entity.State == EntityState.Modified)
|
||||||
{
|
{
|
||||||
obj.UpdatedTime = DateTimeOffset.Now;
|
obj.UpdatedTime = DateTime.Now;
|
||||||
obj.UpdatedUserId = userId;
|
obj.UpdatedUserId = userId;
|
||||||
obj.UpdatedUserName = userName;
|
obj.UpdatedUserName = userName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace Ewide.EntityFramework.Core
|
|||||||
if (entity.State == EntityState.Added)
|
if (entity.State == EntityState.Added)
|
||||||
{
|
{
|
||||||
obj.Id = Guid.NewGuid().ToString();
|
obj.Id = Guid.NewGuid().ToString();
|
||||||
obj.CreatedTime = DateTimeOffset.Now;
|
obj.CreatedTime = DateTime.Now;
|
||||||
if (!string.IsNullOrEmpty(userId))
|
if (!string.IsNullOrEmpty(userId))
|
||||||
{
|
{
|
||||||
obj.CreatedUserId = userId;
|
obj.CreatedUserId = userId;
|
||||||
@@ -56,7 +56,7 @@ namespace Ewide.EntityFramework.Core
|
|||||||
}
|
}
|
||||||
else if (entity.State == EntityState.Modified)
|
else if (entity.State == EntityState.Modified)
|
||||||
{
|
{
|
||||||
obj.UpdatedTime = DateTimeOffset.Now;
|
obj.UpdatedTime = DateTime.Now;
|
||||||
obj.UpdatedUserId = userId;
|
obj.UpdatedUserId = userId;
|
||||||
obj.UpdatedUserName = userName;
|
obj.UpdatedUserName = userName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="生日">
|
<a-form-model-item label="生日">
|
||||||
<a-date-picker
|
<a-date-picker
|
||||||
@change="(date) => form.birthday = date ? $moment(date).format('YYYY-MM-DD') : undefined"
|
@change="(date) => form.birthday = date ? $moment(date).format('YYYY-MM-DD') : null"
|
||||||
class="w-100-p"
|
class="w-100-p"
|
||||||
placeholder="请选择生日"
|
placeholder="请选择生日"
|
||||||
v-model="form.birthday"
|
v-model="form.birthday"
|
||||||
|
|||||||
Reference in New Issue
Block a user