From a8e1eeb802aaff400f33a6403521973f709faed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Tue, 16 Jul 2024 00:33:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=94=99=E8=AF=AF=E8=B5=8B?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Stardust.Server/Controllers/AppController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Stardust.Server/Controllers/AppController.cs b/Stardust.Server/Controllers/AppController.cs index 6334e60d..8a00a698 100644 --- a/Stardust.Server/Controllers/AppController.cs +++ b/Stardust.Server/Controllers/AppController.cs @@ -367,13 +367,14 @@ public ServiceModel[] ResolveService([FromBody] ConsumeServiceInfo model) svc.Save(); info.Consumers = consumes.Count; + info.Save(); var models = _registryService.ResolveService(info, model, svc.Scope); // 记录应用消费服务得到的地址 - info.Address = models?.Select(e => new { e.Address, e.Address2, e.Weight }).ToJson(); + svc.Address = models?.Select(e => new { e.Address }).ToArray().ToJson(); - info.Save(); + svc.Save(); return models; }