Skip to content

Commit

Permalink
节点在线表Token字段改为500长度
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Aug 29, 2024
1 parent fe6f005 commit 6355e23
Show file tree
Hide file tree
Showing 13 changed files with 119 additions and 3 deletions.
9 changes: 9 additions & 0 deletions Stardust.Data/Configs/配置历史.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ public override Object this[String name]
#endregion

#region 扩展查询
/// <summary>根据创建时间查找</summary>
/// <param name="createTime">创建时间</param>
/// <returns>实体列表</returns>
public static IList<ConfigHistory> FindAllByCreateTime(DateTime createTime)
{
if (createTime.Year < 1000) return [];

return FindAll(_.CreateTime == createTime);
}
#endregion

#region 数据清理
Expand Down
23 changes: 23 additions & 0 deletions Stardust.Data/Entity/应用命令.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,29 @@ public override Object this[String name]
#endregion

#region 扩展查询
/// <summary>根据更新时间、应用、命令查找</summary>
/// <param name="updateTime">更新时间</param>
/// <param name="appId">应用</param>
/// <param name="command">命令</param>
/// <returns>实体列表</returns>
public static IList<AppCommand> FindAllByUpdateTimeAndAppIdAndCommand(DateTime updateTime, Int32 appId, String command)
{
if (updateTime.Year < 1000) return [];
if (appId < 0) return [];
if (command.IsNullOrEmpty()) return [];

return FindAll(_.UpdateTime == updateTime & _.AppId == appId & _.Command == command);
}

/// <summary>根据更新时间查找</summary>
/// <param name="updateTime">更新时间</param>
/// <returns>实体列表</returns>
public static IList<AppCommand> FindAllByUpdateTime(DateTime updateTime)
{
if (updateTime.Year < 1000) return [];

return FindAll(_.UpdateTime == updateTime);
}
#endregion

#region 数据清理
Expand Down
9 changes: 9 additions & 0 deletions Stardust.Data/Monitors/应用分钟统计.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ public override Object this[String name]
#endregion

#region 扩展查询
/// <summary>根据统计分钟查找</summary>
/// <param name="statTime">统计分钟</param>
/// <returns>实体列表</returns>
public static IList<AppMinuteStat> FindAllByStatTime(DateTime statTime)
{
if (statTime.Year < 1000) return [];

return FindAll(_.StatTime == statTime);
}
#endregion

#region 数据清理
Expand Down
9 changes: 9 additions & 0 deletions Stardust.Data/Monitors/应用每日统计.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@ public override Object this[String name]
#endregion

#region 扩展查询
/// <summary>根据统计日期查找</summary>
/// <param name="statDate">统计日期</param>
/// <returns>实体列表</returns>
public static IList<AppDayStat> FindAllByStatDate(DateTime statDate)
{
if (statDate.Year < 1000) return [];

return FindAll(_.StatDate == statDate);
}
#endregion

#region 数据清理
Expand Down
9 changes: 9 additions & 0 deletions Stardust.Data/Monitors/跟踪分钟统计.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@ public override Object this[String name]
#endregion

#region 扩展查询
/// <summary>根据统计分钟查找</summary>
/// <param name="statTime">统计分钟</param>
/// <returns>实体列表</returns>
public static IList<TraceMinuteStat> FindAllByStatTime(DateTime statTime)
{
if (statTime.Year < 1000) return [];

return FindAll(_.StatTime == statTime);
}
#endregion

#region 数据清理
Expand Down
9 changes: 9 additions & 0 deletions Stardust.Data/Monitors/跟踪小时统计.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,15 @@ public override Object this[String name]
#endregion

#region 扩展查询
/// <summary>根据统计小时查找</summary>
/// <param name="statTime">统计小时</param>
/// <returns>实体列表</returns>
public static IList<TraceHourStat> FindAllByStatTime(DateTime statTime)
{
if (statTime.Year < 1000) return [];

return FindAll(_.StatTime == statTime);
}
#endregion

