Second-hand car trading system graduation project JAVA+Vue+SpringBoot+MySQL

Author homepage:Designer Xiao Zheng
Author profile: 3 years of JAVA full-stack development experience, focusing on JAVA technology, system customization, remote guidance, committed to enterprise digital transformation, CSDN blog expert, Alibaba Cloud community expert blogger, and Blue Bridge cloud course instructor.

Insert image description here

Get the source code at the end of the article, project number: S 084. \color{red}{The source code is obtained at the end of the article, project number: S084. }The end of the sentence is Genka, the title of the item:S084.



1. Abstract

1.1 Project introduction

The second-hand car trading system based on JAVA+Vue+SpringBoot+MySQL is divided into management backend and user web page, including second-hand car files, reservation order module, reservation order module, message board module and vehicle information module, as well as the system's own Basic modules such as user management, department management, role management, menu management, log management, data dictionary management, file management, chart display, etc. The role-based access control of the used car trading system is available to administrators and ordinary user roles, and permissions can be changed Accurate to the button level, you can customize roles and assign permissions, and the system is suitable for designing precise permission constraint needs.

With the continuous development of my country's Internet technology, e-commerce has been welcomed by the majority of young people. The same is true in the second-hand car industry. Due to epidemic prevention and control and other reasons, online second-hand car sales are increasing year by year. However, our country currently does not have a set of efficient and stable second-hand car trading websites to meet the needs of the people for sales, transfers, and contract signing. need. This article will focus on the actual needs of the second-hand car market and develop a second-hand car trading website that integrates viewing, placing orders, and transferring ownership. SpringBoot and Vue frameworks are used to develop the back-end and front-end respectively, and MySQL is used to store system data to meet the needs of the second-hand market. sales needs.

1.2 Project screen recording


2. Function module

The functional requirements of the used car replacement website mainly include six modules: data center module, used car file module, vehicle reservation module, vehicle reservation module, vehicle message module, and vehicle information module. This is a web management background based on browser interaction. Details of each module are as follows.

2.1 Data Center Module

The data center module contains the basic system configuration of a used car trading website, including connection user management, used car platform organizational structure management, user menu permission management, system log management, public file cloud disk management, etc.

In the docking user management module, the staff of the used car operation and maintenance company are responsible for adding, deleting, modifying and checking user data.

The used car organizational structure refers to the organizational structure of the used car management and operating company. This module is customized to the department level for department owners who manage these organizational structures and employees.

The public cloud disk management module is used to centrally maintain images of used car trading websites, such as used car photos, insurance contracts, three-party contracts, etc.

2.2 Used car file management module

The operation and maintenance personnel of the second-hand car trading website can add, delete, modify and check the data in the second-hand car file module, and can export the second-hand car data in Excel.

2.3 Vehicle reservation management module

Reserving a vehicle means that the buyer has the original intention of requesting a trial just like the seller. Registered users can initiate reservation requests using the used car profile module. After receiving the booking request, the seller will actively contact the buyer for follow-up appointment testing.

2.4 Vehicle reservation management module

Vehicle reservation is a buyer's decision to purchase a selected vehicle. Buyers can select their favorite second-hand cars for reservation in the used car profile, enter the ideal price and review of options, and the seller can obtain the transaction order. The seller reserves the right to accept or reject the buyer's reservation request.

2.5 Vehicle message board management module

Negotiations and conflicts are inevitable when selling a used car. Therefore, the second-hand car sales website has specially designed a bulletin board module to resolve disputes between second-hand car buyers and sellers, buyers and the platform. Both parties can leave messages or reply on the forum.

2.6 Vehicle information management module

The vehicle information management module is used to publish vehicle news and anti-fraud tweets on the second-hand car platform.


3. System design

3.1 E-R diagram design

Currently, the most commonly used database is a relational database. Their system design is object-oriented. Use rows and columns to store data. This is more convenient for users. It is important to note how object classes map to 2D tables in the database. Therefore, modeling tools can be used to design the E-R diagram of the system, as shown in the figure below.

Insert image description here

3.2 Feasibility analysis

3.2.1 Technical feasibility analysis

Java is a popular development language. This system is written in Java language, uses JSP for the design and display of dynamic interfaces, and uses MySQL database to complete the system design. Relatively speaking, Java language is relatively easy to learn among development languages. Java is also my favorite development language in college life, so I chose Java to develop the back-end of a second-hand car trading website. Therefore, there is no problem in the technology selection of second-hand car trading websites.

3.2.2 Operational feasibility

