Browse Source

货源管理拦截ShopId=0的方案

master
shanji 1 year ago
parent
commit
a69f6cda1a
  1. 5
      BBWYB.Server.Business/PurchaseScheme/PurchaseSchemeBusiness.cs

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

Loading…
Cancel
Save