Commit ef31ad18 by zhangsong

重构储值卡服务,接口添加主订单id

parent 01dbefc1
...@@ -10,33 +10,28 @@ ...@@ -10,33 +10,28 @@
namespace Hdll\Services\Recharge\Lib; namespace Hdll\Services\Recharge\Lib;
use Hdll\Services\Recharge\Enum\BuyCardPayStatus;
use Swoft\Core\ResultInterface; use Swoft\Core\ResultInterface;
/** /**
* The interface of demo service * The interface of demo service
* *
* @method ResultInterface deferPayStatus(int $storeId,int $bargainbranchId,int $status,int $orderId) * @method ResultInterface deferPayStatus(int $storeId, int $itemId, int $status, int $orderId)
* @method ResultInterface deferSpendCardMoney(int $storeId, int $buyerId, array $subOrders) * @method ResultInterface deferSpendCardMoney(int $storeId, int $buyerId, array $subOrders, int $parentOrderId)
* @method ResultInterface deferReturnCardMoney(int $storeId,int $buyerId,int $itemOrderId,string $itemTitle,int $payMoney) * @method ResultInterface deferReturnCardMoney(int $storeId,int $buyerId,int $itemOrderId,string $itemTitle,int $payMoney)
* @method ResultInterface deferStatisNum(int $storeId) * @method ResultInterface deferStatisNum(int $storeId)
*/ */
interface RechargeInterface interface RechargeInterface
{ {
/** /**
* 微信支付 状态 回馈接口 * 微信支付 状态 回馈接口
* @param string $storeId // * @param int $storeId
* @param int $itemId // 项目ID $localorderId * @param int $itemId // 项目ID $localorderId
* @param int $status // BuyCardPayStatus::HAVE_PAY 成功支付 BuyCardPayStatus::PAY_EXCEPTION:未支付 (已经过期或者支付异常) * @param int $status // BuyCardPayStatus::HAVE_PAY 成功支付 BuyCardPayStatus::PAY_EXCEPTION:未支付 (已经过期或者支付异常)
* @param int $orderId // 主订单id
* @return mixed * @return mixed
*/ */
public function payStatus( public function payStatus(int $storeId, int $itemId, int $status, int $orderId);
int $storeId,
int $itemId,
int $status , //
int $orderId);
/** /**
* 花费卡金额 * 花费卡金额
...@@ -46,9 +41,9 @@ interface RechargeInterface ...@@ -46,9 +41,9 @@ interface RechargeInterface
* $subOrders 示例: * $subOrders 示例:
* [ * [
* [ * [
* 'id' => 333, * 'id' => 333, // 子订单id
* 'itemName' => 'namenamename', * 'itemName' => 'namenamename', // 项目名
* 'actualAmount' => 444, * 'actualAmount' => 444, // 项目价格
* ], * ],
* [ * [
* 'id' => 555, * 'id' => 555,
...@@ -56,26 +51,22 @@ interface RechargeInterface ...@@ -56,26 +51,22 @@ interface RechargeInterface
* 'actualAmount' => 666, * 'actualAmount' => 666,
* ], * ],
* ] * ]
* @param int $parentOrderId // 主订单id
* @return mixed * @return mixed
*/ */
public function spendCardMoney(int $storeId, int $buyerId, array $subOrders); public function spendCardMoney(int $storeId, int $buyerId, array $subOrders, int $parentOrderId);
/** /**
* 退回储值卡金额 * 退回储值卡金额
* @param int $storeId * @param int $storeId
* @param int $buyerId * @param int $buyerId
* @param int $itemOrderId * @param int $itemOrderId // 子订单
* @param string $itemTitle * @param string $itemTitle // 项目名
* @param int $payMoney * @param int $payMoney // 项目价格
* @param int $parentOrderId // 主订单id
* @return mixed * @return mixed
*/ */
public function ReturnCardMoney( public function ReturnCardMoney(int $storeId, int $buyerId, int $itemOrderId, string $itemTitle, int $payMoney, int $parentOrderId);
int $storeId,
int $buyerId,
int $itemOrderId,
string $itemTitle,
int $payMoney
);
/** /**
* 统计储值卡上架数/总数 * 统计储值卡上架数/总数
......
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