修改版本

Uat_IRC_Net8
he 2026-05-12 15:24:02 +08:00
parent 14cc78cffc
commit 4fe915cfd8
6 changed files with 22291 additions and 2 deletions

View File

@ -59,6 +59,11 @@ public class SegmentationAddOrEdit
/// </summary>
public long FileSize { get; set; } = 0;
/// <summary>
/// SEGUpdateTime 更新时间
/// </summary>
public DateTime? SEGUpdateTime { get; set; }
}
public class SegmentationQuery:PageInput

View File

@ -77,8 +77,17 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
if (addOrEditSegmentation.Id != null)
{
var data= await _segmentationRepository.FirstOrDefaultNoTrackingAsync(x => x.Id == addOrEditSegmentation.Id);
if (addOrEditSegmentation.SEGUrl != data.SEGUrl)
{
addOrEditSegmentation.SEGUpdateTime = DateTime.Now;
}
else
{
addOrEditSegmentation.SEGUpdateTime = data.SEGUpdateTime;
}
await SaveSegmentationVersionAsync(new SaveSegmentationVersionAsyncInDto() { SegmentationId = addOrEditSegmentation.Id.Value,SEGUrl=addOrEditSegmentation.SEGUrl });
await SaveSegmentationVersionAsync(new SaveSegmentationVersionAsyncInDto() { SegmentationId = addOrEditSegmentation.Id.Value, SEGUrl = addOrEditSegmentation.SEGUrl });
}
var entity = await _segmentationRepository.InsertOrUpdateAsync(addOrEditSegmentation, true);
return ResponseOutput.Ok(entity.Id.ToString());
@ -98,7 +107,7 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
.OrderByDescending(x => x.Version)
.FirstOrDefaultAsync();
var startTime = maxVersion != null ? maxVersion.CreateTime : data.UpdateTime;
var startTime = maxVersion != null ? maxVersion.CreateTime :(data.SEGUpdateTime==null? DateTime.MinValue: data.SEGUpdateTime.Value);
var segmentList = await _segmentRepository
.Where(x=>x.CreateTime<= startTime)

View File

@ -60,6 +60,11 @@ public class Segmentation : BaseFullDeleteAuditEntity
[MaxLength]
public string SEGUrl { get; set; } = string.Empty;
/// <summary>
/// SEGUpdateTime 更新时间
/// </summary>
public DateTime? SEGUpdateTime { get; set; }
/// <summary>
/// 文件大小,单位字节
/// </summary>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,29 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class SEGUpdateTime : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "SEGUpdateTime",
table: "Segmentation",
type: "datetime2",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "SEGUpdateTime",
table: "Segmentation");
}
}
}

View File

@ -9505,6 +9505,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<bool>("IsSaved")
.HasColumnType("bit");
b.Property<DateTime?>("SEGUpdateTime")
.HasColumnType("datetime2");
b.Property<string>("SEGUrl")
.IsRequired()
.HasColumnType("nvarchar(max)");