Commit 3c6978f6 by 王召彬

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

parents ec32d47f 6b003c86
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* Date: 2018/7/5 * Date: 2018/7/5
* Time: 15:47 * Time: 15:47
*/ */
namespace Hdll\Services\Buyer\Lib; namespace Hdll\Services\Buyer\Lib;
use Swoft\Core\ResultInterface; use Swoft\Core\ResultInterface;
...@@ -12,85 +13,87 @@ use Swoft\Core\ResultInterface; ...@@ -12,85 +13,87 @@ use Swoft\Core\ResultInterface;
/** /**
* @method ResultInterface deferGetUser(string $token) * @method ResultInterface deferGetUser(string $token)
* @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) * @method ResultInterface deferGetByNickname($nickname)
* @method ResultInterface deferCreateUser($storeId, $data = [])
* @method ResultInterface deferUpdateUser($storeId, $buyerId, $data)
* Interface BuyerInterface * Interface BuyerInterface
* @package App\Lib * @package App\Lib
*/ */
interface BuyerInterface interface BuyerInterface
{ {
/** /**
* 获取用户信息 * 获取用户信息
* *
* @param int $storeId * @param int $storeId
* @param int $buyerId * @param int $buyerId
* @return mixed * @return mixed
array(8) { * array(8) {
["id"]=> int(1) //买家id * ["id"]=> int(1) //买家id
["unionId"]=>string(28) "oyDnT5OYVCQUC9X9ErkDHBNrad90" * ["unionId"]=>string(28) "oyDnT5OYVCQUC9X9ErkDHBNrad90"
["storeId"]=>int(0)//店铺id * ["storeId"]=>int(0)//店铺id
["referId"]=>int(0)//推荐人ID * ["referId"]=>int(0)//推荐人ID
["state"]=>int(0)//买家状态 * ["state"]=>int(0)//买家状态
["nickName"]=>string(0) ""//买家昵称 * ["nickName"]=>string(0) ""//买家昵称
["openId"]=>string(0) ""//买家openId * ["openId"]=>string(0) ""//买家openId
["profile"]=> * ["profile"]=>
array(4) { * array(4) {
["realName"]=>string(12) "真实姓名" * ["realName"]=>string(12) "真实姓名"
["gender"]=>int(1)//性别 * ["gender"]=>int(1)//性别
["phoneNumber"]=>string(11) "18812345678"//手机号 * ["phoneNumber"]=>string(11) "18812345678"//手机号
["birthday"]=>int(0) //生日 * ["birthday"]=>int(0) //生日
} * }
["commission"]=> * ["commission"]=>
array(3) { * array(3) {
["totalCommission"]=>int(10)//总共提现 * ["totalCommission"]=>int(10)//总共提现
["balanceCommission"]=>int(10)//可提现金额 * ["balanceCommission"]=>int(10)//可提现金额
["expectCommission"]=>int(20)//冻结提现金额 * ["expectCommission"]=>int(20)//冻结提现金额
} * }
} * }
* *
*/ */
public function getUser(int $storeId, int $buyerId); public function getUser(int $storeId, int $buyerId);
/** /**
* 更新用户信息 * 更新用户信息
* $updateInfo = [ * $updateInfo = [
"realName" => "真实姓名", * "realName" => "真实姓名",
"gender" => "性别", * "gender" => "性别",
"phoneNumber" => "手机号", * "phoneNumber" => "手机号",
"birthday" => "生日" * "birthday" => "生日"
]; * ];
* @param int $storeId * @param int $storeId
* @param array $data * @param array $data
* @return mixed * @return mixed
*/ */
public function updateProfile(int $storeId, array $data); public function updateProfile(int $storeId, array $data);
/** /**
* 是否已经注册用户 * 是否已经注册用户
* @param $storeId * @param $storeId
* @param $unionid * @param $unionid
* @return mixed * @return mixed
* *
* 返回值: * 返回值:
* array(3) { * array(3) {
["id"]=> int(1)//买家id * ["id"]=> int(1)//买家id
["storeId"]=> int(1) //店铺id * ["storeId"]=> int(1) //店铺id
["referId"]=> int(0) //推荐人id * ["referId"]=> int(0) //推荐人id
} * }
*/ */
public function hasUser($storeId,$unionid); public function hasUser($storeId, $unionid);
public function selectUser(int $storeId, array $buyerIds, array $fields= ['*']); public function selectUser(int $storeId, array $buyerIds, array $fields = ['*']);
/** /**
* 根据买家id获取其上级信息 * 根据买家id获取其上级信息
* *
* @param $storeId * @param $storeId
* @param $buyerId * @param $buyerId
* @return mixed * @return mixed
*/ */
public function getRefereeInfo($storeId,$buyerId); public function getRefereeInfo($storeId, $buyerId);
/** /**
...@@ -100,4 +103,30 @@ interface BuyerInterface ...@@ -100,4 +103,30 @@ interface BuyerInterface
* @author work * @author work
*/ */
public function getByNickname($nickname); public function getByNickname($nickname);
/**
* 创建买家
* @param $storeId
* @param array $data = [
* "storeId"=>'',
* "unionId"=>'',
* "referId"=>'',
* "openId"=>'',
* "nickname"=>'',
* "headimgurl"=>'',
* 'isEntrusted'=>'',
* ]
* @return mixed
*/
public function createUser($storeId, $data = []);
/**
* 更新买家信息
* @param $storeId
* @param $buyerId
* @param $data
* @return mixed
*/
public function updateUser($storeId, $buyerId, $data);
} }
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/26
* Time: 16:00
*/
namespace Hdll\Services\FlowCount\Enum;
/**
* 访问量和转发量 枚举
* Class BrowseShare
* @package Hdll\Services\FlowCount\Enum
*/
class BrowseShare
{
const GOODS = 0; // 普通商品
const BARGAIN = 1; // 砍价
const LIMIT = 2; // 限时购
const GROUP = 3; // 拼团
const RECHARGE = 4; // 储值卡
const TIMES_CARD = 5; // 次卡
const FRONT_MONEY = 6; // 定金
const AWARD = 7; // 抽奖
}
\ No newline at end of file
...@@ -8,10 +8,16 @@ ...@@ -8,10 +8,16 @@
namespace Hdll\Services\FlowCount\Enum; namespace Hdll\Services\FlowCount\Enum;
/**
* 是否新访客 枚举
* Class FlowCategory
* @package Hdll\Services\FlowCount\Enum
*/
class FlowCategory class FlowCategory
{ {
const BARGAIN = 1; // 砍价 const BARGAIN = 1; // 砍价
const LIMIT = 2; // 限时购 const LIMIT = 2; // 限时购
const GROUP = 3; // 团购 const GROUP = 3; // 团购
const FRONTMONEY = 4; // 定金 const FRONTMONEY = 4; // 定金
const AWARD = 5; // 抽奖
} }
\ No newline at end of file
...@@ -36,7 +36,7 @@ interface VisitorInterface ...@@ -36,7 +36,7 @@ interface VisitorInterface
/** /**
* 访问量和转发量 * 访问量和转发量
* @param int $storeId 店铺id * @param int $storeId 店铺id
* @param int $type 类型:0普通商品 1砍价 2限时购 3拼团 * @param int $type 类型(接口使用枚举:BrowseShare):0普通商品 1砍价 2限时购 3拼团 4储值卡 5次卡 6定金 7抽奖
* @param array $itemIds 商品或活动(活动指:砍价、限时购 、拼团)的id列表 * @param array $itemIds 商品或活动(活动指:砍价、限时购 、拼团)的id列表
* 说明:$itemIds 格式[1,2,3] * 说明:$itemIds 格式[1,2,3]
* @return ; * @return ;
...@@ -59,7 +59,7 @@ interface VisitorInterface ...@@ -59,7 +59,7 @@ interface VisitorInterface
/** /**
* 统计是否有新访客 * 统计是否有新访客
* @param int $storeId 店铺id * @param int $storeId 店铺id
* @param int $type 类型:FlowCategory::BARGAIN 砍价 FlowCategory::LIMIT 限时购 FlowCategory::GROUP 拼团 * @param int $type 类型(接口使用枚举:FlowCategory):1砍价 2限时购 3拼团 4定金 5抽奖
* @param array $itemIds 活动ids列表,格式:[1,2,3],默认:null * @param array $itemIds 活动ids列表,格式:[1,2,3],默认:null
* @return mixed * @return mixed
* 响应参数: * 响应参数:
......
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