Commit ef79bef5 by xmy

Merge remote-tracking branch 'origin/master'

parents baa16de0 dfbb8eca
...@@ -14,6 +14,9 @@ class BuyerError ...@@ -14,6 +14,9 @@ class BuyerError
const DB_ERROR = ["msg" => "数据库操作错误", "code" => 500, "errorCode" => 24102]; const DB_ERROR = ["msg" => "数据库操作错误", "code" => 500, "errorCode" => 24102];
const SCORE_ERR = ["msg" => "你无权创建该用户", "code" => 403, "errorCode" => 24103]; 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) public static function atranslate($message,$param)
{ {
......
<?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
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
namespace Hdll\Services\Common\Pool\Config; namespace Hdll\Services\Common\Pool\Config;
use Swoft\Bean\Annotation\Bean; use Swoft\Bean\Annotation\Bean;
use Swoft\Bean\Annotation\Value;
use Swoft\Pool\PoolProperties; use Swoft\Pool\PoolProperties;
/** /**
...@@ -20,48 +21,45 @@ use Swoft\Pool\PoolProperties; ...@@ -20,48 +21,45 @@ use Swoft\Pool\PoolProperties;
*/ */
class BuyerPoolConfig extends PoolProperties class BuyerPoolConfig extends PoolProperties
{ {
/**
* the name of pool
*
*/
protected $name = 'buyer'; protected $name = 'buyer';
/** /**
* Minimum active number of connections * Minimum active number of connections
* *
* @var int
*/ */
protected $minActive = 5; protected $minActive = 5;
/** /**
* the maximum number of active connections * the maximum number of active connections
* *
* @var int
*/ */
protected $maxActive = 50; protected $maxActive = 50;
/** /**
* the maximum number of wait connections * the maximum number of wait connections
* *
* @var int
*/ */
protected $maxWait = 100; protected $maxWait = 100;
/** /**
* Maximum waiting time * Maximum waiting time
* *
* @var int
*/ */
protected $maxWaitTime = 3; protected $maxWaitTime = 3;
/** /**
* Maximum idle time * Maximum idle time
* *
* @var int
*/ */
protected $maxIdleTime = 60; protected $maxIdleTime = 60;
/** /**
* the time of connect timeout * the time of connect timeout
* *
* @var int
*/ */
protected $timeout = 200; protected $timeout = 200;
...@@ -75,30 +73,27 @@ class BuyerPoolConfig extends PoolProperties ...@@ -75,30 +73,27 @@ class BuyerPoolConfig extends PoolProperties
* ] * ]
* </pre> * </pre>
* *
* @var array
*/ */
protected $uri = [ protected $uri = [
'192.168.3.100:8101', "192.168.3.100:8106"
]; ];
/** /**
* whether to user provider(consul/etcd/zookeeper) * whether to user provider(consul/etcd/zookeeper)
* *
* @var bool
*/ */
protected $useProvider = false; protected $useProvider = false;
/** /**
* the default balancer is random balancer * the default balancer is random balancer
* *
* @var string
*/ */
protected $balancer = ''; protected $balancer = '';
/** /**
* the default provider is consul provider * the default provider is consul provider
* *
* @var string
*/ */
protected $provider = ''; protected $provider = '';
} }
...@@ -21,7 +21,7 @@ use Swoft\Pool\PoolProperties; ...@@ -21,7 +21,7 @@ use Swoft\Pool\PoolProperties;
class StorePoolConfig extends PoolProperties class StorePoolConfig extends PoolProperties
{ {
protected $name = 'seller'; protected $name = 'storeId';
/** /**
* Minimum active number of connections * Minimum active number of connections
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment