Computer graduation project supermarket self-service payment system Vue+SpringBoot+MySQL

Author's homepage : Designer Xiao Zheng
Author's brief introduction : A Java full-stack software engineer from Ningbo, Zhejiang, responsible for the development and management of the company's OA projects, focusing on front-end and back-end software development, system customization, and remote technical guidance. CSDN Academy, Blue Bridge Cloud Course certified instructor, high-quality creator in the full stack field.

project content
project name Supermarket self-service payment system (S 008) \color{red}{Supermarket self-service payment system (S008)}Supermarket self-service payment system ( S 008 )
project type paid items
Source code acquisition Source code self-service acquisition
Deployment version Can be run locally without source code
Exchange Q&A post You can communicate and discuss this project in the post bar
Project screen recording You can view a dynamic demo of this project
Value-added services [ documentation, deployment, explanation\color{red}{documentation, deployment, explanation}Documentation, Deployment, Explanation ] "Service Standards for Paid Projects"

Insert image description here


1. Abstract

This blog designs and implements a supermarket shopping self-service payment system. The system uses the latest technology, including Vue and Spring Boot, to achieve fast and accurate product settlement. At the same time, in terms of user interface, the supermarket shopping self-service payment system adopts a simple The intuitive design allows users to quickly master the operation process. By testing and evaluating the supermarket shopping self-service payment system, we have proven its advantages in efficiency and accuracy, and verified its good adaptability and reliability. We It is believed that supermarket shopping self-service payment systems will be widely used and promoted in the future, bringing more convenience and comfort to people's lives.

The supermarket shopping self-service payment system uses the popular JavaEE technology, and the front-end and back-end are developed separately. The front-end uses the Vue.js framework, and the back-end uses the SpringBoot framework. Idea development tools are used to complete the development of the supermarket shopping self-service payment system. The supermarket product management system includes a supermarket area module, a supermarket shelf module, a product type module, and a product file module . It is divided into a user web page and a management backend. It has role-based access control, which can precise permissions to the button level, and some simple charts. analyze.

  • Frontend : Vue 2.7.10

  • Backend : Spring Boot 3.1.10

  • Database : MySQL 8.0.31


2. Research content

The research content of supermarket shopping self-service payment system includes the following aspects. First , the technical aspect. The technical core of supermarket shopping self-service payment system is how to quickly and accurately read product information and determine the settlement amount, calculate and process payment. This research requires many Technical means, including Vue technology, SpringBoot technology, MySQL technology, etc.

The second is user interface design. The user operation interface of the supermarket shopping self-service payment system should be simple, intuitive, and easy to operate. It is necessary to design an interface that meets customer habits and needs by comprehensively considering factors such as human-computer interaction and user experience.

The third is the design of security measures. In order to prevent fraud, theft and other illegal activities, supermarket shopping self-service payment systems should be equipped with appropriate security measures. Security equipment such as cameras and sensors should be considered, and relevant security policies and specifications should be formulated.

The fourth is data analysis and optimization. The supermarket shopping self-service payment system can provide more accurate marketing and promotion services by analyzing user consumption data. At the same time, the system needs to be optimized and upgraded during the operation process to improve the payment success rate and reduce the error rate. wait.

The fifth is the expansion of application scenarios. The application scenarios of supermarket shopping self-service payment systems can not only be expanded to retail industries such as supermarkets and convenience stores, but also can be expanded to other fields. For example, supermarket shopping self-service payment systems can be implemented in tourist attractions and airports, providing Provide users with a more convenient consumption experience. In short, the main research content of supermarket shopping self-service payment systems involves technical core, user interface design, security countermeasure design, data analysis and optimization, application expansion, etc.

Insert image description here

2.1 Product type module

The supermarket shopping self-service payment system requires a commodity type module , mainly because it can quickly and accurately identify different types of commodities and settle according to their characteristics. The commodity type module can classify different types of commodities, such as food, beverages and consumer goods. In order to facilitate subsequent payment and statistics, depending on the product, there may be special situations, such as items sold by weight or discounted items, which require special processing. The product type module can identify and handle this situation. The product type module can provide appropriate discount information and recommendation services based on the type of product purchased by customers, enhancing shopping experience and satisfaction. The product type module enables customers to select products easier and faster, saving time and effort without manual input. product information or scan the barcode. In short, the product type module is an integral part of the supermarket shopping self-service payment system. The supermarket shopping self-service payment system can quickly and accurately identify product types and provide preferential information and services. The product type module can simplify the operation process and help Improve shopping experience and efficiency.

Insert image description here

2.2 Product module

The reason why the supermarket shopping self-service payment system requires the product archive module is because this module provides basic data and management of product information. The supermarket shopping self-service payment system can perform settlement so that it can accurately read product information, calculate prices and perform payment processing. The product file module contains all basic information of the product, such as name, code, specification, unit and selling price. This information is very important to ensure that the supermarket shopping self-service payment system can settle quickly and accurately. The product file module also stores the barcode and barcode of each product. QR code information, the supermarket shopping self-service payment system can quickly identify products and automatically calculate prices by scanning these barcodes. It also avoids manual calculation errors and delays. The product profile module also allows you to set and manage the price and discount information of each product. , the supermarket shopping self-service payment system can automatically calculate the consumer's payment amount based on the price information in the product file module, provide corresponding preferential activities, and improve consumer satisfaction. The product archive module stores the sales data of all products, and supermarkets can analyze this data to develop better marketing strategies. For example, we adjust the type, quantity, price, etc. of goods based on sales data to meet consumer demand and increase sales. As mentioned above, the product file module is an important part of the supermarket shopping self-service payment system, which provides a solid foundation for the normal operation and good service of the supermarket shopping self-service payment system.

Insert image description here

