From 2db9a511ed4093202fd4a43ed9d29b7b30c06efe Mon Sep 17 00:00:00 2001 From: cjy Date: Mon, 2 Feb 2026 11:28:58 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=AD=90=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=91=A8=E6=9C=9F=E5=92=8C=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E5=91=A8=E6=9C=9F=E5=8F=AA=E5=B0=91=E6=9C=89=E4=B8=80=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/logic/contract.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/logic/contract.go b/internal/logic/contract.go index f8f52cd..0b0c541 100644 --- a/internal/logic/contract.go +++ b/internal/logic/contract.go @@ -110,7 +110,8 @@ func validateCyclePeriods(periods []int32, cycleName string) (string, error) { return msg, errors.New(msg) } if len(periods) == 0 { - return "", nil + msg := cycleName + "至少有1期" + return msg, errors.New(msg) } periodSet := make(map[int32]bool) for _, p := range periods {