diff --git a/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwServiceInstance.cs b/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwServiceInstance.cs
index 74033b4..23bcbbc 100644
--- a/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwServiceInstance.cs
+++ b/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwServiceInstance.cs
@@ -5,7 +5,7 @@ namespace Fengling.Platform.Domain.AggregatesModel.GatewayAggregate;
///
public class GwServiceInstance
{
- public long Id { get; set; }
+ public string Id { get; set; } = Guid.CreateVersion7().ToString("N");
///
/// 集群ID
diff --git a/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwTenantRoute.cs b/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwTenantRoute.cs
index c372f88..1a37f93 100644
--- a/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwTenantRoute.cs
+++ b/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwTenantRoute.cs
@@ -5,7 +5,7 @@ namespace Fengling.Platform.Domain.AggregatesModel.GatewayAggregate;
///
public class GwTenantRoute
{
- public long Id { get; set; }
+ public string Id { get; set; } = Guid.CreateVersion7().ToString("N");
///
/// 租户代码
diff --git a/Fengling.Platform.Infrastructure/IInstanceStore.cs b/Fengling.Platform.Infrastructure/IInstanceStore.cs
index 362d705..7e145aa 100644
--- a/Fengling.Platform.Infrastructure/IInstanceStore.cs
+++ b/Fengling.Platform.Infrastructure/IInstanceStore.cs
@@ -9,7 +9,7 @@ namespace Fengling.Platform.Infrastructure;
///
public interface IInstanceStore
{
- Task FindByIdAsync(long? id, CancellationToken cancellationToken = default);
+ Task FindByIdAsync(string? id, CancellationToken cancellationToken = default);
Task FindByClusterIdAsync(string clusterId, CancellationToken cancellationToken = default);
Task FindByDestinationAsync(string clusterId, string destinationId, CancellationToken cancellationToken = default);
Task> GetAllAsync(CancellationToken cancellationToken = default);
diff --git a/Fengling.Platform.Infrastructure/IRouteManager.cs b/Fengling.Platform.Infrastructure/IRouteManager.cs
index ff5d44e..4bb7826 100644
--- a/Fengling.Platform.Infrastructure/IRouteManager.cs
+++ b/Fengling.Platform.Infrastructure/IRouteManager.cs
@@ -9,7 +9,7 @@ namespace Fengling.Platform.Infrastructure;
///
public interface IRouteManager
{
- Task FindByIdAsync(long? id, CancellationToken cancellationToken = default);
+ Task FindByIdAsync(string? id, CancellationToken cancellationToken = default);
Task FindByTenantCodeAsync(string tenantCode, CancellationToken cancellationToken = default);
Task> GetAllAsync(CancellationToken cancellationToken = default);
Task CreateRouteAsync(GwTenantRoute route, CancellationToken cancellationToken = default);
diff --git a/Fengling.Platform.Infrastructure/IRouteStore.cs b/Fengling.Platform.Infrastructure/IRouteStore.cs
index 8b4bdc4..fadeff1 100644
--- a/Fengling.Platform.Infrastructure/IRouteStore.cs
+++ b/Fengling.Platform.Infrastructure/IRouteStore.cs
@@ -9,7 +9,7 @@ namespace Fengling.Platform.Infrastructure;
///
public interface IRouteStore
{
- Task FindByIdAsync(long? id, CancellationToken cancellationToken = default);
+ Task FindByIdAsync(string? id, CancellationToken cancellationToken = default);
Task FindByTenantCodeAsync(string tenantCode, CancellationToken cancellationToken = default);
Task FindByClusterIdAsync(string clusterId, CancellationToken cancellationToken = default);
Task> GetAllAsync(CancellationToken cancellationToken = default);
diff --git a/Fengling.Platform.Infrastructure/InstanceStore.cs b/Fengling.Platform.Infrastructure/InstanceStore.cs
index 7fa5157..a48c7b5 100644
--- a/Fengling.Platform.Infrastructure/InstanceStore.cs
+++ b/Fengling.Platform.Infrastructure/InstanceStore.cs
@@ -21,7 +21,7 @@ public class InstanceStore : IInstanceStore
public void Dispose() { }
- public virtual Task FindByIdAsync(long? id, CancellationToken cancellationToken = default)
+ public virtual Task FindByIdAsync(string? id, CancellationToken cancellationToken = default)
{
if (id == null) return Task.FromResult(null);
return _instances.FirstOrDefaultAsync(i => i.Id == id, cancellationToken);
diff --git a/Fengling.Platform.Infrastructure/RouteManager.cs b/Fengling.Platform.Infrastructure/RouteManager.cs
index 7df7f40..aefed8a 100644
--- a/Fengling.Platform.Infrastructure/RouteManager.cs
+++ b/Fengling.Platform.Infrastructure/RouteManager.cs
@@ -15,7 +15,7 @@ public class RouteManager : IRouteManager
_store = store;
}
- public virtual Task FindByIdAsync(long? id, CancellationToken cancellationToken = default)
+ public virtual Task FindByIdAsync(string? id, CancellationToken cancellationToken = default)
=> _store.FindByIdAsync(id, cancellationToken);
public virtual Task FindByTenantCodeAsync(string tenantCode, CancellationToken cancellationToken = default)
diff --git a/Fengling.Platform.Infrastructure/RouteStore.cs b/Fengling.Platform.Infrastructure/RouteStore.cs
index 5e4dd5d..20aeb68 100644
--- a/Fengling.Platform.Infrastructure/RouteStore.cs
+++ b/Fengling.Platform.Infrastructure/RouteStore.cs
@@ -21,7 +21,7 @@ public class RouteStore : IRouteStore
public void Dispose() { }
- public virtual Task FindByIdAsync(long? id, CancellationToken cancellationToken = default)
+ public virtual Task FindByIdAsync(string? id, CancellationToken cancellationToken = default)
{
if (id == null) return Task.FromResult(null);
return _routes.FirstOrDefaultAsync(r => r.Id == id, cancellationToken);