Campus second-hand trading mall system based on SpringBoot [with source code]

Campus second-hand trading mall system (second-hand book system) based on SpringBoot

  1. Development language: Java
  2. database: mysql
  3. Technology:SpringBoot+MyBatis+VUE+ElementUI
  4. Tools: IDEA/Ecilpse+mysql+Navicat

Roles: Admin, User

  1. Administrator: For the management of products, you can take off illegal products and permanently delete them; manage order information; manage user information, etc.
  2. User: Browse all items in the system, purchase items, pay, bookmark, comment, publish items, my message, harvest address, list of items I sold, delivery, confirmation of receipt, etc.

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

Chapter One Introduction

**1.**1 Subject research background

  With the continuous development of society and economy, the accelerated pace of industrial structure adjustment, and the continuous improvement of people's living standards, a large number of old daily necessities, idle equipment and inventory products are constantly produced. In order to reduce resource waste and reduce environmental burdens, we will It is necessary to make full and reasonable use of second-hand goods [1]. Take books as an example, as a student at school, I have a deep understanding.

1.2 Significance of the subject research

  College students' thirst for knowledge and their demand for books are also increasing, and there are more and more idle books. In order to alleviate the problem of idle book resources, a campus idle book sharing service system is designed, so that idle books can also meet the needs of students [2]. This browser-based application method and the Internet environment combine the resource-saving sharing mode with the modern Internet to form an online transaction system that reduces resource waste and maximizes resource utilization [3]. Almost everyone in the school has a computer, so it is completely feasible to use network resources to develop a book sharing system. In this way, those idle books can continue to reflect their value, let knowledge spread, and let the concept of environmental protection penetrate into the soul of every student [4]. For our future generations, for our country, and for the earth we live on, it is very meaningful to develop such a book sharing platform.

1.3 Current status of the system at home and abroad

  Since the last century, with the rapid development of Internet technology, represented by developed countries, the sharing of foreign book resources has made great achievements. They lead the development trend of the world's book resources sharing in terms of the scale, degree and level of resource sharing. Take the United States and Germany as examples. These two countries attach great importance to the sharing of library resources. From the national level to the local level, they have introduced a series of policies to help and support major universities to carry out resource sharing construction. At present, foreign book sharing platforms mainly focus on the sharing of e-books. Foreign book sharing platforms are also mainly PC-based. In contrast, the shared book platforms on the domestic market are mainly based on the sharing of paper books on mobile terminals. The shared book platform mainly takes the community, school or class as the unit, and takes advantage of the short geographical distance to share idle books within the specified range, and the sharing range is small. It can be seen that although the number of shared book platforms on the domestic market has increased in recent years, most platforms only provide sharing channels for paper books, which obviously cannot meet the needs of people in the mobile Internet era to use fragmented time to read with the help of mobile phones. Not widely used. All major developed countries in the world have made great achievements in the sharing of book resources, and this development achievement has fed back the quality and level of the country's knowledge and information development. Its development characteristics and development achievements are worthy of our serious study and reference.

Chapter 2 System Analysis

  The university campus idle book sharing service system can be operated on a computer browser. Compared with the traditional on-campus second-hand book trading system, the university campus idle book sharing service system improves efficiency and convenience. Users only need to register and log in to share their own idle books and purchase idle books shared by others in the system. It is very convenient to share idle book information, so that students who need these idle books can choose what they need arbitrarily. , more targeted service students.

2.1 Feasibility analysis

