Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
newShopBack
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
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
newshop
newShopBack
Commits
d29b09de
Commit
d29b09de
authored
Dec 27, 2019
by
孙磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店详情修改
Signed-off-by:
sunlei
<
sunlei@romens.cn
>
parent
418437ed
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
BranchController.php
backend/controllers/v1/branch/BranchController.php
+7
-3
ShopBranch.php
backend/models/v1/branch/ShopBranch.php
+7
-4
No files found.
backend/controllers/v1/branch/BranchController.php
View file @
d29b09de
...
...
@@ -118,7 +118,7 @@ class BranchController extends BaseController
if
(
$model
->
validate
())
{
//所有输入数据都有效 all inputs are valid
$info
=
$model
->
BranchDetail
(
$params
[
'GUID'
]);
if
(
!
$
info
)
{
if
(
!
$
list
=
$info
->
getModels
()
)
{
throw
new
BadRequestHttpException
(
'未找到符合的门店列表信息'
);
}
//获取门店服务类目关系信息
...
...
@@ -139,7 +139,11 @@ class BranchController extends BaseController
}
}
}
$info
[
'BRANCH_SERVICE_TYPE'
]
=
$branchServiceRelation
;
//组合数据
foreach
(
$list
as
$key
=>
$val
)
{
$list
[
$key
][
'BRANCH_SERVICE_TYPE'
]
=
$branchServiceRelation
;
}
$info
->
setModels
(
$list
);
return
$info
;
}
else
{
//验证失败:$errors 是一个包含错误信息的数组
...
...
@@ -1004,7 +1008,7 @@ class BranchController extends BaseController
$guid
=
Yii
::
$app
->
request
->
getQueryParam
(
'guid'
);
$info
=
$model
->
BranchDetail
(
$guid
);
if
(
!
$info
)
{
if
(
!
$info
->
getModels
()
)
{
throw
new
BadRequestHttpException
(
'未找到符合的DC信息'
);
}
return
$info
;
...
...
backend/models/v1/branch/ShopBranch.php
View file @
d29b09de
...
...
@@ -355,11 +355,14 @@ class ShopBranch extends BaseModel
->
select
(
'GUID,NAME,CODE,LICENCE_IMAGE_PATH,RECIVER_PROVINCE,RECIVER_CITY,RECIVER_REGION,ADDRESS,PARENT_GUID,
LAT,LNG,IS_POINTS_SHOP,DESCRIPTION,BRANCH_NAME,BRANCH_IMAGE_PATH,PHONE,CONTACT_NAME,SCORE,IS_CARE,
IS_O2O,IS_DELIVERY_CODECHAIN_GOODS,IS_SHELVE,WORK_TIME,DELIVERY_TIME,TRANSPORT_TYPE,RETURN_ADDRESS'
)
->
where
([
'GUID'
=>
$GUID
])
->
asArray
()
->
one
();
->
where
([
'GUID'
=>
$GUID
]);
return
$query
;
return
new
ActiveDataProvider
([
'query'
=>
$query
->
asArray
(),
'pagination'
=>
[
'pageSize'
=>
PAGE_SIZE
],
]);
}
//获取门店(权限下的)
public
function
GetBranch
(
$GUID
,
$SUPPROVINCE_GUID
)
...
...
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