编辑商品导致库存为0的bug
This commit is contained in:
@@ -237,6 +237,7 @@ public class TbProductServiceImpl implements TbProductService {
|
||||
Threads.call(tbProductSkus, tbProductSpec);
|
||||
//组装
|
||||
TbProductVo tbProductVo = new TbProductVo();
|
||||
tbProductVo.setStockNumber(tbProduct.getStockNumber() == null ? 0.00 : tbProduct.getStockNumber());
|
||||
tbProductVo.setCategoryId(StringUtils.isNotBlank(tbProduct.getCategoryId())?Integer.valueOf(tbProduct.getCategoryId()):null);
|
||||
//单位
|
||||
// if (tbProduct.getUnitId() == null) {
|
||||
@@ -426,6 +427,7 @@ public class TbProductServiceImpl implements TbProductService {
|
||||
product.setStatus(1);
|
||||
product.setUpdatedAt(Instant.now().toEpochMilli());
|
||||
product.setImages(resources.getImages().toString());
|
||||
product.setStockNumber(resources.getStockNumber().intValue());
|
||||
if ("sku".equals(resources.getTypeEnum())) {
|
||||
List<BigDecimal> collect = resources.getSkuList().stream().map(TbProductSku::getSalePrice).sorted().collect(Collectors.toList());
|
||||
product.setLowPrice(collect.get(0));
|
||||
|
||||
Reference in New Issue
Block a user