Commit 374130d0 by 王洁

Merge branch 'coupon-membercard'

parents 92eea1a3 3ce9a2e6
<?php
namespace Hdll\Services\MemberCard\Enum;
class CardType {
const member_card = 0;
const cash = 100;
const gift = 200;
const CARD_TYPE = [
self::member_card =>'member_card',
self::cash => 'cash',
self::gift => 'gift'
];
}
\ No newline at end of file
<?php
namespace Hdll\Services\MemberCard\Enum;
class CouponOrderStatus
{
//订单状态
const STATUS_NORMAL = 1; //待支付
const STATUS_HAVE_PAY =2; // 已经支付 //=已下单
const STATUS_PAY_EXCEPTION =3; // 支付异常或过期未付 //=关闭订单
const STATUS_PAY_REFUND =4 ; // 退款 //=已过期
}
\ No newline at end of file
......@@ -21,6 +21,10 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetOrder(int $storeId,int $id)
* @method ResultInterface deferGetOrderBySn(int $storeId,string $sn)
* @method ResultInterface deferIfUserGetCard(int $storeId,int $userId,int $escrow)
* @method ResultInterface deferGetUserCouponDetail(int $storeId ,int $couponId)
* @method ResultInterface deferSetUserCouponStatus(int $storeId,int $couponId,int $status)
* @method ResultInterface deferGetUserValidCouponNum(int $storeId,int $escrow,int $userId)
* @method ResultInterface deferIfCouponSuitOrder(int $storeId,int $userId,int $couponId,array $goods)
*/
/**
* The interface of demo service
......@@ -41,7 +45,7 @@ interface MemberCardInterface
/**
* 支付订单
* 支付订单(H5快速买单)
* @param integer $storeId
* @param string $orderSn
* @param integer $payStatus
......@@ -74,5 +78,46 @@ interface MemberCardInterface
* @param integer $escrow
* @return bool
*/
public function ifUserGetCard(int $storeId,int $userId,int $escrow);
public function ifUserGetCard(int $storeId,int $userId,int $escrow);
/**
* 查询优惠券详细信息
*
* @param integer $storeId
* @param integer $couponId
* @return void
*/
public function getUserCouponDetail(int $storeId ,int $couponId);
/**
* 根据订单状态更改 优惠券的使用的相关状态
*
* @param integer $storeId
* @param integer $couponId
* @param integer $status
* @return bool
*/
public function setUserCouponStatus(int $storeId,int $couponId,int $status);
/**
* 获取用户未失效优惠券数量
*
* @param integer $storeId
* @param integer $escrow
* @param integer $userId
* @return int
*/
public function getUserValidCouponNum(int $storeId,int $escrow,int $userId);
/**
* 判断优惠券是否适用于订单(下单的时候调用)
*
* @param integer $storeId
* @param integer $userId
* @param integer $couponId
* @param array $goods [{goodsId:totalPrice},...]
* @return bool
*/
public function ifCouponSuitOrder(int $storeId,int $userId,int $couponId,array $goods);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment