feat: 商户冻结/解冻功能及字典缓存重构

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
MSuMshk
2026-02-04 10:46:32 +08:00
parent 754dd788ea
commit f69904e195
54 changed files with 753 additions and 1385 deletions

View File

@@ -40,9 +40,9 @@ public sealed class DictionaryGroup : MultiTenantEntityBase
public bool IsEnabled { get; set; } = true;
/// <summary>
/// 并发控制字段。
/// 并发控制字段(映射到 PostgreSQL xmin
/// </summary>
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
public uint RowVersion { get; set; }
/// <summary>
/// 字典项集合。

View File

@@ -43,9 +43,9 @@ public sealed class DictionaryItem : MultiTenantEntityBase
public string? Description { get; set; }
/// <summary>
/// 并发控制字段。
/// 并发控制字段(映射到 PostgreSQL xmin
/// </summary>
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
public uint RowVersion { get; set; }
/// <summary>
/// 导航属性:所属分组。

View File

@@ -79,7 +79,7 @@ public sealed class IdentityUser : AuditableEntityBase
public string? Avatar { get; set; }
/// <summary>
/// 并发控制字段。
/// 并发控制字段(映射到 PostgreSQL xmin
/// </summary>
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
public uint RowVersion { get; set; }
}

View File

@@ -45,8 +45,7 @@ public sealed class InventoryBatch : MultiTenantEntityBase
public int RemainingQuantity { get; set; }
/// <summary>
/// 并发控制字段。
/// 并发控制字段(映射到 PostgreSQL xmin
/// </summary>
[Timestamp]
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
public uint RowVersion { get; set; }
}

View File

@@ -91,8 +91,7 @@ public sealed class InventoryItem : MultiTenantEntityBase
public InventoryBatchConsumeStrategy BatchConsumeStrategy { get; set; } = InventoryBatchConsumeStrategy.Fifo;
/// <summary>
/// 并发控制字段。
/// 并发控制字段(映射到 PostgreSQL xmin
/// </summary>
[Timestamp]
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
public uint RowVersion { get; set; }
}

View File

@@ -45,8 +45,7 @@ public sealed class InventoryLockRecord : MultiTenantEntityBase
public InventoryLockStatus Status { get; set; } = InventoryLockStatus.Locked;
/// <summary>
/// 并发控制字段。
/// 并发控制字段(映射到 PostgreSQL xmin
/// </summary>
[Timestamp]
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
public uint RowVersion { get; set; }
}

View File

@@ -175,7 +175,7 @@ public sealed class Merchant : MultiTenantEntityBase
public DateTime? ClaimExpiresAt { get; set; }
/// <summary>
/// 并发控制版本。
/// 并发控制版本(映射到 PostgreSQL xmin
/// </summary>
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
public uint RowVersion { get; set; }
}

View File

@@ -68,5 +68,15 @@ public enum MerchantAuditAction
/// <summary>
/// 强制接管审核。
/// </summary>
ReviewForceClaimed = 12
ReviewForceClaimed = 12,
/// <summary>
/// 商户冻结。
/// </summary>
Frozen = 13,
/// <summary>
/// 商户解冻。
/// </summary>
Unfrozen = 14
}

View File

@@ -34,8 +34,7 @@ public sealed class StorePickupSetting : MultiTenantEntityBase
public int? MaxQuantityPerOrder { get; set; }
/// <summary>
/// 并发控制字段。
/// 并发控制字段(映射到 PostgreSQL xmin
/// </summary>
[Timestamp]
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
public uint RowVersion { get; set; }
}

View File

@@ -54,8 +54,7 @@ public sealed class StorePickupSlot : MultiTenantEntityBase
public bool IsEnabled { get; set; } = true;
/// <summary>
/// 并发控制字段。
/// 并发控制字段(映射到 PostgreSQL xmin
/// </summary>
[Timestamp]
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
public uint RowVersion { get; set; }
}