作业表Job增加数据字段Data,用于存储Sql模板或C#模板
This commit is contained in:
parent
1a12828605
commit
01e895547e
|
@ -1,7 +1,7 @@
|
|||
<#@ template language="C#" hostSpecific="true" debug="true" #>
|
||||
<#@ assembly name="netstandard" #>
|
||||
<#@ assembly name="$(ProjectDir)\..\..\DLL\NewLife.Core.dll" #>
|
||||
<#@ assembly name="$(ProjectDir)\..\..\DLL\XCode.dll" #>
|
||||
<#@ assembly name="$(ProjectDir)\..\DLL\NewLife.Core.dll" #>
|
||||
<#@ assembly name="$(ProjectDir)\..\DLL\XCode.dll" #>
|
||||
<#@ import namespace="System.Diagnostics" #>
|
||||
<#@ import namespace="System.IO" #>
|
||||
<#@ import namespace="XCode.Code" #>
|
||||
|
|
|
@ -50,9 +50,9 @@ namespace AntJob.Data.Entity
|
|||
if (!Dirtys[nameof(MaxIdle)]) MaxIdle = GetDefaultIdle();
|
||||
}
|
||||
|
||||
// 截断错误信息,避免过长
|
||||
var len = _.Remark.Length;
|
||||
if (!Remark.IsNullOrEmpty() && len > 0 && Remark.Length > len) Remark = Remark.Substring(0, len);
|
||||
//// 截断错误信息,避免过长
|
||||
//var len = _.Remark.Length;
|
||||
//if (!Remark.IsNullOrEmpty() && len > 0 && Remark.Length > len) Remark = Remark.Substring(0, len);
|
||||
|
||||
var app = App;
|
||||
if (isNew && app != null)
|
||||
|
|
|
@ -224,6 +224,14 @@ namespace AntJob.Data.Entity
|
|||
[BindColumn("Enable", "启用", "")]
|
||||
public Boolean Enable { get => _Enable; set { if (OnPropertyChanging(__.Enable, value)) { _Enable = value; OnPropertyChanged(__.Enable); } } }
|
||||
|
||||
private String _Data;
|
||||
/// <summary>数据。Sql模板或C#模板</summary>
|
||||
[DisplayName("数据")]
|
||||
[Description("数据。Sql模板或C#模板")]
|
||||
[DataObjectField(false, false, true, -1)]
|
||||
[BindColumn("Data", "数据。Sql模板或C#模板", "")]
|
||||
public String Data { get => _Data; set { if (OnPropertyChanging(__.Data, value)) { _Data = value; OnPropertyChanged(__.Data); } } }
|
||||
|
||||
private String _Remark;
|
||||
/// <summary>内容</summary>
|
||||
[DisplayName("内容")]
|
||||
|
@ -333,6 +341,7 @@ namespace AntJob.Data.Entity
|
|||
case __.Times: return _Times;
|
||||
case __.Speed: return _Speed;
|
||||
case __.Enable: return _Enable;
|
||||
case __.Data: return _Data;
|
||||
case __.Remark: return _Remark;
|
||||
case __.CreateUserID: return _CreateUserID;
|
||||
case __.CreateUser: return _CreateUser;
|
||||
|
@ -375,6 +384,7 @@ namespace AntJob.Data.Entity
|
|||
case __.Times: _Times = value.ToInt(); break;
|
||||
case __.Speed: _Speed = value.ToInt(); break;
|
||||
case __.Enable: _Enable = value.ToBoolean(); break;
|
||||
case __.Data: _Data = Convert.ToString(value); break;
|
||||
case __.Remark: _Remark = Convert.ToString(value); break;
|
||||
case __.CreateUserID: _CreateUserID = value.ToInt(); break;
|
||||
case __.CreateUser: _CreateUser = Convert.ToString(value); break;
|
||||
|
@ -472,6 +482,9 @@ namespace AntJob.Data.Entity
|
|||
/// <summary>启用</summary>
|
||||
public static readonly Field Enable = FindByName(__.Enable);
|
||||
|
||||
/// <summary>数据。Sql模板或C#模板</summary>
|
||||
public static readonly Field Data = FindByName(__.Data);
|
||||
|
||||
/// <summary>内容</summary>
|
||||
public static readonly Field Remark = FindByName(__.Remark);
|
||||
|
||||
|
@ -583,6 +596,9 @@ namespace AntJob.Data.Entity
|
|||
/// <summary>启用</summary>
|
||||
public const String Enable = "Enable";
|
||||
|
||||
/// <summary>数据。Sql模板或C#模板</summary>
|
||||
public const String Data = "Data";
|
||||
|
||||
/// <summary>内容</summary>
|
||||
public const String Remark = "Remark";
|
||||
|
||||
|
@ -695,6 +711,9 @@ namespace AntJob.Data.Entity
|
|||
/// <summary>启用</summary>
|
||||
Boolean Enable { get; set; }
|
||||
|
||||
/// <summary>数据。Sql模板或C#模板</summary>
|
||||
String Data { get; set; }
|
||||
|
||||
/// <summary>内容</summary>
|
||||
String Remark { get; set; }
|
||||
|
||||
|
|
|
@ -27,12 +27,12 @@ namespace AntJob.Data.Entity
|
|||
// 如果没有脏数据,则不需要进行任何处理
|
||||
if (!HasDirty) return;
|
||||
|
||||
var len = _.Data.Length;
|
||||
if (len > 0 && !Data.IsNullOrEmpty() && Data.Length > len) throw new InvalidOperationException($"字段[{__.Data}]超长");
|
||||
//var len = _.Data.Length;
|
||||
//if (len > 0 && !Data.IsNullOrEmpty() && Data.Length > len) throw new InvalidOperationException($"字段[{__.Data}]超长");
|
||||
|
||||
// 截断错误信息,避免过长
|
||||
len = _.Message.Length;
|
||||
if (!Message.IsNullOrEmpty() && len > 0 && Message.Length > len) Message = Message.Substring(0, len);
|
||||
//// 截断错误信息,避免过长
|
||||
//len = _.Message.Length;
|
||||
//if (!Message.IsNullOrEmpty() && len > 0 && Message.Length > len) Message = Message.Substring(0, len);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -174,16 +174,16 @@ namespace AntJob.Data.Entity
|
|||
/// <summary>数据。可以是Json数据,比如StatID</summary>
|
||||
[DisplayName("数据")]
|
||||
[Description("数据。可以是Json数据,比如StatID")]
|
||||
[DataObjectField(false, false, true, 8000)]
|
||||
[DataObjectField(false, false, true, -1)]
|
||||
[BindColumn("Data", "数据。可以是Json数据,比如StatID", "")]
|
||||
public String Data { get => _Data; set { if (OnPropertyChanging(__.Data, value)) { _Data = value; OnPropertyChanged(__.Data); } } }
|
||||
|
||||
private String _Message;
|
||||
/// <summary>备注</summary>
|
||||
[DisplayName("备注")]
|
||||
[Description("备注")]
|
||||
[DataObjectField(false, false, true, 2000)]
|
||||
[BindColumn("Message", "备注", "")]
|
||||
/// <summary>消息内容。异常信息或其它任务消息</summary>
|
||||
[DisplayName("消息内容")]
|
||||
[Description("消息内容。异常信息或其它任务消息")]
|
||||
[DataObjectField(false, false, true, -1)]
|
||||
[BindColumn("Message", "消息内容。异常信息或其它任务消息", "")]
|
||||
public String Message { get => _Message; set { if (OnPropertyChanging(__.Message, value)) { _Message = value; OnPropertyChanged(__.Message); } } }
|
||||
|
||||
private DateTime _CreateTime;
|
||||
|
@ -336,7 +336,7 @@ namespace AntJob.Data.Entity
|
|||
/// <summary>数据。可以是Json数据,比如StatID</summary>
|
||||
public static readonly Field Data = FindByName(__.Data);
|
||||
|
||||
/// <summary>备注</summary>
|
||||
/// <summary>消息内容。异常信息或其它任务消息</summary>
|
||||
public static readonly Field Message = FindByName(__.Message);
|
||||
|
||||
/// <summary>创建时间</summary>
|
||||
|
@ -411,7 +411,7 @@ namespace AntJob.Data.Entity
|
|||
/// <summary>数据。可以是Json数据,比如StatID</summary>
|
||||
public const String Data = "Data";
|
||||
|
||||
/// <summary>备注</summary>
|
||||
/// <summary>消息内容。异常信息或其它任务消息</summary>
|
||||
public const String Message = "Message";
|
||||
|
||||
/// <summary>创建时间</summary>
|
||||
|
@ -487,7 +487,7 @@ namespace AntJob.Data.Entity
|
|||
/// <summary>数据。可以是Json数据,比如StatID</summary>
|
||||
String Data { get; set; }
|
||||
|
||||
/// <summary>备注</summary>
|
||||
/// <summary>消息内容。异常信息或其它任务消息</summary>
|
||||
String Message { get; set; }
|
||||
|
||||
/// <summary>创建时间</summary>
|
||||
|
|
|
@ -120,6 +120,7 @@
|
|||
<Column Name="Times" DataType="Int32" Description="次数" />
|
||||
<Column Name="Speed" DataType="Int32" Description="速度" />
|
||||
<Column Name="Enable" DataType="Boolean" Description="启用" />
|
||||
<Column Name="Data" DataType="String" Length="-1" Description="数据。Sql模板或C#模板" />
|
||||
<Column Name="Remark" DataType="String" Length="2000" Description="内容" />
|
||||
<Column Name="CreateUserID" DataType="Int32" Description="创建人" />
|
||||
<Column Name="CreateUser" DataType="String" Description="创建者" />
|
||||
|
@ -155,8 +156,8 @@
|
|||
<Column Name="Server" DataType="String" Description="服务器" />
|
||||
<Column Name="ProcessID" DataType="Int32" Description="进程" />
|
||||
<Column Name="Key" DataType="String" Description="最后键" />
|
||||
<Column Name="Data" DataType="String" Length="8000" Description="数据。可以是Json数据,比如StatID" />
|
||||
<Column Name="Message" DataType="String" Length="2000" Description="备注" />
|
||||
<Column Name="Data" DataType="String" Length="-1" Description="数据。可以是Json数据,比如StatID" />
|
||||
<Column Name="Message" DataType="String" Length="-1" Description="消息内容。异常信息或其它任务消息" />
|
||||
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
|
||||
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
|
||||
</Columns>
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace AntJob.Data
|
|||
/// <summary>数据</summary>
|
||||
String Data { get; set; }
|
||||
|
||||
/// <summary>内容</summary>
|
||||
/// <summary>消息内容。异常信息或其它任务消息</summary>
|
||||
String Message { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace AntJob.Data
|
|||
/// <summary>最后键值</summary>
|
||||
public String Key { get; set; }
|
||||
|
||||
/// <summary>内容</summary>
|
||||
/// <summary>消息内容。异常信息或其它任务消息</summary>
|
||||
public String Message { get; set; }
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -280,7 +280,7 @@ Web控制台-->调度中心: 监控
|
|||
| [X组件 .NET4.0](https://github.com/NewLifeX/X_NET40) | 2002 | 存档中 | .NET4.0 | 日志、网络、RPC、序列化、缓存、Windows服务、多线程 |
|
||||
|
||||
#### 新生命开发团队
|
||||
`新生命团队始于2002年,部分开源项目具有15年以上漫长历史,源码库保留有2010年以来所有修改记录,并一直保持更新,请确保获取得到最新版本源代码`
|
||||
`新生命团队始于2002年,部分开源项目具有15年以上漫长历史,源码库保留有2010年以来所有修改记录,并一直保持更新,请确保获取得到最新版本源代码`
|
||||
网站:http://www.NewLifeX.com
|
||||
国内:http://git.NewLifeX.com
|
||||
国外:https://github.com/NewLifeX
|
||||
|
|
Loading…
Reference in New Issue