Commit 9bdc1e69 by xmy

feat:代理

parent ae149c03
<?php
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
*/
interface AgentInterface
{
public function getByUnionId(string $unionId, int $storeId);
public function getByOpenId(string $openId, int $storeId);
/**
* 代理是否可用
* @param int $storeId
* @param int $agentId
* @return bool
*/
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
...@@ -12,12 +12,13 @@ namespace Hdll\Services\Buyer\Lib; ...@@ -12,12 +12,13 @@ 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) * @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
*/ */
interface BillInterface{ interface BillInterface
{
/** /**
* 保存账单数据 * 保存账单数据
...@@ -28,6 +29,8 @@ interface BillInterface{ ...@@ -28,6 +29,8 @@ interface BillInterface{
* @param int $money //订单金额 * @param int $money //订单金额
* @param string $orderName //订单名称 * @param string $orderName //订单名称
* @param int $orderType //订单类型 * @param int $orderType //订单类型
* @param int $agentId //代理商id
* @param int $subOrder
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
...@@ -38,7 +41,9 @@ interface BillInterface{ ...@@ -38,7 +41,9 @@ interface BillInterface{
string $orderSn, string $orderSn,
int $money, int $money,
string $orderName, string $orderName,
int $orderType int $orderType,
int $agentId,
array $subOrder
); );
public function getListByOrderId(int $storeId, int $orderId); public function getListByOrderId(int $storeId, int $orderId);
......
...@@ -129,4 +129,12 @@ interface BuyerInterface ...@@ -129,4 +129,12 @@ interface BuyerInterface
* @return mixed * @return mixed
*/ */
public function updateUser($storeId, $buyerId, $data); public function updateUser($storeId, $buyerId, $data);
/**
* 获取买家信息
* @param $storeId
* @param $openId
* @return mixed
*/
public function getUserByOpenId($storeId, $openId);
} }
\ No newline at end of file
...@@ -5,10 +5,20 @@ ...@@ -5,10 +5,20 @@
* Date: 2018/7/26 * Date: 2018/7/26
* Time: 16:00 * Time: 16:00
*/ */
namespace Hdll\Services\Goods\Enum; namespace Hdll\Services\Goods\Enum;
class GoodsEnum{ class GoodsEnum
{
const ON_OFFER = 0;//出售中 const ON_OFFER = 0;//出售中
const SOLD_OUT = 1;//下架 const SOLD_OUT = 1;//下架
const SELL_OUT = 2;//售完 const SELL_OUT = 2;//售完
const SERVER_GOODS = 1;//服务商品
const ENTITY_GOODS = 2;//实体商品
const FREIGHT_FREE = 1; //包邮
const FREIGHT_DISTANCE = 2;//距离邮费
const FREIGHT_WEIGHT = 3;//重量邮费
} }
\ No newline at end of file
...@@ -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);
} }
<?php
namespace Hdll\Services\Logistics\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferOnPath(array $param)
* @method ResultInterface deferHandleFreight($storeId, array $receiver, array $goods)
* Class LotteryInterface
* @package Hdll\Services\Logistics\Lib
*/
interface LogisticsInterface
{
public function onPath(array $param);
/**
* 获取运费
* @param $storeId
* @param array $receiver
* @param array $goods
* @return mixed
*/
public function handleFreight($storeId, array $receiver, array $goods);
/**
* 获取收货人地址
* @param $id
* @param $storeId
* @return mixed
*/
public function getReceiver($id, $storeId);
}
\ No newline at end of file
<?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