2.3 Supermarket bill module

The supermarket shopping self-service payment system requires the supermarket bill module , which mainly facilitates customers to investigate the supermarket's purchase records and consumption status, and at the same time provides the supermarket with more accurate marketing strategies and services. Customers can find previous purchase records in the supermarket's billing module, including detailed information such as product name, purchase time, quantity and price, which helps customers track their consumption and make purchase plans based on their personal needs, supermarkets The billing module can summarize all customer purchase records and generate statistical reports of expenditure amounts, which helps customers understand their consumption levels in the supermarket and effectively manage their expenditures. The supermarket bill module can also be integrated with the supermarket's coupon system, allowing customers to easily check the usage and remaining quantity of coupons. At the same time, the supermarket can recommend appropriate coupons based on the customer's purchase records and preferences, improving user loyalty and satisfaction. Degree, the supermarket's billing module can analyze and mine customers' purchase record data, understand customers' consumption habits and preferences, and provide more accurate marketing strategies and services for supermarkets. The supermarket bill module can also perform predictive analysis based on historical data and develop a more scientific operation plan for the supermarket. As mentioned above, the supermarket bill module is an indispensable part of the supermarket shopping self-service payment system. It can bring benefits to customers and supermarkets. Comes with many conveniences and advantages.

Insert image description here

3. Interface display

3.1 Login and registration module

Insert image description here

3.2 Supermarket product type module

Insert image description here

Insert image description here

3.3 Supermarket product module

Insert image description here
Insert image description here

3.4 Product purchase module

Insert image description here

3.5 Supermarket bill module

Insert image description here


4. Partial source code display

4.1 Entity class definition

Product entity class:

@Table(name = "a_product")
@TableName("a_product")
@ApiModel(value = "商品")
public class Product extends ZwzBaseEntity {
    
    

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品名称")
    private String title;

    @ApiModelProperty(value = "商品类型")
    private String type;

    @ApiModelProperty(value = "销售价")
    private BigDecimal price;

    @ApiModelProperty(value = "图片")
    private String image;

    @ApiModelProperty(value = "供应商")
    private String supplier;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "购买数量")
    private BigDecimal number;
}

Product type entity class:

@Table(name = "a_product_type")
@TableName("a_product_type")
@ApiModel(value = "商品类型")
public class ProductType extends ZwzBaseEntity {
    
    

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "类型名称")
    private String title;

    @ApiModelProperty(value = "类型状态")
    private String status;

    @ApiModelProperty(value = "排序值")
    private BigDecimal sortOrder;

    @ApiModelProperty(value = "备注")
    private String remark;
}

4.2 Controller interface

Check the products I published:

@RequestMapping(value = "/getSellPage", method = RequestMethod.GET)
@ApiOperation(value = "查询商品")
public Result<IPage<Product>> getSellPage(@ModelAttribute Product product,@ModelAttribute PageVo page){
    
    
    QueryWrapper<Product> qw = new QueryWrapper<>();
    User currUser = securityUtil.getCurrUser();
    QueryWrapper<SupermarketBill> billQw = new QueryWrapper<>();
    billQw.eq("user_id",currUser.getId());
    billQw.eq("status","未付款");
    List<SupermarketBill> billList = iSupermarketBillService.list(billQw);
    if(!ZwzNullUtils.isNull(product.getTitle())) {
    
    
        qw.like("title",product.getTitle());
    }
    if(!ZwzNullUtils.isNull(product.getType())) {
    
    
        qw.eq("type",product.getType());
    }
    IPage<Product> data = iProductService.page(PageUtil.initMpPage(page),qw);
    for (Product vo : data.getRecords()) {
    
    
        vo.setNumber(BigDecimal.ZERO);
    }
    for (Product vo : data.getRecords()) {
    
    
        for (SupermarketBill bill : billList) {
    
    
            if(Objects.equals(vo.getId(),bill.getProductId())) {
    
    
                vo.setNumber(vo.getNumber().add(bill.getNumber()));
            }
        }
    }
    return new ResultUtil<IPage<Product>>().setData(data);
}

Product order:

@RequestMapping(value = "/addOne", method = RequestMethod.GET)
@ApiOperation(value = "下单")
public Result<Object> addOne(@RequestParam String id){
    
    
    Product p = iProductService.getById(id);
    if(p == null) {
    
    
        return ResultUtil.error("商品不存在");
    }
    User currUser = securityUtil.getCurrUser();
    /**
     * 判断是否下单
     */
    QueryWrapper<SupermarketBill> billQw = new QueryWrapper<>();
    billQw.eq("product_id",id);
    billQw.eq("user_id",currUser.getId());
    billQw.eq("status","未付款");
    billQw.last("limit 1");
    SupermarketBill bill = iSupermarketBillService.getOne(billQw);
    if(bill != null) {
    
    
        bill.setNumber(bill.getNumber().add(BigDecimal.ONE));
        bill.setSum(bill.getPrice().multiply(bill.getNumber()));
        iSupermarketBillService.saveOrUpdate(bill);
        return ResultUtil.success();
    }
    /**
     * 下单
     */
    SupermarketBill b = new SupermarketBill();
    b.setProductId(p.getId());
    b.setProductName(p.getTitle());
    b.setProductImage(p.getImage());
    b.setUserId(currUser.getId());
    b.setUserName(currUser.getNickname());
    b.setPrice(p.getPrice());
    b.setNumber(BigDecimal.ONE);
    b.setSum(p.getPrice());
    b.setStatus("未付款");
    iSupermarketBillService.saveOrUpdate(b);
    return ResultUtil.success();
}

5. Display of supporting documents

Insert image description here

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


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 ownership and independent intellectual property rights of the application system after the software is built, 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 the code of this system 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/132595174