Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
351db415
Commit
351db415
authored
Nov 30, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
f017937d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
AdminAuthServiceImpl.java
...com/egolm/film/api/service/impl/AdminAuthServiceImpl.java
+21
-16
No files found.
src/main/java/com/egolm/film/api/service/impl/AdminAuthServiceImpl.java
View file @
351db415
...
...
@@ -106,24 +106,29 @@ public class AdminAuthServiceImpl implements AdminAuthService {
@Override
@Transactional
public
void
updateGroupAuth
(
Integer
group_id
,
Integer
[]
menu_ids
,
Integer
[]
film_types
)
{
List
<
Fc_admin_group_menu
>
agmList
=
new
ArrayList
<
Fc_admin_group_menu
>();
for
(
Integer
menu_id
:
menu_ids
)
{
Fc_admin_group_menu
agm
=
new
Fc_admin_group_menu
();
agm
.
setGroup_id
(
group_id
);
agm
.
setMenu_id
(
menu_id
);
agmList
.
add
(
agm
);
}
List
<
Fc_admin_group_filmtype
>
gtypeList
=
new
ArrayList
<
Fc_admin_group_filmtype
>();
for
(
Integer
film_type
:
film_types
)
{
Fc_admin_group_filmtype
gtype
=
new
Fc_admin_group_filmtype
();
gtype
.
setGroup_id
(
group_id
);
gtype
.
setFilm_type_id
(
film_type
);
gtypeList
.
add
(
gtype
);
}
jdbcTemplate
.
executeUpdate
(
"delete from fc_admin_group_menu where group_id = ?"
,
group_id
);
jdbcTemplate
.
batchSave
(
agmList
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_admin_group_filmtype where group_id = ?"
,
group_id
);
jdbcTemplate
.
batchSave
(
gtypeList
);
if
(
menu_ids
!=
null
&&
menu_ids
.
length
>
0
)
{
List
<
Fc_admin_group_menu
>
agmList
=
new
ArrayList
<
Fc_admin_group_menu
>();
for
(
Integer
menu_id
:
menu_ids
)
{
Fc_admin_group_menu
agm
=
new
Fc_admin_group_menu
();
agm
.
setGroup_id
(
group_id
);
agm
.
setMenu_id
(
menu_id
);
agmList
.
add
(
agm
);
}
jdbcTemplate
.
batchSave
(
agmList
);
}
if
(
film_types
!=
null
&&
film_types
.
length
>
0
)
{
List
<
Fc_admin_group_filmtype
>
gtypeList
=
new
ArrayList
<
Fc_admin_group_filmtype
>();
for
(
Integer
film_type
:
film_types
)
{
Fc_admin_group_filmtype
gtype
=
new
Fc_admin_group_filmtype
();
gtype
.
setGroup_id
(
group_id
);
gtype
.
setFilm_type_id
(
film_type
);
gtypeList
.
add
(
gtype
);
}
jdbcTemplate
.
batchSave
(
gtypeList
);
}
}
@Override
...
...
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