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
ef79bef5
Commit
ef79bef5
authored
Aug 03, 2018
by
xmy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
baa16de0
dfbb8eca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
13 deletions
+48
-13
src/Buyer/Enum/BuyerError.php
+3
-0
src/Buyer/Lib/CommissionInterface.php
+37
-0
src/Common/Pool/Config/BuyerPoolConfig.php
+7
-12
src/Common/Pool/Config/StorePoolConfig.php
+1
-1
No files found.
src/Buyer/Enum/BuyerError.php
View file @
ef79bef5
...
...
@@ -14,6 +14,9 @@ class BuyerError
const
DB_ERROR
=
[
"msg"
=>
"数据库操作错误"
,
"code"
=>
500
,
"errorCode"
=>
24102
];
const
SCORE_ERR
=
[
"msg"
=>
"你无权创建该用户"
,
"code"
=>
403
,
"errorCode"
=>
24103
];
const
NOT_FOUND_COMMISSION
=
[
"msg"
=>
"获取佣金信息失败"
,
"code"
=>
404
,
"errorCode"
=>
24104
];
const
INSUFFICIENT_COMMISSION
=
[
"msg"
=>
"可提现金额不足,无法提现"
,
"code"
=>
400
,
"errorCode"
=>
24105
];
public
static
function
atranslate
(
$message
,
$param
)
{
...
...
src/Buyer/Lib/CommissionInterface.php
0 → 100644
View file @
ef79bef5
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/8/2
* Time: 9:49
*/
namespace
Hdll\Services\Buyer\Lib
;
/**
* Interface CommissionInterface
* @package Hdll\Services\Buyer\Lib
*/
interface
CommissionInterface
{
/**
* 扣除可提现金额
*
* @param $storeId
* @param $buyerId
* @param $money
* @return bool
*/
public
function
reduceBalanceCommission
(
$storeId
,
$buyerId
,
$money
);
/**
* 增加可提现金额
*
* @param $storeId
* @param $buyerId
* @param $money
* @return bool
*/
public
function
addBalanceCommission
(
$storeId
,
$buyerId
,
$money
);
}
\ No newline at end of file
src/Common/Pool/Config/BuyerPoolConfig.php
View file @
ef79bef5
...
...
@@ -11,6 +11,7 @@
namespace
Hdll\Services\Common\Pool\Config
;
use
Swoft\Bean\Annotation\Bean
;
use
Swoft\Bean\Annotation\Value
;
use
Swoft\Pool\PoolProperties
;
/**
...
...
@@ -20,48 +21,45 @@ use Swoft\Pool\PoolProperties;
*/
class
BuyerPoolConfig
extends
PoolProperties
{
/**
* the name of pool
*
*/
protected
$name
=
'buyer'
;
/**
* Minimum active number of connections
*
* @var int
*/
protected
$minActive
=
5
;
/**
* the maximum number of active connections
*
* @var int
*/
protected
$maxActive
=
50
;
/**
* the maximum number of wait connections
*
* @var int
*/
protected
$maxWait
=
100
;
/**
* Maximum waiting time
*
* @var int
*/
protected
$maxWaitTime
=
3
;
/**
* Maximum idle time
*
* @var int
*/
protected
$maxIdleTime
=
60
;
/**
* the time of connect timeout
*
* @var int
*/
protected
$timeout
=
200
;
...
...
@@ -75,30 +73,27 @@ class BuyerPoolConfig extends PoolProperties
* ]
* </pre>
*
* @var array
*/
protected
$uri
=
[
'192.168.3.100:8101'
,
"192.168.3.100:8106"
];
/**
* whether to user provider(consul/etcd/zookeeper)
*
* @var bool
*/
protected
$useProvider
=
false
;
/**
* the default balancer is random balancer
*
* @var string
*/
protected
$balancer
=
''
;
/**
* the default provider is consul provider
*
* @var string
*/
protected
$provider
=
''
;
}
src/Common/Pool/Config/StorePoolConfig.php
View file @
ef79bef5
...
...
@@ -21,7 +21,7 @@ use Swoft\Pool\PoolProperties;
class
StorePoolConfig
extends
PoolProperties
{
protected
$name
=
's
eller
'
;
protected
$name
=
's
toreId
'
;
/**
* Minimum active number of connections
...
...
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