|
@@ -143,7 +143,7 @@ public class FsStoreCartServiceImpl implements IFsStoreCartService
|
|
|
.isBuy(cartParam.getIsBuy())
|
|
|
.build();
|
|
|
storeCart.setCreateTime(new Date());
|
|
|
-// checkProductStock(cartParam.getProductId(),storeCart.getProductAttrValueId());
|
|
|
+ checkProductStock(cartParam.getProductId(),storeCart.getProductAttrValueId());
|
|
|
fsStoreCartMapper.insertFsStoreCart(storeCart);
|
|
|
return R.ok().put("id",storeCart.getId());
|
|
|
|
|
@@ -169,7 +169,7 @@ public class FsStoreCartServiceImpl implements IFsStoreCartService
|
|
|
.isBuy(0)
|
|
|
.build();
|
|
|
storeCart.setCreateTime(new Date());
|
|
|
-// checkProductStock(cartParam.getProductId(),storeCart.getProductAttrValueId());
|
|
|
+ checkProductStock(cartParam.getProductId(),storeCart.getProductAttrValueId());
|
|
|
fsStoreCartMapper.insertFsStoreCart(storeCart);
|
|
|
return R.ok().put("id",storeCart.getId());
|
|
|
}
|
|
@@ -177,7 +177,7 @@ public class FsStoreCartServiceImpl implements IFsStoreCartService
|
|
|
storeCart=cart.get(0);
|
|
|
storeCart.setCartNum(cartParam.getCartNum() + cart.get(0).getCartNum());
|
|
|
storeCart.setUpdateTime(new Date());
|
|
|
-// checkProductStock(cartParam.getProductId(),storeCart.getProductAttrValueId());
|
|
|
+ checkProductStock(cartParam.getProductId(),storeCart.getProductAttrValueId());
|
|
|
fsStoreCartMapper.updateFsStoreCart(storeCart);
|
|
|
return R.ok().put("id",storeCart.getId());
|
|
|
}
|
|
@@ -199,7 +199,7 @@ public class FsStoreCartServiceImpl implements IFsStoreCartService
|
|
|
@Override
|
|
|
public R changeNum(long userId, FsStoreCartNumParam cartParam) {
|
|
|
FsStoreCart cart=fsStoreCartMapper.selectFsStoreCartById(cartParam.getId());
|
|
|
-// checkProductStock(cart.getProductId(),cart.getProductAttrValueId());
|
|
|
+ checkProductStock(cart.getProductId(),cart.getProductAttrValueId());
|
|
|
cart.setCartNum(cartParam.getNumber());
|
|
|
cart.setUpdateTime(new Date());
|
|
|
fsStoreCartMapper.updateFsStoreCart(cart);
|