From a69f6cda1ab3f3ae09ae9d8edf60b7be5bc4004e Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Wed, 27 Mar 2024 15:39:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A7=E6=BA=90=E7=AE=A1=E7=90=86=E6=8B=A6?= =?UTF-8?q?=E6=88=AAShopId=3D0=E7=9A=84=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchaseScheme/PurchaseSchemeBusiness.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BBWYB.Server.Business/PurchaseScheme/PurchaseSchemeBusiness.cs b/BBWYB.Server.Business/PurchaseScheme/PurchaseSchemeBusiness.cs index 0d26122..9428cff 100644 --- a/BBWYB.Server.Business/PurchaseScheme/PurchaseSchemeBusiness.cs +++ b/BBWYB.Server.Business/PurchaseScheme/PurchaseSchemeBusiness.cs @@ -302,14 +302,15 @@ namespace BBWYB.Server.Business if (groupCount > 1) throw new BusinessException("只能对同一个spu的方案进行编辑"); - if (batchCURDSchemeRequest.AddPurchaseSchemeList.Any(ps => string.IsNullOrEmpty(ps.ProductId) || + if (batchCURDSchemeRequest.AddPurchaseSchemeList.Any(ps => ps.ShopId == 0 || + string.IsNullOrEmpty(ps.ProductId) || string.IsNullOrEmpty(ps.SkuId) || ps.PurchaseSchemeProductList.Any(psp => string.IsNullOrEmpty(psp.ProductId) || string.IsNullOrEmpty(psp.SkuId) || psp.PurchaseSchemeProductSkuList.Any(pss => string.IsNullOrEmpty(pss.ProductId) || string.IsNullOrEmpty(pss.SkuId))))) { - throw new BusinessException("新增方案缺少ProductId/SkuId"); + throw new BusinessException("新增方案缺少ShopId/ProductId/SkuId"); } if (batchCURDSchemeRequest.AddPurchaseSchemeList.Any(ps => ps.PurchaseSchemeProductList == null ||