Graduation Design - SSM Cinema Ticketing System (SSM Graduation Design) (Graduation Design of Film Ticketing System)

Project type: SSM project (B/S architecture) Project Name...
Cinema Home Page
User registration
Movie introduction
Ticket Purchase Page
User Personal Center
Introduction to Movie City
Personal Information Modification
Background Home Page
Movie Category Management
Add and modify categories
Movie Information Management (movies that come off shelves can be taken off shelves, and movies that come off shelves can be restored to show again)
Movies on the shelf
Show management (after adding a movie, it needs to be uploaded before it can be purchased by the user)
Add New File Period
mapper for user login registration module
mapper for seat selection module

Project type: SSM project (B/S architecture)

Project Name: SM-based cinema ticket-buying system

User type: 2 roles (Administrator + Ticket Buyer)
System Type: Front End Ticketing Interface + Background Management
Design Mode: SSM

UI Appearance: Bootstrap+CSS+JS
Development Tools: Idea
Database: Mysql+Navicat
Database tables: 13

🍅   Author's introduction: Chief Accounting Officer can give free guidance to reduce weight checking, regularly issue high-quality manually developed source code, and provide guidance for course design and graduation design! Freshly graduated students from Shuang1-class colleges and universities used to be small white!

🍅   (Public Number - Senior Source)

🍅   Focus on replies     Practice     Free get     Teaching, Research, Evaluation and Teaching System (Hand-training Project for Curriculum Design)

🍅   Focus on replies      Student     Free get     A set of Java Web sources

🍅   Focus on replies     ppt       Free get     367 sets of ppt templates for defense

🍅   Focus on replies     resume     Free get     200 Programmed Ape Resume Templates

🍅   Focus on getting addresses: Other projects and project sources (Public Number - Senior Source)

🍅

🍅

  🍅   Free ppt resources:   

🍅   Free resume resources:   

Catalog

Introduction to Front End Functions

Cinema Home Page

User registration

Movie introduction

Ticket Purchase Page

User Personal Center

Introduction to Movie City

Personal Information Modification

Introduction of Background Management Functions

Background Home Page

Movie Category Management

Add and modify categories

Movie Information Management (movies that come off shelves can be taken off shelves, and movies that come off shelves can be restored to show again)

Movies on the shelf

Show management (after adding a movie, it needs to be uploaded before it can be purchased by the user)

Add New File Period

Database Design

Project structure

  Part of the code demo (for example, when a user purchases a movie ticket)

mapper for user login registration module

mapper for the booking module

mapper for seat selection module

Introduction to Front End Functions

Cinema Home Page

User registration

Movie introduction

Ticket Purchase Page

Movies can be selected for the specified date and refreshed via Ajax. Black means it has already been purchased by other users and only green seats are available for ticket purchase. And you can buy more than one ticket at the same time.

User Personal Center

Introduction to Movie City

Personal Information Modification

Introduction of Background Management Functions

Background Home Page

Movie Category Management

Add and modify categories

Movie Information Management (movies that come off shelves can be taken off shelves, and movies that come off shelves can be restored to show again)

Movies on the shelf

Show management (after adding a movie, it needs to be uploaded before it can be purchased by the user)

Add New File Period

Database Design

Project structure

  Part of the code demo (for example, when a user purchases a movie ticket)

Controller side code section

