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 ||