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
5b6a3b62
Commit
5b6a3b62
authored
Aug 16, 2018
by
xmy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
59354456
3932dc40
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
285 additions
and
32 deletions
+285
-32
src/Bargain/Lib/BargainInterface.php
+3
-3
src/Buyer/Lib/CommissionInterface.php
+11
-0
src/Common/Entity/User.php
+2
-2
src/Common/Exception/ExceptionParseData.php
+2
-1
src/Common/Pool/Config/BargainPoolConfig.php
+2
-2
src/Common/Pool/Config/ReservationPoolConfig.php
+3
-5
src/Common/Pool/Config/SchedulePoolConfig.php
+3
-5
src/Common/Pool/Config/SellerPoolConfig.php
+2
-1
src/Common/Pool/Config/StorePoolConfig.php
+3
-4
src/Common/Pool/Config/TimeLimitBuyPoolConfig.php
+103
-0
src/Common/Pool/Config/WithdrawCashPoolConfig.php
+104
-0
src/LimitTimeBuy/Lib/LimitTimeBuyInterface.php
+5
-8
src/Order/Enum/OrderEnum.php
+1
-1
src/WithdrawCash/Lib/BuyerCnDrawInterface.php
+41
-0
No files found.
src/Bargain/Lib/BargainInterface.php
View file @
5b6a3b62
...
...
@@ -22,14 +22,13 @@ interface BargainInterface
{
/**
* 获取砍价商品的 商品信息
* @param int $bargain_id
* @return mixed
*/
public
function
get
goodsi
nfo
(
int
$bargain_id
public
function
get
GoodsI
nfo
(
int
$stordId
,
int
$bargain_id
);
}
\ No newline at end of file
src/Buyer/Lib/CommissionInterface.php
View file @
5b6a3b62
...
...
@@ -33,4 +33,14 @@ interface CommissionInterface
*/
public
function
addBalanceCommission
(
$storeId
,
$buyerId
,
$money
);
/**
* 增加累计现金额
*
* @param $storeId
* @param $buyerId
* @param $money
* @return bool
*/
public
function
addTotalCommission
(
$storeId
,
$buyerId
,
$money
);
}
\ No newline at end of file
src/Common/Entity/User.php
View file @
5b6a3b62
...
...
@@ -28,7 +28,7 @@ use Swoft\Redis\Redis;
*/
class
User
{
private
$id
;
private
$id
=
2
;
private
$nickname
;
...
...
@@ -36,7 +36,7 @@ class User
private
$headImg
;
private
$token
;
private
$token
=
"3333E"
;
private
$cmId
;
...
...
src/Common/Exception/ExceptionParseData.php
View file @
5b6a3b62
...
...
@@ -9,7 +9,7 @@ namespace Hdll\Services\Common\Exception;
class
ExceptionParseData
{
public
static
function
parseData
(
\
Exception
$e
)
public
static
function
parseData
(
\
Throwable
$e
)
{
if
(
is_callable
([
$e
,
'getResponse'
])
)
{
$response
=
$e
->
getResponse
();
...
...
@@ -19,6 +19,7 @@ class ExceptionParseData
$msg
=
isset
(
$data
[
'0'
])
?
$data
[
'0'
]
:
''
;
$data
=
json_decode
(
$msg
,
true
);
$data
=
empty
(
$data
)
?
$response
:
$data
;
}
else
{
$data
[
'msg'
]
=
$e
->
getMessage
();
$data
[
'code'
]
=
500
;
...
...
src/Common/Pool/Config/BargainPoolConfig.php
View file @
5b6a3b62
...
...
@@ -12,6 +12,7 @@ namespace Hdll\Services\Common\Pool\Config;
use
Swoft\Bean\Annotation\Bean
;
use
Swoft\Pool\PoolProperties
;
use
Swoft\Bean\Annotation\Value
;
/**
* @Bean()
...
...
@@ -19,7 +20,6 @@ use Swoft\Pool\PoolProperties;
*/
class
BargainPoolConfig
extends
PoolProperties
{
protected
$name
=
'bargain'
;
/**
...
...
@@ -73,7 +73,7 @@ class BargainPoolConfig extends PoolProperties
* '127.0.0.1:88'
* ]
* </pre>
*
*
@Value(name="", env="${RPC_BARGAIN_URI}")
* @var array
*/
protected
$uri
=
[
...
...
src/Common/Pool/Config/ReservationPoolConfig.php
View file @
5b6a3b62
...
...
@@ -12,6 +12,7 @@ namespace Hdll\Services\Common\Pool\Config;
use
Swoft\Bean\Annotation\Bean
;
use
Swoft\Pool\PoolProperties
;
use
Swoft\Bean\Annotation\Value
;
/**
* the config of service user
...
...
@@ -74,13 +75,10 @@ class ReservationPoolConfig extends PoolProperties
* '127.0.0.1:88'
* ]
* </pre>
*
*
@Value(name="", env="${RPC_RESERVATION_URI}")
* @var array
*/
protected
$uri
=
[
'192.168.3.23:8095'
,
'192.168.3.23:8095'
,
];
protected
$uri
=
[
'172.21.0.11:8099'
,
'172.16.255.6:8099'
];
/**
* whether to user provider(consul/etcd/zookeeper)
...
...
src/Common/Pool/Config/SchedulePoolConfig.php
View file @
5b6a3b62
...
...
@@ -12,6 +12,7 @@ namespace Hdll\Services\Common\Pool\Config;
use
Swoft\Bean\Annotation\Bean
;
use
Swoft\Pool\PoolProperties
;
use
Swoft\Bean\Annotation\Value
;
/**
* the config of service user
...
...
@@ -74,13 +75,10 @@ class SchedulePoolConfig extends PoolProperties
* '127.0.0.1:88'
* ]
* </pre>
*
*
@Value(name="", env="${RPC_SCHEDULE_URI}")
* @var array
*/
protected
$uri
=
[
'192.168.3.23:8096'
,
'192.168.3.23:8096'
,
];
protected
$uri
=
[
'172.21.0.23:8099'
,
'172.16.255.197:8099'
];
/**
* whether to user provider(consul/etcd/zookeeper)
...
...
src/Common/Pool/Config/SellerPoolConfig.php
View file @
5b6a3b62
...
...
@@ -78,7 +78,8 @@ class SellerPoolConfig extends PoolProperties
* @var array
*/
protected
$uri
=
[
'192.168.3.39:8099'
,
'172.21.0.10:8099'
,
'172.16.255.196:8099'
,
];
/**
...
...
src/Common/Pool/Config/StorePoolConfig.php
View file @
5b6a3b62
...
...
@@ -12,6 +12,7 @@ namespace Hdll\Services\Common\Pool\Config;
use
Swoft\Bean\Annotation\Bean
;
use
Swoft\Pool\PoolProperties
;
use
Swoft\Bean\Annotation\Value
;
/**
* the config of service user
...
...
@@ -74,12 +75,10 @@ class StorePoolConfig extends PoolProperties
* '127.0.0.1:88'
* ]
* </pre>
*
*
@Value(name="", env="${RPC_STORE_URI}")
* @var array
*/
protected
$uri
=
[
'192.168.3.23:8098'
,
];
protected
$uri
=
[
'172.21.0.44:8099'
,
'172.16.255.190:8099'
];
/**
* whether to user provider(consul/etcd/zookeeper)
...
...
src/Common/Pool/Config/TimeLimitBuyPoolConfig.php
0 → 100644
View file @
5b6a3b62
<?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
;
use
Swoft\Bean\Annotation\Value
;
/**
* @Bean()
* the config of service bargain
*/
class
TimeLimitBuyPoolConfig
extends
PoolProperties
{
protected
$name
=
'bargain'
;
/**
* 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
=
5
;
/**
* the addresses of connection
*
* <pre>
* [
* '127.0.0.1:88',
* '127.0.0.1:88'
* ]
* </pre>
* @Value(name="", env="${RPC_BARGAIN_URI}")
* @var array
*/
protected
$uri
=
[
'172.21.0.34:8099'
,
'172.16.255.241:8099'
,
];
/**
* 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/WithdrawCashPoolConfig.php
0 → 100644
View file @
5b6a3b62
<?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 WithdrawCash
*
* @Bean()
*/
class
WithdrawCashPoolConfig
extends
PoolProperties
{
protected
$name
=
'withdrawCash'
;
/**
* 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
=
5
;
/**
* the addresses of connection
*
* <pre>
* [
* '127.0.0.1:88',
* '127.0.0.1:88'
* ]
* </pre>
*
* @var array
*/
protected
$uri
=
[
'192.168.3.12:8002'
,
];
/**
* 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/LimitTimeBuy/Lib/LimitTimeBuyInterface.php
View file @
5b6a3b62
...
...
@@ -39,16 +39,13 @@ interface LimitTimeBuyInterface
int
$selected_num
,
int
$order_type
,
int
$goods_id
,
string
$reservation_time
=
''
);
string
$reservation_time
);
/**
* 获取限时购商品的 商品信息
* @param int $limit_id
* @return mixed
*/
public
function
getLimitgoods
(
int
$limit_id
);
}
\ No newline at end of file
public
function
getLimitGoods
(
int
$sellerId
,
int
$limitId
);}
\ No newline at end of file
src/Order/Enum/OrderEnum.php
View file @
5b6a3b62
...
...
@@ -26,7 +26,7 @@ class OrderEnum
const
TYPE_GOODS
=
0
;
//商品订单
const
TYPE_CUT_PRICE
=
1
;
//砍价订单
const
TYPE_LIMIT
=
2
;
//限时购订单
const
TYPE_COLLECTION
=
3
;
//
限时购订单
const
TYPE_COLLECTION
=
3
;
//
拼团
//对账状态
const
BALANCE_STATE_FALSE
=
0
;
//未对账
...
...
src/WithdrawCash/Lib/BuyerCnDrawInterface.php
0 → 100644
View file @
5b6a3b62
<?php
/**
* 买家佣金提现接口
*
* @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\WithdrawCash\Lib
;
use
Swoft\Core\ResultInterface
;
/**
* The interface of BuyerCnDrawInterface service
*
* @method ResultInterface deferPaySuccess(int $storeId,int $id,string $wxOrderSn,int $fee)
* @method ResultInterface deferPayFailed(int $storeId,int $id,string $message)
*/
interface
BuyerCnDrawInterface
{
/**
* 支付成功接口
*
* @param integer $storeId 店铺ID
* @param integer $id 提现记录ID
* @param string $wxOrderSn 微信支付订单号
* @param integer $fee 手续费
* @return void
*/
public
function
paySuccess
(
int
$storeId
,
int
$id
,
string
$wxOrderSn
,
int
$fee
);
/**
* 支付失败接口
*
* @param integer $storeId 店铺ID
* @param integer $id 提现记录ID
* @param string $message 失败信息
* @return void
*/
public
function
payFailed
(
int
$storeId
,
int
$id
,
string
$message
);
}
\ 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