基于微信小程序的springboot校园班车预定系统源码和论文

校车是服务教职工和学生的交通工具,有着特殊的运行方式和用途,它一般 用于多个校区之间的往来交通,或者作为教职工上下班的交通工具。校园班车预定系统是后勤服务工作的主要组成部分,与高校教师、学生和工 作员的工作、学习和生活等息息相关。随着人口的增加,由于高校的规模逐步扩 张,车辆数目也逐步增加,造成后勤车辆管理的难度增大。同时公车私用、无车 可用等现象也存在。车辆管理系统有助于提高后勤车辆管理过程中的管理效率, 进而提高服务质量。通过信息化的手段对后勤车辆进行管理,规范管理过程中的 每个环节,并且形成一套标准,能够大大提高工作开展的效率。

为了解决上述的问题,本系统将车票购买与线上购买的方式结合了起来,系统分为后台管理系统和微信小程序,为用户及管理员提供美观、便利、合理的操作界面与信息交互,通过后端与数据库之间的交互使乘车人可以在线上完成车票的购买,修改以及退票等的操作。

其次,对当前软件开发技术进行了研究,提出了基于微信小程序平台,采用微信开发者工具、idea开发,使用MySQL数据库管理数据的开发方案。再次,采用UML建模技术对系统进行需求分析、功能设计以及类的设计;最后为给汽车售票系统提供一个管理的平台,特开发了本微信小程序汽车售票系统。用户可以随时查看汽车售票信息、在线购票等。系统功能齐全,方便易用。

经过测试和运行,系统的运用,将为微信用户提供一个更加方便、快捷、高效的平台,节省了车票购买的人力资源以及时间成本。具有实际意义和推广价值。

关键词:汽车售票 微信小程序 微信 Springboot

【589】基于微信小程序的springboot校园班车预定系统源码和论文

Abstract

The school bus is a transportation tool serving teaching staff and students. It has a special operation mode and purpose. It is generally used for the traffic between multiple campuses or as a transportation tool for teaching staff to work.The campus bus reservation system is the main component of the logistics service, which is closely related to the work, study and life of college teachers, students and staff. With the increase of population, as the scale of colleges and universities gradually expands, the number of vehicles also gradually increases, which makes the management of logistics vehicles more difficult. At the same time, there are also phenomena such as private use of public cars and no cars available. The vehicle management system is helpful to improve the management efficiency in the logistics vehicle management process, and then improve the service quality. To manage logistics vehicles by means of informatization, standardize every link in the management process, and form a set of standards, which can greatly improve the efficiency of work.

In order to solve the above problems, the system combines ticket purchase with online purchase. The system is divided into a background management system and a wechat applet to provide users and administrators with a beautiful, convenient and reasonable operation interface and information interaction. Through the interaction between the back-end and the database, passengers can complete the purchase, modification and refund of tickets online.

Secondly, the current software development technology is studied, and a development scheme based on wechat small program platform, using wechat developer tools and idea development, and using MySQL database to manage data is proposed. Thirdly, the UML modeling technology is used to analyze the system requirements, function design and class design; Finally, in order to provide a management platform for the auto ticketing system, this wechat small program auto ticketing system is specially developed. The user can view the ticket sales information and purchase tickets online at any time. The system has complete functions and is easy to use。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.8.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.poiu</groupId>
    <artifactId>ticket</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>demo</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.67</version>
        </dependency>
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.3.1.tmp</version>
        </dependency>
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-generator</artifactId>
            <version>3.3.1.tmp</version>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity-engine-core</artifactId>
            <version>2.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.18</version>
        </dependency>
        <dependency>
            <groupId>com.belerweb</groupId>
            <artifactId>pinyin4j</artifactId>
            <version>2.5.1</version>
        </dependency>


        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.4.13</version>
                <configuration>
                    <!-- 删除 172.16.1.75:5000 -->
                    <imageName>lianghb/ticket:latest</imageName>
                    <dockerDirectory>${project.basedir}/</dockerDirectory>
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                </configuration>
                <!-- 运行命令 mvn clean package docker:build 打包并生成docker镜像 -->
            </plugin>

        </plugins>

    </build>

</project>

 

package com.poiu.ticket;

import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.config.*;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
import lombok.extern.slf4j.Slf4j;

import java.util.Scanner;


@Slf4j
public class BatisPlusGenerator {

    public static void main(String[] args) {
        String[] tables = new String[]{
                "tp_ticket"
        };


        AutoGenerator autoGenerator = new AutoGenerator();

        /**
         * 全局配置
         */
        GlobalConfig globalConfig = new GlobalConfig();
        String projectPath = System.getProperty("user.dir");
        // D:\work\ticket-project\src\main\java
        globalConfig.setOutputDir(projectPath + "/src/main/java");
        globalConfig.setAuthor("poiu");
        globalConfig.setEnableCache(false);
        globalConfig.setBaseResultMap(true);
        globalConfig.setBaseColumnList(true);
        globalConfig.setOpen(false);
        globalConfig.setFileOverride(true);
        autoGenerator.setGlobalConfig(globalConfig);

        /**
         * 数据源配置
         */
        DataSourceConfig dataSourceConfig = new DataSourceConfig();
        dataSourceConfig.setUrl("jdbc:mysql://106.13.209.81:3306/ticket_project?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2B8");
        dataSourceConfig.setDriverName("com.mysql.cj.jdbc.Driver");
        dataSourceConfig.setUsername("root");
        dataSourceConfig.setPassword("root1");
        autoGenerator.setDataSource(dataSourceConfig);

        /**
         * 包配置v
         */
        PackageConfig packageConfig = new PackageConfig();
        packageConfig.setModuleName("domain");
        packageConfig.setParent("com.poiu.ticket");
        autoGenerator.setPackageInfo(packageConfig);

        /**
         * 模板配置
         */
        TemplateConfig templateConfig = new TemplateConfig();
        templateConfig.setEntity("templates/entity.java");
        templateConfig.setMapper("templates/mapper.java");
        templateConfig.setXml("templates/mapper.xml");
        templateConfig.setService("templates/service.java");
        templateConfig.setServiceImpl("templates/serviceImpl.java");
        templateConfig.setController("templates/controller.java");
        autoGenerator.setTemplate(templateConfig);

        /**
         * 策略配置
         */
        StrategyConfig strategy = new StrategyConfig();
        strategy.setNaming(NamingStrategy.underline_to_camel);
        strategy.setColumnNaming(NamingStrategy.underline_to_camel);
        strategy.setEntityLombokModel(true);
        strategy.setRestControllerStyle(true);
        strategy.setInclude(tables);
        strategy.setControllerMappingHyphenStyle(true);
        strategy.setTablePrefix("tp_");
        autoGenerator.setStrategy(strategy);
        autoGenerator.execute();
    }

}
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 2023-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);
    }
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值