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
5905b42a
Commit
5905b42a
authored
Jan 08, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
6e03d87c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
FilmGroupService.java
...ain/java/com/egolm/film/api/service/FilmGroupService.java
+2
-0
FilmGroupServiceImpl.java
...com/egolm/film/api/service/impl/FilmGroupServiceImpl.java
+8
-0
FilmGroupController.java
...ava/com/egolm/film/api/web/admin/FilmGroupController.java
+8
-0
No files found.
src/main/java/com/egolm/film/api/service/FilmGroupService.java
View file @
5905b42a
...
@@ -11,4 +11,6 @@ public interface FilmGroupService {
...
@@ -11,4 +11,6 @@ public interface FilmGroupService {
void
updateFilmGroupId
(
Integer
film_id
,
Integer
group_id
);
void
updateFilmGroupId
(
Integer
film_id
,
Integer
group_id
);
void
removeFilmGroupById
(
Integer
id
);
}
}
src/main/java/com/egolm/film/api/service/impl/FilmGroupServiceImpl.java
View file @
5905b42a
...
@@ -5,6 +5,7 @@ import java.util.Map;
...
@@ -5,6 +5,7 @@ import java.util.Map;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.film.api.service.FilmGroupService
;
import
com.egolm.film.api.service.FilmGroupService
;
...
@@ -29,5 +30,12 @@ public class FilmGroupServiceImpl implements FilmGroupService {
...
@@ -29,5 +30,12 @@ public class FilmGroupServiceImpl implements FilmGroupService {
public
void
updateFilmGroupId
(
Integer
film_id
,
Integer
group_id
)
{
public
void
updateFilmGroupId
(
Integer
film_id
,
Integer
group_id
)
{
jdbcTemplate
.
executeUpdate
(
"update fc_member_film set group_id = ? where id = ?"
,
group_id
,
film_id
);
jdbcTemplate
.
executeUpdate
(
"update fc_member_film set group_id = ? where id = ?"
,
group_id
,
film_id
);
}
}
@Override
@Transactional
public
void
removeFilmGroupById
(
Integer
id
)
{
jdbcTemplate
.
executeUpdate
(
"delete from fc_film_group where id = ?"
,
id
);
jdbcTemplate
.
executeUpdate
(
"update fc_member_film set group_id = ? where group_id = ?"
,
id
,
id
);
}
}
}
src/main/java/com/egolm/film/api/web/admin/FilmGroupController.java
View file @
5905b42a
...
@@ -41,6 +41,14 @@ public class FilmGroupController {
...
@@ -41,6 +41,14 @@ public class FilmGroupController {
return
Rjx
.
jsonOk
().
setData
(
g
);
return
Rjx
.
jsonOk
().
setData
(
g
);
}
}
@ResponseBody
@PostMapping
(
"delete"
)
@ApiOperation
(
"保存或更新分类"
)
public
Object
delete
(
Integer
id
)
{
filmGroupService
.
removeFilmGroupById
(
id
);
return
Rjx
.
jsonOk
();
}
@ResponseBody
@ResponseBody
@PostMapping
(
"getFilmGroupList"
)
@PostMapping
(
"getFilmGroupList"
)
@ApiOperation
(
"保存分类"
)
@ApiOperation
(
"保存分类"
)
...
...
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