From 2dc5a2435fac2c2e50c54413bb686f7979880309 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Tue, 10 Oct 2023 15:03:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=AE=97=E6=B3=95=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/repositories/image_handle.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/repositories/image_handle.go b/service/repositories/image_handle.go index b8fb68ba..7c05432c 100644 --- a/service/repositories/image_handle.go +++ b/service/repositories/image_handle.go @@ -175,7 +175,7 @@ type ( func (l *defaultImageHandle) LogoInfoSet(ctx context.Context, in *LogoInfoSetReq) (*LogoInfoSetRes, error) { fmt.Println("算法请求轮训下标:", globalBLMServiceIndex) var bLMServicePort = l.BLMServicePorts[globalBLMServiceIndex] - if len(l.BLMServicePorts) == globalBLMServiceIndex { + if len(l.BLMServicePorts) == (globalBLMServiceIndex + 1) { globalBLMServiceIndex = 0 } else { globalBLMServiceIndex = globalBLMServiceIndex + 1 @@ -241,7 +241,7 @@ type TemplateTagColor struct { func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq) (*LogoCombineRes, error) { fmt.Println("算法请求轮训下标:", globalBLMServiceIndex) var bLMServicePort = l.BLMServicePorts[globalBLMServiceIndex] - if len(l.BLMServicePorts) == globalBLMServiceIndex { + if len(l.BLMServicePorts) == (globalBLMServiceIndex + 1) { globalBLMServiceIndex = 0 } else { globalBLMServiceIndex = globalBLMServiceIndex + 1 @@ -432,7 +432,7 @@ type ( func (l *defaultImageHandle) LogoStandard(ctx context.Context, in *LogoStandardReq) (*LogoStandardRes, error) { fmt.Println("算法请求轮训下标:", globalBLMServiceIndex) var bLMServicePort = l.BLMServicePorts[globalBLMServiceIndex] - if len(l.BLMServicePorts) == globalBLMServiceIndex { + if len(l.BLMServicePorts) == (globalBLMServiceIndex + 1) { globalBLMServiceIndex = 0 } else { globalBLMServiceIndex = globalBLMServiceIndex + 1