Commit b702e0e7 by 王召彬

Merge branch 'test' of http://git.dev.2b3.cn/tencent/services into test

parents 8ffbd8b4 b54868ed
<?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 frontmoney
*/
class FrontMoneyPoolConfig extends PoolProperties
{
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_FRONTMONEY_URI', 'frontmoney:8099'));
}
protected $name = 'frontmoney';
/**
* Minimum active number of connections
*
* @var int
*/
protected $minActive = 5;
/**
* the maximum number of active connections
*
* @var int
*/
protected $maxActive = 300;
/**
* the maximum number of wait connections
*
* @var int
*/
protected $maxWait = 400;
/**
* 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>
* @Value(name="", env="${RPC_FRONTMONEY_URI}")
* @var array
*/
protected $uri = [
'frontmoney: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 = '';
}
......@@ -16,10 +16,10 @@ use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferBackNum(string $token, int $consignee_id, int $front_id, int $selected_num, int $order_type, int $goods_id, string $reservation_time = '')
* @method ResultInterface deferBackNum(string $token, int $consigneeId, int $frontId, int $selectedNum, int $orderType, int $goodsId, string $reservationTime = '')
* @method ResultInterface deferGetFrontGoods(int $storeId, int $frontId)
* @method ResultInterface deferGetFrontInfo(int $storeId, int $goodsId)
* @method ResultInterface deferPayStatus(string $store_id,int $front_id, int $status, int $orderId)
* @method ResultInterface deferPayStatus(string $storeId,int $frontId, int $status, int $orderId)
* @method ResultInterface deferGetFrontCounts(int $storeId)
* @method ResultInterface deferGetNewOrderNum(int $storeId,int $lastTime)
*/
......@@ -37,17 +37,11 @@ interface FrontMoneyInterface
* @param string $reservation_time
* @return mixed
*/
public function backNum(
string $token,
int $consignee_id,
int $front_id,
int $selected_num,
int $order_type,
int $goods_id,
string $reservation_time);
public function backNum(string $token, int $consigneeId, int $frontId, int $selectedNum, int $orderType, int $goodsId, string $reservationTime = '');
/**
* 获取限时购商品的 商品信息
* 获取定金商品的 商品信息
* @param int $front_id
* @return {
* "name" 名称
......@@ -59,7 +53,7 @@ interface FrontMoneyInterface
public function getFrontGoods(int $storeId, int $frontId);
/**
* 通过商品id 获取是否 有限时购活动
* 通过商品id 获取是否 有定金活动
* @param int $storeId
* @param int $goodsId
* @return bool
......@@ -77,10 +71,10 @@ interface FrontMoneyInterface
* @return bool|mixed
* @throws ConException
*/
public function payStatus(string $store_id,int $front_id,int $status, int $orderId);
public function payStatus(string $storeId,int $frontId, int $status, int $orderId);
/**
* 获取限时购活动总个数 和正在进行的个数
* 获取定金活动总个数 和正在进行的个数
*
* @return mixed
*/
......
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