Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
R
restful
Project
Project
Details
Activity
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
李永强
restful
Commits
1e0fba5f
Commit
1e0fba5f
authored
Oct 24, 2019
by
李永强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整功能
parent
c52193f0
Pipeline
#220
failed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
JurisdictionController.java
...n/java/com/restful/controller/JurisdictionController.java
+1
-1
jurisdiction.xml
src/main/resources/mapper/jurisdiction.xml
+1
-1
No files found.
src/main/java/com/restful/controller/JurisdictionController.java
View file @
1e0fba5f
...
@@ -76,7 +76,7 @@ public class JurisdictionController {
...
@@ -76,7 +76,7 @@ public class JurisdictionController {
@ApiOperation
(
value
=
"给用户赋予角色"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
@ApiOperation
(
value
=
"给用户赋予角色"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
@ApiImplicitParam
(
name
=
Constants
.
ACCESS_TOKEN
,
required
=
true
,
paramType
=
"header"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
Constants
.
ACCESS_TOKEN
,
required
=
true
,
paramType
=
"header"
,
dataType
=
"String"
)
@RequestMapping
(
value
=
"/
role/{roleIds}/user/{userId
}"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/
user/{userId}/role/{roleIds
}"
,
method
=
RequestMethod
.
POST
)
public
Object
roleToUser
(
@PathVariable
String
roleIds
,
@PathVariable
Long
userId
)
throws
ServiceException
{
public
Object
roleToUser
(
@PathVariable
String
roleIds
,
@PathVariable
Long
userId
)
throws
ServiceException
{
jurisdictionService
.
roleToUser
(
roleIds
,
userId
);
jurisdictionService
.
roleToUser
(
roleIds
,
userId
);
return
null
;
return
null
;
...
...
src/main/resources/mapper/jurisdiction.xml
View file @
1e0fba5f
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
<insert
id=
"roleToUser"
>
<insert
id=
"roleToUser"
>
insert into user_role (ur_role_id, ur_user_id)
insert into user_role (ur_role_id, ur_user_id)
values
values
<foreach
collection=
"roleIds"
item=
"roleId
s
"
separator=
","
>
<foreach
collection=
"roleIds"
item=
"roleId"
separator=
","
>
(#{roleId}, #{userId})
(#{roleId}, #{userId})
</foreach>
</foreach>
</insert>
</insert>
...
...
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