feat(geo): add tenant/merchant/store geocode fallback and retry workflow
All checks were successful
Build and Deploy TenantApi / build-and-deploy (push) Successful in 43s

This commit is contained in:
2026-02-19 17:13:00 +08:00
parent ad245078a2
commit 53f7c54c82
33 changed files with 9514 additions and 11 deletions

View File

@@ -2468,6 +2468,31 @@ namespace TakeoutSaaS.Infrastructure.Migrations
.HasColumnType("character varying(500)")
.HasComment("冻结原因。");
b.Property<string>("GeoFailReason")
.HasMaxLength(500)
.HasColumnType("character varying(500)")
.HasComment("地理定位失败原因。");
b.Property<DateTime?>("GeoNextRetryAt")
.HasColumnType("timestamp with time zone")
.HasComment("下次地理定位重试时间UTC。");
b.Property<int>("GeoRetryCount")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(0)
.HasComment("地理定位重试次数。");
b.Property<int>("GeoStatus")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(0)
.HasComment("地理定位状态。");
b.Property<DateTime?>("GeoUpdatedAt")
.HasColumnType("timestamp with time zone")
.HasComment("地理定位最近成功时间UTC。");
b.Property<bool>("IsFrozen")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
@@ -2557,8 +2582,13 @@ namespace TakeoutSaaS.Infrastructure.Migrations
b.HasIndex("TenantId");
b.HasIndex("Longitude", "Latitude")
.HasFilter("\"Longitude\" IS NOT NULL AND \"Latitude\" IS NOT NULL");
b.HasIndex("TenantId", "Status");
b.HasIndex("TenantId", "GeoStatus", "GeoNextRetryAt");
b.ToTable("merchants", null, t =>
{
t.HasComment("商户主体信息,承载入驻和资质审核结果。");
@@ -4935,6 +4965,31 @@ namespace TakeoutSaaS.Infrastructure.Migrations
.HasColumnType("timestamp with time zone")
.HasComment("强制关闭时间。");
b.Property<string>("GeoFailReason")
.HasMaxLength(500)
.HasColumnType("character varying(500)")
.HasComment("地理定位失败原因。");
b.Property<DateTime?>("GeoNextRetryAt")
.HasColumnType("timestamp with time zone")
.HasComment("下次地理定位重试时间UTC。");
b.Property<int>("GeoRetryCount")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(0)
.HasComment("地理定位重试次数。");
b.Property<int>("GeoStatus")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(0)
.HasComment("地理定位状态。");
b.Property<DateTime?>("GeoUpdatedAt")
.HasColumnType("timestamp with time zone")
.HasComment("地理定位最近成功时间UTC。");
b.Property<double?>("Latitude")
.HasColumnType("double precision")
.HasComment("纬度。");
@@ -5056,6 +5111,8 @@ namespace TakeoutSaaS.Infrastructure.Migrations
b.HasIndex("TenantId", "OwnershipType");
b.HasIndex("TenantId", "MerchantId", "GeoStatus", "GeoNextRetryAt");
b.ToTable("stores", null, t =>
{
t.HasComment("门店信息,承载营业配置与能力。");
@@ -6460,11 +6517,40 @@ namespace TakeoutSaaS.Infrastructure.Migrations
.HasColumnType("timestamp with time zone")
.HasComment("服务到期时间UTC。");
b.Property<string>("GeoFailReason")
.HasMaxLength(500)
.HasColumnType("character varying(500)")
.HasComment("地理定位失败原因。");
b.Property<DateTime?>("GeoNextRetryAt")
.HasColumnType("timestamp with time zone")
.HasComment("下次地理定位重试时间UTC。");
b.Property<int>("GeoRetryCount")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(0)
.HasComment("地理定位重试次数。");
b.Property<int>("GeoStatus")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(0)
.HasComment("地理定位状态。");
b.Property<DateTime?>("GeoUpdatedAt")
.HasColumnType("timestamp with time zone")
.HasComment("地理定位最近成功时间UTC。");
b.Property<string>("Industry")
.HasMaxLength(64)
.HasColumnType("character varying(64)")
.HasComment("所属行业,如餐饮、零售等。");
b.Property<double?>("Latitude")
.HasColumnType("double precision")
.HasComment("纬度信息。");
b.Property<string>("LegalEntityName")
.HasColumnType("text")
.HasComment("法人或公司主体名称。");
@@ -6473,6 +6559,10 @@ namespace TakeoutSaaS.Infrastructure.Migrations
.HasColumnType("text")
.HasComment("LOGO 图片地址。");
b.Property<double?>("Longitude")
.HasColumnType("double precision")
.HasComment("经度信息。");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
@@ -6537,6 +6627,11 @@ namespace TakeoutSaaS.Infrastructure.Migrations
b.HasIndex("ContactPhone")
.IsUnique();
b.HasIndex("GeoStatus", "GeoNextRetryAt");
b.HasIndex("Longitude", "Latitude")
.HasFilter("\"Longitude\" IS NOT NULL AND \"Latitude\" IS NOT NULL");
b.ToTable("tenants", null, t =>
{
t.HasComment("租户信息,描述租户的生命周期与基础资料。");