修复 任务EndTime结束时未赋值问题

This commit is contained in:
小肥羊 2025-03-12 17:03:19 +08:00
parent 17f75c975e
commit 3d7abaecd5
2 changed files with 6 additions and 1 deletions

View File

@ -193,6 +193,7 @@ namespace VideoAnalysisCore.Common
taskData.ChatAnalysisScore = gptRes?.Assessment?.Merit?.Sum(s => s.Score) ?? 0;
taskData.ErrorMessage = string.Empty;
taskData.LastEnum = RedisChannelEnum.EndTask;
taskData.EndTime = DateTime.Now;
await DbScoped.Sugar.Updateable(taskData)
.UpdateColumns(it => new
{
@ -203,6 +204,7 @@ namespace VideoAnalysisCore.Common
it.ErrorMessage,
it.TotalTokens,
it.LastEnum,
it.EndTime
}).ExecuteCommandAsync();
//NewTask();

View File

@ -101,8 +101,11 @@ namespace VideoAnalysisCore.Model
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; } = DateTime.Now;
/// <summary>
/// 任务结束时间
/// </summary>
[SugarColumn( IsNullable = true)]
public DateTime EndTime { get; set; }
public DateTime? EndTime { get; set; }
/// <summary>
/// 开始时间轴
/// </summary>