Commit da310ad7 by zhangsong

流量和卡片接口修改

parents 2abc040f cfd284a5
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/26
* Time: 16:00
*/
namespace Hdll\Services\FlowCount\Enum;
class FlowCategory
{
const BARGAIN = 1; // 砍价
const LIMIT = 2; // 限时购
const GROUP = 3; // 团购
}
\ No newline at end of file
......@@ -13,6 +13,7 @@ use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferAdd(int $storeId, array $data)
* @method ResultInterface deferBrowseAndShare(int $storeId, int $type, array $itemIds)
* @method ResultInterface deferNewVisitor(int $storeId, int $type, array $itemIds = null)
* Interface VisitorInterface
* @package App\Lib
*/
......@@ -55,4 +56,22 @@ interface VisitorInterface
*/
public function browseAndShare(int $storeId, int $type, array $itemIds);
/**
* 统计是否有新访客
* @param int $storeId 店铺id
* @param int $type 类型:FlowCategory::BARGAIN 砍价 FlowCategory::LIMIT 限时购 FlowCategory::GROUP 拼团
* @param array $itemIds 活动ids列表,格式:[1,2,3],默认:null
* @return mixed
* 响应参数:
* [
* 'time' => 上次统计时间戳,
* 'list' => [ // 参数$itemIds为空时list为空
* ['活动id' => 活动新访客数],
* ['活动id' => 活动新访客数],
* ... ...
* ]
* ]
*/
public function newVisitor(int $storeId, int $type, array $itemIds = null);
}
\ No newline at end of file
......@@ -10,33 +10,28 @@
namespace Hdll\Services\Recharge\Lib;
use Hdll\Services\Recharge\Enum\BuyCardPayStatus;
use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferPayStatus(int $storeId,int $bargainbranchId,int $status,int $orderId)
* @method ResultInterface deferSpendCardMoney(int $storeId, int $buyerId, array $subOrders)
* @method ResultInterface deferReturnCardMoney(int $storeId,int $buyerId,int $itemOrderId,string $itemTitle,int $payMoney)
* @method ResultInterface deferPayStatus(int $storeId, int $itemId, int $status, int $orderId)
* @method ResultInterface deferSpendCardMoney(int $storeId, int $buyerId, array $subOrders, int $parentOrderId)
* @method ResultInterface deferReturnCardMoney(int $storeId,int $buyerId,int $itemOrderId,string $itemTitle,int $payMoney, int $parentOrderId)
* @method ResultInterface deferStatisNum(int $storeId)
*/
interface RechargeInterface
{
/**
* 微信支付 状态 回馈接口
* @param string $storeId //
* @param int $itemId // 项目ID $localorderId
* @param int $status // BuyCardPayStatus::HAVE_PAY 成功支付 BuyCardPayStatus::PAY_EXCEPTION:未支付 (已经过期或者支付异常)
* @param int $storeId
* @param int $itemId // 项目ID $localorderId
* @param int $status // BuyCardPayStatus::HAVE_PAY 成功支付 BuyCardPayStatus::PAY_EXCEPTION:未支付 (已经过期或者支付异常)
* @param int $orderId // 主订单id
* @return mixed
*/
public function payStatus(
int $storeId,
int $itemId,
int $status , //
int $orderId);
public function payStatus(int $storeId, int $itemId, int $status, int $orderId);
/**
* 花费卡金额
......@@ -46,9 +41,9 @@ interface RechargeInterface
* $subOrders 示例:
* [
* [
* 'id' => 333,
* 'itemName' => 'namenamename',
* 'actualAmount' => 444,
* 'id' => 333, // 子订单id
* 'itemName' => 'namenamename', // 项目名
* 'actualAmount' => 444, // 项目价格
* ],
* [
* 'id' => 555,
......@@ -56,26 +51,22 @@ interface RechargeInterface
* 'actualAmount' => 666,
* ],
* ]
* @param int $parentOrderId // 主订单id
* @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 $buyerId
* @param int $itemOrderId
* @param string $itemTitle
* @param int $payMoney
* @param int $itemOrderId // 子订单
* @param string $itemTitle // 项目名
* @param int $payMoney // 项目价格
* @param int $parentOrderId // 主订单id
* @return mixed
*/
public function ReturnCardMoney(
int $storeId,
int $buyerId,
int $itemOrderId,
string $itemTitle,
int $payMoney
);
public function ReturnCardMoney(int $storeId, int $buyerId, int $itemOrderId, string $itemTitle, int $payMoney, int $parentOrderId);
/**
* 统计储值卡上架数/总数
......
<?php
/**
* Created by PhpStorm.
* User: mac
* Date: 2019-01-10
* Time: 09:58
*/
namespace Hdll\Services\TimesCard\Enum;
class Status{
const OK = 1; // 可删除
const EXIST = 2; // 次卡存在
const BUY = 3; // 次卡存在购买用户
}
\ No newline at end of file
......@@ -73,12 +73,10 @@ interface TimesCardInterface
* 通过商品id 获取是否 有正在服务的次卡用户
* @param int $storeId
* @param int $goodsId
* @return bool
* @return int 返回状态:Status::OK 可删除 Status::EXIST 次卡存在 Status::BUY次卡存在购买用户
*
*/
public function getTimesCardUserCardInfo(
int $storeId, int $goodsId
);
public function getTimesCardUserCardInfo(int $storeId, int $goodsId);
/**
* 统计次卡上架数/总数
......
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