当前位置:   article > 正文

【基于ssm电影购票系统源码和论文_基于ssm的电影票预订系统参考文献

基于ssm的电影票预订系统参考文献

影票在线预订系统

电子商务带领传统行业进入了新的发展时代,“互联网+”模式使传统的电影 院焕发了新的生命力。电影票在线预订系统是电子商务与传统影院销售模式的一 种融合,将票务销售和影院管理转移到网络上进行,方便用户及时方便的查询和 预定票务信息。与传统的影院人工购票不同,电影票在线销售系统能够提供高效, 稳定,方便的购票体验。不仅减少了人工统计出错和低效的问题,而且可以通过 大量的数据统计获取用户对于影片的喜好程度,影院可以根据这些信息进行更合 理的排片计划。

本文探讨和设计了一个电影票在线销售系统,整个系统的设计大体可以分为 三个部分,用户功能客服功能和管理员管理的功能。用户部分涉及到用户的注册登录,选购 影院,影片和座位以及在线支付的功能。后台管理部分为管理员管理的功能,主 要包括对普通管理员的权限分配,影片、影厅、购票管理,统计影片信息,用户 信息管理等功能。系统充分实现了一个普通用户购买映票的整个过程,其中包括 了支付等环节,以及其相对应的可能涉及到的退款等操作。

本系统在设计上使用了目前较为流行的 JAVAWEB 技术,综合了SSM bootstrap等框架进行设计,通过 Maven 项目管理工具对项目进行 构建,使用开源免费的MySQL数据库作为持久化存储,并使用了 JDBC开源框架作为数据库的连接池,前台采用了目前较为流行的bootstrap框架进快速开发,系统开发的集成开发环境选取 了目前较为流行的Java开发环境Intellij IDEA。整个系统采用分层设计的思 想,每层独立其功能和设计,通过Spring管理各个层之间的依赖和注入关系等。 在设计上使用了 MVC的设计模式,将逻辑层与展示层进行分离,通过控制层来实现逻辑的映射关系。

本文讲述了影票预订系统目前的发展现状以及国内外的情况,在此基础上对 系统进行需求分析和设计。侧重于对系统的分析与设计,在分析基础之上对系统 的模块进行了划分,并按照需求设计进行了要求进行了网上的设计。

         关键字:影票预订,JAVAWEB,电子商务,SSM框架

       【582】基于ssm电影购票系统源码和论文 

Abstract

Movie ticket online booking System

E-commerce has led the traditional industry into a new development era. The "Internet +" mode has given new vitality to the traditional cinema. The online booking system for movie tickets is a combination of e-commerce and traditional cinema sales mode. It transfers ticket sales and Cinema Management to the network, and facilitates users to query and book ticket information in a timely and convenient manner. Unlike the traditional manual ticket purchase in cinemas, the online ticket sales system can provide an efficient, stable and convenient ticket purchase experience. It not only reduces the error and inefficiency of manual statistics, but also can obtain the user's preference for movies through a large number of data statistics, and the cinema can make a more reasonable film arrangement plan according to this information.

This paper discusses and designs a movie ticket online sales system. The design of the whole system can be divided into three parts: user function, customer service function and administrator management function. The user part involves the registration and login of users, the purchase of cinemas, movies and seats, and the online payment function. The background management part is the function of administrator management, mainly including the authority allocation to ordinary administrators, film, cinema, ticket purchase management, statistical film information, user information management and other functions. The system fully realizes the entire process of an ordinary user's purchase of movie tickets, including payment and other links, as well as the corresponding possible refund and other operations.

In the design of this system, the current popular JavaWeb technology is used, the SSM bootstrap and other frameworks are integrated for design, the project is built by Maven project management tool, the open source and free MySQL database is used as the persistent storage, and the JDBC open source framework is used as the connection pool of the database. The foreground uses the current popular bootstrap framework for rapid development, The integrated development environment for system development is IntelliJ idea, which is a popular java development environment. The whole system adopts the idea of layered design, each layer is independent of its function and design, and the dependency and injection relationship between each layer are managed through spring. The MVC design pattern is used in the design, which separates the logic layer from the display layer, and realizes the logical mapping relationship through the control layer.

This paper describes the current development of the movie ticket reservation system and the situation at home and abroad, and on this basis, the system needs analysis and design. It focuses on the analysis and design of the system. On the basis of the analysis, the modules of the system are divided, and the online design is carried out according to the requirements of the demand design.

