商品SKU不可售或不存在
This commit is contained in:
@@ -105,7 +105,7 @@ public class UProductServiceImpl extends ServiceImpl<ProductMapper, Product> imp
|
|||||||
}
|
}
|
||||||
Integer isSaleTime = calcIsSaleTime(group.getUseTime(), group.getSaleStartTime(), group.getSaleEndTime());
|
Integer isSaleTime = calcIsSaleTime(group.getUseTime(), group.getSaleStartTime(), group.getSaleEndTime());
|
||||||
productList.parallelStream().forEach(product -> {
|
productList.parallelStream().forEach(product -> {
|
||||||
product.setIsSaleTime(isSaleTime);
|
product.setIsSaleTime(isSaleTime);
|
||||||
});
|
});
|
||||||
group.setProductList(productList);
|
group.setProductList(productList);
|
||||||
}
|
}
|
||||||
@@ -137,11 +137,12 @@ public class UProductServiceImpl extends ServiceImpl<ProductMapper, Product> imp
|
|||||||
.eq(ProdSku::getIsGrounding, YesNoEnum.YES.value())
|
.eq(ProdSku::getIsGrounding, YesNoEnum.YES.value())
|
||||||
.eq(ProdSku::getSpecInfo, specInfo)
|
.eq(ProdSku::getSpecInfo, specInfo)
|
||||||
, ShopProductSkuInfoVo.class);
|
, 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 null;
|
||||||
return data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user