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
02b4f2da
Commit
02b4f2da
authored
Dec 11, 2019
by
孙磊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' of
http://gitlab-ebiz.yiyao365.cn/newshop/newshopback
into development
parents
f90c43b3
a927676a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
urlmanager.php
backend/config/urlmanager.php
+1
-0
ManageListController.php
backend/controllers/v1/authority/ManageListController.php
+36
-0
No files found.
backend/config/urlmanager.php
View file @
02b4f2da
...
@@ -319,6 +319,7 @@ return [
...
@@ -319,6 +319,7 @@ return [
'GET,OPTIONS manage-group-list'
=>
'manage-group-list'
,
'GET,OPTIONS manage-group-list'
=>
'manage-group-list'
,
'POST,OPTIONS manage-add'
=>
'manage-add'
,
'POST,OPTIONS manage-add'
=>
'manage-add'
,
'GET,OPTIONS get-user-info'
=>
'get-user-info'
,
'GET,OPTIONS get-user-info'
=>
'get-user-info'
,
'POST,OPTIONS manage-update'
=>
'manage-update'
,
],
],
],
],
],
],
...
...
backend/controllers/v1/authority/ManageListController.php
View file @
02b4f2da
...
@@ -201,4 +201,40 @@ class ManageListController extends BaseController
...
@@ -201,4 +201,40 @@ class ManageListController extends BaseController
return
$userInfo
;
return
$userInfo
;
}
}
/**
* @OA\POST(
* path="/backend/web/v1/authority/manage-lists/manage-update",
* tags={"权限管理"},
* summary="添加管理员(张晓林)",
* description="添加管理员",
* * @OA\RequestBody(
* required=true,
* @OA\MediaType(
* mediaType="application/x-www-form-urlencoded",
* @OA\Schema(
* type="object",
* @OA\Property(property="USER_ID",description="角色用户ID",type="string"),
* @OA\Property(property="ROLE_ID",description="选中的角色GUID",type="string"),
* )
* )
* ),
* @OA\Response(response=200,description="success"),
* security={{"Authorization": {}}}
* )
*/
public
function
actionManageUpdate
(){
$param
=
Yii
::
$app
->
request
->
post
();
$rbacRoleUserModel
=
new
ShopRbacRoleUser
();
$info
=
$rbacRoleUserModel
::
findOne
([
'USER_ID'
=>
$param
[
'USER_ID'
]]);
$info
->
ROLE_ID
=
$param
[
'ROLE_ID'
];
if
(
$info
->
save
()){
return
[
'code'
=>
200
,
'message'
=>
'更新成功'
];
}
else
{
return
$info
->
errors
;
}
}
}
}
\ 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