Commit 02a6f052 authored by Quxl's avatar Quxl

x

parent 149d9216
...@@ -13,6 +13,6 @@ public interface CinemaService { ...@@ -13,6 +13,6 @@ public interface CinemaService {
void setTmpData(Integer showtimeId); void setTmpData(Integer showtimeId);
List<Map<String, Object>> queryShowtimeList(); List<Map<String, Object>> queryShowtimeList(Integer cinemaId);
} }
...@@ -63,10 +63,10 @@ public class CinemaServiceImpl implements CinemaService { ...@@ -63,10 +63,10 @@ public class CinemaServiceImpl implements CinemaService {
} }
@Override @Override
public List<Map<String, Object>> queryShowtimeList() { public List<Map<String, Object>> queryShowtimeList(Integer cinemaId) {
Date dodayStart = DateUtil.start(new Date()); Date dodayStart = DateUtil.start(new Date());
String sql = "select * from fc_cinema_showtime where show_date >= ?"; String sql = "select * from fc_cinema_showtime where show_date >= ? and cinema_id = ?";
return jdbcTemplate.queryForList(sql, dodayStart); return jdbcTemplate.queryForList(sql, dodayStart, cinemaId);
} }
} }
...@@ -111,8 +111,11 @@ public class CinemaController { ...@@ -111,8 +111,11 @@ public class CinemaController {
@ResponseBody @ResponseBody
@PostMapping("updateShowtime") @PostMapping("updateShowtime")
@ApiOperation("编辑场次") @ApiOperation("编辑场次")
public Object getShowtimeList() { @ApiImplicitParams({
List<Map<String, Object>> list = service.queryShowtimeList(); @ApiImplicitParam(paramType="query", name="cinema_id", value="影院放映厅ID"),
})
public Object getShowtimeList(Integer cinema_id) {
List<Map<String, Object>> list = service.queryShowtimeList(cinema_id);
List<String> dates = new ArrayList<String>(); List<String> dates = new ArrayList<String>();
List<String> times = new ArrayList<String>(); List<String> times = new ArrayList<String>();
for(Map<String, Object> map : list) { for(Map<String, Object> map : list) {
......
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