Commit 02c2691b authored by Quxl's avatar Quxl

x

parent d758c712
package com.egolm.film.api.web.admin;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
......@@ -42,9 +45,9 @@ public class CinemaController {
}
@ResponseBody
@PostMapping("getCinemaListForSelected")
@ApiOperation("查询影院列表(不包含影厅信息,且GroupBy去重),新增影院影厅信息的时候,影院信息可以通过下拉菜单选择,数据库中已存在的影院信息将显示再此列表中")
public Object getCinemaListForSelected(String keyword) {
@PostMapping("getGroupByCinemaList")
@ApiOperation("查询影院列表(不包含影厅信息,且GroupBy去重)")
public Object getGroupByCinemaList(String keyword) {
List<Map<String, Object>> list = service.getCinemaListForSelected(keyword);
return Rjx.jsonOk().setData(list);
}
......@@ -64,9 +67,28 @@ public class CinemaController {
@ResponseBody
@PostMapping("saveShowtime")
@ApiOperation("保存拍片时间")
public Object saveShowtime(Fc_cinema_showtime[] showtime) {
common.save(showtime);
@ApiOperation("保存排片时间")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", name="cinema_id", value="影院放映厅ID"),
@ApiImplicitParam(paramType="query", name="show_date", value="排片日期"),
@ApiImplicitParam(paramType="query", name="show_time", value="排片时间"),
})
public Object saveShowtime(Integer cinema_id, @DateTimeFormat(pattern="yyyy-MM-dd")Date[] show_date, String[] show_time) {
Date now = new Date();
List<Object> list = new ArrayList<Object>();
for(Date date : show_date) {
for(String time : show_time) {
Fc_cinema_showtime showtime = new Fc_cinema_showtime();
showtime.setShow_date(date);
showtime.setShow_time(time);
showtime.setCinema_id(cinema_id);
showtime.setCreate_time(now);
showtime.setStatus(0);
showtime.setIs_important(0);
list.add(showtime);
}
}
common.batchSave(list);
return Rjx.jsonOk();
}
......
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