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.
50 lines
954 B
50 lines
954 B
<?php
|
|
|
|
namespace App\Service\v3\Interfaces;
|
|
|
|
interface CouponServiceInterface
|
|
{
|
|
/**
|
|
* 领取
|
|
* @return mixed
|
|
*/
|
|
public function do();
|
|
|
|
/**
|
|
* 是否已经领取
|
|
* @return mixed
|
|
*/
|
|
public function check();
|
|
|
|
/**
|
|
* 退还优惠券
|
|
* @return mixed
|
|
*/
|
|
public function undo();
|
|
|
|
/**
|
|
* 统计用户可使用优惠券数量
|
|
* @param $userId
|
|
* @return mixed
|
|
*/
|
|
public function countAvailableByUser($userId);
|
|
|
|
public function cacheTodayCouponUsed($userId, $couponId, $couponRecId);
|
|
|
|
public function allTodayCouponUsed($userId);
|
|
|
|
/**
|
|
* 订单使用优惠券
|
|
* @param $orderMainId
|
|
* @param $couponRecs
|
|
* @return mixed
|
|
*/
|
|
public function orderUseCoupons($orderMainId, $couponRecs);
|
|
|
|
/**
|
|
* 订单退还优惠券
|
|
* @param $orderMainId
|
|
* @return mixed
|
|
*/
|
|
public function orderRefundCoupons($orderMainId);
|
|
}
|