Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
ca4cacdd
Commit
ca4cacdd
authored
Sep 16, 2019
by
xmy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sx'
parents
6afab12b
63bb75da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
99 additions
and
69 deletions
+99
-69
src/Buyer/Lib/BuyerInterface.php
+99
-69
No files found.
src/Buyer/Lib/BuyerInterface.php
View file @
ca4cacdd
...
...
@@ -5,6 +5,7 @@
* Date: 2018/7/5
* Time: 15:47
*/
namespace
Hdll\Services\Buyer\Lib
;
use
Swoft\Core\ResultInterface
;
...
...
@@ -12,85 +13,87 @@ use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferGetUser(string $token)
* @method ResultInterface deferUpdateProfile(string $token, array $data)
* @method ResultInterface deferSelectUser(int $storeId, array $buyerIds, array $fields= ['*'])
* @method ResultInterface deferGetRefereeInfo($storeId,$buyerId)
* @method ResultInterface deferSelectUser(int $storeId, array $buyerIds, array $fields
= ['*'])
* @method ResultInterface deferGetRefereeInfo($storeId,
$buyerId)
* @method ResultInterface deferGetByNickname($nickname)
* @method ResultInterface deferCreateUser($storeId, $data = [])
* @method ResultInterface deferUpdateUser($storeId, $buyerId, $data)
* Interface BuyerInterface
* @package App\Lib
*/
interface
BuyerInterface
{
/**
* 获取用户信息
*
* @param int $storeId
* @param int $buyerId
* @return mixed
array(8) {
["id"]=> int(1) //买家id
["unionId"]=>string(28) "oyDnT5OYVCQUC9X9ErkDHBNrad90"
["storeId"]=>int(0)//店铺id
["referId"]=>int(0)//推荐人ID
["state"]=>int(0)//买家状态
["nickName"]=>string(0) ""//买家昵称
["openId"]=>string(0) ""//买家openId
["profile"]=>
array(4) {
["realName"]=>string(12) "真实姓名"
["gender"]=>int(1)//性别
["phoneNumber"]=>string(11) "18812345678"//手机号
["birthday"]=>int(0) //生日
}
["commission"]=>
array(3) {
["totalCommission"]=>int(10)//总共提现
["balanceCommission"]=>int(10)//可提现金额
["expectCommission"]=>int(20)//冻结提现金额
}
}
*
*/
public
function
getUser
(
int
$storeId
,
int
$buyerId
);
/**
* 获取用户信息
*
* @param int $storeId
* @param int $buyerId
* @return mixed
*
array(8) {
*
["id"]=> int(1) //买家id
*
["unionId"]=>string(28) "oyDnT5OYVCQUC9X9ErkDHBNrad90"
*
["storeId"]=>int(0)//店铺id
*
["referId"]=>int(0)//推荐人ID
*
["state"]=>int(0)//买家状态
*
["nickName"]=>string(0) ""//买家昵称
*
["openId"]=>string(0) ""//买家openId
*
["profile"]=>
*
array(4) {
*
["realName"]=>string(12) "真实姓名"
*
["gender"]=>int(1)//性别
*
["phoneNumber"]=>string(11) "18812345678"//手机号
*
["birthday"]=>int(0) //生日
*
}
*
["commission"]=>
*
array(3) {
*
["totalCommission"]=>int(10)//总共提现
*
["balanceCommission"]=>int(10)//可提现金额
*
["expectCommission"]=>int(20)//冻结提现金额
*
}
*
}
*
*/
public
function
getUser
(
int
$storeId
,
int
$buyerId
);
/**
* 更新用户信息
* $updateInfo = [
"realName" => "真实姓名",
"gender" => "性别",
"phoneNumber" => "手机号",
"birthday" => "生日"
];
* @param int
$storeId
* @param array $data
* @return mixed
*/
public
function
updateProfile
(
int
$storeId
,
array
$data
);
/**
* 更新用户信息
* $updateInfo = [
*
"realName" => "真实姓名",
*
"gender" => "性别",
*
"phoneNumber" => "手机号",
*
"birthday" => "生日"
*
];
* @param int
$storeId
* @param array $data
* @return mixed
*/
public
function
updateProfile
(
int
$storeId
,
array
$data
);
/**
* 是否已经注册用户
* @param $storeId
* @param $unionid
* @return mixed
*
* 返回值:
* array(3) {
["id"]=> int(1)//买家id
["storeId"]=> int(1) //店铺id
["referId"]=> int(0) //推荐人id
}
*/
public
function
hasUser
(
$storeId
,
$unionid
);
/**
* 是否已经注册用户
* @param $storeId
* @param $unionid
* @return mixed
*
* 返回值:
* array(3) {
*
["id"]=> int(1)//买家id
*
["storeId"]=> int(1) //店铺id
*
["referId"]=> int(0) //推荐人id
*
}
*/
public
function
hasUser
(
$storeId
,
$unionid
);
public
function
selectUser
(
int
$storeId
,
array
$buyerIds
,
array
$fields
=
[
'*'
]);
public
function
selectUser
(
int
$storeId
,
array
$buyerIds
,
array
$fields
=
[
'*'
]);
/**
* 根据买家id获取其上级信息
*
* @param $storeId
* @param $buyerId
* @return mixed
*/
public
function
getRefereeInfo
(
$storeId
,
$buyerId
);
/**
* 根据买家id获取其上级信息
*
* @param $storeId
* @param $buyerId
* @return mixed
*/
public
function
getRefereeInfo
(
$storeId
,
$buyerId
);
/**
...
...
@@ -100,4 +103,30 @@ interface BuyerInterface
* @author work
*/
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment