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
351db415
Commit
351db415
authored
Nov 30, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
f017937d
Show 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,6 +106,9 @@ public class AdminAuthServiceImpl implements AdminAuthService {
...
@@ -106,6 +106,9 @@ public class AdminAuthServiceImpl implements AdminAuthService {
@Override
@Override
@Transactional
@Transactional
public
void
updateGroupAuth
(
Integer
group_id
,
Integer
[]
menu_ids
,
Integer
[]
film_types
)
{
public
void
updateGroupAuth
(
Integer
group_id
,
Integer
[]
menu_ids
,
Integer
[]
film_types
)
{
jdbcTemplate
.
executeUpdate
(
"delete from fc_admin_group_menu where group_id = ?"
,
group_id
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_admin_group_filmtype where group_id = ?"
,
group_id
);
if
(
menu_ids
!=
null
&&
menu_ids
.
length
>
0
)
{
List
<
Fc_admin_group_menu
>
agmList
=
new
ArrayList
<
Fc_admin_group_menu
>();
List
<
Fc_admin_group_menu
>
agmList
=
new
ArrayList
<
Fc_admin_group_menu
>();
for
(
Integer
menu_id
:
menu_ids
)
{
for
(
Integer
menu_id
:
menu_ids
)
{
Fc_admin_group_menu
agm
=
new
Fc_admin_group_menu
();
Fc_admin_group_menu
agm
=
new
Fc_admin_group_menu
();
...
@@ -113,6 +116,9 @@ public class AdminAuthServiceImpl implements AdminAuthService {
...
@@ -113,6 +116,9 @@ public class AdminAuthServiceImpl implements AdminAuthService {
agm
.
setMenu_id
(
menu_id
);
agm
.
setMenu_id
(
menu_id
);
agmList
.
add
(
agm
);
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
>();
List
<
Fc_admin_group_filmtype
>
gtypeList
=
new
ArrayList
<
Fc_admin_group_filmtype
>();
for
(
Integer
film_type
:
film_types
)
{
for
(
Integer
film_type
:
film_types
)
{
Fc_admin_group_filmtype
gtype
=
new
Fc_admin_group_filmtype
();
Fc_admin_group_filmtype
gtype
=
new
Fc_admin_group_filmtype
();
...
@@ -120,12 +126,11 @@ public class AdminAuthServiceImpl implements AdminAuthService {
...
@@ -120,12 +126,11 @@ public class AdminAuthServiceImpl implements AdminAuthService {
gtype
.
setFilm_type_id
(
film_type
);
gtype
.
setFilm_type_id
(
film_type
);
gtypeList
.
add
(
gtype
);
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
);
jdbcTemplate
.
batchSave
(
gtypeList
);
}
}
}
@Override
@Override
public
void
saveOrUpdateMenu
(
Fc_admin_menu
menu
)
{
public
void
saveOrUpdateMenu
(
Fc_admin_menu
menu
)
{
jdbcTemplate
.
saveOrUpdate
(
menu
);
jdbcTemplate
.
saveOrUpdate
(
menu
);
...
...
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