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
19bdda2e
Commit
19bdda2e
authored
Dec 09, 2019
by
侯贺政
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运费模板权限调整
Signed-off-by:
houhezheng
<
houhezheng@romens.cn
>
parent
4e6f37b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
TransportSettingController.php
...d/controllers/v1/transport/TransportSettingController.php
+5
-1
ShopBranch.php
backend/models/v1/branch/ShopBranch.php
+1
-1
No files found.
backend/controllers/v1/transport/TransportSettingController.php
View file @
19bdda2e
...
...
@@ -361,6 +361,10 @@ class TransportSettingController extends BaseController
{
$params
=
Yii
::
$app
->
request
->
bodyParams
;
$userInfo
=
(
new
ShopRbacUser
)
->
getRbacUserInfo
(
Yii
::
$app
->
user
->
identity
->
GUID
);
//只有总部和省级可以添加
if
(
!
in_array
(
$userInfo
[
'ROLE_ID'
],[
USER_ROLE_REGION_ADMIN
,
USER_ROLE_HEADQUARTERS_ADMIN
]))
{
throw
new
BadRequestHttpException
(
'没有添加权限!'
);
}
$model
=
new
$this
->
modelClass
();
$model
->
scenario
=
'creation'
;
...
...
backend/models/v1/branch/ShopBranch.php
View file @
19bdda2e
...
...
@@ -457,7 +457,7 @@ class ShopBranch extends BaseModel
}
$query
=
static
::
find
()
->
select
([
'GUID'
,
'NAME'
,
'CODE'
,
'RECIVER_PROVINCE as PROVINCE'
,
'RECIVER_CITY as CITY'
,
'RECIVER_REGION as REGION'
])
->
where
(
'BRANCH_TYPE=1'
)
->
where
(
[
'BRANCH_TYPE'
=>
BRANCH_TYPE_REGION
]
)
->
andFilterWhere
(
$where
)
->
andfilterWhere
([
'or'
,
[
'like'
,
'CODE'
,
$search
],
[
'like'
,
'NAME'
,
$search
]]);
...
...
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