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
0fb1c773
Commit
0fb1c773
authored
Jul 12, 2018
by
zhufx
Browse files
Options
Browse Files
Download
Plain Diff
扫描rpc连接池配置
parents
181722c0
106a31a8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
123 additions
and
1 deletions
+123
-1
src/BuyerDistribution/Lib/AgencyInterface.php
+41
-1
src/Common/Controller/BaseController.php
+43
-0
src/Common/Exception/BaseException.php
+39
-0
src/Shop/Lib/TestInterface.php
+0
-0
No files found.
src/BuyerDistribution/Lib/AgencyInterface.php
View file @
0fb1c773
...
@@ -43,7 +43,7 @@ interface AgencyInterface{
...
@@ -43,7 +43,7 @@ interface AgencyInterface{
* @return mixed
* @return mixed
* @author Administrator
* @author Administrator
*/
*/
public
function
getTeam
(
string
$token
,
int
$pid
,
int
$page
);
//
public function getTeam(string $token,int $pid,int $page);
/**
/**
* 保存分销账单
* 保存分销账单
...
@@ -61,4 +61,43 @@ interface AgencyInterface{
...
@@ -61,4 +61,43 @@ interface AgencyInterface{
* @author Administrator
* @author Administrator
*/
*/
public
function
addSellerFreezeMoney
(
string
$token
,
int
$money
);
public
function
addSellerFreezeMoney
(
string
$token
,
int
$money
);
/**
* 获取买家佣金数据
* @param string $token
* @return mixed
* @author Administrator
*/
public
function
getBuyerCommission
(
string
$token
);
/**
* 获取卖家资金数据
* @param string $token
* @return mixed
* @author Administrator
*/
public
function
getSellerFund
(
string
$token
);
/**
* 保存账单数据
* @param string $token
* @param int $order_id
* @param int $buyer_id
* @param int $store_id
* @param string $order_sn
* @param int $money
* @return mixed
* @author Administrator
*/
public
function
saveBill
(
string
$token
,
int
$order_id
,
int
$buyer_id
,
int
$store_id
,
string
$order_sn
,
int
$money
);
public
function
getBillList
(
string
$token
,
array
$condition
,
int
$page
,
int
$limit
=
15
);
}
}
\ No newline at end of file
src/Common/Controller/BaseController.php
0 → 100644
View file @
0fb1c773
<?php
namespace
Hdll\Services\Common\Controller
;
// use Swoft\Http\Message\Server\Request;
/**
* 活动啦啦Controller基类
*
*/
class
BaseController
{
/**
* 业务层-错误时响应
*
* @param integer $errorCode
* @param string $msg
* @param mixed $data
* @return array
*/
public
static
function
error
(
int
$errorCode
,
string
$msg
,
$data
=
null
)
{
return
[
'error_code'
=>
$errorCode
,
'msg'
=>
$msg
,
'data'
=>
$data
,
];
}
/**
* 业务层-正确时响应
*
* @param mixed $data
* @param string $msg
* @return void
*/
public
static
function
success
(
$data
,
string
$msg
=
''
)
{
return
[
'data'
=>
$data
,
'msg'
=>
$msg
,
'error_code'
=>
0
,
];
}
}
\ No newline at end of file
src/Common/Exception/BaseException.php
0 → 100644
View file @
0fb1c773
<?php
namespace
Hdll\Services\Common\Exception
;
use
Swoft\Exception\Exception
;
class
BaseException
extends
Exception
{
// HTTP 状态码 404,200
public
$code
=
500
;
// 错误具体信息
public
$message
=
'服务器异常'
;
// 业务错误码
public
$errorCode
=
-
1
;
public
function
__construct
(
$params
=
[])
{
if
(
isset
(
$params
[
'code'
])){
$this
->
code
=
$params
[
'code'
];
}
if
(
isset
(
$params
[
'msg'
])){
$this
->
message
=
$params
[
'msg'
];
}
if
(
isset
(
$params
[
'error_code'
])){
$this
->
errorCode
=
$params
[
'error_code'
];
}
parent
::
__construct
(
$this
->
message
,
$this
->
code
);
}
public
function
getErrcode
(){
return
$this
->
errorCode
;
}
}
\ No newline at end of file
src/Shop/Lib/TestInterface.php
View file @
0fb1c773
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