/** * home page * @param user * @param request * @param model * @return */ @RequestMapping("/") public String index(@ModelAttribute Users user, HttpServletRequest request,Model model){ HttpSession session=request.getSession(); user= (Users) session.getAttribute("user"); Map<String,Object> map =filmService.list(1,8); model.addAttribute("map",map); System.out.println(user); if (user!=null){ model.addAttribute("user",user); }else { Users u = new Users(); u.setUserName("1"); model.addAttribute("userb", u); } return "user/home"; } /** * Movie Details * @param filmId * @param user * @param request * @param model * @return */ @RequestMapping("/filma") public String film(Integer filmId,Users user,HttpServletRequest request,Model model){ HttpSession session=request.getSession(); user= (Users) session.getAttribute("user"); model.addAttribute("user",user); Film film=filmService.film(filmId); model.addAttribute("film",film); System.out.println(film); return "user/film"; /* return "user/home";*/ } /** * Ticket Purchase Interface * @param filmId * @param user * @param request * @param model * @return */ @RequestMapping("/goupiao") public String goupiao(Integer filmId,Users user,HttpServletRequest request,Model model){ HttpSession session=request.getSession(); user= (Users) session.getAttribute("user"); model.addAttribute("user",user); List<Play> list=playService.filmById(filmId); model.addAttribute("list",list); Play play=playService.playById(list.get(0).getPlayId()); System.out.println("a"+play); model.addAttribute("play",play); return "user/goupiao"; } /** * Follow schedule * @param playId * @param user * @param request * @param model * @return */ @RequestMapping("/goupiao2") public String goupiao2(Integer playId,Users user,HttpServletRequest request,Model model){ HttpSession session=request.getSession(); user= (Users) session.getAttribute("user"); model.addAttribute("user",user); Play play=playService.playById(playId); model.addAttribute("play",play); List<Play> list=playService.filmById(play.getFilm().getFilmId()); model.addAttribute("list",list); model.addAttribute("index",playId); return "user/goupiao"; } /** *Purchased * @param playId * @param user * @return */ @RequestMapping("/mai") @ResponseBody public String mai(Integer playId, Users user){ System.out.println(playId); List<Ticket> list=ticketService.playById(playId); System.out.println(list); /* model.addAttribute("ticket",list);*/ Map<String,Object> map=new HashMap<String,Object>(); map.put("ticket",list); String a= JSON.toJSONString(map); return a; } /** * Introduction to Movie City * @param user * @param request * @param model * @return */ @RequestMapping("/we") public String we(@ModelAttribute Users user, HttpServletRequest request,Model model){ HttpSession session=request.getSession(); user= (Users) session.getAttribute("user"); System.out.println(user); if (user!=null){ model.addAttribute("user",user); }else { Users u = new Users(); u.setUserName("1"); model.addAttribute("userb", u); } return "user/jies"; } /** * Sign in * @param users * @param request * @return */ @RequestMapping("/login") @ResponseBody public Users login(Users users, HttpServletRequest request){ Users user= null; user = userService.login(users,request); System.out.println(user); if (user!=null){ HttpSession session=request.getSession(); session.setAttribute("user",user); System.out.println(session.getAttribute("user")); return user; }else{ return null; } } /** * User Exit * @param request * @return */ @RequestMapping("/tui") @ResponseBody public String tui(HttpServletRequest request){ HttpSession session=request.getSession(); session.removeAttribute("user"); return ""; } /** * Buy movie tickets * @param tic * @param request * @return */ @RequestMapping(value = "/goumai",method = RequestMethod.POST) @ResponseBody public Integer goumai(Tic tic,HttpServletRequest request){ HttpSession session=request.getSession(); Users user= (Users) session.getAttribute("user"); tic.setUserId(user.getUserId()); System.out.println(tic); int a=ticketService.add(tic); return a; } @RequestMapping("/list") public ModelAndView List(){ ModelAndView modelAndView=new ModelAndView("user/listfilm"); Map<String,Object> map= filmService.list(1,8); modelAndView.addObject("map",map); return modelAndView; } @RequestMapping("/filmlist") public ModelAndView filmList(Integer page){ ModelAndView modelAndView=new ModelAndView("user/listfilm"); Map<String,Object> map= filmService.list(page,8); modelAndView.addObject("map",map); return modelAndView; } @RequestMapping("/mohu") public String mohu(String name,Integer page,Model model){ Map map=filmService.mohu(name,page); model.addAttribute("map",map); return "user/listfilm"; } @RequestMapping("/zhu") @ResponseBody public Integer zhu(Users users){ return userService.add(users); } @RequestMapping("/personal") public String personal(Integer page,HttpServletRequest request,Model model){ Users users=new Users(); HttpSession session=request.getSession(); users= (Users) session.getAttribute("user"); System.out.println(users); if (page==null){ page=1; } if (users!=null){ /*Real-time update after modification*/ Map<String,Object> map=ticketService.userList(page,users.getUserId()); model.addAttribute("map",map); /*model.addAttribute("user",users);*/ Users u=userService.upLogin(users,request); session.setAttribute("user",u); model.addAttribute("user",session.getAttribute("user")); }else{ Map<String,Object> map=new HashMap<String, Object>(); map.put("pages",0); map.put("pageNum",0); model.addAttribute("map",map); } return "user/personal"; } @RequestMapping(value = "/update",method = RequestMethod.POST) public String update(UserPojo userPojo,HttpServletRequest request){ Users users=new Users(); HttpSession session=request.getSession(); users= (Users) session.getAttribute("user"); userPojo.setUserId(users.getUserId()); userService.update(userPojo,request); return "redirect:/personal"; } }

