浏览代码

Merge branch 'dev' of http://124.70.149.18:10880/sunsheng/box-cost into dev

sun-pc-linux 2 月之前
父节点
当前提交
d516790430
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      boxcost/api/stages.go

+ 3 - 0
boxcost/api/stages.go

@@ -193,6 +193,9 @@ func updateStage(c *gin.Context, db *mongo.Collection, req *StageRequest) (inter
 	if err != nil {
 		return nil, fmt.Errorf("invalid planId: %v", err)
 	}
+	if len(req.Stages) == 0 {
+		return nil, fmt.Errorf("stages array cannot be empty")
+	}
 
 	// 构建更新操作
 	update := bson.M{