Commit fe7ad8d6 by 王召彬

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

parents 7059e679 deb50fa5
......@@ -2,9 +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
*/
......@@ -22,4 +24,18 @@ interface AgentInterface
*/
public function usefulAgent(int $storeId, int $agentId);
/**
* 创建分销商
* @param $buyerId
* @param $unionId
* @param $openId
* @param $storeId
* @param $nickname
* @param $headimgurl
* @return array|mixed
* @throws BaseException
*/
public function create($param);
}
\ No newline at end of file
<?php
namespace Hdll\Services\Comments\Enum;
class CommentsEnum
{
const VIRTUAL_COMMENTS = 0; //虚拟评论
const REAL_COMMENTS = 1;//真实评论
const CHILD_COMMENTS = 2;//子评论
const CATEGORY_ACTIVITY_TLP = 0;//活动模版分类
}
\ No newline at end of file
<?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
{
/**
* 获取item评论数
* @param array $itemIds
* @return array
* [1=>['virtual'=>1,'real'=>2]]
* @throws BaseException
*/
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\Pool\PoolProperties;
/**
* @Bean()
*/
class CommentsPoolConfig extends PoolProperties
{
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_COMMENTS_URI', 'comments:8099'));
}
protected $name = 'coupon';
/**
* 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 = [];
/**
* 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\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', 'logistics: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 = '';
}
......@@ -17,7 +17,7 @@ use Swoft\Core\ResultInterface;
* The interface of craftsman service
*
* @method ResultInterface deferGetCraftsmenList(int $storeId, int $subStoreId = 0, int $itemId = 0)
* @method ResultInterface deferGetCraftsmenByUnionId(string $unionId)
* @method ResultInterface deferGetCraftsmenByUnionId(string $unionId, int $isSeller)
* @method ResultInterface defercreateCraftsman($storeId, array $params)
* @method ResultInterface deferGetCraftsmenById(int $storeId, int $cmanId)
* @method ResultInterface deferGetCraftsmenByIds(int $storeId, array $cmanIds)
......@@ -72,9 +72,10 @@ interface CraftsmanInterface
* 根据unionId获取店员信息
*
* @param string $unionId
* @param int $isSeller 是否店主 1-是 ,0-否
* @return array
*/
public function getCraftsmenByUnionId(string $unionId);
public function getCraftsmenByUnionId(string $unionId, int $isSeller);
/**
......
<?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
......@@ -9,21 +9,35 @@ namespace Hdll\Services\Order\Enum;
class OrderEnum
{
//订单状态
const STATUS_CANCEL = 0; //已取消
const STATUS_UNPAID = 10; //待支付
const STATUS_PAID = 20; //已支付
const STATUS_DELIVERY = 30; //已发货/已预约
const STATUS_DELIVERED = 40; //已收获/已核销
const STATUS_DELIVERY = 30; //已发货|已预约
const STATUS_ARRIVED = 31; //已送达
const STATUS_DELIVERED = 40; //已收获|已核销
const STATUS_REFUND = 50; //申请退款
const STATUS_REFUNDED = 60; //已退款
const STATUS_CANCEL = 0; //已取消
const STATUS_CLOSED = 70; //已关闭
const STATUS_REFUNDING = 80; //退款中
const STATUS_EVALUATION = 90; //已评价
const STATUS_COLLECTION = 100; //团购进行中
//支付后的所有状态数组
const PAID_STATUS = [
self::STATUS_PAID,
self::STATUS_DELIVERY,
self::STATUS_ARRIVED,
self::STATUS_REFUND,
self::STATUS_REFUNDING,
self::STATUS_DELIVERED,
self::STATUS_EVALUATION
];
//订单类别
const CLASS_SERVICE = 1;//服务类
const CLASS_PHYSICAL = 2;//实物类
//订单类型
const TYPE_GOODS = 0; //商品订单
const TYPE_CUT_PRICE = 1; //砍价订单
......@@ -32,48 +46,25 @@ class OrderEnum
const TYPE_CARD = 4; //储值卡订单
const TYPE_TIMESCARD = 5; //次卡订单
const TYPE_DEPOSIT = 6;//定金订单
const CHANGE_PRICE_FALSE = 1;
const CHANGE_PRICE_TRUE = 2;
//对账锁定
const LOCK = 1; //订单锁定
//订单类型数组
const ORDER_TYPES = [
self::TYPE_GOODS,
self::TYPE_CUT_PRICE,
self::TYPE_LIMIT,
self::TYPE_COLLECTION,
self::TYPE_CARD,
self::TYPE_TIMESCARD
self::TYPE_TIMESCARD,
self::TYPE_DEPOSIT
];
//可以直接预约的订单类型
const CAN_RESERVE = [
self::TYPE_GOODS,
self::TYPE_CUT_PRICE,
self::TYPE_LIMIT,
];
const PAY_STATUS = [ //支付状态
self::STATUS_PAID,
self::STATUS_DELIVERY,
self::STATUS_COLLECTION
];
const PAID_STATUS = [ //支付后的所有状态数组
self::STATUS_PAID,
self::STATUS_DELIVERY,
self::STATUS_DELIVERED,
self::STATUS_EVALUATION
];
//订单改价
const CHANGE_PRICE_FALSE = 1;//未改价
const CHANGE_PRICE_TRUE = 2;//改价
//对账状态
const BALANCE_STATE_FALSE = 0; //未对账
const BALANCE_STATE_TRUE = 1;//已对账
const BALANCE_STATE_FALSE = 0; //未对账
const BALANCE_STATE_TRUE = 1;//已对账
const LOCK = 1; //对账异常锁定
//退款状态
const REFUND_NONE = 0;//无退款
......
<?php
namespace Hdll\Services\StateLess\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferSave($nickname, $headimgurl)
* Interface VirtualUserService
* @package Hdll\Services\StateLess\Lib
*/
interface VirtualUserService
{
public function save($nickname, $headimgurl);
}
\ 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