mapper for user login registration module

<!--according to id Find Users--> <select id="userById" parameterType="Integer" resultType="com.wwt.entity.Users"> select * from users where user_id=# and is_delete=1 </select> <!--Sign in--> <select id="login" parameterType="com.wwt.entity.Users" resultType="com.wwt.entity.Users"> select * from users <where> user_account=# and user_password=# and is_delete=1 </where> </select> <!--modify--> <update id="update" parameterType="com.wwt.entity.Users"> update users <set> <if test="userName!=null and userName!=''"> user_name=#, </if> <if test="userPassword!=null and userPassword!=''"> user_password=#, </if> <if test="sex!=null"> sex=#, </if> <if test="userEmli!=null and userEmli!=''"> user_emli=#, </if> <if test="userPhone!=null and userPhone!=''"> user_phone=#, </if> <if test="imgUrl!=null and imgUrl!=''"> img_url=#, </if> <if test="lastIp!=null and lastIp!=''"> last_ip=#, </if> <if test="updateTime!=null and updateTime!=''"> update_time=#, </if> </set> where user_id=# and is_delete=1 </update> <insert id="add" parameterType="com.wwt.entity.Users"> insert into users(user_name,user_account,user_password,user_emli,user_phone,create_time,update_time,img_url) value (#,#,#,#,#,#,#,'/img/ht.jpg') </insert>

mapper for the booking module

<resultMap id="TicketMap" type="com.wwt.entity.Ticket"> <id property="ticketId" column="ticket_id"/> <result property="buyingTime" column="buying_time"/> <association property="play" column="play_id" javaType="com.wwt.entity.Play" select="com.wwt.mapper.PlayMapper.playById"/> <association property="seat" column="seat_id" javaType="com.wwt.entity.Seat" select="com.wwt.mapper.SeatMapper.seatById"/> </resultMap> <select id="playById" parameterType="Integer" resultMap="TicketMap"> select t.*,p.play_id play_id ,s.seat_id seat_id from play p,ticket t,seat s where p.play_id=t.play_id and s.seat_id=t.seat_id and t.play_id=# </select> <select id="userList" parameterType="Integer" resultMap="TicketMap"> select t.*,p.play_id play_id ,s.seat_id seat_id from play p,ticket t,seat s where p.play_id=t.play_id and s.seat_id=t.seat_id and t.user_id=# ORDER BY t.ticket_id DESC </select> <insert id="add" parameterType="com.wwt.pojo.TicA"> insert into ticket value (null,#,#,#,#) </insert>

mapper for seat selection module

<select id="seatById" parameterType="Integer" resultType="com.wwt.entity.Seat"> select * from seat where seat_id=# </select> <select id="seatBySeat" parameterType="String" resultType="com.wwt.entity.Seat"> select * from seat where seat=# </select>

18 October 2021, 13:19 | Views: 9064

Add new comment

For adding a comment, please log in
or create account

0 comments