2.1.1 Technical Feasibility Analysis

  After analyzing the real needs of the university campus idle book sharing service system, the roles required by the university campus idle book sharing service system are divided into the following Figure 2-1 and Figure 2-2.

  From the perspective of development tools, since the university campus idle book sharing service system is based on java web, all development tools currently on the market can be used for development. These powerful development tools can bring great benefits to me in designing the project convenient.

  From the perspective of the technology of the university campus idle book sharing service system, it is not troublesome for me to develop a university campus idle book sharing service system. The development of the university campus idle books sharing service system can be simply divided into front-end module, back-end module development and database development. Most of the technical difficulties have been used when I was in school, and there are many technical points on the Internet that I can learn from. The WEB background management is developed using Java's SpringBoot framework, the database uses MySQL, and the page uses Html5 VUE with Jquery scripts, so it saves a lot of redundant code for me in the development of the university campus idle book sharing service system, which gives me The preparation of the completion project has brought great convenience.

  From the perspective of user experience, I can refer to many widely used cases such as JD.com and Suning on the market. Therefore, I can integrate the advantages of online page interaction design and make revisions based on the characteristics of my graduation project. User-satisfied page interaction experience. To sum up, from a technical point of view, it is feasible to develop a shared service system for idle books on university campuses.

2.1.2 Economic Feasibility Analysis

  From the perspective of the development cost of the idle book sharing service system on the university campus, the design and development of the idle book sharing service system on the university campus are all done by myself, and there is no other cost overhead.

  From the point of view of the maintenance cost of the university campus idle book sharing service system, the development of the university campus idle book sharing service system follows a complete set of code writing specifications, and the structure design of the university campus idle book sharing service system is very flexible and follows high cohesion The principle of low coupling makes it easy to maintain and iteratively develop.

  After the university campus idle book sharing service system is launched, I will investigate according to the real needs in the early stage of the launch, and formulate a set of suitable usage fees for the use of the university campus idle book sharing service system I developed. After the system runs stably, I will extend the scope of promotion to other schools. They can register and use my university campus idle book sharing service system by themselves. They only need to pay a small deposit, and I will introduce advertising investment and self-operated business to them.

  Based on the above analysis, the economic benefits brought by the idle book sharing service system on the university campus will bring great benefits. And with my promotion, the market for using the university campus idle book sharing service system I developed will become larger and larger, and the profits brought by the university campus idle book sharing service system will also increase. Therefore, from an economic point of view, it is feasible to develop a shared service system for idle books on university campuses.

2.2 System function analysis

2.2.1 Functional Analysis

  The university campus idle book sharing service system uses IntelliJ IDEA 2019.3.4 x64 development tool, Tomcat 8.0 server, Mysql5.7 database and Navicat visual client tool, and uses SpringBoot of the Java development language and the front-end vue framework to divide the front-end users and the back-end There are two parts to the administrator.

  The front-end user function modules mainly include user registration, user login, book classification display, forum communication, book details, my selling order, my book buying order, the news I received, my post management, my favorites, account Balances, account maintenance, etc.

  The administrator function module mainly includes membership column management, book information management, suitable object management, sales statistics, book statistics, home page carousel image setting, announcement management, user management, account maintenance, etc.

2.2.2 Non-functional analysis

  The non-functional requirements of the university campus idle book sharing service system, such as the security, reliability, performance, and scalability of the university campus idle book sharing service system, etc. Specifically, it can be expressed in the following table 2-1:

Table 2-1 Non-functional Requirements Table of Idle Books Sharing Service System on University Campus

safety It mainly refers to the installation of the database of the university campus idle book sharing service system, the use of the database and the setting of passwords must comply with the regulations.
reliability Reliability means that the idle book sharing service system on the university campus can be operated by installing the user's instructions. After testing, the reliability is over 90%.
performance Performance is a necessary condition for the university campus idle book sharing service system to occupy the market, so the best performance is good.
scalability For example, the database reserves multiple attributes, such as the use of interfaces, to ensure the non-functional requirements of the system.
ease of use Users only need to follow the page display content of the university campus idle book sharing service system to operate.
maintainability The maintainability of the development of the university campus idle book sharing service system is very important. After testing, there is no problem with the maintainability

the code

package com.second.hand.trading.server.Exception;

import java.util.Map;

public class ParamException extends RuntimeException{
    private Map map;

    public ParamException(Map map) {
        this.map = map;
    }

    public Map getMap() {
        return map;
    }
}

package com.second.hand.trading.server.model;

import java.io.Serializable;
import java.util.Date;

/**
 * sh_favorite
 * @author 
 */
