Commit 7a022c94 by liwotianname

add customerprofiles

parent 0699ffb1
<?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 CustomerProfilesConfig extends PoolProperties
{
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_CUSTOMERPROFILES_URI', 'customerprofiles:8099'));
}
protected $name = 'customerprofiles';
/**
* 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 = 200;
/**
* 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 = [
'customerprofiles: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 = '';
}
<?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\CustomerProfiles\Lib;
use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferAddOrder($storeId, $orderId,$goodsId,$goodsName,$orderPrice,$orderType,$consigneeName,$consigneePhone)
*/
interface ProfileInterface
{
/**
* 档案和消费信息入库
* @param $storeId
* @param $orderId
* @param $goodsId
* @param $goodsName
* @param $orderPrice
* @param $orderType
* @return mixed
*/
public function AddOrder($storeId, $orderId,$goodsId,$goodsName,$orderPrice,$orderType,$consigneeName,$consigneePhone);
}
\ 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