Commit 0f685e1c by dzhang

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

parents 4e0924b9 ff6c2a0a
......@@ -2,10 +2,11 @@
namespace Hdll\Services\Buyer\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferGetByUnionId(string $unionId, int $storeId)
* @method ResultInterface deferUsefulAgent(int $storeId, int $agentId)
* @method ResultInterface deferGetByOpenId(string $openId, int $storeId)
* Interface AgentInterface
* @package Hdll\Services\Buyer\Lib
*/
......
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/26
* Time: 16:00
*/
namespace Hdll\Services\Comments\Enum;
class StarEnum
{
const STAR = 1;//点赞
const CANCEL = 2;//取消点赞
const HAS_START_KEY = 'comments:hasStar';
const STAR_KEY = 'comments:star';
}
\ No newline at end of file
<?php
namespace Hdll\Services\Comments\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferGetNum(array $itemIds)
* Class CommentsInterface
* @package Hdll\Services\CommentsInterface\Lib
*/
interface CommentsInterface
{
public function getNum(array $itemIds);
}
\ No newline at end of file
<?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\Bean\Annotation\Value;
use Swoft\Pool\PoolProperties;
/**
* the config of service user
*
* @Bean()
*/
class LogisticsPoolConfig extends PoolProperties
{
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_LOGISTICS_URI', 'buyer:8099'));
}
/**
* the name of pool
*
*/
protected $name = 'logistics';
/**
* Minimum active number of connections
*
*/
protected $minActive = 5;
/**
* the maximum number of active connections
*
*/
protected $maxActive = 300;
/**
* the maximum number of wait connections
*
*/
protected $maxWait = 400;
/**
* Maximum waiting time
*
*/
protected $maxWaitTime = 3;
/**
* Maximum idle time
*
*/
protected $maxIdleTime = 60;
/**
* the time of connect timeout
*
*/
protected $timeout = 200;
/**
* the addresses of connection
*
* <pre>
* [
* '127.0.0.1:88',
* '127.0.0.1:88'
* ]
* </pre>
*
*/
protected $uri = [
"buyer:8099",
];
/**
* whether to user provider(consul/etcd/zookeeper)
*
*/
protected $useProvider = false;
/**
* the default balancer is random balancer
*
*/
protected $balancer = '';
/**
* the default provider is consul provider
*
*/
protected $provider = '';
}
<?php
namespace Hdll\Services\Logistics\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferOnPath(array $param)
* @method ResultInterface deferHandleFreight($storeId, array $receiver, array $goodsIds)
* Class LotteryInterface
* @package Hdll\Services\Logistics\Lib
*/
interface LogisticsInterface
{
public function onPath(array $param);
/**
* 获取运费
* @param $storeId
* @param array $receiver
* @param array $goodsIds
* @return mixed
*/
public function handleFreight($storeId, array $receiver, array $goodsIds);
/**
* 获取收货人地址
* @param $id
* @param $storeId
* @return mixed
*/
public function getReceiver($id, $storeId);
}
\ 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