public class FavoriteModel implements Serializable {
    /**
     * 自增主键id
     */
    private Long id;

    /**
     * 加入收藏的时间
     */
    private Date createTime;

    /**
     * 用户主键id
     */
    private Long userId;

    /**
     * 闲置物主键id
     */
    private Long idleId;

    private IdleItemModel idleItem;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getIdleId() {
        return idleId;
    }

    public void setIdleId(Long idleId) {
        this.idleId = idleId;
    }

    public IdleItemModel getIdleItem() {
        return idleItem;
    }

    public void setIdleItem(IdleItemModel idleItem) {
        this.idleItem = idleItem;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FavoriteModel other = (FavoriteModel) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getIdleId() == null ? other.getIdleId() == null : this.getIdleId().equals(other.getIdleId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getIdleId() == null) ? 0 : getIdleId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", createTime=").append(createTime);
        sb.append(", userId=").append(userId);
        sb.append(", idleId=").append(idleId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

Chapter 5 System Test

  The test of the university campus idle book sharing service system is based on the principle of early access, so the verification test of the corresponding functional modules was carried out immediately after the development was completed. The university campus idle book sharing service system has carried out a system test for the main functional aspects. The following is mainly explained in terms of functional test cases and test summary.

5.1 Functional test

  The function tests of the university campus idle book sharing service system include: second-hand idle classified display function test, guess your favorite function test, second-hand idle book sales statistics function test, second-hand idle book quantity statistics function test, as shown in the following table:

Table 5-1 Second-hand idle classification display function test table

test name test function operation process expected outcome Test Results
Second-hand idle books classification display module test Is the display of second-hand idle books normal? A visitor clicks on the menu for the used unused books category on the navigation bar of the home page It will display the second-level digital product classification under the first-level digital product classification of "digital photography", including digital cameras, mirrorless cameras, SLR cameras, sports cameras, video cameras, lenses, etc. The display of the second-level digital product classification of the first-level classification of digital products is normal

Table 5-2 Guess you like the function test table

test name test function operation process expected outcome Test Results
Guess you like module testing Guess if it's normal for you to like to display second-hand unused books After the member logs in, click the "History" menu under "Humanities and Social Sciences" on the home page navigation bar, and the second-hand idle book information will be displayed, and then click the book "New Notes on the Art of War by Sun Tzu" The "Guess you like" function will be displayed on the details page of "New Notes on the Art of War by Sun Tzu", and other second-hand idle books that users may like will be displayed at the same time Show Guess Your Favorite Secondhand Unused Books is functional

Table 5-3 Second-hand idle book sales statistics function test table

test name test function operation process expected outcome Test Results
Second-hand idle book sales statistics module test Whether the table display in the second-hand idle book sales statistics is normal After the administrator logs in, click the "Sales Statistics" menu on the left navigation bar, enter 2021-1 for the start date, enter 2022-1 for the end date, and click the "Statistics" button The sales quantity and total sales amount of all second-hand idle books from January 2021 to January 2022 will be counted and displayed in tabular form and bar chart form The tables and histograms in the second-hand idle book sales statistics display normally

Table 5-4 Statistical function test table for the number of second-hand idle books

test name test function operation process expected outcome Test Results
Second-hand idle books quantity statistics module test Whether the visual histogram display in the statistics of the number of second-hand idle books is normal After the administrator logs in, click the "Product Statistics" menu on the left navigation bar The sales data of second-hand idle books will be calculated in the form of tables, and the quantity of second-hand idle books will be displayed in the form of pie charts and tables The visual histogram in the statistics of the number of second-hand idle books is displayed normally

5.2 Test summary

  By writing the test cases of the idle book sharing service system on the university campus, the function test of second-hand idle classification and display, the function test of guessing what you like, the function test of second-hand idle book sales statistics, and the function test of the number of second-hand idle books have been tested, and these 4 modules have been passed. It provides strong technical support for the later promotion and operation of the university campus idle book sharing service system.

Guess you like

Origin blog.csdn.net/2301_78335941/article/details/131095485