嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元微信扫码支付:2 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
springboot mybatis layui 搭建的电影购票系统。包含:购票,选座、下单。后台包括对厅室、座位、场次进行管理
Customer customer = (Customer) request.getSession().getAttribute("customer");
if(customer == null){
return LayuiResult.LayuiData(301,"请登录后再购买!",null);
}
tOrder.setCreateTime(new Date());
tOrder.setOrderStatus("未入场");
tOrder.setCustomerId(customer.getId());
this.tOrderService.save(tOrder);
String[] split = tOrder.getSeatId().split("-");
List<TSeat> tSeats = new ArrayList<>();
for (String sId: split) {
TSeat byId = tSeatService.getById(sId);
byId.setSeatStatus("售出");
byId.setStatus(2);
tSeats.add(byId);
}
tSeatService.updateBatchById(tSeats);
return LayuiResult.LayuiData(0,"购买成功!",null);