Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
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
曲欣亮
member-api
Commits
de1faf49
Commit
de1faf49
authored
Nov 23, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理组权限
parent
2a438e49
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
AdminAuthController.java
...in/java/com/egolm/film/api/admin/AdminAuthController.java
+3
-2
AdminAuthService.java
...va/com/egolm/film/api/admin/service/AdminAuthService.java
+3
-1
AdminAuthServiceImpl.java
...olm/film/api/admin/service/impl/AdminAuthServiceImpl.java
+9
-6
No files found.
src/main/java/com/egolm/film/api/admin/AdminAuthController.java
View file @
de1faf49
...
...
@@ -148,8 +148,9 @@ public class AdminAuthController {
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"group_id"
,
value
=
"组ID"
),
})
public
Object
groupAuthQuery
(
Integer
group_id
)
throws
FileNotFoundException
{
List
<
Map
<
String
,
Object
>>
list
=
service
.
queryGroupAuth
(
group_id
);
return
Rjx
.
jsonOk
().
setData
(
list
);
List
<
Map
<
String
,
Object
>>
groupMenuList
=
service
.
queryGroupMenuList
(
group_id
);
List
<
Integer
>
groupFilmtypeList
=
service
.
queryGroupFilmtypeList
(
group_id
);
return
Rjx
.
jsonOk
().
set
(
"groupMenuList"
,
groupMenuList
).
set
(
"groupFilmtypeList"
,
groupFilmtypeList
);
}
@ResponseBody
...
...
src/main/java/com/egolm/film/api/admin/service/AdminAuthService.java
View file @
de1faf49
...
...
@@ -21,7 +21,9 @@ public interface AdminAuthService {
void
mergeAdmin
(
Fc_admin
admin
);
List
<
Map
<
String
,
Object
>>
queryGroupAuth
(
Integer
group_id
);
List
<
Map
<
String
,
Object
>>
queryGroupMenuList
(
Integer
group_id
);
List
<
Integer
>
queryGroupFilmtypeList
(
Integer
group_id
);
void
updateGroupAuth
(
Integer
group_id
,
Integer
[]
menu_ids
,
Integer
[]
film_types
);
...
...
src/main/java/com/egolm/film/api/admin/service/impl/AdminAuthServiceImpl.java
View file @
de1faf49
...
...
@@ -61,7 +61,7 @@ public class AdminAuthServiceImpl implements AdminAuthService {
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryGroup
Auth
(
Integer
group_id
)
{
public
List
<
Map
<
String
,
Object
>>
queryGroup
MenuList
(
Integer
group_id
)
{
String
s
=
"select am.*, agm.group_id from fc_admin_menu am left join fc_admin_group_menu agm on am.menu_id = agm.menu_id and agm.group_id = ? order by order_num"
;
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
queryForList
(
s
,
group_id
);
return
this
.
getTree
(
list
,
null
);
...
...
@@ -83,6 +83,13 @@ public class AdminAuthServiceImpl implements AdminAuthService {
return
nodes
;
}
@Override
public
List
<
Integer
>
queryGroupFilmtypeList
(
Integer
group_id
)
{
String
s
=
"select film_type from fc_admin_group_filmtype where group_id = ?"
;
List
<
Integer
>
list
=
jdbcTemplate
.
queryForObjects
(
s
,
Integer
.
class
,
group_id
);
return
list
;
}
@Override
@Transactional
public
void
updateGroupAuth
(
Integer
group_id
,
Integer
[]
menu_ids
,
Integer
[]
film_types
)
{
...
...
@@ -106,8 +113,4 @@ public class AdminAuthServiceImpl implements AdminAuthService {
jdbcTemplate
.
batchSave
(
gtypeList
);
}
}
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