#region 数据清理
Expand Down
2 changes: 2 additions & 0 deletions Stardust.Data/Monitors/跟踪每日统计.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ public override Object this[String name]
/// <returns>实体列表</returns>
public static IList<TraceDayStat> FindAllByStatDate(DateTime statDate)
{
if (statDate.Year < 1000) return [];

return FindAll(_.StatDate == statDate);
}
#endregion
Expand Down
2 changes: 1 addition & 1 deletion Stardust.Data/Nodes/Model.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<Column Name="Uptime" DataType="Int32" ItemType="TimeSpan" Description="开机时间。单位s" />
<Column Name="MACs" DataType="String" Length="200" Description="网卡" />
<Column Name="Processes" DataType="String" Length="2000" Description="进程列表" />
<Column Name="Token" DataType="String" Length="200" Description="令牌" />
<Column Name="Token" DataType="String" Length="500" Description="令牌" />
<Column Name="Data" DataType="String" Length="-1" Description="数据" />
<Column Name="TraceId" DataType="String" Description="追踪。最新一次查看采样,可用于关联多个片段,建立依赖关系,随线程上下文、Http、Rpc传递" Category="扩展" />
<Column Name="Creator" DataType="String" Description="创建者。服务端节点" Category="扩展" />
Expand Down
2 changes: 1 addition & 1 deletion Stardust.Data/Nodes/Stardust.htm
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ <h3>节点在线(NodeOnline)</h3>
<td>Token</td>
<td>令牌</td>
<td>String</td>
<td>200</td>
<td>500</td>
<td></td>
<td></td>
<td></td>
Expand Down
24 changes: 24 additions & 0 deletions Stardust.Data/Nodes/节点命令.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,20 @@ public override Object this[String name]
#endregion

#region 扩展查询
/// <summary>根据更新时间、节点、命令查找</summary>
/// <param name="updateTime">更新时间</param>
/// <param name="nodeId">节点</param>
/// <param name="command">命令</param>
/// <returns>实体列表</returns>
public static IList<NodeCommand> FindAllByUpdateTimeAndNodeIDAndCommand(DateTime updateTime, Int32 nodeId, String command)
{
if (updateTime.Year < 1000) return [];
if (nodeId < 0) return [];
if (command.IsNullOrEmpty()) return [];

return FindAll(_.UpdateTime == updateTime & _.NodeID == nodeId & _.Command == command);
}

/// <summary>根据节点查找</summary>
/// <param name="nodeId">节点</param>
/// <returns>实体列表</returns>
Expand All @@ -236,6 +250,16 @@ public static IList<NodeCommand> FindAllByNodeID(Int32 nodeId)

return FindAll(_.NodeID == nodeId);
}

/// <summary>根据更新时间查找</summary>
/// <param name="updateTime">更新时间</param>
/// <returns>实体列表</returns>
public static IList<NodeCommand> FindAllByUpdateTime(DateTime updateTime)
{
if (updateTime.Year < 1000) return [];

return FindAll(_.UpdateTime == updateTime);
}
#endregion

#region 数据清理
Expand Down
2 changes: 1 addition & 1 deletion Stardust.Data/Nodes/节点在线.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ public partial class NodeOnline
/// <summary>令牌</summary>
[DisplayName("令牌")]
[Description("令牌")]
[DataObjectField(false, false, true, 200)]
[DataObjectField(false, false, true, 500)]
[BindColumn("Token", "令牌", "")]
public String Token { get => _Token; set { if (OnPropertyChanging("Token", value)) { _Token = value; OnPropertyChanged("Token"); } } }

Expand Down
22 changes: 22 additions & 0 deletions Stardust.Data/Nodes/节点统计.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,28 @@ public static IList<NodeStat> FindAllByCategory(String category)

return FindAll(_.Category == category);
}

/// <summary>根据类别、统计日期查找</summary>
/// <param name="category">类别</param>
/// <param name="statDate">统计日期</param>
/// <returns>实体列表</returns>
public static IList<NodeStat> FindAllByCategoryAndStatDate(String category, DateTime statDate)
{
if (category.IsNullOrEmpty()) return [];
if (statDate.Year < 1000) return [];

return FindAll(_.Category == category & _.StatDate == statDate);
}

/// <summary>根据统计日期查找</summary>
/// <param name="statDate">统计日期</param>
/// <returns>实体列表</returns>
public static IList<NodeStat> FindAllByStatDate(DateTime statDate)
{
if (statDate.Year < 1000) return [];

return FindAll(_.StatDate == statDate);
}
#endregion

#region 数据清理
Expand Down
Binary file modified Stardust.Data/xcodetool.exe
Binary file not shown.

0 comments on commit 6355e23

Please sign in to comment.