Commit 1b04b988 by zhangsong

合并test分支

parents de84748e 81295d30
# 1.0.83
- 添加服务模版消息
# 1.0.82
- 添加根据店铺名称获取店铺信息的rpc接口
......
......@@ -11,7 +11,8 @@ namespace Hdll\Services\FlowCount\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferAdd(array $data)
* @method ResultInterface deferAdd(int $storeId, array $data)
* @method ResultInterface deferBrowseAndShare(int $storeId, int $type, array $itemIds)
* Interface VisitorInterface
* @package App\Lib
*/
......@@ -20,8 +21,8 @@ interface VisitorInterface
/**
* 添加访客
* @param int $storeId
* @param array $data
* int $data['storeId']=> 商家id
* int $data['visitorId']=>访客id
* int $data['date']=>访问时间
* int $data['appType']=>访问的app类型 默认传值:1前台小程序,2后台小程序
......@@ -29,6 +30,29 @@ interface VisitorInterface
* string $data['headImgUrl']=>'访客头像URL'
* @return mixed
*/
public function add(array $data);
public function add(int $storeId, array $data);
/**
* 访问量和转发量
* @param int $storeId 店铺id
* @param int $type 类型:0普通商品 1砍价 2限时购 3拼团
* @param array $itemIds 商品或活动(活动指:砍价、限时购 、拼团)的id列表
* 说明:$itemIds 格式[1,2,3]
* @return ;
* 响应参数:
* [
* 'browseNum' => [
* 'itemId' => 10,
* 'itemId' => 10,
* ... ...
* ],
* 'shareNum' => [
* 'itemId' => 10,
* 'itemId' => 10,
* ... ...
* ]
* ]
*/
public function browseAndShare(int $storeId, int $type, array $itemIds);
}
\ No newline at end of file
......@@ -28,118 +28,118 @@ use Swoft\Core\ResultInterface;
interface GoodsInterface
{
/**
* 获取商品
* @param $storeId
* @return [
* 'gcId' 商品类ID
* 'asId' 服务ID
* 'stock' 库存
* 'name' 名称
* 'image' 图片
* 'price' 价格
* 'state' 状态
* 'body' 描述
* 'originalPrice' 原价
* 'sales' 销量
* ]
* @param $id
* @return mixed
* @author Administrator
*/
public function get($storeId, $id);
/**
* 增加商品销量
* 减少商品库存
* @param $storeId
* @param $goodsId
* @return mixed
* @author Administrator
*/
public function incSales($storeId, $goodsId);
/**
* 减少商品销量
* 增加商品库存
* @param $storeId
* @param $goodsId
* @return mixed
* @author Administrator
*/
public function decSales($storeId, $goodsId);
/**
* 获取商品服务
* @param $storeId
* @param $goodsId
* @param $type 1 付款后 2 服务前 3 服务后
* @return mixed
* @author Administrator
*/
public function getServiceByGoodsId($storeId, $goodsId, $type = 3);
/**
* 获取用户回访
* @param $storeId
* @param $goodsId
* @param $type 1 之前 2 之后
* @return mixed
* @author Administrator
*/
public function getReturnVisitByGoodsId($storeId, $goodsId, $type = 2);
/**
* 获取商品列表 ids
* @param $ids
* @param $storeId
* @param $order
* @return mixed
* @author Administrator
*/
public function listByIds(array $ids, $storeId, $order = ['id', 'DESC']);
/**
* 获取sku信息
* @param $skuId
* @param $goodsId
* @param $storeId
* @return mixed
* @author work
*/
public function getSkuInfo($skuId, $goodsId, $storeId);
/**
* 获取多个sku信息
* @param $goodsId
* @param $skuIds
* @return mixed
* @author work
*/
public function getSkuByIds($goodsId, $skuIds, $storeId);
public function getSkuByGoodsId($goodsId, $storeId);
/**
* 获取商品规格属性
* @param $goodsId
* @param $storeId
* @return mixed
* @author work
*/
public function getSpecAttributeByGoodsId($goodsId, $storeId);
/**
* 添加后续服务模版
* @param $storeId
* @return mixed
* @author work
*/
public function afterServiceTmp($storeId);
}
\ No newline at end of file
/**
* 获取商品
* @param $storeId
* @return [
* 'gcId' 商品类ID
* 'asId' 服务ID
* 'stock' 库存
* 'name' 名称
* 'image' 图片
* 'price' 价格
* 'state' 状态
* 'body' 描述
* 'originalPrice' 原价
* 'sales' 销量
* ]
* @param $id
* @return mixed
* @author Administrator
*/
public function get($storeId, $id);
/**
* 增加商品销量
* 减少商品库存
* @param $storeId
* @param $goodsId
* @return mixed
* @author Administrator
*/
public function incSales($storeId, $goodsId);
/**
* 减少商品销量
* 增加商品库存
* @param $storeId
* @param $goodsId
* @return mixed
* @author Administrator
*/
public function decSales($storeId, $goodsId);
/**
* 获取商品服务
* @param $storeId
* @param $goodsId
* @param $type 1 付款后 2 服务前 3 服务后
* @return mixed
* @author Administrator
*/
public function getServiceByGoodsId($storeId, $goodsId, $type = 3);
/**
* 获取用户回访
* @param $storeId
* @param $goodsId
* @param $type 1 之前 2 之后
* @return mixed
* @author Administrator
*/
public function getReturnVisitByGoodsId($storeId, $goodsId, $type = 2);
/**
* 获取商品列表 ids
* @param $ids
* @param $storeId
* @param $order
* @return mixed
* @author Administrator
*/
public function listByIds(array $ids, $storeId, $order = ['id', 'DESC']);
/**
* 获取sku信息
* @param $skuId
* @param $goodsId
* @param $storeId
* @return mixed
* @author work
*/
public function getSkuInfo($skuId, $goodsId, $storeId);
/**
* 获取多个sku信息
* @param $goodsId
* @param $skuIds
* @return mixed
* @author work
*/
public function getSkuByIds($goodsId, $skuIds, $storeId);
public function getSkuByGoodsId($goodsId, $storeId);
/**
* 获取商品规格属性
* @param $goodsId
* @param $storeId
* @return mixed
* @author work
*/
public function getSpecAttributeByGoodsId($goodsId, $storeId);
/**
* 添加后续服务模版
* @param $storeId
* @return mixed
* @author work
*/
public function afterServiceTmp($storeId);
}
......@@ -22,6 +22,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferPayOrder(int $storeId,string $orderSn,int $payStatus)
* @method ResultInterface deferGetOrder(int $storeId,int $smsOId)
* @method ResultInterface deferGetOrderBySn(int $storeId,string $sn)
* @method ResultInterface deferGetCountLeft(int $storeId)
*/
interface SMSInterface
{
......@@ -63,5 +64,14 @@ interface SMSInterface
* @return array
*/
public function getOrderBySn(int $storeId,string $sn);
/**
* 根据店铺id 获取剩余的短信条数
*
* @param integer $storeId
* @return int
*/
public function getCountLeft(int $storeId);
}
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