Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh_internal_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨培培
wxh_internal_api
Commits
156fbdda
Commit
156fbdda
authored
May 28, 2019
by
夏彬
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
fcf346da
2b928bc2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
1 deletion
+92
-1
shop_shop.php
example/shop_shop.php
+22
-0
Server.php
src/base/Server.php
+1
-1
Shop.php
src/shop/Shop.php
+69
-0
No files found.
example/shop_shop.php
0 → 100644
View file @
156fbdda
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2019/5/27
* Time: 17:40
*/
use
internalApi\shop\Shop
;
require
__DIR__
.
'/_init.php'
;
Shop
::
setDebug
();
$arr
=
Shop
::
getShop
(
1
);
//$arr = Shop::fetchList(null, 1, 50);
//Shop::saveShop([
// 'id' => 15,
// 'status' => 0
//]);
src/base/Server.php
View file @
156fbdda
...
@@ -102,7 +102,7 @@ class Server
...
@@ -102,7 +102,7 @@ class Server
$hasDefault
=
true
;
$hasDefault
=
true
;
}
}
if
(
isset
(
$requestData
[
$k
]
))
{
if
(
array_key_exists
(
$k
,
$requestData
))
{
$params
[]
=
$requestData
[
$k
];
$params
[]
=
$requestData
[
$k
];
}
elseif
(
$hasDefault
)
{
}
elseif
(
$hasDefault
)
{
$params
[]
=
$v
;
$params
[]
=
$v
;
...
...
src/shop/Shop.php
0 → 100644
View file @
156fbdda
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2019/5/27
* Time: 17:38
*/
namespace
internalApi\shop
;
use
internalApi\base\Client
;
class
Shop
extends
Client
{
/**
* 查询店铺列表
*
* @param array|null $filter 查询条件,目前仅支持 status
* 示例:['status'=>1]
* @param int $page
* @param int $num
* @return array|null
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public
static
function
fetchList
(
$filter
,
$page
=
1
,
$num
=
50
)
{
return
self
::
call
(
'shop.fetchList'
,
compact
(
'filter'
,
'page'
,
'num'
));
}
/**
* 添加/修改店铺
*
* @param array $data 店铺数据
* 当店铺数据中包含 id 字段时则为修改该 id 字段店铺,否则为新建
* 支持修改的字段列表
* description: 店铺简介
* code: 店铺编码
* name: 店铺名称
* 店铺地址: address
* 店铺等级: level
* 让长SSO UID: manager_id
* 服务星账号(手机号): star_tel
* 仓库ID: warehouse_id
* 状态: status,0 为停用状态,1为正常状态
* @return bool
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public
static
function
saveShop
(
$data
)
{
return
self
::
call
(
'shop.saveShop'
,
compact
(
'data'
));
}
/**
* 获取指定店铺的详情
*
* @param int $id
* @return array
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public
static
function
getShop
(
$id
)
{
return
self
::
call
(
'shop.getShop'
,
compact
(
'id'
));
}
}
\ 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