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
170bdf1a
Commit
170bdf1a
authored
Dec 30, 2019
by
孙磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店服务类目、配送方式修改
Signed-off-by:
sunlei
<
sunlei@romens.cn
>
parent
99fdac0d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
BranchController.php
backend/controllers/v1/branch/BranchController.php
+20
-5
ShopBranch.php
backend/models/v1/branch/ShopBranch.php
+1
-3
No files found.
backend/controllers/v1/branch/BranchController.php
View file @
170bdf1a
...
...
@@ -296,7 +296,10 @@ class BranchController extends BaseController
if
(
!
$info
)
{
throw
new
BadRequestHttpException
(
'未找到符合的门店服务类目信息'
);
}
return
$info
;
return
new
ActiveDataProvider
([
'models'
=>
$info
,
'pagination'
=>
false
]);
}
/**
* @OA\Get(
...
...
@@ -318,7 +321,10 @@ class BranchController extends BaseController
if
(
!
$info
)
{
throw
new
BadRequestHttpException
(
'未找到符合的门店门店配送方式'
);
}
return
$info
;
return
new
ActiveDataProvider
([
'models'
=>
$info
,
'pagination'
=>
false
]);
}
/**
* @OA\Get(
...
...
@@ -340,7 +346,10 @@ class BranchController extends BaseController
if
(
!
$info
)
{
throw
new
BadRequestHttpException
(
'未找到符合的分公司信息'
);
}
return
$info
;
return
new
ActiveDataProvider
([
'models'
=>
$info
,
'pagination'
=>
false
]);
}
/**
* @OA\Get(
...
...
@@ -374,7 +383,10 @@ class BranchController extends BaseController
throw
new
BadRequestHttpException
(
'未找到符合的门店区域信息'
);
}
$info
[
0
][
'ROLE_ID'
]
=
$authRole
;
return
$info
;
return
new
ActiveDataProvider
([
'models'
=>
$info
,
'pagination'
=>
false
]);
}
else
{
//验证失败:$errors 是一个包含错误信息的数组
Yii
::
$app
->
response
->
statusCode
=
422
;
...
...
@@ -413,7 +425,10 @@ class BranchController extends BaseController
throw
new
BadRequestHttpException
(
'未找到符合的门店区域信息'
);
}
$info
[
0
][
'ROLE_ID'
]
=
$authRole
;
return
$info
;
return
new
ActiveDataProvider
([
'models'
=>
$info
,
'pagination'
=>
false
]);
}
else
{
//验证失败:$errors 是一个包含错误信息的数组
Yii
::
$app
->
response
->
statusCode
=
422
;
...
...
backend/models/v1/branch/ShopBranch.php
View file @
170bdf1a
...
...
@@ -359,9 +359,7 @@ class ShopBranch extends BaseModel
return
new
ActiveDataProvider
([
'query'
=>
$query
->
asArray
(),
'pagination'
=>
[
'pageSize'
=>
PAGE_SIZE
],
'pagination'
=>
false
]);
}
//获取门店(权限下的)
...
...
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