Commit 0242d795 by zhangsong

流量统计中添加访客统计

parent 5a736b65
<?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 SellerPoolConfig extends PoolProperties
{
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_SELLER_URI', 'seller:8099'));
}
protected $name = 'seller';
/**
* Minimum active number of connections
*
* @var int
*/
protected $minActive = 5;
/**
* the maximum number of active connections
*
* @var int
*/
protected $maxActive = 400;
/**
* the maximum number of wait connections
*
* @var int
*/
protected $maxWait = 500;
/**
* 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: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
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/27
* Time: 16:28
*/
namespace Hdll\Services\Seller\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferSave($referId, $unionId, $openId, $nickName, $headImgUrl)
* @method ResultInterface deferGet($id, $fields = ['*'])
* @method ResultInterface deferGetByUnionId($unionId, $fields = ['*'])
* @method ResultInterface deferGetByStoreId($storeId, $fields = ['*'])
* @method ResultInterface deferUpdate($id, $data)
* @method ResultInterface deferCountDistributionNum($sellerId)
* @method ResultInterface deferGetByIds(array $ids, $fields = ['*'])
* @method ResultInterface deferGetAndUpdateOpenId($unionId, $openId)
* @method ResultInterface deferSaveRelation($sellerId)
* @method ResultInterface deferUpdateRelationVip($sellerId, $isVip)
* @method ResultInterface deferCountVip($sellerId, $isVip)
* Interface SellerInterface
* @package App\Lib
*/
interface VisitorInterface
{
/**
* @param $referId
* @param $unionId
* @param $openId
* @param $nickName
* @param $headImgUrl
* @param string $realName
* @param string $phoneNumber
* @return mixed
* @author Administrator
*/
public function save($referId, $unionId, $openId, $nickName, $headImgUrl);
/**
* @param $id
* @param array $fields
* @return mixed
* @author Administrator
*/
public function get($id, $fields = ['*']);
/**
* @param $unionId
* @param array $fields
* @return mixed
* @author Administrator
*/
public function getByUnionId($unionId, $fields = ['*']);
/**
* @param $condition
* @param $data
* $data['referId']=>'来源ID'
* $data['unionId']=>'unionId'
* $data['openId']=>'openId'
* $data['nickName']=>'昵称'
* $data['headImgUrl']=>'头像URL'
* $data['realName']=>'真实姓名'
* $data['phoneNumber']=>'手机号'
* @return mixed
* @author Administrator
*/
public function update($condition, $data);
/**
* @param $storeId
* @param array $fields
* @return mixed
* @author Administrator
*/
public function getByStoreId($storeId, $fields = ['*']);
public function countDistributionNum($sellerId);
public function getByIds(array $ids, $fields = ['*']);
public function getAndUpdateOpenId($unionId, $openId);
public function saveRelation($sellerId);
public function updateRelationVip($sellerId, $isVip);
public function countVip($sellerId);
}
\ 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