Commit c515a066 by xmy

Merge branch 'v4'

parents af4d5aad 1b7d443d
<?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 user
*
* @Bean()
*/
class LotteryPoolConfig extends PoolProperties
{
public function __construct()
{
// 区别本地和线上的RPC服务地址
// $this->uri = explode(',', env('RPC_GROUPBOOKING_URI', '172.21.0.38:8099,172.16.255.27:8099'));
$this->uri = explode(',', env('RPC_LOTTERY_URI', 'lottery:8099'));
}
protected $name = 'groupBooking';
/**
* 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>
*
* @var array
*/
protected $uri = [
'192.168.3.39:8200',
];
/**
* 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 = '';
}
<?php
namespace Hdll\Services\Lottery\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferAdminCountActivity($storeId)
* @method ResultInterface deferGetNewOrderNum($storeId, $time)
* Class LotteryInterface
* @package Hdll\Services\Lottery\Lib
*/
interface LotteryInterface
{
/**
* 获取所有活动数量
* [
* 'total'=>1,
* 'online'=>1
* ]
* @param $storeId
* @return mixed
* @author work
*/
public function adminCountActivity($storeId);
/**
* 获取新订单数量
* @param $storeId
* @param $time
* @return mixed
* @return number
* @author work
*/
public function getNewOrderNum($storeId, $time);
}
\ No newline at end of file
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