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
b6082059
Commit
b6082059
authored
Jan 08, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
47cd5a13
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
0 deletions
+114
-0
FilmGroupService.java
...ain/java/com/egolm/film/api/service/FilmGroupService.java
+14
-0
FilmGroupServiceImpl.java
...com/egolm/film/api/service/impl/FilmGroupServiceImpl.java
+33
-0
FilmGroupController.java
...ava/com/egolm/film/api/web/admin/FilmGroupController.java
+67
-0
No files found.
src/main/java/com/egolm/film/api/service/FilmGroupService.java
0 → 100644
View file @
b6082059
package
com
.
egolm
.
film
.
api
.
service
;
import
java.util.List
;
import
java.util.Map
;
public
interface
FilmGroupService
{
List
<
Map
<
String
,
Object
>>
queryFilmGroupList
();
List
<
Map
<
String
,
Object
>>
queryFilmListByGroupId
(
Integer
film_group_id
);
void
updateFilmGroupId
(
Integer
film_id
,
Integer
group_id
);
}
src/main/java/com/egolm/film/api/service/impl/FilmGroupServiceImpl.java
0 → 100644
View file @
b6082059
package
com
.
egolm
.
film
.
api
.
service
.
impl
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.film.api.service.FilmGroupService
;
@Service
public
class
FilmGroupServiceImpl
implements
FilmGroupService
{
@Autowired
JdbcTemplate
jdbcTemplate
;
@Override
public
List
<
Map
<
String
,
Object
>>
queryFilmGroupList
()
{
return
jdbcTemplate
.
queryForList
(
"select * from fc_film_group"
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryFilmListByGroupId
(
Integer
group_id
)
{
return
jdbcTemplate
.
queryForList
(
"select id, group_id, create_time, last_modify_time, film_no, en_name, cn_name from fc_member_film where group_id = ?"
,
group_id
);
}
@Override
public
void
updateFilmGroupId
(
Integer
film_id
,
Integer
group_id
)
{
jdbcTemplate
.
executeUpdate
(
"update fc_member_film set group_id = ? where id = ?"
,
group_id
,
film_id
);
}
}
src/main/java/com/egolm/film/api/web/admin/FilmGroupController.java
0 → 100644
View file @
b6082059
package
com
.
egolm
.
film
.
api
.
web
.
admin
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.film.api.service.FilmGroupService
;
import
com.egolm.film.bean.Fc_film_group
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
@Controller
@RequestMapping
(
"admin/filmGroup"
)
public
class
FilmGroupController
{
@Autowired
FilmGroupService
filmGroupService
;
@Autowired
JdbcTemplate
jdbcTemplate
;
@ResponseBody
@PostMapping
(
"save"
)
@ApiOperation
(
"保存分类"
)
public
Object
save
(
String
group_name
,
Integer
parent_id
,
Integer
order_num
)
{
Fc_film_group
g
=
new
Fc_film_group
();
g
.
setGroup_name
(
group_name
);
g
.
setParent_id
(
parent_id
);
g
.
setOrder_num
(
order_num
);
jdbcTemplate
.
save
(
g
);
return
Rjx
.
jsonOk
();
}
@ResponseBody
@PostMapping
(
"getFilmGroupList"
)
@ApiOperation
(
"保存分类"
)
public
Object
getFilmGroupList
()
{
List
<
Map
<
String
,
Object
>>
list
=
filmGroupService
.
queryFilmGroupList
();
return
Rjx
.
jsonOk
().
setData
(
list
);
}
@ResponseBody
@PostMapping
(
"getFilmListByGroupId"
)
@ApiOperation
(
"保存分类"
)
public
Object
getFilmListByGroupId
(
Integer
group_id
)
{
List
<
Map
<
String
,
Object
>>
list
=
filmGroupService
.
queryFilmListByGroupId
(
group_id
);
return
Rjx
.
jsonOk
().
setData
(
list
);
}
@ResponseBody
@PostMapping
(
"updateFilmGroupId"
)
@ApiOperation
(
"保存分类"
)
public
Object
updateFilmGroupId
(
Integer
film_id
,
Integer
group_id
)
{
filmGroupService
.
updateFilmGroupId
(
film_id
,
group_id
);
return
Rjx
.
jsonOk
();
}
}
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