商品SKU不可售或不存在
This commit is contained in:
parent
9939ef3c0d
commit
92e3514f51
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue