|
@@ -482,13 +482,13 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
|
|
|
//销量
|
|
|
Integer productQuantity = omsOrderItem.getProductQuantity();
|
|
|
PmsProduct pmsProduct = pmsProductMapper.selectByPrimaryKey(productId);
|
|
|
- Integer sale = pmsProduct.getSale();
|
|
|
+ Integer stock = pmsProduct.getStock();
|
|
|
//等于空
|
|
|
- if (StringUtils.isEmpty(sale)) {
|
|
|
+ if (StringUtils.isEmpty(stock)) {
|
|
|
pmsProduct.setSale(productQuantity);
|
|
|
} else {
|
|
|
- Integer sum = sale + productQuantity;
|
|
|
- pmsProduct.setSale(sum);
|
|
|
+ Integer sum = stock + productQuantity;
|
|
|
+ pmsProduct.setStock(sum);
|
|
|
}
|
|
|
pmsProductMapper.updateByPrimaryKeySelective(pmsProduct);
|
|
|
}
|