Commit 2a5548c6 by 王召彬

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

parents 0e9e809c 67400b1e
...@@ -14,6 +14,7 @@ use Swoft\Core\ResultInterface; ...@@ -14,6 +14,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferUpdateProfile(string $token, array $data) * @method ResultInterface deferUpdateProfile(string $token, array $data)
* @method ResultInterface deferSelectUser(int $storeId, array $buyerIds, array $fields= ['*']) * @method ResultInterface deferSelectUser(int $storeId, array $buyerIds, array $fields= ['*'])
* @method ResultInterface deferGetRefereeInfo($storeId,$buyerId) * @method ResultInterface deferGetRefereeInfo($storeId,$buyerId)
* @method ResultInterface deferGetByNickname($nickname)
* Interface BuyerInterface * Interface BuyerInterface
* @package App\Lib * @package App\Lib
*/ */
...@@ -90,4 +91,13 @@ interface BuyerInterface ...@@ -90,4 +91,13 @@ interface BuyerInterface
* @return mixed * @return mixed
*/ */
public function getRefereeInfo($storeId,$buyerId); public function getRefereeInfo($storeId,$buyerId);
/**
* 获取(视图)买家信息 by nickname
* @param $nickname
* @return mixed
* @author work
*/
public function getByNickname($nickname);
} }
\ No newline at end of file
...@@ -16,7 +16,7 @@ use Swoft\Core\ResultInterface; ...@@ -16,7 +16,7 @@ use Swoft\Core\ResultInterface;
/** /**
* The interface of coupon service * The interface of coupon service
* *
* @method ResultInterface deferCheckCoupon(int $buyerId, int $storeId, int $couponId, int $itemId) * @method ResultInterface deferCheckCoupon(int $buyerId, int $storeId, int $couponId, array $itemIds)
* @method ResultInterface deferGetCouponRecvdList(int $buyerId, int $storeId, int $subStoreId = 0, int $itemId = 0) * @method ResultInterface deferGetCouponRecvdList(int $buyerId, int $storeId, int $subStoreId = 0, int $itemId = 0)
* @method ResultInterface deferGetDataByCouponId(int $buyerId, int $storeId, int $couponId) * @method ResultInterface deferGetDataByCouponId(int $buyerId, int $storeId, int $couponId)
*/ */
...@@ -40,10 +40,10 @@ interface CouponInterface ...@@ -40,10 +40,10 @@ interface CouponInterface
* @param integer $buyerId * @param integer $buyerId
* @param integer $storeId * @param integer $storeId
* @param integer $couponId * @param integer $couponId
* @param integer $itemId * @param array $itemIds
* @return int|boolen 如果可用返回优惠券的面值,不可用返回false * @return int|boolen 如果可用返回优惠券的面值,不可用返回false
*/ */
public function checkCoupon(int $buyerId, int $storeId, int $couponId, int $itemId); public function checkCoupon(int $buyerId, int $storeId, int $couponId, array $itemIds);
/** /**
* 更新优惠券状态 * 更新优惠券状态
......
...@@ -11,7 +11,8 @@ namespace Hdll\Services\FlowCount\Lib; ...@@ -11,7 +11,8 @@ namespace Hdll\Services\FlowCount\Lib;
use Swoft\Core\ResultInterface; use Swoft\Core\ResultInterface;
/** /**
* @method ResultInterface deferAdd($storeId, array $data) * @method ResultInterface deferAdd(int $storeId, array $data)
* @method ResultInterface deferBrowseAndShare(int $storeId, int $type, array $itemIds)
* Interface VisitorInterface * Interface VisitorInterface
* @package App\Lib * @package App\Lib
*/ */
...@@ -19,7 +20,6 @@ interface VisitorInterface ...@@ -19,7 +20,6 @@ interface VisitorInterface
{ {
/** /**
*
* 添加访客 * 添加访客
* @param int $storeId * @param int $storeId
* @param array $data * @param array $data
...@@ -30,6 +30,29 @@ interface VisitorInterface ...@@ -30,6 +30,29 @@ interface VisitorInterface
* string $data['headImgUrl']=>'访客头像URL' * string $data['headImgUrl']=>'访客头像URL'
* @return mixed * @return mixed
*/ */
public function add($storeId, 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' => '统计数',
* 'itemId' => '统计数',
* ... ...
* ],
* 'shareNum' => [
* 'itemId' => '统计数',
* 'itemId' => '统计数',
* ... ...
* ]
* ]
*/
public function browseAndShare(int $storeId, int $type, array $itemIds);
} }
\ No newline at end of file
...@@ -17,6 +17,10 @@ use Swoft\Core\ResultInterface; ...@@ -17,6 +17,10 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetServiceByGoodsId($storeId, $goodsId, $type = 3) * @method ResultInterface deferGetServiceByGoodsId($storeId, $goodsId, $type = 3)
* @method ResultInterface deferGetReturnVisitByGoodsId($storeId, $goodsId, $type = 2) * @method ResultInterface deferGetReturnVisitByGoodsId($storeId, $goodsId, $type = 2)
* @method ResultInterface deferListByIds($ids, $storeId) * @method ResultInterface deferListByIds($ids, $storeId)
* @method ResultInterface deferGetSkuInfo($skuId, $goodsId, $storeId)
* @method ResultInterface deferGetSkuByIds($goodsId, $skuIds, $storeId)
* @method ResultInterface deferGetSkuByGoodsId($goodsId, $storeId)
* @method ResultInterface deferGetSpecAttributeByGoodsId($goodsId, $storeId)
* @method ResultInterface deferAfterServiceTmp($storeId) * @method ResultInterface deferAfterServiceTmp($storeId)
* Interface GoodsInterface * Interface GoodsInterface
* @package Hdll\Services\Goods\Lib * @package Hdll\Services\Goods\Lib
...@@ -24,85 +28,118 @@ use Swoft\Core\ResultInterface; ...@@ -24,85 +28,118 @@ use Swoft\Core\ResultInterface;
interface GoodsInterface interface GoodsInterface
{ {
/** /**
* 获取商品 * 获取商品
* @param $storeId * @param $storeId
* @return [ * @return [
* 'gcId' 商品类ID * 'gcId' 商品类ID
* 'asId' 服务ID * 'asId' 服务ID
* 'stock' 库存 * 'stock' 库存
* 'name' 名称 * 'name' 名称
* 'image' 图片 * 'image' 图片
* 'price' 价格 * 'price' 价格
* 'state' 状态 * 'state' 状态
* 'body' 描述 * 'body' 描述
* 'originalPrice' 原价 * 'originalPrice' 原价
* 'sales' 销量 * 'sales' 销量
* ] * ]
* @param $id * @param $id
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function get($storeId, $id); public function get($storeId, $id);
/** /**
* 增加商品销量 * 增加商品销量
* 减少商品库存 * 减少商品库存
* @param $storeId * @param $storeId
* @param $goodsId * @param $goodsId
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function incSales($storeId, $goodsId); public function incSales($storeId, $goodsId);
/** /**
* 减少商品销量 * 减少商品销量
* 增加商品库存 * 增加商品库存
* @param $storeId * @param $storeId
* @param $goodsId * @param $goodsId
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function decSales($storeId, $goodsId); public function decSales($storeId, $goodsId);
/** /**
* 获取商品服务 * 获取商品服务
* @param $storeId * @param $storeId
* @param $goodsId * @param $goodsId
* @param $type 1 付款后 2 服务前 3 服务后 * @param $type 1 付款后 2 服务前 3 服务后
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function getServiceByGoodsId($storeId, $goodsId, $type = 3); public function getServiceByGoodsId($storeId, $goodsId, $type = 3);
/** /**
* 获取用户回访 * 获取用户回访
* @param $storeId * @param $storeId
* @param $goodsId * @param $goodsId
* @param $type 1 之前 2 之后 * @param $type 1 之前 2 之后
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function getReturnVisitByGoodsId($storeId, $goodsId, $type = 2); public function getReturnVisitByGoodsId($storeId, $goodsId, $type = 2);
/** /**
* 获取商品列表 ids * 获取商品列表 ids
* @param $ids * @param $ids
* @param $storeId * @param $storeId
* @param $order * @param $order
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function listByIds(array $ids, $storeId, $order = ['id', 'DESC']); public function listByIds(array $ids, $storeId, $order = ['id', 'DESC']);
/** /**
* 添加后续服务模版 * 获取sku信息
* @param $storeId * @param $skuId
* @return mixed * @param $goodsId
* @author work * @param $storeId
*/ * @return mixed
public function afterServiceTmp($storeId); * @author work
} */
\ No newline at end of file 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);
}
<?php <?php
namespace Hdll\Services\GroupBooking\Enum; namespace Hdll\Services\GroupBooking\Enum;
class GroupBookingCmqEnum{ class GroupBookingCmqEnum
{
const TOPIC = 'groupBooking'; const TOPIC = 'groupBooking';
const CLOSE_RECORD = 'closeRecord'; const CLOSE_RECORD = 'closeRecord';//关闭拼团
const GROUP_BOOKING = 'groupBooking';//拼团成功回调
} }
\ No newline at end of file
...@@ -17,9 +17,7 @@ class OrderItemEnum ...@@ -17,9 +17,7 @@ class OrderItemEnum
const LOCKED = 4;//锁定 const LOCKED = 4;//锁定
//核销渠道 //核销方式
const DELIVERED_BUYER_BTN = 1; //买家按钮核销 const DELIVERED_BTN = 1; //按钮核销
const DELIVERED_EMPLOYEE_CODE = 2; //店员扫码核销 const DELIVERED_CODE = 2; //扫码核销
const DELIVERED_SELLER_CODE = 3; //店主扫码码核销
const DELIVERED_SELLER_BTN = 4; //店主按钮核销
} }
\ No newline at end of file
...@@ -16,8 +16,8 @@ use Swoft\Core\ResultInterface; ...@@ -16,8 +16,8 @@ use Swoft\Core\ResultInterface;
/** /**
* The interface of demo service * The interface of demo service
* *
* @method ResultInterface deferpayStatus(int $storeId,int $bargainbranchId,int $status,int $orderId) * @method ResultInterface deferPayStatus(int $storeId,int $bargainbranchId,int $status,int $orderId)
* @method ResultInterface deferspendCardMoney( int $storeId,int $buyerId,int $itemOrderId,string $itemTitle,int $payMoney) * @method ResultInterface deferSpendCardMoney(int $storeId, int $buyerId, array $subOrders)
* @method ResultInterface deferReturnCardMoney( int $storeId,int $buyerId,int $itemOrderId,string $itemTitle,int $payMoney) * @method ResultInterface deferReturnCardMoney( int $storeId,int $buyerId,int $itemOrderId,string $itemTitle,int $payMoney)
*/ */
interface RechargeInterface interface RechargeInterface
...@@ -41,16 +41,23 @@ interface RechargeInterface ...@@ -41,16 +41,23 @@ interface RechargeInterface
* 花费卡金额 * 花费卡金额
* @param int $storeId * @param int $storeId
* @param int $buyerId * @param int $buyerId
* @param int $goodOrderId * @param array $subOrders
* $subOrders 示例:
* [
* [
* 'id' => 333,
* 'itemName' => 'namenamename',
* 'actualAmount' => 444,
* ],
* [
* 'id' => 555,
* 'itemName' => 'namenamename',
* 'actualAmount' => 666,
* ],
* ]
* @return mixed * @return mixed
*/ */
public function spendCardMoney( public function spendCardMoney(int $storeId, int $buyerId, array $subOrders);
int $storeId,
int $buyerId,
int $itemOrderId,
string $itemTitle,
int $payMoney
);
/** /**
* 退回储值卡金额 * 退回储值卡金额
......
...@@ -22,6 +22,7 @@ use Swoft\Core\ResultInterface; ...@@ -22,6 +22,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferPayOrder(int $storeId,string $orderSn,int $payStatus) * @method ResultInterface deferPayOrder(int $storeId,string $orderSn,int $payStatus)
* @method ResultInterface deferGetOrder(int $storeId,int $smsOId) * @method ResultInterface deferGetOrder(int $storeId,int $smsOId)
* @method ResultInterface deferGetOrderBySn(int $storeId,string $sn) * @method ResultInterface deferGetOrderBySn(int $storeId,string $sn)
* @method ResultInterface deferGetCountLeft(int $storeId)
*/ */
interface SMSInterface interface SMSInterface
{ {
...@@ -63,5 +64,14 @@ interface SMSInterface ...@@ -63,5 +64,14 @@ interface SMSInterface
* @return array * @return array
*/ */
public function getOrderBySn(int $storeId,string $sn); public function getOrderBySn(int $storeId,string $sn);
/**
* 根据店铺id 获取剩余的短信条数
*
* @param integer $storeId
* @return int
*/
public function getCountLeft(int $storeId);
} }
...@@ -5,22 +5,26 @@ ...@@ -5,22 +5,26 @@
* Date: 2018/7/25 * Date: 2018/7/25
* Time: 14:00 * Time: 14:00
*/ */
namespace Hdll\Services\SellerDistribution\Lib; namespace Hdll\Services\SellerDistribution\Lib;
use Swoft\Core\ResultInterface; use Swoft\Core\ResultInterface;
/** /**
* @method ResultInterface deferSaveBill($orderId, $sellerId, $money) * @method ResultInterface deferSaveBill($orderId, $sellerId, $money)
* @method ResultInterface deferGetCommission($sellerId) * @method ResultInterface deferGetCommission($sellerId)
* @method ResultInterface deferAddBalance($sellerId, $money, $orderSn='') * @method ResultInterface deferAddBalance($sellerId, $money, $orderSn = '')
* @method ResultInterface deferReduceBalance($sellerId, $money, $orderSn='') * @method ResultInterface deferReduceBalance($sellerId, $money, $orderSn = '')
* @method ResultInterface deferListByOrderId($storeId, $orderId,$sellerId) * @method ResultInterface deferListByOrderId($storeId, $orderId, $sellerId)
* @method ResultInterface deferAddTotal($sellerId, $money, $orderSn='') * @method ResultInterface deferAddTotal($sellerId, $money, $orderSn = '')
* @method ResultInterface deferRefundAddBalance($sellerId, $money, $orderSn='') * @method ResultInterface deferRefundAddBalance($sellerId, $money, $orderSn = '')
* @method ResultInterface deferCountVip($storeId, $sellerId) * @method ResultInterface deferCountVip($storeId, $sellerId)
* @method ResultInterface deferSumViewMoneyByStoreIds(array $storeIds)
* Interface SellerDistributionInterface * Interface SellerDistributionInterface
* @package App\Lib * @package App\Lib
*/ */
interface SellerDistributionInterface{ interface SellerDistributionInterface
{
/** /**
...@@ -53,7 +57,7 @@ interface SellerDistributionInterface{ ...@@ -53,7 +57,7 @@ interface SellerDistributionInterface{
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function addBalance($sellerId, $money, $orderSn=''); public function addBalance($sellerId, $money, $orderSn = '');
/** /**
* 减少佣金 * 减少佣金
...@@ -62,7 +66,7 @@ interface SellerDistributionInterface{ ...@@ -62,7 +66,7 @@ interface SellerDistributionInterface{
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function reduceBalance($sellerId, $money, $orderSn=''); public function reduceBalance($sellerId, $money, $orderSn = '');
/** /**
...@@ -73,7 +77,7 @@ interface SellerDistributionInterface{ ...@@ -73,7 +77,7 @@ interface SellerDistributionInterface{
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function listByOrderId($storeId, $orderId,$sellerId); public function listByOrderId($storeId, $orderId, $sellerId);
/** /**
* 更细对账表 * 更细对账表
...@@ -83,7 +87,7 @@ interface SellerDistributionInterface{ ...@@ -83,7 +87,7 @@ interface SellerDistributionInterface{
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function updateBill($storeId,$id,$balanceState); public function updateBill($storeId, $id, $balanceState);
/** /**
* 增加累计提现 * 增加累计提现
...@@ -92,7 +96,7 @@ interface SellerDistributionInterface{ ...@@ -92,7 +96,7 @@ interface SellerDistributionInterface{
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function addTotal($sellerId, $money, $orderSn=''); public function addTotal($sellerId, $money, $orderSn = '');
/** /**
...@@ -102,7 +106,7 @@ interface SellerDistributionInterface{ ...@@ -102,7 +106,7 @@ interface SellerDistributionInterface{
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
public function refundAddBalance($sellerId, $money, $orderSn=''); public function refundAddBalance($sellerId, $money, $orderSn = '');
/** /**
...@@ -113,4 +117,14 @@ interface SellerDistributionInterface{ ...@@ -113,4 +117,14 @@ interface SellerDistributionInterface{
* @author Administrator * @author Administrator
*/ */
public function countVip($storeId, $sellerId); public function countVip($storeId, $sellerId);
/**
* 统计所有分销金额
* @param array $storeIds
* @return mixed
* @author work
*/
public function sumViewMoneyByStoreIds(array $storeIds);
} }
\ No newline at end of file
...@@ -16,8 +16,8 @@ use Swoft\Core\ResultInterface; ...@@ -16,8 +16,8 @@ use Swoft\Core\ResultInterface;
/** /**
* The interface of demo service * The interface of demo service
* *
* @method ResultInterface deferpayStatus(int $storeId,int $bargainbranchId,int $status,int $orderId) * @method ResultInterface deferPayStatus(int $storeId,int $bargainbranchId,int $status,int $orderId)
* @method ResultInterface deferspendTimesCard( int $storeId,int $buyerId,int $itemOrderId, int $usercardId,int $goodsId,string $itemTitle, int $times) * @method ResultInterface deferSpendTimesCard(int $storeId, int $buyerId, int $usercardId, array $subOrders)
* @method ResultInterface deferReturnCardTimes( int $storeId,int $buyerId,int $itemOrderId,int $goodsId,string $itemTitle,int $times) * @method ResultInterface deferReturnCardTimes( int $storeId,int $buyerId,int $itemOrderId,int $goodsId,string $itemTitle,int $times)
* @method ResultInterface defergetTimesCardUserCardInfo(int $storeId, int $goodsId) * @method ResultInterface defergetTimesCardUserCardInfo(int $storeId, int $goodsId)
*/ */
...@@ -40,25 +40,14 @@ interface TimesCardInterface ...@@ -40,25 +40,14 @@ interface TimesCardInterface
/** /**
* 花费卡次数 * 花费卡次数
*
* @param int $storeId // 商铺id * @param integer $storeId
* @param int $buyerId // 买家ID * @param integer $buyerId
* @param int $itemOrderId // 订单 id * @param integer $usercardId
* @param int $usercardId // 用户卡id * @param array $subOrders
* @param int $goodsId // 商品id * @return bool
* @param string $itemTitle //商品名字
* @param int $times // 花费次数 传 1
* @return mixed
*/ */
public function spendTimesCard( public function spendTimesCard(int $storeId, int $buyerId, int $usercardId, array $subOrders);
int $storeId,
int $buyerId,
int $itemOrderId,
int $usercardId,
int $goodsId,
string $itemTitle,
int $times
);
/** /**
* 退回次卡数量 * 退回次卡数量
......
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