You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
954 B

  1. <?php
  2. namespace App\Service\v3\Interfaces;
  3. interface CouponServiceInterface
  4. {
  5. /**
  6. * 领取
  7. * @return mixed
  8. */
  9. public function do();
  10. /**
  11. * 是否已经领取
  12. * @return mixed
  13. */
  14. public function check();
  15. /**
  16. * 退还优惠券
  17. * @return mixed
  18. */
  19. public function undo();
  20. /**
  21. * 统计用户可使用优惠券数量
  22. * @param $userId
  23. * @return mixed
  24. */
  25. public function countAvailableByUser($userId);
  26. public function cacheTodayCouponUsed($userId, $couponId, $couponRecId);
  27. public function allTodayCouponUsed($userId);
  28. /**
  29. * 订单使用优惠券
  30. * @param $orderMainId
  31. * @param $couponRecs
  32. * @return mixed
  33. */
  34. public function orderUseCoupons($orderMainId, $couponRecs);
  35. /**
  36. * 订单退还优惠券
  37. * @param $orderMainId
  38. * @return mixed
  39. */
  40. public function orderRefundCoupons($orderMainId);
  41. }