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
1632fcaa
Commit
1632fcaa
authored
Jul 20, 2018
by
xmy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
错误消息
parent
b8162158
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
47 deletions
+45
-47
src/BuyerDistribution/Enum/BuyerDistributionEnum.php
+33
-0
src/BuyerDistribution/Lib/AgencyInterface.php
+12
-47
No files found.
src/BuyerDistribution/Enum/BuyerDistributionEnum.php
0 → 100644
View file @
1632fcaa
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/17
* Time: 14:19
*/
namespace
Hdll\Services\Order\Enum
;
class
BuyerDistributionEnum
{
const
E101
=
[
'101'
,
'金额不能小于0'
];
const
E102
=
[
102
,
'该数据不属于您'
,
403
];
const
E103
=
[
103
,
'请勿重复创建'
,
403
];
const
E104
=
[
104
,
'该用户不存在或属于您的团队'
,
403
];
public
function
getError
(
$code
)
{
$reflect
=
new
\ReflectionClass
(
self
::
class
);
$arr
=
$reflect
->
getConstant
(
'E'
.
substr
(
$code
,
-
3
));
if
(
!
is_array
(
$arr
))
{
return
false
;
}
return
[
'code'
=>
$arr
[
0
],
'msg'
=>
$arr
[
1
],
'errorCode'
=>
$arr
[
2
],
];
}
}
\ No newline at end of file
src/BuyerDistribution/Lib/AgencyInterface.php
View file @
1632fcaa
...
...
@@ -6,77 +6,44 @@
* Time: 13:48
*/
namespace
Hdll\Services\BuyerDistribution\Lib
;
use
Swoft\Core\ResultInterface
;
namespace
Hdll\Services\Shop\Lib
;
/**
* @method ResultInterface defer
GetSetting(string $token
)
* @method ResultInterface defer
PutSetting(string $token,array $param
)
* @method ResultInterface deferGet
Team(string $token,int $pid,int $page
)
* @method ResultInterface deferSave
AgencyBill(string $token,array $order
)
* @method ResultInterface defer
AddSellerFreezeMoney(int $storeId,int $money
)
* @method ResultInterface defer
GetBuyerCommission(int $buyerId
)
* @method ResultInterface deferGet
SellerFund(int $storeId
)
* @method ResultInterface deferSave
Bill(string $token,int $order_id,int $buyer_id,int $store_id,string $order_sn,int $money
)
* Interface AgencyInterface
* @package App\Lib
*/
interface
AgencyInterface
{
/**
* 获取分销设置
* @return mixed
* @author Administrator
*/
public
function
getSetting
(
string
$token
);
/**
* 写入或更新分销设置
* @param array $param
* @return mixed
* @author Administrator
*/
public
function
putSetting
(
string
$token
,
array
$param
);
/**
* 获取团队列表
* @param $pid
* @param $page
* @return mixed
* @author Administrator
*/
// public function getTeam(string $token,int $pid,int $page);
/**
* 保存分销账单
* @param array $order 订单数据
* @return mixed
* @author Administrator
*/
public
function
saveAgencyBill
(
string
$token
,
array
$order
);
/**
* 增加卖家冻结金额
* @param
string $token
* @param int
$money
* @param
int $storeId
* @param int
$money 冻结金额(千分)
* @return mixed
* @author Administrator
*/
public
function
addSellerFreezeMoney
(
string
$token
,
int
$money
);
public
function
addSellerFreezeMoney
(
int
$storeId
,
int
$money
);
/**
* 获取买家佣金数据
* @param
string $token
* @param
int $buyerId
* @return mixed
* @author Administrator
*/
public
function
getBuyerCommission
(
string
$token
);
public
function
getBuyerCommission
(
int
$buyerId
);
/**
* 获取卖家资金数据
* @param
string $token
* @param
int $storeId
* @return mixed
* @author Administrator
*/
public
function
getSellerFund
(
string
$token
);
public
function
getSellerFund
(
int
$storeId
);
/**
* 保存账单数据
...
...
@@ -99,5 +66,4 @@ interface AgencyInterface{
);
public
function
getBillList
(
string
$token
,
array
$condition
,
int
$page
,
int
$limit
=
15
);
}
\ No newline at end of file
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