当前位置:   article > 正文

基于javaweb的电影售票管理系统(java+ssm+jsp+jquery+ajax+mysql)_采用ssm开发基于web的电影管理系统。

采用ssm开发基于web的电影管理系统。

基于javaweb的电影售票管理系统(java+ssm+jsp+jquery+ajax+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

20220528223546

20220528223547

20220528223548

20220528223549

20220528223550

20220528223552

基于javaweb+mysql的电影售票管理系统(java+SSM+JSP+jQuery+Ajax+mysql)

项目介绍

管理员角色包含以下功能: 管理员登陆,管理员用户管理,新闻公告增删改查,电影类型增删改查,影院信息增删改查,电影信息增删改查,订单查询,电影评价管理等功能。 用户角色包含以下功能: 用户首页,用户登录,查看电影详情,加入购物车,下单电影票,查看我的订单,用户中心,评价电影等功能。 这个系统除了不提供在线选座,其他真的一个很完美的电影买票系统

环境需要

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项目:否;

技术栈

  1. 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+jQuery+Ajax

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中springmvc-servlet.xml配置文件中的数据库配置改为自己的配置; 4. 运行项目, 前台运行地址:输入localhost:8080/ssm_zxdydp/index/index.action 登录 用户账号/密码: ls/lisi 后台运行地址:localhost:8080/ssm_zxdydp/admin/index.jsp 管理员账号/密码:admin/admin

用户管理控制层:

@RestController()

public class AccountController {

private final static String ACCOUNT_INFO_ERROR=“用户名或密码错误”;

@Autowired

private AccountServiceImpl accountService;

@PostMapping(“/login”)

public ResponseVO login(@RequestBody UserForm userForm, HttpSession session){

UserVO user = accountService.login(userForm);

if(user==null){

return ResponseVO.buildFailure(ACCOUNT_INFO_ERROR);

//注册session

session.setAttribute(InterceptorConfiguration.SESSION_KEY,userForm);

return ResponseVO.buildSuccess(user);

@PostMapping(“/register”)

public ResponseVO registerAccount(@RequestBody UserForm userForm){

return accountService.registerAccount(userForm);

@PostMapping(“/logout”)

public String logOut(HttpSession session){

session.removeAttribute(InterceptorConfiguration.SESSION_KEY);

return “index”;

@GetMapping(“/get/history”)

public ResponseVO getHistory(@RequestParam int userId){

return accountService.getHistoryByUserId(userId);

@PostMapping(“insert/history”)

public ResponseVO insertHistory(@RequestBody historyItem history){return accountService.insertHistory(history); }

@GetMapping(“/get/user”)

public ResponseVO getUserById(@RequestParam int userId){return accountService.getUserById(userId);}

@PostMapping(“/update/user”)

public ResponseVO updateUser(@RequestBody User user){return accountService.updateUser(user);}

@GetMapping(“/get/all/user”)

public ResponseVO getAllUser(){return accountService.getAllUser();}

@PostMapping(“/delete/user”)

public ResponseVO deleteUser(@RequestParam int userId){return accountService.deleteUser(userId);}

后台电影管理控制层:

/**电影管理

*/

@RestController

public class MovieController {

@Autowired

private MovieService movieService;

@Autowired

private MovieLikeService movieLikeService;

@RequestMapping(value = “/movie/add”, method = RequestMethod.POST)

public ResponseVO addMovie(@RequestBody MovieForm addMovieForm){

return movieService.addMovie(addMovieForm);

@RequestMapping(value = “/movie/{id}/{userId}”, method = RequestMethod.GET)

public ResponseVO searchOneMovieByIdAndUserId(@PathVariable int id, @PathVariable int userId){

return movieService.searchOneMovieByIdAndUserId(id, userId);

@RequestMapping(value = “/movie/all”, method = RequestMethod.GET)

public ResponseVO searchAllMovie(){

//返回结果中包括已经下架的电影

return movieService.searchAllMovie();

@RequestMapping(value = “/movie/all/exclude/off”, method = RequestMethod.GET)

public ResponseVO searchOtherMoviesExcludeOff(){

//返回结果中不包括已经下架的电影

return movieService.searchOtherMoviesExcludeOff();

@RequestMapping(value = “/movie/{movieId}/like”, method = RequestMethod.POST)

public ResponseVO likeMovie(@PathVariable int movieId,@RequestParam int userId){

return movieLikeService.likeMovie(userId,movieId);

@RequestMapping(value = “/movie/{movieId}/unlike”, method = RequestMethod.POST)

public ResponseVO unlikeMovie(@PathVariable int movieId,@RequestParam int userId){

return movieLikeService.unLikeMovie(userId,movieId);

@RequestMapping(value = “/movie/{movieId}/like/count”, method = RequestMethod.GET)

public ResponseVO getMovieLikeCounts(@PathVariable int movieId){

return movieLikeService.getCountOfLikes(movieId);

@RequestMapping(value = “/movie/{movieId}/like/date”, method = RequestMethod.GET)

public ResponseVO getMovieLikeCountByDate(@PathVariable int movieId){

return movieLikeService.getLikeNumsGroupByDate(movieId);

@RequestMapping(value = “/movie/search”,method = RequestMethod.GET)

public ResponseVO getMovieByKeyword(@RequestParam String keyword){

return movieService.getMovieByKeyword(keyword);

@RequestMapping(value = “/movie/off/batch”,method = RequestMethod.POST)

public ResponseVO pullOfBatchOfMovie(@RequestBody MovieBatchOffForm movieBatchOffForm){

return movieService.pullOfBatchOfMovie(movieBatchOffForm);

@RequestMapping(value = “/movie/update”,method = RequestMethod.POST)

public ResponseVO updateMovie(@RequestBody MovieForm updateMovieForm){

return movieService.updateMovie(updateMovieForm);

电影票管理控制层:

@RestController

@RequestMapping(“/ticket”)

public class TicketController {

@Autowired

TicketService ticketService;

@Autowired

AccountService accountService;

@PostMapping(“/vip/buy”)

public ResponseVO buyTicketByVIPCard(@RequestParam List 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 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 ticketId){

return ticketService.cancelTicket(ticketId);

@PostMapping(“insert/history”)

public ResponseVO insertHistory(@RequestBody historyItem history){return accountService.insertHistory(history); }


声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/453907
推荐阅读
相关标签
  

闽ICP备14008679号