This system uses Java as the development language for agricultural trade. Operators only need to know how to access the Internet normally and can use the operating system, and no deep computer knowledge is required. This is a high-tech era, and smart devices have entered thousands of households, so it is easy for most people to access the Internet.

3.2.3 Economic feasibility

This system is a simulated second-hand car trading website with low cost pressure. Computers are very popular now. All you need to do is design the system on your own computer. The software you need to design and use can be searched and downloaded from the Internet. They are essentially free, so development costs are relatively low. At the same time, you can design and develop your system anywhere with no financial effort. The system does not have strict requirements on computer configuration, that is, it does not require very advanced configuration. Therefore, the system is economically feasible.

3.3 Database design

3.3.1 User information table

User information table, unique code, with ID as the key field, creator, creation time, last modified date, last updated date, home address, personal avatar, personal signature, personal email address, personal mobile phone number, user name, Login password, gender. There are also user status, street, user type, login account, etc.

Insert image description here

3.3.2 Second-hand vehicle file table

Second-hand car file table, second-hand car number is an important field, such as second-hand car No. 1, brand, driving year, trial operation time, vehicle photos, third-party inspection photos, price, displacement, model, contact information, phone number, remarks, etc. .
Insert image description here

3.3.3 Second-hand car reservation form

Second-hand car. The reservation table includes fields such as reservation ID, second-hand car ID, second-hand car brand, second-hand car price, vehicle photo, seller name, seller mobile phone, buyer ID, buyer name, reservation time, etc. The reservation ID is a key field.

Insert image description here

3.3.4 Second-hand car reservation form

Second-hand car reservation form, reservation ID, second-hand car ID, second-hand car brand, second-hand car price, vehicle photo, seller name, seller mobile phone, buyer ID, buyer name, reservation time, contract signing, contract signing, approval, etc., among which ID is the key field.
Insert image description here

3.3.5 Message board table

The message board table has fields such as message content, message timestamp, and message recipient, among which the message number is the primary key.

Insert image description here


4. System display

Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here


5. Core code

5.1 Added second-hand car reservation form

@RequestMapping(value = "/addLook", method = RequestMethod.GET)
@ApiOperation(value = "新增二手车预约单")
public Result<Object> addLook(@RequestParam String carId){
    
    
    UsedCar usedCar = iUsedCarService.getById(carId);
    if(usedCar == null) {
    
    
        return ResultUtil.error("二手车不存在");
    }
    String userId = securityUtil.getCurrUser().getId();
    CarLook carLook = new CarLook();
    carLook.setCarId(carId);
    carLook.setBuyId(userId);
    carLook.setOrderTime(DateUtil.now());
    iCarLookService.saveOrUpdate(carLook);
    return ResultUtil.success();
}

5.2 Query used car reservation order

@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查询二手车预约单")
public Result<IPage<CarLook>> getByPage(@ModelAttribute CarLook carLook,@ModelAttribute PageVo page){
    
    
    QueryWrapper<CarLook> qw = new QueryWrapper<>();
    if(!ZwzNullUtils.isNull(carLook.getBrand())) {
    
    
        qw.inSql("id","select id from t_car_look where car_id in (select id from t_used_car where brand like '" + carLook.getBrand() + "')");
    }
    if(!ZwzNullUtils.isNull(carLook.getBuyName())) {
    
    
        qw.inSql("id","select id from t_car_look where buy_id in (select id from t_user where nickname like '" + carLook.getBuyName() + "')");
    }
    if(!ZwzNullUtils.isNull(carLook.getSellerName())) {
    
    
        qw.inSql("id","select id from t_car_look where car_id in (select id from t_used_car where sell_name like '" + carLook.getSellerName() + "')");
    }
    if(!ZwzNullUtils.isNull(carLook.getOrderTime())) {
    
    
        qw.like("order_time",carLook.getOrderTime());
    }
    IPage<CarLook> data = iCarLookService.page(PageUtil.initMpPage(page),qw);
    for (CarLook look : data.getRecords()) {
    
    
        if(!ZwzNullUtils.isNull(look.getBuyId())) {
    
    
            User user = iUserService.getById(look.getBuyId());
            if(user != null) {
    
    
                look.setBuyName(user.getNickname());
            }
        }
        if(!ZwzNullUtils.isNull(look.getCarId())) {
    
    
            UsedCar usedCar = iUsedCarService.getById(look.getCarId());
            if(usedCar != null) {
    
    
                look.setBrand(usedCar.getBrand());
                look.setSellerMoney(usedCar.getMoney());
                look.setImageUrl(usedCar.getImageUrl());
                look.setSellerName(usedCar.getSellName());
                look.setSellerMobile(usedCar.getSellMobile());
            }
        }
    }
    return new ResultUtil<IPage<CarLook>>().setData(data);
}

