CartItemInterface.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. namespace addons\TinyShop\common\interfaces;
  3. use addons\TinyShop\common\forms\CartItemForm;
  4. /**
  5. * Interface CartItemInterface
  6. * @package addons\TinyShop\common\interfaces
  7. */
  8. interface CartItemInterface
  9. {
  10. /**
  11. * 购物车列表
  12. *
  13. * @param $member_id
  14. * @return mixed
  15. */
  16. public function all($member_id);
  17. /**
  18. * 创建
  19. *
  20. * @param CartItemForm $form
  21. * @return mixed
  22. */
  23. public function create(CartItemForm $form);
  24. /**
  25. * 修改购物车数量
  26. *
  27. * @param CartItemForm $form
  28. * @return mixed
  29. */
  30. public function updateNumber(CartItemForm $form);
  31. /**
  32. * 修改规格
  33. *
  34. * @param CartItemForm $form
  35. * @return mixed
  36. */
  37. public function updateSku(CartItemForm $form);
  38. /**
  39. * 删除一组
  40. *
  41. * @param array $ids
  42. * @param $member_id
  43. * @return mixed
  44. */
  45. public function deleteIds(array $ids, $member_id);
  46. /**
  47. * 清空购物车
  48. *
  49. * @param $member_id
  50. * @param bool $lose_status
  51. * @return mixed
  52. */
  53. public function clear($member_id, $lose_status = false);
  54. /**
  55. * 让sku失效
  56. *
  57. * @param $skus
  58. * @return mixed
  59. */
  60. public function loseBySkus($skus);
  61. /**
  62. * 让所有商品失效
  63. *
  64. * @param $product_id
  65. */
  66. public function loseByProductIds(array $product_idsa);
  67. }
粤ICP备19079148号