Commit 9a146476 by dzhang

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

parents cb25f269 2e7cec14
# 2.0.36
- 店铺服务增加rpc接口
# 2.0.35
- 增加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;
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)
* Interface AgencyInterface
* @package App\Lib
......@@ -30,7 +30,7 @@ interface BillInterface
* @param string $orderName //订单名称
* @param int $orderType //订单类型
* @param int $agentId //代理商id
* @param int $itemId
* @param int $subOrder
* @return mixed
* @author Administrator
*/
......@@ -43,7 +43,7 @@ interface BillInterface
string $orderName,
int $orderType,
int $agentId,
int $itemId
array $subOrder
);
public function getListByOrderId(int $storeId, int $orderId);
......
......@@ -8,5 +8,5 @@ class CommentsEnum
const REAL_COMMENTS = 1;//真实评论
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;
* @method ResultInterface deferGetReturnVisitByGoodsIds($storeId, $goodsIds)
* @method ResultInterface deferCountEvaluate($storeId, $time)
* @method ResultInterface deferFind($storeId, $id)
* @method ResultInterface deferReduceStock($storeId, $goods)
* @method ResultInterface deferAddStock($storeId, $goods)
* Interface GoodsInterface
* @package Hdll\Services\Goods\Lib
*/
......@@ -186,4 +188,25 @@ interface GoodsInterface
* @return array|mixed
*/
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;
/**
* @method ResultInterface deferOnPath(array $param)
* @method ResultInterface deferHandleFreight($storeId, array $receiver, array $goodsIds)
* @method ResultInterface deferHandleFreight($storeId, array $receiver, array $goods)
* Class LotteryInterface
* @package Hdll\Services\Logistics\Lib
*/
......@@ -19,10 +19,10 @@ interface LogisticsInterface
* 获取运费
* @param $storeId
* @param array $receiver
* @param array $goodsIds
* @param array $goods
* @return mixed
*/
public function handleFreight($storeId, array $receiver, array $goodsIds);
public function handleFreight($storeId, array $receiver, array $goods);
/**
* 获取收货人地址
......
......@@ -5,33 +5,34 @@
* Date: 2018/7/5
* Time: 13:15
*/
namespace Hdll\Services\Notice\Enum;
class NoticeEnum
{
//商家小程序发送
const TYPE_MINI_BACKEND_SEND= 100;
//腾讯sms发送
const TYPE_TENCENT_SMS = 150;
//买家小程序消息推送
const TYPE_MINI_FRONTEND_SEND= 101;
const TYPE_MP_SEND= 102;
//商家小程序发送
const TYPE_MINI_BACKEND_SEND = 100;
const SEND_TYPES = [
self::TYPE_MINI_BACKEND_SEND,
self::TYPE_TENCENT_SMS,
self::TYPE_MINI_FRONTEND_SEND,
self::TYPE_MP_SEND,
];
//腾讯sms发送
const TYPE_TENCENT_SMS = 150;
//买家小程序消息推送
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,16 @@ interface NoticeInterface
]
];
*
* 系统发送消息数据结构
$data[NoticeEnum::TYPE_SYSTEM_SEND] = [
'storeId' => 198
"userId" => "1", //用户id
"content" => "内容",
"page" => "", //页面地址
* "isUpdate"=> bool ,//是否更新 根据page storeId userId更新未读消息内容
];
*
*
* @param array $sendTypes
* @param array $data
* @param $sendTime //如果需要多个时间段发送则填写时间戳数组例如:[15800000,1580000]
......
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