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