Commit 82c64325 by 王召彬

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

parents 05180f37 0ff3f605
# 2.0.36
- 店铺服务增加rpc接口
# 2.0.35 # 2.0.35
- 增加rpc接口 - 增加rpc接口
......
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/27
* Time: 16:28
*/
namespace Hdll\Services\ActivityPlan\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferGetInfo(int $id)
* Interface VisitorInterface
* @package App\Lib
*/
interface ActivityPlanInterface
{
/**
* 根据id获取活动方案
* @return mixed
*/
public function getInfo(int $id);
}
\ No newline at end of file
...@@ -12,7 +12,7 @@ namespace Hdll\Services\Buyer\Lib; ...@@ -12,7 +12,7 @@ namespace Hdll\Services\Buyer\Lib;
use Swoft\Core\ResultInterface; use Swoft\Core\ResultInterface;
/** /**
* @method ResultInterface deferSaveBill(int $order_id, int $buyer_id, int $store_id, string $order_sn, int $money, string $orderName, int $orderType, int $agentId, int $itemId) * @method ResultInterface deferSaveBill(int $order_id, int $buyer_id, int $store_id, string $order_sn, int $money, string $orderName, int $orderType, int $agentId, array $subOrder)
* @method ResultInterface deferGetListByOrderId(int $storeId, int $orderId) * @method ResultInterface deferGetListByOrderId(int $storeId, int $orderId)
* Interface AgencyInterface * Interface AgencyInterface
* @package App\Lib * @package App\Lib
...@@ -30,7 +30,7 @@ interface BillInterface ...@@ -30,7 +30,7 @@ interface BillInterface
* @param string $orderName //订单名称 * @param string $orderName //订单名称
* @param int $orderType //订单类型 * @param int $orderType //订单类型
* @param int $agentId //代理商id * @param int $agentId //代理商id
* @param int $itemId * @param int $subOrder
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
...@@ -43,7 +43,7 @@ interface BillInterface ...@@ -43,7 +43,7 @@ interface BillInterface
string $orderName, string $orderName,
int $orderType, int $orderType,
int $agentId, int $agentId,
int $itemId array $subOrder
); );
public function getListByOrderId(int $storeId, int $orderId); public function getListByOrderId(int $storeId, int $orderId);
......
...@@ -8,5 +8,5 @@ class CommentsEnum ...@@ -8,5 +8,5 @@ class CommentsEnum
const REAL_COMMENTS = 1;//真实评论 const REAL_COMMENTS = 1;//真实评论
const CHILD_COMMENTS = 2;//子评论 const CHILD_COMMENTS = 2;//子评论
const CATEGORY_ACTIVITY_TLP = 0;//活动模版分类 const CATEGORY_ACTIVITY_TLP = 1;//活动模版分类
} }
\ 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;
/**
* the config of service user
*
* @Bean()
*/
class ActivityPlanPoolConfig extends PoolProperties
{
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_ACTIVITYPLAN_URI', 'activity-plan:8099'));
}
protected $name = 'activity-plan';
/**
* 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 = '';
}
...@@ -28,6 +28,8 @@ use Swoft\Core\ResultInterface; ...@@ -28,6 +28,8 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetReturnVisitByGoodsIds($storeId, $goodsIds) * @method ResultInterface deferGetReturnVisitByGoodsIds($storeId, $goodsIds)
* @method ResultInterface deferCountEvaluate($storeId, $time) * @method ResultInterface deferCountEvaluate($storeId, $time)
* @method ResultInterface deferFind($storeId, $id) * @method ResultInterface deferFind($storeId, $id)
* @method ResultInterface deferReduceStock($storeId, $goods)
* @method ResultInterface deferAddStock($storeId, $goods)
* Interface GoodsInterface * Interface GoodsInterface
* @package Hdll\Services\Goods\Lib * @package Hdll\Services\Goods\Lib
*/ */
...@@ -186,4 +188,25 @@ interface GoodsInterface ...@@ -186,4 +188,25 @@ interface GoodsInterface
* @return array|mixed * @return array|mixed
*/ */
public function find($storeId, $id); public function find($storeId, $id);
/**
* 减少库存
* @param $storeId
* @param $goods = [
* 商品 goodsId=>num,
* sku goodsId=>[skuId=>num]
* ]
*/
public function reduceStock($storeId, $goods);
/**
* 增加库存
* @param $storeId
* @param $goods =[
* 商品 goodsId=>num,
* sku goodsId=>[skuId=>num]
* ]
*/
public function addStock($storeId, $goods);
} }
...@@ -6,7 +6,7 @@ use Swoft\Core\ResultInterface; ...@@ -6,7 +6,7 @@ use Swoft\Core\ResultInterface;
/** /**
* @method ResultInterface deferOnPath(array $param) * @method ResultInterface deferOnPath(array $param)
* @method ResultInterface deferHandleFreight($storeId, array $receiver, array $goodsIds) * @method ResultInterface deferHandleFreight($storeId, array $receiver, array $goods)
* Class LotteryInterface * Class LotteryInterface
* @package Hdll\Services\Logistics\Lib * @package Hdll\Services\Logistics\Lib
*/ */
...@@ -19,10 +19,10 @@ interface LogisticsInterface ...@@ -19,10 +19,10 @@ interface LogisticsInterface
* 获取运费 * 获取运费
* @param $storeId * @param $storeId
* @param array $receiver * @param array $receiver
* @param array $goodsIds * @param array $goods
* @return mixed * @return mixed
*/ */
public function handleFreight($storeId, array $receiver, array $goodsIds); public function handleFreight($storeId, array $receiver, array $goods);
/** /**
* 获取收货人地址 * 获取收货人地址
......
...@@ -5,33 +5,34 @@ ...@@ -5,33 +5,34 @@
* Date: 2018/7/5 * Date: 2018/7/5
* Time: 13:15 * Time: 13:15
*/ */
namespace Hdll\Services\Notice\Enum; namespace Hdll\Services\Notice\Enum;
class NoticeEnum class NoticeEnum
{ {
//商家小程序发送 //商家小程序发送
const TYPE_MINI_BACKEND_SEND= 100; const TYPE_MINI_BACKEND_SEND = 100;
//腾讯sms发送
const TYPE_TENCENT_SMS = 150;
//买家小程序消息推送
const TYPE_MINI_FRONTEND_SEND= 101;
const TYPE_MP_SEND= 102;
const SEND_TYPES = [ //腾讯sms发送
self::TYPE_MINI_BACKEND_SEND, const TYPE_TENCENT_SMS = 150;
self::TYPE_TENCENT_SMS,
self::TYPE_MINI_FRONTEND_SEND,
self::TYPE_MP_SEND,
];
//买家小程序消息推送
const TYPE_MINI_FRONTEND_SEND = 101;
//公众号发送
const TYPE_MP_SEND = 102;
//系统消息发送
const TYPE_SYSTEM_SEND = 103;
const SEND_TYPES = [
self::TYPE_MINI_BACKEND_SEND,
self::TYPE_TENCENT_SMS,
self::TYPE_MINI_FRONTEND_SEND,
self::TYPE_MP_SEND,
self::TYPE_SYSTEM_SEND,
];
} }
\ No newline at end of file
...@@ -80,6 +80,18 @@ interface NoticeInterface ...@@ -80,6 +80,18 @@ interface NoticeInterface
] ]
]; ];
* *
* 系统发送消息数据结构
$data[NoticeEnum::TYPE_SYSTEM_SEND] = [
NoticeEnum::TYPE_SYSTEM_SEND=>[
'storeId' => 198
"userId" => "1", //用户id
"content" => "内容",
"page" => "", //页面地址
"isUpdate"=> bool ,//是否更新 根据page storeId userId更新未读消息内容
]
];
*
*
* @param array $sendTypes * @param array $sendTypes
* @param array $data * @param array $data
* @param $sendTime //如果需要多个时间段发送则填写时间戳数组例如:[15800000,1580000] * @param $sendTime //如果需要多个时间段发送则填写时间戳数组例如:[15800000,1580000]
......
...@@ -20,4 +20,5 @@ class OrderItemEnum ...@@ -20,4 +20,5 @@ class OrderItemEnum
//核销方式 //核销方式
const DELIVERED_BTN = 1; //按钮核销 const DELIVERED_BTN = 1; //按钮核销
const DELIVERED_CODE = 2; //扫码核销 const DELIVERED_CODE = 2; //扫码核销
const DELIVERED_AUTO = 3;//自动核销/收货
} }
\ No newline at end of file
...@@ -11,10 +11,10 @@ class OrderQueueEnum ...@@ -11,10 +11,10 @@ class OrderQueueEnum
{ {
const TOPIC = "order"; const TOPIC = "order";
const UPDATE_INFO = 'update-info'; const UPDATE_INFO = 'update-info'; //买家订单更改
const SELLER_ORDER_UPDATE_INFO = 'updateInfoById';
const SELLER_ORDER_UPDATE_INFO = 'updateInfoById'; //卖家订单更改
const ORDER_DELIVERY = 'orderDelivery';//实物订单发货
} }
\ 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