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
2dcfecae
Commit
2dcfecae
authored
Aug 27, 2018
by
dzhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.2b3.cn/tencent/services
parents
49557387
e8a1cfe5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
4 deletions
+54
-4
src/Buyer/Lib/BillInterface.php
+4
-0
src/Buyer/Lib/CommissionInterface.php
+11
-2
src/Common/Lib/Redis.php
+18
-1
src/Order/Enum/OrderEnum.php
+7
-0
src/Order/Lib/OrderInterface.php
+3
-1
src/SellerDistribution/Lib/SellerDistributionInterface.php
+11
-0
No files found.
src/Buyer/Lib/BillInterface.php
View file @
2dcfecae
...
...
@@ -13,6 +13,7 @@ use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferSaveBill(string $token,int $order_id,int $buyer_id,int $store_id,string $order_sn,int $money)
* @method ResultInterface deferGetListByOrderId(int $storeId, int $orderId)
* Interface AgencyInterface
* @package App\Lib
*/
...
...
@@ -36,5 +37,7 @@ interface BillInterface{
int
$money
);
public
function
getListByOrderId
(
int
$storeId
,
int
$orderId
);
}
\ No newline at end of file
src/Buyer/Lib/CommissionInterface.php
View file @
2dcfecae
...
...
@@ -14,14 +14,23 @@ namespace Hdll\Services\Buyer\Lib;
interface
CommissionInterface
{
/**
* 扣除可提现金额
(仅限于对账服务使用,切记!!!)
* 扣除可提现金额
*
* @param $storeId
* @param $buyerId
* @param $money
* @return bool
*/
public
function
reduceBalanceCommissionCompare
(
$storeId
,
$buyerId
,
$money
);
public
function
reduceBalanceCommission
(
$storeId
,
$buyerId
,
$money
);
/**
* 增加可提现金额
*
* @param $storeId
* @param $buyerId
* @param $money
* @return bool
*/
public
function
addBalanceCommission
(
$storeId
,
$buyerId
,
$money
);
/**
* 增加可提现金额(仅限于对账服务使用,切记!!!)
...
...
src/Common/Lib/Redis.php
View file @
2dcfecae
...
...
@@ -12,14 +12,31 @@ use Swoft\Redis\Operator\Processor\PrefixProcessor;
class
Redis
extends
\Swoft\Redis\Redis
{
private
$prefix
;
/**
* 设置redis前缀
* @param $prefix
*/
public
function
setPrefix
(
$prefix
)
{
$this
->
prefix
=
$prefix
;
}
public
function
call
(
string
$method
,
array
$params
)
{
$config
=
App
::
getBean
(
PrefixProcessor
::
class
);
$config
->
setPrefix
(
$prefix
);
$config
->
setPrefix
(
$this
->
prefix
);
$res
=
parent
::
call
(
$method
,
$params
);
$config
->
setPrefix
(
config
(
"redis.prefix"
,
''
));
return
$res
;
}
public
function
__destruct
()
{
$config
=
App
::
getBean
(
PrefixProcessor
::
class
);
$config
->
setPrefix
(
config
(
"redis.prefix"
,
''
));
}
...
...
src/Order/Enum/OrderEnum.php
View file @
2dcfecae
...
...
@@ -36,6 +36,13 @@ class OrderEnum
self
::
TYPE_COLLECTION
,
];
const
PAID_STATUS
=
[
self
::
STATUS_PAID
,
self
::
STATUS_DELIVERY
,
self
::
STATUS_DELIVERED
,
self
::
STATUS_EVALUATION
];
//对账状态
const
BALANCE_STATE_FALSE
=
0
;
//未对账
const
BALANCE_STATE_TRUE
=
1
;
//已对账
...
...
src/Order/Lib/OrderInterface.php
View file @
2dcfecae
...
...
@@ -15,7 +15,7 @@ use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferCreateOrder( string $token,int $consignee_id,int $activity_id,int $selected_num,int $order_type,float $total,float $goods_price,string $goods_name,string $goods_image,string $activity_name,string $reservation_time = '')
* @method ResultInterface deferCreateOrder( string $token,int $consignee_id,int $activity_id,int $selected_num,int $order_type,float $total,float $goods_price,string $goods_name,string $goods_image,string $activity_name,
int $goodsId,
string $reservation_time = '')
* @method ResultInterface deferGetOrderInfoBySn(int $storeId, string $orderSn)
* @method ResultInterface deferGetOrderInfo(int $storeId,int $orderId)
* @method ResultInterface deferUpdateInfoById(int $storeId,int $orderId, array $updateInfo)
...
...
@@ -35,6 +35,7 @@ interface OrderInterface
* @param string $goods_name
* @param string $goods_image
* @param string $activity_name
* @param int $goodsId,
* @param string $reservation_time
* @return mixed
*/
...
...
@@ -50,6 +51,7 @@ interface OrderInterface
string
$goods_name
,
string
$goods_image
,
string
$activity_name
,
int
$goodsId
,
string
$reservation_time
=
''
);
public
function
getOrderInfo
(
int
$storeId
,
int
$orderId
);
...
...
src/SellerDistribution/Lib/SellerDistributionInterface.php
View file @
2dcfecae
...
...
@@ -15,6 +15,7 @@ use Swoft\Core\ResultInterface;
* method ResultInterface deferReduceBalance($sellerId, $money)
* method ResultInterface deferAddTotal($sellerId, $money)
* method ResultInterface deferReduceTotal($sellerId, $money)
* method ResultInterface deferListByOrderId($storeId, $orderId)
* Interface SellerDistributionInterface
* @package App\Lib
*/
...
...
@@ -79,4 +80,13 @@ interface SellerDistributionInterface{
* @author Administrator
*/
public
function
reduceTotal
(
$sellerId
,
$money
);
/**
* 获取分销记录
* @param $storeId
* @param $orderId
* @return mixed
* @author Administrator
*/
public
function
listByOrderId
(
$storeId
,
$orderId
);
}
\ 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