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
8017aa78
Commit
8017aa78
authored
Aug 01, 2018
by
xmy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
bd11b2c1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
258 additions
and
8 deletions
+258
-8
src/Common/Pool/Config/StorePoolConfig.php
+104
-0
src/Common/Pool/Config/VipPoolConfig.php
+104
-0
src/SellerDistribution/Enum/SellerDistributionEnum.php
+16
-0
src/SellerDistribution/Enum/SellerDistributionError.php
+6
-8
src/Vip/Lib/VipInterface.php
+28
-0
No files found.
src/Common/Pool/Config/StorePoolConfig.php
0 → 100644
View file @
8017aa78
<?php
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://doc.swoft.org
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/
namespace
Hdll\Services\Common\Pool\Config
;
use
Swoft\Bean\Annotation\Bean
;
use
Swoft\Pool\PoolProperties
;
/**
* the config of service user
*
* @Bean()
*/
class
StorePoolConfig
extends
PoolProperties
{
protected
$name
=
'seller'
;
/**
* 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
;
/**
* the addresses of connection
*
* <pre>
* [
* '127.0.0.1:88',
* '127.0.0.1:88'
* ]
* </pre>
*
* @var array
*/
protected
$uri
=
[
'192.168.3.23:8098'
,
];
/**
* 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/VipPoolConfig.php
0 → 100644
View file @
8017aa78
<?php
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://doc.swoft.org
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/
namespace
Hdll\Services\Common\Pool\Config
;
use
Swoft\Bean\Annotation\Bean
;
use
Swoft\Pool\PoolProperties
;
/**
* the config of service user
*
* @Bean()
*/
class
VipPoolConfig
extends
PoolProperties
{
protected
$name
=
'seller'
;
/**
* 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
;
/**
* the addresses of connection
*
* <pre>
* [
* '127.0.0.1:88',
* '127.0.0.1:88'
* ]
* </pre>
*
* @var array
*/
protected
$uri
=
[
'192.168.3.39:8200'
,
];
/**
* 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/SellerDistribution/Enum/SellerDistributionEnum.php
0 → 100644
View file @
8017aa78
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/17
* Time: 14:19
*/
namespace
Hdll\Services\SellerDistribution\Enum
;
class
SellerDistributionEnum
{
const
SETTING
=
[
1
=>
0.2
,
2
=>
0.1
];
}
\ No newline at end of file
src/SellerDistribution/Enum/SellerDistributionError.php
View file @
8017aa78
...
...
@@ -11,14 +11,12 @@ namespace Hdll\Services\SellerDistribution\Enum;
class
SellerDistributionError
{
const
E001
=
[
001
,
'参数非法'
,
400
];
const
E002
=
[
002
,
'无效的Token'
,
403
];
const
E003
=
[
003
,
'无权限操作'
,
403
];
const
E004
=
[
004
,
'数据不存在'
,
404
];
const
E101
=
[
101
,
'微信支付错误'
,
500
];
const
E102
=
[
102
,
'订单不存在或状态异常'
,
404
];
const
E103
=
[
103
,
'升级VIP失败,没有找到对应的店铺'
,
404
];
const
E101
=
[
101
,
'店铺不存在'
];
const
E102
=
[
102
,
'该数据不属于您'
,
403
];
const
E103
=
[
103
,
'请勿重复创建'
,
403
];
const
E104
=
[
104
,
'该用户不存在或属于您的团队'
,
403
];
const
E105
=
[
105
,
'未开启分销'
,
200
];
const
E106
=
[
106
,
'分销上级不存在'
,
404
];
public
function
getError
(
$code
)
{
...
...
src/Vip/Lib/VipInterface.php
0 → 100644
View file @
8017aa78
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/27
* Time: 16:28
*/
namespace
Hdll\Services\Vip\Lib
;
use
Swoft\Core\ResultInterface
;
/**
* @method ResultInterface deferOpenVip($token,$orderId,$money)
* @method ResultInterface deferUpdate($token,$condition, $data)
* Interface SellerInterface
* @package App\Lib
*/
interface
VipInterface
{
public
function
openVip
(
$token
,
$orderId
,
$money
);
public
function
update
(
$token
,
$condition
,
$data
);
}
\ 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