摘 要
如今,由于互联网技术的飞速发展,同时也改变着人们的出行方式,人们会逐渐的选择在线上购买出行的车票,而不是选择去车站大排长龙,与此同时,由于假期时长的缘故,客运汽车出行作为中短途的出行工具也就逐渐流行了起来。传统的客运模式已经不太适应现在的社会发展,人口日益增长,出行人数愈来愈多,客运系统面临着售票厅大排长龙,购买、更改车票过于费时。
为了解决上述的问题,本系统将车票购买与线上购买的方式结合了起来,系统分为后台管理系统和微信小程序,为用户及管理员提供美观、便利、合理的操作界面与信息交互,通过后端与数据库之间的交互使乘车人可以在线上完成车票的购买,修改以及退票等的操作。
其次,对当前软件开发技术进行了研究,提出了基于微信小程序平台,采用微信开发者工具、idea开发,使用MySQL数据库管理数据的开发方案。再次,采用UML建模技术对系统进行需求分析、功能设计以及类的设计;最后为给汽车售票系统提供一个管理的平台,特开发了本微信小程序汽车售票系统。用户可以随时查看汽车售票信息、在线购票等。系统功能齐全,方便易用。
经过测试和运行,系统的运用,将为微信用户提供一个更加方便、快捷、高效的平台,节省了车票购买的人力资源以及时间成本。具有实际意义和推广价值。
关键词:汽车售票 微信小程序 微信
【501】基于微信小程序的springboot客运汽车票购票系统源码和论文
Abstract
Nowadays, due to the rapid development of Internet technology and changing the way people travel, people will gradually choose to buy travel tickets online instead of going to long lines at the station. At the same time, due to the length of the holiday, passenger transportation Automobile travel has gradually become popular as a short- and medium-distance travel tool. The traditional passenger transport mode is no longer suitable for the current social development. The population is increasing and the number of travelers is increasing. The passenger transport system is facing a long line of ticket halls. It is too time-consuming to purchase and change tickets.
In order to solve the above problems, this system combines the purchase of tickets with online purchases. The system is divided into a background management system and a WeChat applet to provide users, administrators with beautiful, convenient and reasonable operation interfaces and information interaction. Through the interaction between the backend and the database, passengers can complete the operations of purchasing, modifying and refunding tickets online.
Secondly, the current software development technology is researched, and a development plan based on WeChat mini-program platform, using WeChat developer tools and ideas, and using MySQL database to manage data is proposed. Thirdly, UML modeling technology is used to carry out requirements analysis, functional design and class design for the system. Finally, in order to provide a management platform for the car ticketing system, this WeChat mini-program car ticketing system was specially developed. Users can view car ticket sales information, buy tickets online, etc. at any time. The system is fully functional and easy to use.
After testing and running, the application of the system will provide a more convenient, fast, and efficient platform for WeChat users, saving human resources and time costs for ticket purchases. It has practical significance and promotion value.
Keywords: car ticket sales; WeChat mini-program WeChat convenient
package com.poiu.ticket.domain.controller;
import com.poiu.ticket.core.entity.BasePageVO;
import com.poiu.ticket.domain.model.dto.CarShiftAddDTO;
import com.poiu.ticket.domain.model.dto.CarShiftDeleteDTO;
import com.poiu.ticket.domain.model.dto.CarShiftQueryDTO;
import com.poiu.ticket.domain.model.dto.CarShiftUpdateDTO;
import com.poiu.ticket.domain.model.vo.CarShiftListVO;
import com.poiu.ticket.domain.service.ICarShiftService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* <p>
* 班次信息 前端控制器
* </p>
*
* @author poiu
* @since 2022-03-21
*/
@RestController
@RequestMapping("/domain/carShift")
public class CarShiftController {
@Resource
private ICarShiftService carShiftService;
@PostMapping("/add")
public void add(@RequestBody CarShiftAddDTO addDTO) {
carShiftService.addCarShift(addDTO);
}
@PostMapping("/update")
public void update(@RequestBody CarShiftUpdateDTO updateDTO) {
carShiftService.update(updateDTO);
}
@PostMapping("/delete")
public void delete(@RequestBody CarShiftDeleteDTO deleteDTO) {
carShiftService.removeByIds(deleteDTO.getIdList());
}
@PostMapping("/pageCarShift")
public BasePageVO pageCarShift(@RequestBody CarShiftQueryDTO CarShiftQueryDTO) {
return carShiftService.pageCarShift(CarShiftQueryDTO);
}
@PostMapping("/listCarShift")
public List<CarShiftListVO> listCarShift(@RequestBody CarShiftQueryDTO CarShiftQueryDTO) {
return carShiftService.listCarShift(CarShiftQueryDTO);
}
}
package com.poiu.ticket.domain.controller;
import com.poiu.ticket.core.entity.BasePageVO;
import com.poiu.ticket.domain.entity.User;
import com.poiu.ticket.domain.model.dto.*;
import com.poiu.ticket.domain.model.vo.UserInfoVO;
import com.poiu.ticket.domain.service.IUserService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* <p>
* 用户表 前端控制器
* </p>
*
* @author poiu
* @since 2022-03-21
*/
@RestController
@RequestMapping("/domain/user")
public class UserController {
@Resource
private IUserService userService;
@PostMapping("/login")
public UserInfoVO login(@RequestBody @Validated UserLoginDTO loginDTO) {
User user = userService.login(loginDTO);
return new UserInfoVO().setId(user.getId()).setPhone(user.getPhone()).setUserName(user.getUserName());
}
@PostMapping("/detail")
public User detail(@RequestBody UserQueryDTO userQueryDTO){
return userService.getById(userQueryDTO.getId());
}
@PostMapping("/register")
public UserInfoVO register(@RequestBody @Validated UserRegisterDTO registerDTO) {
User user = userService.register(registerDTO);
return new UserInfoVO().setId(user.getId()).setPhone(user.getPhone()).setUserName(user.getUserName());
}
@PostMapping("/update")
public void update(@RequestBody @Validated UserUpdateDTO updateDTO) {
userService.update(updateDTO);
}
@PostMapping("/updatePassword")
public void updatePassword(@RequestBody @Validated UserPasswordDTO updateDTO) {
userService.update(updateDTO);
}
@PostMapping("/updateUserName")
public void updateUserName(@RequestBody @Validated UserNameDTO updateDTO) {
userService.update(updateDTO);
}
@PostMapping("/delete")
public void delete(@RequestBody UserDeleteDTO deleteDTO) {
userService.removeByIds(deleteDTO.getIdList());
}
@PostMapping("/pageUser")
public BasePageVO pageUser(@RequestBody UserQueryDTO queryDTO){
return userService.pageUser(queryDTO);
}
}
- tp_city(城市信息表)
表tp_city用于保存城市的基本信息,该表的结构如表3.3所示。
表3.3 tp_city表
字段名 | 描述 | 数据类型 | 长度 | 是否键 |
id | ID | bigint | 20 | 主键 |
city_name | 名称 | varchar | 50 | 否 |
create_time | 创建时间 | datetime | 否 | |
update_time | 更新时间 | datetime | 否 | |
version | 版本号 | int | 11 | 否 |
pinyin_prefix | 拼音前缀 | varchar | 10 | 是 |
- tp_coupon(优惠券信息表)
表tp_coupon用于保存优惠卷的基本信息,该表的结构如表3.4所示。
表3.4 tp_coupon表
字段名 | 描述 | 数据类型 | 长度 | 是否键 |
id | ID | bigint | 20 | 主键 |
user_id | 用户id | bigint | 20 | 外键 |
coupon_number | 订单号 | varchar | 255 | 否 |
coupon_name | 优惠卷名称 | varchar | 50 | 否 |
coupon_price | 优惠卷金额 | int | 11 | 否 |
coupon_status | 优惠卷状态 | int | 11 | 否 |
create_time | 创建时间 | datetime | 否 | |
update_time | 更新时间 | datetime | 否 | |
version | 版本号 | Int | 11 | 否 |
- tp_order(订单表)
表tp_order用于保存订单的基本信息,该表的结构如表3.5所示。
表3.5 tp_order表
字段名 | 描述 | 数据类型 | 长度 | 是否键 |
id | 编号 | bigint | 20 | 主键 |
order_number | 订单号 | varchar | 255 | 否 |
user_id | 用户id | bigint | 20 | 外键 |
car_shift_id | 班次id | bigint | 20 | 外键 |
order_price | 订单金额 | int | 11 | 否 |
pay_price | 支付金额 | int | 11 | 否 |
coupon_id | 优惠券id | bigint | 20 | 外键 |
coupon_name | 优惠券名称 | varchar | 50 | 否 |
coupon_price | 优惠卷金额 | int | 11 | 否 |
order_status | 车票状态 | int | 11 | 否 |
pay_time | 支付时间 | datetime | 是 | |
create_time | 创建时间 | datetime | 否 | |
update_time | 更新时间 | datetime | 否 | |
version | 版本号 | int | 11 | 否 |
- tp_pay_log(支付记录表)
表tp_pay_log用于保存支付记录的基本信息,该表的结构如表3.6所示。
表3.6 tp_pay_log表
字段名 | 描述 | 数据类型 | 长度 | 是否键 |
id | ID | varchar | 20 | 主键 |
order_number | 订单号 | varchar | 255 | 否 |
user_id | 用户id | varchar | 20 | 外键 |
pay_price | 支付金额 | varchar | 11 | 否 |
pay_time | 支付时间 | varchar | 否 | |
create_time | 创建时间 | datetime | 否 | |
update_time | 更新时间 | datetime | 否 | |
version | 版本号 | int | 11 | 否 |