diff --git a/AntJob.Server/Services/AppService.cs b/AntJob.Server/Services/AppService.cs index b492c2e..6dcb19b 100644 --- a/AntJob.Server/Services/AppService.cs +++ b/AntJob.Server/Services/AppService.cs @@ -59,7 +59,8 @@ public AppService(IPasswordProvider passwordProvider, AntJobSetting setting, ILo // 版本和编译时间 if (app.Version.IsNullOrEmpty() || app.Version.CompareTo(model.Version) < 0) app.Version = model.Version; - if (app.CompileTime < model.Compile) app.CompileTime = model.Compile; + var compile = model.Compile.ToDateTime().ToLocalTime(); + if (app.CompileTime < compile) app.CompileTime = compile; if (app.DisplayName.IsNullOrEmpty()) app.DisplayName = model.DisplayName; app.Save(); @@ -69,7 +70,7 @@ public AppService(IPasswordProvider passwordProvider, AntJobSetting setting, ILo online.Name = model.Machine; online.ProcessId = model.ProcessId; online.Version = model.Version; - online.CompileTime = model.Compile; + online.CompileTime = compile; online.Save(); WriteHistory(app, autoReg ? "注册" : "登录", true, $"[{model.Code}/{model.Secret}]在[{model.ClientId}]登录[{app}]成功", ip); diff --git a/AntJob.Web/Areas/Ant/Controllers/AppOnlineController.cs b/AntJob.Web/Areas/Ant/Controllers/AppOnlineController.cs index 6f49c09..265f971 100644 --- a/AntJob.Web/Areas/Ant/Controllers/AppOnlineController.cs +++ b/AntJob.Web/Areas/Ant/Controllers/AppOnlineController.cs @@ -14,7 +14,7 @@ public class AppOnlineController : AntEntityController { static AppOnlineController() { - AppOnline.Meta.Table.DataTable.InsertOnly = true; + //AppOnline.Meta.Table.DataTable.InsertOnly = true; ListFields.TraceUrl(); } diff --git a/AntJob/Models/LoginModel.cs b/AntJob/Models/LoginModel.cs index fbd8612..c9c2bbe 100644 --- a/AntJob/Models/LoginModel.cs +++ b/AntJob/Models/LoginModel.cs @@ -23,8 +23,8 @@ public class LoginModel : LoginRequest ///// 版本 //public String Version { get; set; } - /// 编译时间 - public DateTime Compile { get; set; } + ///// 编译时间 + //public DateTime Compile { get; set; } } ///// 登录响应 diff --git a/AntJob/Providers/AntClient.cs b/AntJob/Providers/AntClient.cs index cdc9ab8..163971f 100644 --- a/AntJob/Providers/AntClient.cs +++ b/AntJob/Providers/AntClient.cs @@ -83,7 +83,7 @@ public override ILoginRequest BuildLoginRequest() request.DisplayName = dname; request.Machine = Environment.MachineName; request.ProcessId = Process.GetCurrentProcess().Id; - request.Compile = asmx.Compile; + //request.Compile = asmx.Compile; return request; }