Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
da310ad7
Commit
da310ad7
authored
Jul 15, 2019
by
zhangsong
Browse files
Options
Browse Files
Download
Plain Diff
流量和卡片接口修改
parents
2abc040f
cfd284a5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
31 deletions
+75
-31
src/FlowCount/Enum/FlowCategory.php
+17
-0
src/FlowCount/Lib/VisitorInterface.php
+20
-0
src/Recharge/Lib/RechargeInterface.php
+18
-27
src/TimesCard/Enum/Status.php
+18
-0
src/TimesCard/Lib/TimesCardInterface.php
+2
-4
No files found.
src/FlowCount/Enum/FlowCategory.php
0 → 100644
View file @
da310ad7
<?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
src/FlowCount/Lib/VisitorInterface.php
View file @
da310ad7
...
@@ -13,6 +13,7 @@ use Swoft\Core\ResultInterface;
...
@@ -13,6 +13,7 @@ use Swoft\Core\ResultInterface;
/**
/**
* @method ResultInterface deferAdd(int $storeId, array $data)
* @method ResultInterface deferAdd(int $storeId, array $data)
* @method ResultInterface deferBrowseAndShare(int $storeId, int $type, array $itemIds)
* @method ResultInterface deferBrowseAndShare(int $storeId, int $type, array $itemIds)
* @method ResultInterface deferNewVisitor(int $storeId, int $type, array $itemIds = null)
* Interface VisitorInterface
* Interface VisitorInterface
* @package App\Lib
* @package App\Lib
*/
*/
...
@@ -55,4 +56,22 @@ interface VisitorInterface
...
@@ -55,4 +56,22 @@ interface VisitorInterface
*/
*/
public
function
browseAndShare
(
int
$storeId
,
int
$type
,
array
$itemIds
);
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
src/Recharge/Lib/RechargeInterface.php
View file @
da310ad7
...
@@ -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
, int $parentOrderId
)
* @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
);
/**
/**
* 统计储值卡上架数/总数
* 统计储值卡上架数/总数
...
...
src/TimesCard/Enum/Status.php
0 → 100644
View file @
da310ad7
<?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
src/TimesCard/Lib/TimesCardInterface.php
View file @
da310ad7
...
@@ -73,12 +73,10 @@ interface TimesCardInterface
...
@@ -73,12 +73,10 @@ interface TimesCardInterface
* 通过商品id 获取是否 有正在服务的次卡用户
* 通过商品id 获取是否 有正在服务的次卡用户
* @param int $storeId
* @param int $storeId
* @param int $goodsId
* @param int $goodsId
* @return
bool
* @return
int 返回状态:Status::OK 可删除 Status::EXIST 次卡存在 Status::BUY次卡存在购买用户
*
*
*/
*/
public
function
getTimesCardUserCardInfo
(
public
function
getTimesCardUserCardInfo
(
int
$storeId
,
int
$goodsId
);
int
$storeId
,
int
$goodsId
);
/**
/**
* 统计次卡上架数/总数
* 统计次卡上架数/总数
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment