Browse Source

查询sku并触发验证时,提示具体缺示的sku

qianyi
shanji 2 years ago
parent
commit
a23f93ae86
  1. 4
      BBWY.Server.Business/PlatformSDK/JDBusiness.cs

4
BBWY.Server.Business/PlatformSDK/JDBusiness.cs

@ -174,7 +174,9 @@ namespace BBWY.Server.Business
!string.IsNullOrEmpty(searchProductSkuRequest.Sku) && !string.IsNullOrEmpty(searchProductSkuRequest.Sku) &&
skuIdList.Count() != skuList.Count()) skuIdList.Count() != skuList.Count())
{ {
throw new BusinessException($"{searchProductSkuRequest.CheckStep}-sku条件数量和查询结果数量不一致"); var targetSkuIdList = skuList.Select(s => s.Id);
var exceptSkuIdList = skuIdList.Except(targetSkuIdList);
throw new BusinessException($"{searchProductSkuRequest.CheckStep}-sku条件数量和查询结果数量不一致\r\n{string.Join(",", exceptSkuIdList)}");
} }
return skuList; return skuList;

Loading…
Cancel
Save