Keywords: movie ticket booking, JavaWeb, e-commerce, SSM framework

  1. package com.mecol.film.controller;
  2. import com.alibaba.fastjson.JSON;
  3. import com.mecol.film.entity.Film;
  4. import com.mecol.film.entity.Play;
  5. import com.mecol.film.entity.Ticket;
  6. import com.mecol.film.entity.Users;
  7. import com.mecol.film.mapper.TestDao;
  8. import com.mecol.film.pojo.Tic;
  9. import com.mecol.film.pojo.UserPojo;
  10. import com.mecol.film.service.FilmService;
  11. import com.mecol.film.service.PlayService;
  12. import com.mecol.film.service.TicketService;
  13. import com.mecol.film.service.UserService;
  14. import org.springframework.beans.factory.annotation.Autowired;
  15. import org.springframework.stereotype.Controller;
  16. import org.springframework.ui.Model;
  17. import org.springframework.web.bind.annotation.ModelAttribute;
  18. import org.springframework.web.bind.annotation.RequestMapping;
  19. import org.springframework.web.bind.annotation.RequestMethod;
  20. import org.springframework.web.bind.annotation.ResponseBody;
  21. import org.springframework.web.servlet.ModelAndView;
  22. import javax.servlet.http.HttpServletRequest;
  23. import javax.servlet.http.HttpSession;
  24. import java.util.HashMap;
  25. import java.util.List;
  26. import java.util.Map;
  27. @Controller
  28. public class ReceptionController {
  29. @Autowired
  30. private UserService userService;
  31. @Autowired
  32. private FilmService filmService;
  33. @Autowired
  34. private PlayService playService;
  35. @Autowired
  36. private TicketService ticketService;
  37. //首页 8080/film 打开电影首页
  38. @RequestMapping("/")
  39. public String index(@ModelAttribute Users user, HttpServletRequest request, Model model){
  40. HttpSession session=request.getSession();
  41. user= (Users) session.getAttribute("user");
  42. Map<String,Object> map =filmService.list(1,8);
  43. model.addAttribute("map",map);
  44. /// System.out.println(user);
  45. if (user!=null){
  46. model.addAttribute("user",user);
  47. }
  48. /*
  49. else {
  50. Users u = new Users();
  51. u.setUserName("1");
  52. model.addAttribute("userb", u);
  53. }*/
  54. return "user/home";
  55. }
  56. @RequestMapping("/list")
  57. public ModelAndView List(){
  58. ModelAndView modelAndView=new ModelAndView("user/listfilm");
  59. //每页显示8部电影
  60. Map<String,Object> map= filmService.list(1,8);
  61. modelAndView.addObject("map",map);
  62. return modelAndView;
  63. }
  64. @RequestMapping("/filmlist")
  65. public ModelAndView filmList(Integer page){
  66. ModelAndView modelAndView=new ModelAndView("user/listfilm");
  67. //从第page开始 再选出8个 如果有的话
  68. Map<String,Object> map= filmService.list(page,8);
  69. modelAndView.addObject("map",map);
  70. return modelAndView;
  71. }
  72. //电影详情
  73. @RequestMapping("/filma")
  74. public String film(Integer filmId,Users user,HttpServletRequest request,Model model){
  75. HttpSession session=request.getSession();
  76. user= (Users) session.getAttribute("user");
  77. model.addAttribute("user",user);
  78. Film film=filmService.film(filmId);
  79. model.addAttribute("film",film);
  80. // System.out.println(film);
  81. return "user/film";
  82. }
  83. /**
  84. * 购票界面
  85. */
  86. @RequestMapping("/goupiao")
  87. public String goupiao(Integer filmId,Users user,
  88. HttpServletRequest request,
  89. Model model){
  90. HttpSession session=request.getSession();
  91. user= (Users) session.getAttribute("user");
  92. model.addAttribute("user",user);
  93. List<Play> list=playService.filmById(filmId);
  94. if (list.size()!=0) {
  95. model.addAttribute("list", list);
  96. Play play = playService.playById(list.get(0).getPlayId());
  97. // System.out.println("a"+play);
  98. model.addAttribute("play", play);
  99. return "user/goupiao";
  100. }
  101. else {
  102. Film film=filmService.film(filmId);
  103. model.addAttribute("film",film);
  104. return "user/noPlay"; //没有档期 没有排档期
  105. }
  106. }
  107. /**
  108. * 跟换排期
  109. */
  110. @RequestMapping("/goupiao2")
  111. public String goupiao2(Integer playId,Users user,HttpServletRequest request,Model model){
  112. HttpSession session=request.getSession();
  113. user= (Users) session.getAttribute("user");
  114. model.addAttribute("user",user);
  115. Play play=playService.playById(playId);
  116. model.addAttribute("play",play);
  117. List<Play> list=playService.filmById(play.getFilm().getFilmId());
  118. model.addAttribute("list",list);
  119. model.addAttribute("index",playId);
  120. return "user/goupiao";
  121. }
  122. /**
  123. * 登录
  124. */
  125. @RequestMapping("/login")
  126. @ResponseBody
  127. public Users login(Users users, HttpServletRequest request){
  128. Users user= null;
  129. user = userService.login(users,request);
  130. // System.out.println(user);
  131. if (user!=null){
  132. HttpSession session=request.getSession();
  133. session.setAttribute("user",user);
  134. // System.out.println(session.getAttribute("user"));
  135. return user;
  136. }else{
  137. Users users1=new Users();
  138. users1.setUserId(0); //创造一个假的 说明数据库中没有这个 前端用
  139. return users1;
  140. }
  141. }
  142. /**
  143. * 用户退出
  144. */
  145. @RequestMapping("/tui")
  146. @ResponseBody
  147. public String tui(HttpServletRequest request){
  148. HttpSession session=request.getSession();
  149. session.removeAttribute("user");
  150. return "";
  151. }
  152. /**
  153. * 购买电影票
  154. */
  155. @RequestMapping(value = "/goumai",method = RequestMethod.POST)
  156. @ResponseBody
  157. public Integer goumai(Tic tic, HttpServletRequest request){
  158. HttpSession session=request.getSession();
  159. Users user= (Users) session.getAttribute("user");
  160. tic.setUserId(user.getUserId());
  161. // System.out.println(tic);
  162. int a=ticketService.add(tic,user);
  163. return a;
  164. }
  165. /**
  166. * 影城介绍
  167. */
  168. @RequestMapping("/we")
  169. public String we(@ModelAttribute Users user, HttpServletRequest request,Model model){
  170. HttpSession session=request.getSession();
  171. user= (Users) session.getAttribute("user");
  172. System.out.println(user);
  173. if (user!=null){
  174. model.addAttribute("user",user);
  175. }else {
  176. Users u = new Users();
  177. u.setUserName("1");
  178. model.addAttribute("userb", u);
  179. }
  180. return "user/jies";
  181. }
  182. @RequestMapping("/mohu")
  183. public String mohu(String name,Integer page,Model model){
  184. Map map=filmService.mohu(name,page);
  185. model.addAttribute("map",map);
  186. return "user/listfilm";
  187. }
  188. @RequestMapping("/personal")
  189. public String personal(Integer page,HttpServletRequest request,Model model){
  190. Users users=new Users();
  191. HttpSession session=request.getSession();
  192. users= (Users) session.getAttribute("user");
  193. //System.out.println(users);
  194. if (page==null){
  195. page=1;
  196. }
  197. if (users!=null){
  198. /*修改完后时实更新*/
  199. Map<String,Object> map=ticketService.userList(page,users.getUserId());
  200. model.addAttribute("map",map);
  201. /*model.addAttribute("user",users);*/
  202. Users u=userService.upLogin(users,request);
  203. session.setAttribute("user",u);
  204. model.addAttribute("user",session.getAttribute("user"));
  205. }else{
  206. Map<String,Object> map=new HashMap<String, Object>();
  207. map.put("pages",0);
  208. map.put("pageNum",0);
  209. model.addAttribute("map",map);
  210. }
  211. return "user/personal";
  212. }
  213. @RequestMapping(value = "/update",method = RequestMethod.POST)
  214. public String update(UserPojo userPojo, HttpServletRequest request){
  215. Users users=new Users();
  216. HttpSession session=request.getSession();
  217. users= (Users) session.getAttribute("user");
  218. userPojo.setUserId(users.getUserId());
  219. userService.update(userPojo,request);
  220. return "redirect:/personal";
  221. }
  222. @RequestMapping(value = "/updateMoney",method = RequestMethod.POST)
  223. public String updateMoney(UserPojo userPojo, HttpServletRequest request){
  224. Users users=new Users();
  225. HttpSession session=request.getSession();
  226. users= (Users) session.getAttribute("user");
  227. userPojo.setUserId(users.getUserId());
  228. userService.updateMoney(userPojo,request);
  229. return "redirect:/personal";
  230. }
  231. /**
  232. *已被购买的
  233. */
  234. @RequestMapping("/mai")
  235. @ResponseBody
  236. public String mai(Integer playId, Users user){
  237. // System.out.println(playId);
  238. List<Ticket> list=ticketService.playById(playId);
  239. // System.out.println(list);
  240. /* model.addAttribute("ticket",list);*/
  241. Map<String,Object> map=new HashMap<String,Object>();
  242. map.put("ticket",list);
  243. String a= JSON.toJSONString(map);
  244. return a;
  245. }
  246. @RequestMapping("/zhu")
  247. @ResponseBody
  248. public Integer zhu(Users users){
  249. return userService.add(users);
  250. }
  251. }

  1. package com.mecol.film.controller;
  2. import com.mecol.film.entity.Admin;
  3. import com.mecol.film.service.AdminService;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.stereotype.Controller;
  6. import org.springframework.ui.Model;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.ResponseBody;
  9. import javax.servlet.http.HttpServletRequest;
  10. import javax.servlet.http.HttpSession;
  11. import java.io.UnsupportedEncodingException;
  12. @Controller
  13. public class ViewController {
  14. @Autowired
  15. private AdminService adminService;
  16. /**
  17. * 登录界面
  18. * @return
  19. */
  20. @RequestMapping("/adminlogin")
  21. public String adminLogin(){
  22. return "admin/login";
  23. }
  24. @RequestMapping("/loginadmin")
  25. @ResponseBody
  26. public String admin(Admin admin, HttpServletRequest request, Model model){
  27. Admin a= null;
  28. try {
  29. a = adminService.login(admin);
  30. } catch (UnsupportedEncodingException e) {
  31. e.printStackTrace();
  32. }
  33. System.out.println(a);
  34. if (a!=null){
  35. HttpSession session=request.getSession();
  36. session.setAttribute("admin",a);
  37. model.addAttribute("admin",a);
  38. return "ok";
  39. }
  40. return "redirect:/root/admin";
  41. }
  42. }

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

闽ICP备14008679号