商品SKU不可售或不存在

This commit is contained in:
Tankaikai 2025-03-25 14:06:17 +08:00
parent 9939ef3c0d
commit 92e3514f51
1 changed files with 6 additions and 5 deletions

View File

@ -105,7 +105,7 @@ public class UProductServiceImpl extends ServiceImpl<ProductMapper, Product> imp
}
Integer isSaleTime = calcIsSaleTime(group.getUseTime(), group.getSaleStartTime(), group.getSaleEndTime());
productList.parallelStream().forEach(product -> {
product.setIsSaleTime(isSaleTime);
product.setIsSaleTime(isSaleTime);
});
group.setProductList(productList);
}
@ -137,11 +137,12 @@ public class UProductServiceImpl extends ServiceImpl<ProductMapper, Product> imp
.eq(ProdSku::getIsGrounding, YesNoEnum.YES.value())
.eq(ProdSku::getSpecInfo, specInfo)
, ShopProductSkuInfoVo.class);
if (data == null) {
throw new CzgException("商品SKU不可售或不存在");
// throw new CzgException("商品SKU不可售或不存在");
if (data != null) {
data.setStockNumber(ObjUtil.defaultIfNull(product.getStockNumber(), 0));
return data;
}
data.setStockNumber(ObjUtil.defaultIfNull(product.getStockNumber(), 0));
return data;
return null;
}
/**