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
c94a6a7e
Commit
c94a6a7e
authored
Jan 18, 2019
by
feixiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.dev.2b3.cn/tencent/services
parents
f436c898
fd2d06ae
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
217 additions
and
1 deletions
+217
-1
UPGRADE.md
+7
-0
src/Common/Pool/Config/RechargePoolConfig.php
+104
-0
src/Recharge/Enum/BuyCardPayStatus.php
+22
-0
src/Recharge/Lib/RechargeInterface.php
+77
-0
src/Vip/Enum/VipEnum.php
+7
-1
No files found.
UPGRADE.md
View file @
c94a6a7e
# 1.0.53
-
vip试用类型
# 1.0.52
-
添加储值卡的回款接口
# 1.0.51
-
添加储值卡的接口
# 1.0.50
-
添加获取主门店信息的接口
# 1.0.49
...
...
src/Common/Pool/Config/RechargePoolConfig.php
0 → 100644
View file @
c94a6a7e
<?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\Bean\Annotation\Value
;
use
Swoft\Pool\PoolProperties
;
/**
* the config of service user
*
* @Bean()
*/
class
RechargePoolConfig
extends
PoolProperties
{
public
function
__construct
()
{
// 区别本地和线上的RPC服务地址
$this
->
uri
=
explode
(
','
,
env
(
'RPC_RECHARGE_URI'
,
'recharge:8099'
));
}
/**
* the name of pool
*
*/
protected
$name
=
'recharge'
;
/**
* Minimum active number of connections
*
*/
protected
$minActive
=
5
;
/**
* the maximum number of active connections
*
*/
protected
$maxActive
=
300
;
/**
* the maximum number of wait connections
*
*/
protected
$maxWait
=
400
;
/**
* Maximum waiting time
*
*/
protected
$maxWaitTime
=
3
;
/**
* Maximum idle time
*
*/
protected
$maxIdleTime
=
60
;
/**
* the time of connect timeout
*
*/
protected
$timeout
=
200
;
/**
* the addresses of connection
*
* <pre>
* [
* '127.0.0.1:88',
* '127.0.0.1:88'
* ]
* </pre>
*
*/
protected
$uri
=
[
"192.168.3.100:8102"
,
];
/**
* whether to user provider(consul/etcd/zookeeper)
*
*/
protected
$useProvider
=
false
;
/**
* the default balancer is random balancer
*
*/
protected
$balancer
=
''
;
/**
* the default provider is consul provider
*
*/
protected
$provider
=
''
;
}
src/Recharge/Enum/BuyCardPayStatus.php
0 → 100644
View file @
c94a6a7e
<?php
/**
* Created by PhpStorm.
* User: mac
* Date: 2019-01-10
* Time: 09:58
*/
namespace
Hdll\Services\Recharge\Enum
;
class
BuyCardPayStatus
{
//订单状态
const
STATUS_NORMAL
=
10
;
//待支付
//paystatus
const
HAVE_PAY
=
2
;
const
PAY_EXCEPTION
=
3
;
const
PAY_REFUND
=
4
;
// 退款
}
\ No newline at end of file
src/Recharge/Lib/RechargeInterface.php
0 → 100644
View file @
c94a6a7e
<?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\Recharge\Lib
;
use
Hdll\Services\Recharge\Enum\BuyCardPayStatus
;
use
Swoft\Core\ResultInterface
;
/**
* The interface of demo service
*
* @method ResultInterface deferpayStatus(string $storeId,int $bargainbranchId,int $status,int $orderId)
* @method ResultInterface deferspendCardMoney( int $storeId,int $buyerId,int $itemOrderId,string $itemTitle,int $payMoney)
* @method ResultInterface deferReturnCardMoney( int $storeId,int $buyerId,int $itemOrderId,string $itemTitle,int $payMoney)
*/
interface
RechargeInterface
{
/**
* 微信支付 状态 回馈接口
* @param string $storeId //
* @param int $itemId // 项目ID $localorderId
* @param int $status // BuyCardPayStatus::HAVE_PAY 成功支付 BuyCardPayStatus::PAY_EXCEPTION:未支付 (已经过期或者支付异常)
* @return mixed
*/
public
function
payStatus
(
string
$storeId
,
int
$itemId
,
int
$status
,
//
int
$orderId
);
/**
* 花费卡金额
* @param int $storeId
* @param int $buyerId
* @param int $goodOrderId
* @return mixed
*/
public
function
spendCardMoney
(
int
$storeId
,
int
$buyerId
,
int
$itemOrderId
,
string
$itemTitle
,
int
$payMoney
);
/**
* 退回储值卡金额
* @param int $storeId
* @param int $buyerId
* @param int $itemOrderId
* @param string $itemTitle
* @param int $payMoney
* @return mixed
*/
public
function
ReturnCardMoney
(
int
$storeId
,
int
$buyerId
,
int
$itemOrderId
,
string
$itemTitle
,
int
$payMoney
);
}
\ No newline at end of file
src/Vip/Enum/VipEnum.php
View file @
c94a6a7e
...
...
@@ -7,7 +7,8 @@
*/
namespace
Hdll\Services\Vip\Enum
;
class
VipEnum
{
class
VipEnum
{
const
VIP_TOTAL_FEE
=
69800
;
//价格
...
...
@@ -20,4 +21,8 @@ class VipEnum{
const
STATUS_PAID
=
20
;
//已支付
const
VIP_QUEUE_KEY
=
'vip:queue'
;
const
VIP_TYPE_NORMAL
=
"1"
;
//普通
const
VIP_TYPE_TRY
=
"2"
;
//试用
}
\ 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