项目介绍
本项目分为前后台,前台为普通用户登录,后台为管理员登录;
管理员角色包含以下功能:
管理员登录,系统用户管理,游客用户查询,新闻管理,场馆信息管理,门票管理,订单管理,订单统计,留言信息查看,留言回复等功能。
用户角色包含以下功能:
用户首页,查看某一展品,用户登录注册,加入购物车,查看我的订单,修改个人信息等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.数据库:MySql 5.7版本;
6.是否Maven项目:否;
技术栈
- 后端:Spring+SpringMVC+Mybatis
- 前端:JSP+css+javascript+jQuery+Ajax
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
- 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; - 将项目中springmvc-servlet.xml配置文件中的数据库配置改为自己的配置;
- 运行项目,在浏览器中输入http://localhost:8080/ssm_bwgsp_sys 登录
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
}
@PostMapping("insert/history")
public ResponseVO insertHistory(@RequestBody historyItem history){return accountService.insertHistory(history); }
}
排场管理控制层:
@RestController
public class ScheduleController {
@Autowired
private ScheduleService scheduleService;
@RequestMapping(value = "/schedule/add", method = RequestMethod.POST)
public ResponseVO addSchedule(@RequestBody ScheduleForm scheduleForm){
return scheduleService.addSchedule(scheduleForm);
}
@RequestMapping(value = "/schedule/update", method = RequestMethod.POST)
public ResponseVO updateSchedule(@RequestBody ScheduleForm scheduleForm){
return scheduleService.updateSchedule(scheduleForm);
return statisticsService.getPopularMovies(days, movieNum);
}
}
票管理控制层:
@RestController
@RequestMapping("/ticket")
public class TicketController {
@Autowired
TicketService ticketService;
@Autowired
AccountService accountService;
@PostMapping("/vip/buy")
public ResponseVO buyTicketByVIPCard(@RequestParam List<Integer> ticketId, @RequestParam int couponId){
AccountService accountService;
@PostMapping("/vip/buy")
public ResponseVO buyTicketByVIPCard(@RequestParam List<Integer> ticketId, @RequestParam int couponId){
return ticketService.completeByVIPCard(ticketId,couponId);
}
@PostMapping("/lockSeat")
public ResponseVO lockSeat(@RequestBody TicketForm ticketForm){
return ticketService.addTicket(ticketForm);
}
@PostMapping("/buy")
public ResponseVO buyTicket(@RequestParam List<Integer> ticketId,@RequestParam int couponId){
return ticketService.completeTicket(ticketId,couponId);
}
@GetMapping("/get/{userId}")
@RestController
public class StatisticsController {
@Autowired
private StatisticsService statisticsService;
@RequestMapping(value = "statistics/scheduleRate", method = RequestMethod.GET)
public ResponseVO getScheduleRateByDate(@RequestParam(required = false) Date date){
//此处date为非必填参数,若不填则默认为当天
return statisticsService.getScheduleRateByDate(date);
}
@RequestMapping(value = "statistics/boxOffice/total", method = RequestMethod.GET)
public ResponseVO getTotalBoxOffice(){
return statisticsService.getTotalBoxOffice();
}
@RequestMapping(value = "statistics/audience/price", method = RequestMethod.GET)
public ResponseVO getAudiencePrice(){
return statisticsService.getAudiencePriceSevenDays();
}
@RequestMapping(value = "statistics/PlacingRate", method = RequestMethod.GET)
public ResponseVO getMoviePlacingRateByDate(@RequestParam Date date){
return statisticsService.getMoviePlacingRateByDate(date);
}
}
@PostMapping("/buy")
public ResponseVO buyTicket(@RequestParam List<Integer> ticketId,@RequestParam int couponId){
return ticketService.completeTicket(ticketId,couponId);
}
@GetMapping("/get/{userId}")
public ResponseVO getTicketByUserId(@PathVariable int userId){
return ticketService.getTicketByUser(userId);
}
@GetMapping("/get/occupiedSeats")
public ResponseVO getOccupiedSeats(@RequestParam int scheduleId){
return ticketService.getBySchedule(scheduleId);
}
@PostMapping("/cancel")
public ResponseVO cancelTicket(@RequestParam List<Integer> ticketId){
return ticketService.cancelTicket(ticketId);
}
@PostMapping("insert/history")
public ResponseVO insertHistory(@RequestBody historyItem history){return accountService.insertHistory(history); }
}
排场管理控制层:
@RestController
public class ScheduleController {
}
@RequestMapping(value = "statistics/audience/price", method = RequestMethod.GET)
public ResponseVO getAudiencePrice(){
return statisticsService.getAudiencePriceSevenDays();
}
@RequestMapping(value = "statistics/PlacingRate", method = RequestMethod.GET)
public ResponseVO getMoviePlacingRateByDate(@RequestParam Date date){
return statisticsService.getMoviePlacingRateByDate(date);
}
@RequestMapping(value = "statistics/popular/movie", method = RequestMethod.GET)
public ResponseVO getPopularMovies(@RequestParam int days, @RequestParam int movieNum){
return statisticsService.getPopularMovies(days, movieNum);
}
}
票管理控制层:
@RestController
@RequestMapping("/ticket")
public class TicketController {
@Autowired
TicketService ticketService;
return ticketService.getBySchedule(scheduleId);
}
@PostMapping("/cancel")
public ResponseVO cancelTicket(@RequestParam List<Integer> ticketId){
return ticketService.cancelTicket(ticketId);
}
@PostMapping("insert/history")
public ResponseVO insertHistory(@RequestBody historyItem history){return accountService.insertHistory(history); }
}
排场管理控制层:
@RestController
public class ScheduleController {
@Autowired
private ScheduleService scheduleService;
票管理控制层:
@RestController
@RequestMapping("/ticket")
public class TicketController {
@Autowired
TicketService ticketService;
@Autowired
AccountService accountService;
@PostMapping("/vip/buy")
public ResponseVO buyTicketByVIPCard(@RequestParam List<Integer> ticketId, @RequestParam int couponId){
return ticketService.completeByVIPCard(ticketId,couponId);
}
@PostMapping("/lockSeat")
public ResponseVO lockSeat(@RequestBody TicketForm ticketForm){
@RequestMapping(value = "statistics/popular/movie", method = RequestMethod.GET)
public ResponseVO getPopularMovies(@RequestParam int days, @RequestParam int movieNum){
return statisticsService.getPopularMovies(days, movieNum);
}
}
票管理控制层:
@RestController
@RequestMapping("/ticket")
public class TicketController {
@Autowired
TicketService ticketService;
@Autowired
AccountService accountService;
@PostMapping("/vip/buy")
public ResponseVO buyTicketByVIPCard(@RequestParam List<Integer> ticketId, @RequestParam int couponId){
return ticketService.completeByVIPCard(ticketId,couponId);
}
@PostMapping("/lockSeat")
public ResponseVO lockSeat(@RequestBody TicketForm ticketForm){
return ticketService.addTicket(ticketForm);
}
@PostMapping("/buy")
return ticketService.getTicketByUser(userId);
}
@GetMapping("/get/occupiedSeats")
public ResponseVO getOccupiedSeats(@RequestParam int scheduleId){
return ticketService.getBySchedule(scheduleId);
}
@PostMapping("/cancel")
public ResponseVO cancelTicket(@RequestParam List<Integer> ticketId){
return ticketService.cancelTicket(ticketId);
}
@PostMapping("insert/history")
public ResponseVO insertHistory(@RequestBody historyItem history){return accountService.insertHistory(history); }
}
排场管理控制层:
@RestController
public class ScheduleController {
@Autowired
private ScheduleService scheduleService;
}
}
统计管理控制层:
@RestController
public class StatisticsController {
@Autowired
private StatisticsService statisticsService;
@RequestMapping(value = "statistics/scheduleRate", method = RequestMethod.GET)
public ResponseVO getScheduleRateByDate(@RequestParam(required = false) Date date){
//此处date为非必填参数,若不填则默认为当天
return statisticsService.getScheduleRateByDate(date);
}
@RequestMapping(value = "statistics/boxOffice/total", method = RequestMethod.GET)
public ResponseVO getTotalBoxOffice(){
return statisticsService.getTotalBoxOffice();
}
public class TicketController {
@Autowired
TicketService ticketService;
@Autowired
AccountService accountService;
@PostMapping("/vip/buy")
public ResponseVO buyTicketByVIPCard(@RequestParam List<Integer> ticketId, @RequestParam int couponId){
return ticketService.completeByVIPCard(ticketId,couponId);
}
@PostMapping("/lockSeat")
public ResponseVO lockSeat(@RequestBody TicketForm ticketForm){
return ticketService.addTicket(ticketForm);
}
@PostMapping("/buy")
public ResponseVO buyTicket(@RequestParam List<Integer> ticketId,@RequestParam int couponId){
return ticketService.completeTicket(ticketId,couponId);
}
@GetMapping("/get/{userId}")
public ResponseVO getTicketByUserId(@PathVariable int userId){
return ticketService.getTicketByUser(userId);
}
@GetMapping("/get/occupiedSeats")
public ResponseVO getOccupiedSeats(@RequestParam int scheduleId){
return ticketService.getBySchedule(scheduleId);
}
@PostMapping("/cancel")
public ResponseVO cancelTicket(@RequestParam List<Integer> ticketId){