Commit 6e03d87c authored by Quxl's avatar Quxl

x

parent b6082059
...@@ -29,15 +29,16 @@ public class FilmGroupController { ...@@ -29,15 +29,16 @@ public class FilmGroupController {
JdbcTemplate jdbcTemplate; JdbcTemplate jdbcTemplate;
@ResponseBody @ResponseBody
@PostMapping("save") @PostMapping("saveOrUpdate")
@ApiOperation("保存分类") @ApiOperation("保存或更新分类")
public Object save(String group_name, Integer parent_id, Integer order_num) { public Object saveOrUpdate(Integer id, String group_name, Integer parent_id, Integer order_num) {
Fc_film_group g = new Fc_film_group(); Fc_film_group g = new Fc_film_group();
g.setId(id);
g.setGroup_name(group_name); g.setGroup_name(group_name);
g.setParent_id(parent_id); g.setParent_id(parent_id);
g.setOrder_num(order_num); g.setOrder_num(order_num);
jdbcTemplate.save(g); jdbcTemplate.merge(g);
return Rjx.jsonOk(); return Rjx.jsonOk().setData(g);
} }
@ResponseBody @ResponseBody
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment