苍穹外卖--清空购物车
This commit is contained in:
@@ -15,4 +15,9 @@ public interface ShoppingCartService {
|
||||
查看购物车
|
||||
*/
|
||||
List<ShoppingCart> showShoppingCart();
|
||||
|
||||
/*
|
||||
清空购物车
|
||||
*/
|
||||
void cleanShoppingCart();
|
||||
}
|
||||
|
||||
@@ -104,4 +104,13 @@ public class ShoppingCartServiceImpl implements ShoppingCartService {
|
||||
|
||||
return shoppingCartMapper.list(cart);
|
||||
}
|
||||
|
||||
/*
|
||||
清空购物车
|
||||
*/
|
||||
@Override
|
||||
public void cleanShoppingCart() {
|
||||
|
||||
shoppingCartMapper.deleteByUserId(BaseContext.getCurrentId());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user