5.3 Query all used cars

@RequestMapping(value = "/getAllOnWeb", method = RequestMethod.GET)
@ApiOperation(value = "查询全部二手车")
public Result<List<UsedCar>> getAllOnWeb(@RequestParam(required = false) String title){
    
    
    QueryWrapper<UsedCar> qw = new QueryWrapper<>();
    if(!ZwzNullUtils.isNull(title)) {
    
    
        // qw.and(wrapper -> wrapper.eq("system_guishu", ParameterSettings.YH_XZXT).or().eq("system_guishu",ParameterSettings.YH_YXXT).or().eq("system_guishu",ParameterSettings.YH_SJYFGS));
        if(title.startsWith("价格")) {
    
    
            String[] sp = title.split("价格");
            if(sp.length > 1) {
    
    
                String[] spp = sp[1].split("-");
                if(spp.length > 1) {
    
    
                    try {
    
    
                        qw.ge("money",BigDecimal.valueOf(Long.parseLong(spp[0])));
                        qw.le("money",BigDecimal.valueOf(Long.parseLong(spp[1])));
                    }catch (Exception e) {
    
    
                        return ResultUtil.error("价格搜索输入非数字");
                    }
                }
            }
        } else if(title.startsWith("排量")) {
    
    
            String[] sp = title.split("排量");
            if(sp.length > 1) {
    
    
                qw.eq("license",sp[1]);
            }
        } else {
    
    
            qw.like("brand",title);
        }
    }
    List<UsedCar> carList = iUsedCarService.list(qw);
    for (UsedCar car : carList) {
    
    
        QueryWrapper<CarOrder> carQw = new QueryWrapper<>();
        carQw.eq("car_id",car.getId());
        carQw.eq("audit_flag",true);
        if(iCarOrderService.count(carQw) > 0) {
    
    
            car.setCanOrder(true);
        }
    }
    return new ResultUtil<List<UsedCar>>().setData(carList);
}

5.4 Review of pre-orders

@RequestMapping(value = "/doAudit", method = RequestMethod.POST)
@ApiOperation(value = "审核预订单")
public Result<Object> doAudit(@RequestParam String id){
    
    
    CarOrder carOrder = iCarOrderService.getById(id);
    if(carOrder == null) {
    
    
        return ResultUtil.error("订单不存在");
    }
    carOrder.setAuditFlag(true);
    iCarOrderService.saveOrUpdate(carOrder);
    return ResultUtil.success();
}

5.5 Query a single used car

@RequestMapping(value = "/getOneOnWeb", method = RequestMethod.GET)
@ApiOperation(value = "查询单个二手车")
public Result<UsedCar> getOneOnWeb(@RequestParam String id){
    
    
    UsedCar car = iUsedCarService.getById(id);
    if(car == null) {
    
    
        return ResultUtil.error("二手车不存在");
    }
    QueryWrapper<CarOrder> qw = new QueryWrapper<>();
    qw.eq("car_id",id);
    qw.eq("audit_flag",true);
    if(iCarOrderService.count(qw) > 0) {
    
    
        car.setCanOrder(true);
    }
    return new ResultUtil<UsedCar>().setData(car);
}

6. Disclaimer

  • This project is for personal study only. For commercial authorization, please contact the blogger, otherwise you will be responsible for the consequences.
  • The blogger owns all content and independent intellectual property rights of the application system built by this software, and has the final right of interpretation.
  • If you have any questions, please leave a message in the warehouse Issue. We will reply as soon as possible after seeing it. Relevant opinions will be considered as appropriate, but there is no promise or guarantee that they will be adopted.

Users who download this system code or use this system must agree to the following content, otherwise please do not download!

  1. You use/develop this software voluntarily, understand the risks of using this software, and agree to bear the risks of using this software.
  2. Any information content of the website built using this software and any resulting copyright disputes, legal disputes and consequences have nothing to do with the blogger, and the blogger does not bear any responsibility for this.
  3. Under no circumstances will the blogger be liable for any loss that is difficult to reasonably predict (including but not limited to loss of commercial profits, business interruption, and loss of business information) resulting from the use or inability to use this software.
  4. You must understand the risks of using this software. The blogger does not promise to provide one-on-one technical support or use guarantee, nor does it assume any responsibility for unforeseen problems caused by this software.

Insert image description here

Guess you like

Origin blog.csdn.net/qq_41464123/article/details/134698828