(Source code attached) Springboot+ e-commerce platform computer completion 46269

Based on springboot e-commerce platform 

Summary

With the rapid development of science and technology, all walks of life are striving to integrate with modern advanced technology and improve their own advantages through scientific and technological means; of course, e-commerce platforms cannot be excluded. As network technology continues to mature, e-commerce has been driven by The platform has completely changed the traditional management methods in the past, not only making service management easier, but also improving the flexibility of management. This kind of personalized platform pays special attention to the mutual coordination of interaction and management, which stimulates the creativity and initiative of managers, which is very beneficial to the e-commerce platform .

This paper mainly discusses how to use Java language to develop a springboot e-commerce platform . This system will strictly follow the software development process to carry out work at each stage, using B/S architecture and object-oriented programming ideas for project development. In the introduction, the author will discuss the current background of the e-commerce platform and the purpose of system development. Subsequent chapters will strictly follow the software development process to analyze and design the system at each stage.

Keywords : E-commerce platform   Mysql database  springboot framework


Abstract

                                                  

With the rapid development of science and technology, all walks of life are trying to integrate with modern advanced technology and improve their own advantages through scientific and technological means; Of course, e-commerce platforms cannot be excluded. With the continuous maturity of network technology, e-commerce platforms have been driven. It has completely changed the traditional management methods in the past, not only making service management less difficult, but also improving the flexibility of management. This personalized platform pays special attention to the mutual cooperation between interaction coordination and management, which stimulates the creativity and initiative of managers and is very beneficial to e-commerce platforms.

This paper mainly discusses how to use java language to develop a spring boot e-commerce platform. This system will strictly follow the software development process to carry out the work at all stages, and use B/S architecture and object-oriented programming ideas to develop the project. In the introduction, the author will discuss the current background of the e-commerce platform and the purpose of the system development, and the subsequent chapters will strictly follow the software development process to analyze and design the system at each stage.

Keyword: e-commerce platform MySQL database spring boot framework

  Table of contents

Chapter One Introduction

1.1 Background and significance

1.2 Overview of research at home and abroad

1.3 Contents of the study

Chapter 2  Research on Key Technologies

2.1 Development technology

2.2 MVVM pattern

2.3 MySQL database

2.4 B/S structure

2.5 Introduction to spring boot framework

2.6 Vue.js main functions

Chapter 3 System Analysis

3.2 System feasibility analysis

3.3 System function analysis and description

3.4 System UML use case analysis

3.4.1 Administrator use case

3.4.2 User use cases

3.4.3 Merchant user use cases

3.5 System process analysis

3.5.1 Add information process

3.5.2 Operation process

3.5.3 Deletion of information process

4.1 System architecture

4.2 Database design principles

4.4 Data sheet

Chapter 5 System Implementation

5.1 User function module

5.1.2 Member registration interface

5.1.3 Member login interface

5.1.4 Communication forum interface

5.1.5 Shipping address interface

5.1.6 Product Center Interface

5.1.7 My order interface

5.2 Merchant function module

5.2.1 Product center management interface

5.2.2 Order list interface

5.3 Administrator function module

5.3.1 User management interface

5.3.2 Carousel chart management interface

5.3.3 Product Center Management Interface

5.3.4 Forum list interface

Chapter   6 System Testing

6.1 Test definition and purpose

6.2 Performance test

6.3 Test module

6.4 Test results

Summarize  

Thanks

Chapter One Introduction

1.1 Background and significance

System management will also be carried out through computers for overall intelligent operation. There are many management and data storage involved in the e-commerce platform , such as administrator; homepage, site management (carousel, bulletin board) user management (management Members, test users, merchant users) content management (forum list, forum category list, news list, news category list) mall management (commodity center, category list, order list) and other functions; test users: home page, communication forum , announcement message , News, Product Center. This brings huge challenges to the work of managers. In the face of a large amount of information, traditional management systems collect detailed information through notes. Later, computers appeared, and computer input software was used to collect paper-based information. On the computer, this method is more traditional, and it is troublesome to get statistical data information, and it is also affected by time and space, so an e-commerce platform was developed for this purpose; it provides users with a convenient management platform for administrators to view and maintain. , and can edit and maintain content based on requirements; for users , they can query the required information at any time , and administrators can obtain system data and information without leaving home, and it can also save users a lot of time. , so the development of e-commerce platforms brings great convenience to managers, and it also facilitates administrators to process user information.

The e-commerce platform in this paper mainly involves programs, databases and computer technology. Covering a wide range of knowledge can greatly improve the work efficiency of system personnel .

1.2 Overview of research at home and abroad

With the continuous development of the domestic economic situation, China's Internet has entered a rare period of peak development, which has caused Chinese and foreign capitalists to turn to the Internet market. However, the unreasonable structure, shortage of personnel and the increase in market management needs in many management fields have made more people aware of Internet management.

In today's highly developed information, information management reform has become a more extensive and comprehensive trend. The " e-commerce platform " is based on the Mysql database and implemented on the basis of springboot framework programming. In order to ensure the sustainable development of China's economy, the information age is increasingly updated, and the service industry is still booming . At the same time, with the rapid development of the information society, various management systems are faced with more and more data that need to be processed. How to enable managers to query, store, manage and share effective data in the vast data ocean in a convenient and fast way? Information has important practical significance for our study, work and life. Therefore, academic circles at home and abroad have conducted in-depth and extensive research on this, and a new research field- springboot e-commerce platform was born.

1.3 Contents of the study

At present, many people still use traditional paper tools as the main tool for information management, and the application of network technology only plays a supporting role. In terms of awareness of network tools, more traditional office software is still the main tool used by people, while relatively comprehensive and professional information management software is still not understood or recognized by most people. This topic aims to realize various functions of the e-commerce platform through label classification management and other methods , so as to achieve the management of the e-commerce platform .

The detailed introduction will be elaborated in the following six chapters:

Chapter 1, Introduction, introduces the background and significance of the research topic selection, the research status, and briefly introduces the chapter content of this article.

Chapter 2: Introduce technical knowledge, develop by introducing key technologies, and introduce intuitively expressed technical knowledge into the system.

Chapter 3 focuses on the analysis of the system. Starting from the strong supply and demand market of the system, the feasibility of system development, system processes, and system performance and functions are discussed.

Chapter 4 introduces the detailed design plan of the system, including system structure design and database design.

Chapter 5, the implementation of system design, demonstrates the structure of the system through a detailed description of the system functional design.

Chapter 6: Overall test of the system to determine whether the system can be run online.

Chapter 2  Research on Key Technologies

 2.1 Development Technology

The front-end framework of this system uses the popular progressive JavaScript framework Vue.js. Use Vue-Router and Vuex to realize dynamic routing and global state management, Ajax to realize front-end and back-end communication, and Element UI component library to quickly prototype the page. Back-end part: Use springboot as the development framework, and integrate MyBatis, Redis and other related technologies.

2.2 MVVM pattern

MVVM is the abbreviation of Model-View-ViewModel. It is essentially an improved version of MVC. MVVM abstracts the state and behavior of the View, allowing us to separate the view UI and business logic. Of course, ViewModel has already done these things for us. It can take out the data of the Model and help handle the business logic involved in the View due to the need to display content. Microsoft's WPF brings new technical experiences, such as Silverlight, audio , video , 3D , animation ..., which results in the software UI layer being more detailed and customizable. At the same time, at the technical level, WPF also brings new features such as Binding, Dependency Property, Routed Events, Command, DataTemplate, ControlTemplate and so on. The origin of the MVVM (Model-View-ViewModel) framework is a new architectural framework that evolved from the application method of combining the MVP (Model-View-Presenter) pattern with WPF . It is based on the original MVP framework and incorporates the new features of WPF to cope with increasingly complex changes in customer needs.

2.3 MySQL database

The advancement of science and technology has brought many conveniences to daily life: classroom projectors use virtual imaging technology, and digital cameras use photoelectric detection technology. For example, the records of supermarket goods entering and leaving the warehouse require an information warehouse. This information warehouse is the database, and this time the e-commerce platform also needs the support of this technology.

The software MySQL is used because it can accept access from multiple users, and Archive etc. exist in it. It will first classify the data and then save it in tables respectively. Such special operations will improve the speed of the data management system itself and allow the database to be used flexibly. MySQL's code is public and allows others to compile and upgrade it again. This feature can reduce user costs and form a good website system when paired with appropriate software. Although it has shortcomings, in all aspects, it is the mainstream application object of users.

2.4 B/S structure

B/S (Browser/Server) is a more trouble-free architecture than its predecessor. It uses Web server to complete data transmission and exchange. You only need to download the browser as the client, and your work will be "slimmed down" without having to consider the issue of constantly installing software.

2.5 Introduction to spring boot framework

The Spring framework is an open source application framework on the Java platform that provides a container with control inversion characteristics. Although the Spring framework itself has no restrictions on the programming model, its frequent use in Java applications made it so popular that it was later used as a supplement or even a substitute for the EJB (Enterprise JavaBeans) model. The Spring framework provides a series of solutions for development, such as utilizing the core features of inversion of control and implementing inversion of control through dependency injection to implement containerization of the managed object life cycle, using aspect-oriented programming for declarative transaction management, and integration A variety of persistence technologies manage data access, provide a large number of excellent web frameworks to facilitate development, and so on. The Spring framework has the Inversion of Control (IOC) feature. IOC is designed to facilitate project maintenance and testing. It provides a method for unified configuration and management of Java objects through Java's reflection mechanism. The Spring framework uses containers to manage the life cycle of objects. The container can configure objects by scanning XML files or specific Java annotations on classes. Developers can obtain objects through dependency lookup or dependency injection. The Spring framework has an aspect-oriented programming (AOP) framework. The Spring AOP framework is based on the proxy mode and is configurable at runtime; the AOP framework mainly modularizes cross-concerns between modules. The AOP framework of the Spring framework only provides basic AOP features. Although it cannot be compared with the AspectJ framework, it can also meet basic needs through integration with AspectJ. Transaction management, remote access and other functions under the Spring framework can be realized by using Spring AOP technology. Spring's transaction management framework brings an abstraction mechanism to the Java platform that enables local and global transactions, as well as nested transactions, to work with savepoints and in almost any environment on the Java platform. Spring integrates a variety of transaction templates. The system can configure transactions through transaction templates, XML or Java annotations, and the transaction framework integrates functions such as messaging and caching. Spring's data access framework solves common difficulties developers encounter when using databases in their applications. It not only provides support for all popular data access frameworks such as Java: JDBC, iBATS/MyBATIs, Hibernate, Java Data Objects (JDO), ApacheOJB and ApacheCayne, but can also be used with Spring's transaction management to provide data access. Flexible abstraction. The Spring framework did not initially intend to build its own Web MVC framework . During the development process, its developers believed that the separation between the presentation layer and the request processing layer of the existing StrutsWeb framework, as well as between the request processing layer and the model, was not enough, so they created SpringMVC.

 2.6 Vue.js main functions

Vue.js is a progressive framework for building user interfaces. Unlike other heavyweight frameworks, Vue adopts a bottom-up incremental development design. Vue's core library only focuses on the view layer, and is very easy to learn and integrate with other libraries or existing projects. Vue, on the other hand, is fully capable of driving complex single-page applications developed using single-file components and libraries supported by the Vue ecosystem.

The goal of Vue.js is to implement responsive data binding and composed view components through the simplest possible API.

Vue.js itself is not a full-featured framework - it only focuses on the view layer. Therefore it is very easy to learn and very easy to integrate with other libraries or existing projects. On the other hand, Vue.js can also power complex single-page applications when used with related tools and supporting libraries.

Chapter 3 System Analysis

3.1 System design goals

The e-commerce platform is mainly for the convenience of users to operate product information, product center, order information and other information. It is also to better allow administrators to better store all data information and provide quick and convenient retrieval functions. Each module of the system is Reasonable analysis is made through many of today's developed systems to determine the operability considering the user, following the principles of system optimization developed, after comprehensive investigation and research.

Analysis of the functions to be achieved by the system, for the convenient management of the current network, can be viewed according to one's own needs, etc. This can save users ' time and does not need to be queried in the traditional way. Due to the time constraints of many users , there is no way It is really difficult to meet the various needs of users by going offline to learn information . Therefore, the development of e-commerce platforms can not only meet the needs of users , but also improve the efficiency of administrators and reduce the original unnecessary workload.

3.2 System feasibility analysis

The development environment and configuration of the system can be installed by yourself. The system uses springboot development tools and the relatively mature Mysql database to interact with relevant data between the front and backend of the system . The database is modified and maintained according to the technical language and combined with the needs. It can make the system operation more stable and safe, thereby completing the development of the system.

( 1) Hardware feasibility analysis

The design of the e-commerce platform and information analysis does not have any rigid requirements for the computer used. As long as the computer can be used normally for code writing and page design, it is feasible. The main requirements are for the server and the server to be uploaded after the platform is built. There are certain requirements. The server must be selected with relatively high security, and then opening the system must be smooth and cannot be paused for too long; it must be cost-effective and secure.

(2) Software feasibility analysis

Provides a common mechanism similar to the excuse dynamic model, with a more focused design. Furthermore, modularization and storage of information can be easily achieved using the Java language. In addition, code reuse can also be reflected well. Therefore, considering the actual situation of the system, the springboot framework was selected as the system development technology. Through the above analysis, the design and implementation of the system are feasible in software.

Therefore, we conducted a feasibility study from two aspects and it can be seen that there is no problem in the development of the system.

3. 3  System function analysis and description

Those who use the e-commerce platform are divided into three permission modules: administrator, user, and merchant .

The main functions that administrators can use are: homepage, site management (carousel, bulletin board) user management (administrators, test users, merchant users) content management (forum list, forum category list, news list, news category list) ) Mall management (commodity center, category list, order list) , etc.

Users can realize homepage and mall management (commodity center, order list).

Merchants can implement homepage, communication forum, announcement messages, news, and product center.

3.4 System UML use case analysis

3.4.1 Administrator use case

After logging in, the administrator can perform homepage and site management (carousel chart, bulletin board) user management (administrators, test users, merchant users) content management (forum list, forum category list, news list, news category list) mall management ( Product center, category list, order list) , the administrator's use case is shown in Figure 3-1.

Figure 3-1 Administrator use case diagram

3.4.2 User use cases

After the user registers and logs in, he can manage the homepage, communication forum, announcement messages, news, and product center . The user example is shown in Figure 3-2.

Figure 3-2 User use case diagram

3.4. 3 Merchant user use cases

After registering and logging in, merchant users can manage the homepage and mall management (commodity center, order list) . The merchant user use case is shown in Figure 3-3 .

Figure 3-2 User use case diagram

3.5 System process analysis

3.5. 1 Add information process

Add information, the numbering system uses the automatic numbering mode, there is no user to fill in, the user adds information and enters the information, the system will automatically confirm the information and data, the successful verification is that the valid information is added to the database, if the information is invalid, re-enter the information. The process of adding information is shown in Figure 3-3 .

Figure 3-3 Add  information flow chart

3.5. 2 Operation process

If a user wants to enter the system, he must first enter the system login interface, enter the correct user name and password, and select the login type to log in. The system will check the login information, and if the information is correct, then enter the corresponding function interface, and it will prompt that the information is incorrect and the login failed. The system operation flow is shown in Figure 3-4 .

Figure 3-4 Operation flow chart

3.5.3 Deletion of information process

The user selects the information to be deleted and clicks the Delete button. The system prompts whether to delete the information. If the user wants to delete the information, the system will delete the information. System database delete information. The flow chart of deleting information is shown in Figure 3-5.

Figure 3-5  Deletion information flow chart


                       Chapter 4 System Design

4. 1 System architecture

The structure of the e-commerce platform is shown in Figure 4-1:

Figure 4-1 System structure

The module includes the main interface, home page, site management (carousel, bulletin board) user management (administrators, test users, merchant users) content management (forum list, forum category list, news list, news category list) mall management (products center, category list, order list), etc. to perform corresponding operations .

Login system structure diagram, as shown in Figure 4-2:

Figure 4-2 Login structure diagram

These functions can fully meet the needs of e-commerce platforms . The function of this system is relatively comprehensive, as shown in the figure below. The system functional structure is shown in Figure 4-3 .

              

Figure 4-3 System functional structure diagram

4.2  Database design principles

The applications of each database are separated from each other. When running into a certain program, it will communicate with the client through its own related protocols. Then this system will connect these data. When we choose which segment, we will briefly describe how the database is created. When you click the Finish button, the name of the data source will automatically pop up in the dialog box. Just click Next and directly enter the corresponding authentication and login password. 

Data process of e-commerce platform:

Figure 4-4 System   data flow chart

The system entity ER diagram is shown in Figure 4-5 .

          

Figure 4.5 System entity ER diagram

The product classification entity diagram is shown in Figure 4-6 .

                          

Figure 4-6 Commodity classification entity diagram

The physical diagram of the shopping cart is shown in Figure 4-7 .

           

Figure 4-7Shopping cart entity diagram

The order information entity diagram is shown in Figure 4-8 .

        

Figure 4-8 Order information entity diagram

The user information entity diagram is shown in Figure 4-9 .

    

Figure 4-9 User information entity diagram

The administrator information entity diagram is shown in Figure 4-10 .

     

Figure 4-10 Administrator information entity diagram

4. 4  Data Sheet

Convert ER diagram of database conceptual design into relational database. In a relational database, data relationships are composed of data tables, but the structure of the table is represented by the fields of the table.

commodity_center

Field Name

type

length

not null

primary key

Field description

commodity_center_id

int

11

yes

primary key

Product center ID

specifications

varchar

64

no

Specification

manufacturer

varchar

64

no

manufacturer

seller_account

int

11

no

Seller name

seller_address

varchar

64

no

Seller address

examine_state

varchar

16

yes

Approval Status

recommend

int

11

yes

Intelligent Recommendation

cart_title

varchar

125

no

title

cart_img

text

0

no

cover picture

cart_description

varchar

255

no

describe

cart_price_ago

double

8

yes

original price

cart_price

double

8

yes

selling price

cart_inventory

int

11

yes

Commodity stocks

cart_type

varchar

64

yes

Categories

cart_content

longtext

0

no

text

cart_img_1

text

0

no

Main picture 1

cart_img_2

text

0

no

Main picture 2

cart_img_3

text

0

no

Main picture 3

cart_img_4

text

0

no

Main picture 4

cart_img_5

text

0

no

Main picture 5

create_time

datetime

0

yes

creation time

update_time

timestamp

0

yes

Update time

forum_type

Field Name

type

length

not null

primary key

Field description

type_id

smallint

5

yes

primary key

Category ID

name

varchar

16

yes

Category Name

description

varchar

255

no

describe

url

varchar

255

no

External link address

father_id

smallint

5

yes

Parent category ID

icon

varchar

255

no

Category icon

create_time

timestamp

0

yes

creation time

update_time

timestamp

0

yes

Update time

notice

Field Name

type

length

not null

primary key

Field description

notice_id

mediumint

8

yes

primary key

Announcement id

title

varchar

125

yes

title

content

longtext

0

no

text

create_time

timestamp

0

yes

creation time

update_time

timestamp

0

yes

Update time

order

Field Name

type

length

not null

primary key

Field description

order_id

int

11

yes

primary key

Order ID

order_number

varchar

64

no

order number

goods_id

mediumint

8

yes

Product id

title

varchar

32

no

Product title

img

varchar

255

no

product picture

price

double

10

yes

price

price_ago

double

10

yes

original price

num

int

8

yes

quantity

price_count

double

8

yes

total price

norms

varchar

255

no

Specification

type

varchar

64

yes

Categories

contact_name

varchar

32

no

Contact name

contact_email

varchar

125

no

Contact email

contact_phone

varchar

11

no

Contact mobile phone

contact_address

varchar

255

no

Recipient address

postal_code

varchar

9

no

postal code

user_id

int

10

yes

Buyer ID

merchant_id

mediumint

8

yes

Merchant ID

create_time

timestamp

0

yes

creation time

update_time

timestamp

0

yes

Update time

description

varchar

255

no

describe

state

varchar

16

yes

Order Status

seller

Field Name

type

length

not null

primary key

Field description

seller_id

int

11

yes

primary key

Seller ID

seller_name

varchar

64

yes

Seller name

seller_address

varchar

64

no

Seller address

examine_state

varchar

16

yes

Approval Status

recommend

int

11

yes

Intelligent Recommendation

user_id

int

11

yes

User ID

create_time

datetime

0

yes

creation time

update_time

timestamp

0

yes

Update time

slides

Field Name

type

length

not null

primary key

Field description

slides_id

int

10

yes

primary key

Carousel ID

title

varchar

64

no

title

content

varchar

255

no

content

url

varchar

255

no

Link

img

varchar

255

no

carousel

hits

int

10

yes

Clicks

create_time

timestamp

0

yes

creation time

update_time

timestamp

0

yes

Update time

test_user

Field Name

type

length

not null

primary key

Field description

test_user_id

int

11

yes

primary key

Test user ID

user_name

varchar

64

yes

username

gender

varchar

64

no

gender

examine_state

varchar

16

yes

Approval Status

recommend

int

11

yes

Intelligent Recommendation

user_id

int

11

yes

User ID

create_time

datetime

0

yes

creation time

update_time

timestamp

0

yes

Update time

Chapter 5 System Implementation

5. 1 User function module

5.1.1 Front-end homepage interface

The user enters the front-end system operation interface and can operate the homepage, communication forum, announcement messages, news, product center and other functional modules , as shown in Figure 5-1 below.

Figure 5-1 Home page interface diagram

The homepage code is as follows:

server:

  port: 5000

  servlet:

    context-path: /api

spring:

  datasource:

    url: jdbc:mysql://127.0.0.1:3306/CS725260_20211101091736?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8

    username: root

    password: root

    driver-class-name: com.mysql.cj.jdbc.Driver

  jackson:

    property-naming-strategy: CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES

    default-property-inclusion: ALWAYS

    time-zone: GMT+8

    date-format: yyyy-MM-dd HH:mm:ss

  servlet:

    multipart:

      max-file-size: 100MB

      max-request-size: 100MB

5.1.2 Member registration interface

Those who are not formal members of the e-commerce platform can register online. If you do not have an account on this e-commerce platform, add "Register" and fill in your account number + password + confirmation password + nickname + email + mobile phone number, etc. After clicking the "Register" button, it will first verify whether there is any empty data entered, verify again whether the password and confirmation password are the same, and finally verify whether the entered account name and the registered account name in the database table are duplicates, and only verify both If there is no problem, the membership registration will be successful. The member registration interface is shown in Figure 5-2 below.

Figure 5-2 Front desk member registration interface diagram

The registration code is as follows:

/**

     * register

     * @param user

     * @return

     */

    @PostMapping("register")

    public Map<String, Object> signUp(@RequestBody User user) {

        //Query user

        Map<String, String> query = new HashMap<>();

        query.put("username",user.getUsername());

        List list = service.select(query, new HashMap<>()).getResultList();

        if (list.size()>0){

            return error(30000, "User already exists");

        }

        user.setUserId(null);

        user.setPassword(service.encryption(user.getPassword()));

        service.save(user);

        return success(1);

}

/**

     * User ID: [0,8388607] User obtains other user-related data

     */

    @Id

    @GeneratedValue(strategy = GenerationType.IDENTITY)

    @Column(name = "user_id")

    private Integer userId;

    /**

     * Account status: [0,10] (1 available | 2 abnormal | 3 frozen | 4 logged out)

     */

    @Basic

    @Column(name = "state")

    private Integer state;

    /**

     * User group: [0,32767] determines user identity and permissions

     */

    @Basic

    @Column(name = "user_group")

    private String userGroup;

    /**

     * Last Login Time:

     */

    @Basic

    @Column(name = "login_time")

    private Timestamp loginTime;

    /**

     * Mobile phone number: [0,11] User’s mobile phone number, used to retrieve password or log in

     */

    @Basic

    @Column(name = "phone")

    private String phone;

    /**

     * Mobile phone certification: [0,1] (0 not certified | 1 under review | 2 certified)

     */

    @Basic

    @Column(name = "phone_state")

    private Integer phoneState;

    /**

     * 用户名:[0,16]用户登录时所用的账户名称

     */

    @Basic

    @Column(name = "username")

    private String username;

    /**

     * 昵称:[0,16]

     */

    @Basic

    @Column(name = "nickname")

    private String nickname;

    /**

     * 密码:[0,32]用户登录所需的密码,由6-16位数字或英文组成

     */

    @Basic

    @Column(name = "password")

    private String password;

    /**

     * 邮箱:[0,64]用户的邮箱,用于找回密码时或登录时

     */

    @Basic

    @Column(name = "email")

    private String email;

    /**

     * 邮箱认证:[0,1](0未认证|1审核中|2已认证)

     */

    @Basic

    @Column(name = "email_state")

    private Integer emailState;

    /**

     * 头像地址:[0,255]

     */

    @Basic

    @Column(name = "avatar")

    private String avatar;

    /**

     * 创建时间:

     */

    @Basic

    @Column(name = "create_time")

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

    private Timestamp createTime;

    @Basic

    @Transient

    private String code;

}

5.1.3 会员登录界面

电商平台中的前台上注册后的会员是可以通过自己的账户名和密码进行登录的,当会员输入完整的自己的账户名和密码信息并点击“登录”按钮后,将会首先验证输入的有没有空数据,再次验证输入的账户名+密码和数据库中当前保存的用户信息是否一致,只有在一致后将会登录成功并自动跳转到电商平台的首页中;否则将会提示相应错误信息,用户登录界面如下图5-3所示。

图5-3会员登录界面图

登录代码如下:

/**

     * 登录

     * @param data

     * @param httpServletRequest

     * @return

     */

    @PostMapping("login")

    public Map<String, Object> login(@RequestBody Map<String, String> data, HttpServletRequest httpServletRequest) {

        log.info("[执行登录接口]");

        String username = data.get("username");

        String email = data.get("email");

        String phone = data.get("phone");

        String password = data.get("password");

        List resultList = null;

        Map<String, String> map = new HashMap<>();

        if(username != null && "".equals(username) == false){

            map.put("username", username);

            resultList = service.select(map, new HashMap<>()).getResultList();

        }

        else if(email != null && "".equals(email) == false){

            map.put("email", email);

            resultList = service.select(map, new HashMap<>()).getResultList();

        }

        else if(phone != null && "".equals(phone) == false){

            map.put("phone", phone);

            resultList = service.select(map, new HashMap<>()).getResultList();

        }else{

            return error(30000, "账号或密码不能为空");

        }

        if (resultList == null || password == null) {

            return error(30000, "账号或密码不能为空");

        }

        //判断是否有这个用户

        if (resultList.size()<=0){

            return error(30000,"用户不存在");

        }

        User byUsername = (User) resultList.get(0);

        Map<String, String> groupMap = new HashMap<>();

        groupMap.put("name",byUsername.getUserGroup());

        List groupList = userGroupService.select(groupMap, new HashMap<>()).getResultList();

        if (groupList.size()<1){

            return error(30000,"用户组不存在");

        }

        UserGroup userGroup = (UserGroup) groupList.get(0);

        //查询用户审核状态

        if (!StringUtils.isEmpty(userGroup.getSourceTable())){

            String sql = "select examine_state from "+ userGroup.getSourceTable() +" WHERE user_id = " + byUsername.getUserId();

            String res = String.valueOf(service.runCountSql(sql).getSingleResult());

            if (res==null){

                return error(30000,"用户不存在");

            }

            if (!res.equals("已通过")){

                return error(30000,"该用户审核未通过");

            }

        }

        //查询用户状态

        if (byUsername.getState()!=1){

            return error(30000,"用户非可用状态,不能登录");

        }

        String md5password = service.encryption(password);

        if (byUsername.getPassword().equals(md5password)) {

            // 存储Token到数据库

            AccessToken accessToken = new AccessToken();

            accessToken.setToken(UUID.randomUUID().toString().replaceAll("-", ""));

            accessToken.setUser_id(byUsername.getUserId());

            tokenService.save(accessToken);

            // 返回用户信息

            JSONObject user = JSONObject.parseObject(JSONObject.toJSONString(byUsername));

            user.put("token", accessToken.getToken());

            JSONObject ret = new JSONObject();

            ret.put("obj",user);

            return success(ret);

        } else {

            return error(30000, "账号或密码不正确");

        }

}

5.1.4交流论坛界面

用户在点击导航栏上面的交流论坛后,就可以搜索查看论坛信息,用户根据自己的喜好可以进行点赞收藏等,交流论坛界面如下图5-4所示。

图5-4交流论坛界面图

交流论坛代码如下:

 @RequestMapping("/get_list")

    public Map<String, Object> getList(HttpServletRequest request) {

        Map<String, Object> map = service.selectToPage(service.readQuery(request), service.readConfig(request));

        return success(map);

}

5.1.5 收货地址界面

当用户点击“收货地址”右后,就回去显示出目前现有的地址,也可以添加新的地址,界面如下图5-5所示。

图5-5收货地址界面图

收货地址代码如下:

  @RequestMapping(value = "/del")

    @Transactional

    public Map<String, Object> del(HttpServletRequest request) {

        service.delete(service.readQuery(request), service.readConfig(request));

        return success(1);

}

    @Transactional

    public void delete(Map<String,String> query,Map<String,String> config){

        StringBuffer sql = new StringBuffer("DELETE FROM ").append("`").append(table).append("`").append(" ");

        sql.append(toWhereSql(query, "0".equals(config.get(FindConfig.GROUP_BY))));

        log.info("[{}] - 删除操作:{}",table,sql);

        Query query1 = runCountSql(sql.toString());

        query1.executeUpdate();

    }

5.1.6 商品中心界面

当访客点击了任意商品后将会进入该款商品的详情界面,可以了解到该商品的图片信息、商品信息、价钱信息等,同时可以对该商品进行加购+立即购买+收藏+点赞+评论,商品详情展示页面如图5-6所示。

图5-6 商品详情界面图

商品详情代码如下:

   @RequestMapping("/get_obj")

    public Map<String, Object> obj(HttpServletRequest request) {

        Query select = service.select(service.readQuery(request), service.readConfig(request));

        List resultList = select.getResultList();

        if (resultList.size() > 0) {

            JSONObject jsonObject = new JSONObject();

            jsonObject.put("obj",resultList.get(0));

            return success(jsonObject);

        } else {

            return success(null);

        }

}

 public Query select(Map<String,String> query,Map<String,String> config){

        StringBuffer sql = new StringBuffer("select ");

        sql.append(config.get(FindConfig.FIELD) == null || "".equals(config.get(FindConfig.FIELD)) ? "*" : config.get(FindConfig.FIELD)).append(" ");

        sql.append("from ").append("`").append(table).append("`").append(toWhereSql(query, "0".equals(config.get(FindConfig.LIKE))));

        if (config.get(FindConfig.GROUP_BY) != null && !"".equals(config.get(FindConfig.GROUP_BY))){

            sql.append("group by ").append(config.get(FindConfig.GROUP_BY)).append(" ");

        }

        if (config.get(FindConfig.ORDER_BY) != null && !"".equals(config.get(FindConfig.ORDER_BY))){

            sql.append("order by ").append(config.get(FindConfig.ORDER_BY)).append(" ");

        }

        if (config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE))){

            int page = config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE)) ? Integer.parseInt(config.get(FindConfig.PAGE)) : 1;

            int limit = config.get(FindConfig.SIZE) != null && !"".equals(config.get(FindConfig.SIZE)) ? Integer.parseInt(config.get(FindConfig.SIZE)) : 10;

            sql.append(" limit ").append( (page-1)*limit ).append(" , ").append(limit);

        }

        log.info("[{}] - 查询操作,sql: {}",table,sql);

        return runEntitySql(sql.toString());

    }

5.1.7 我的订单界面

当用户点击“我的订单”链接后就进入自己购买的订单的界面展示,界面如下图5-7所示。

图5-7 我的订单界面图

我的订单代码如下:

  public Map<String, Object> getList(HttpServletRequest request) {

        Map<String, Object> map = service.selectToPage(service.readQuery(request), service.readConfig(request));

        return success(map);

}

5.2 商家功能模块

5.2.1商品中心管理界面

商家进入后台后点击“商品中心”,能够看到自己发布的商品信息,对商品进行管控。界面如下图5-8所示。

图5-8 商品中心管理界面图

5.2.2订单列表界面

商家进入后台后点击“订单列表”,能够看到用户购买自己商品的时候提交的订单。界面如下图5-9所示。

图5-9 订单列表界面图

5.3管理员功能模块

5.3.1 用户管理界面

电商平台中的管理人员是可以对前台注册的买家进行管理的,也可以对管理员进行管控。界面如下图5-10所示。

5-10用户管理界面图

5.3.2 轮播图管理界面

电商平台中的管理人员是可以对轮播图进行添加轮播内容的,界面如下图5-11所示。

图5-11轮播图界面图

5.3.3 商品中心管理界面

电商平台中的管理人员是可以对电商平台内发布的商品进行添加、维护和管理的,支持增删改查操作。界面如下图5-12所示。

图5-12商品中心界面图

5.3.4 论坛列表界面

电商平台中的管理人员是可以对电商平台内的论坛信息进行维护和管理的。论坛列表界面如下图5-13所示。

图5-13论坛列表界面图

章  系统测试

6.1测试定义及目的

关于系统实现的测试,英文名称是System TEST,简称ST,ST是使用完整其系统的各种功能多次、多案例、多环境测试,这是ST的简单描述。ST可以证明该功能对系统的要求是否得到满足以及是否有效。

对于系统开发的实现,不管开发过程多么努力,在系统运行的时候多少都会出现一些错误信息,所以为了系统的安全性及提高系统的使用率及给用户带来更好的体验,系统在完成之前,一定要进行一遍系统的测试,再完美的程序也会有漏洞,再细心的技术开发员也会有疏忽的时候,所以对于程序的测试是必须要做的一步。通过系统测试找到系统存在的问题,并根据问题的原因进行在线解决问题,如果找不到解决问题的办法可以进行通过咨询指导老师或者通过同学帮忙,一定将问题找出,否则将会出现更多的错误。所以程序出现错误时不可避免,系统测试虽然耗时费力,但是为了确保后期系统的长期使用,必须要进行系统测试,问题解决完成后还要再一步测试,直到没有任何问题后方可进行使用。

6.2性能测试

任何一款程序开发成功后都必须通过软件测试,它是保障软件稳定运行的前提。测试最主要的一步就是性能测试,性能测试内容如下:

(1)对于测试的速度有一定的要求,速度必须快,而且对于测试出来的错误问题一定以最快的速度进行处理解决,并且进行再次测试,保证整个系统运行的安全性。

(2)在系统测试的时候要将测试所用到的测试计划和测试报告保管好,方便后期系统的运行使用后的整体维护操作。

(3)软件测试整个过程中的聚类现象应优先考虑。

(4)对于整体系统测试,不要用自己的思想去认可整个系统,而是从公正的角度的进行对系统进行认可,是否符系统的整合应用。

6.3测试模块

测试系统是最新的Windows 10系统,通过对系统实现的功能模块进行每个功能模块的操作测试,查看每个用户的功能模块所对应的权限信息是否可以操作并且数据信息更新一致。

测试需求

测试重点

是否达成需求

结果

用户登录

输入账号密码

需求达成

通过

用户注册

创建新的账号密码

需求达成

通过

登录失败

输入错误账号密码

需求达成

通过

修改信息

修改成功

需求达成

通过

添加信息管理

增删查改

需求达成

通过

回复管理

增删查改

需求达成

通过

搜索查询管理

增删查改

需求达成

通过

                                                                                                                                                       

系统测试方面,我们通常运用的是白盒测试以及黑盒测试这两种方法。白盒测试是指在了解系统内部工作流程的前提下,可以根据需求规范验证系统内部操作是否能够正常运行的测试;而黑盒测试指的是,倘若知道了这个系统的全部功能,可以进行测试检测系统中的每一个功能是否满足正常使用。

为了方便用户使用“电商平台”,以及尽可能少的减少系统测试错误的发生,我们对该系统进行了相对应的测试。

对该系统的全部的功能界面进行测试,简单来说,就是我们输入一些数据并且对其进行提交,之后我们查看每个页面的反馈,检测页面的相关功能可不可以完全实现。

6.4测试结果

测试评估的结果是电商平台满足要求中的所有功能,处理大多数错误条件,修复大多数错误并通过测试。电商平台的基本功能都是可行的,不管是系统里面的功能还是界面的设计都是可值得推广宣传的。

   

电商平台的整体功能模块的实现,主要是对自己在大学这几年时间所学内容的一个测试,对于系统,主要是通过现在智能化的电商平台进行开始系统的实现,并且可以根据需求进行数据信息的增加修改删除等操作,完美的解决了当下电商平台中所遇到的问题。

经过一个学期的毕业设计的实现完成已接近尾声,到目前为止,当我回想起整个学期的系统开发日,收获颇丰。毕业设计的主要任务是建立一个智能化的电商平台的信息系统,主要使用springboot框架和Mysql数据库的开发工具,对系统的每个功能模块进行相对应的操作,最后,系统调试结果表明系统基本可以满足功能要求。

电商平台的开发对我大学学习的改进有很大帮助。它使我能够学习计算机知识的相关技术方面问题及与人交往的沟通交流方面,让我意识到无论我们做什么,我们都需要坚持不懈,努力工作,只有这样尝试了并且坚持去做了,我们才可以成功,才可以获得成功的喜悦,如果没有尝试,只是想,那连成功的机会都没有,实际操作进行做了,才会越来越近的靠近成功,随着道路一路向前,未来的路是美好的。

对于电商平台的实现,是自己第一次完成的设计一个管理系统。在项目的设计过程中,我克服了各种困难,并且在面对这些困难,我积极的面对,想办法解决问题,并且更好的掌握了理论知识和动手操作实践能力,从系统的开发到设计完成,我完成了一个更全面、更完善、更安全的平台管理系统,这也让我取得了很大的成就感,也使我对未来的生活更有信心。


致  谢

大学生活在这个时候即将划上一个句号,但是对于我的人生道路来说,这仅仅是一个逗号,我将面对的是又一次征程的开始。

回忆过去,许许多多的事情浮现在脑海:刚上大学时欢乐心情和兴奋的场景还历历在目。一切都是那么新鲜,那么富有吸引力。有快乐也有艰辛,有收获也有失落。衷心感谢信息学院所有支持帮助过我的老师,谢谢你们多年来的关心和爱护。同窗的友情同样难忘,你们与我共同走过了人生中不平凡的道路,给我留下了值得珍藏的美好记忆。

最后,我要特别感谢指导电商平台论文设计的老师。本论文是在他的悉心指导和热情帮助下完成的,老师认真负责的工作态度,严谨的治学精神和精深的理论水平都使我受益匪浅。老师无论在理论上还是在实践中,都给予我很大的帮助,使我专业技能的应用水平得到很大提高,这对于我以后的工作和学习都有益处。值此论文完成之际,特别向老师表示衷心的感谢和崇高的敬意,谢谢他细心而又耐心地辅导,使得我得以顺利的完成毕业设计开发工作,同时也要感谢其他帮助过我的老师和同学,他们在我成长过程中给予了我很大的帮助,在此一并表示感谢。

由于本人水平有限,加上时间紧促,本文一定有不少缺点和不足,恳请各位老师给予帮助和指正。


                                 参考文献

[1]李宁,周琦宇,邹丽琼.农产品网络销售会影响新型农业经营主体的农地经营规模吗[J/OL].农业技术经济:1-16[2021-12-11].https://doi.org/10.13246/j.cnki.jae.20211206.001.

[2] Wu Liwen, Cai Shaolin. Research on precision marketing paths of agricultural products based on data mining - taking Shanwei City, Guangdong Province as an example [J]. Agriculture and Technology, 2021, 41(22): 143-148. DOI: 10.19754/j. nyyjs.20211130040.

[3] Zhang Yaqiong, Yang Yang. System design of local e-commerce platform in the Internet + era [J]. Microcomputer Applications, 2021, 37(11): 29-31.

[4] Zhang Xiwen. Rural e-commerce builds a bridge for agricultural products to leave the village and enter the city [N]. China Financial News, 2021-11-18(008).DOI:10.28053/n.cnki.nccjb.2021.002854.

[5] Yang Yi, Zhao Weimiao, Wang Qiulan. A brief analysis of Yanshou County e-commerce platform model innovation under the background of the Internet [J]. Modern Business, 2021(30):52-54.DOI:10.14097/j.cnki.5392/2021.30. 016.

[6] Liu Ni, Rong Yi, Shi Huijuan, Wu Manting, Li Jinglei. Research on the impact of county magistrate’s live broadcast on e-commerce platforms based on SOR theory [J]. Hebei Enterprise, 2021(11):107-109.DOI:10.19885/j .cnki.hbqy.2021.11.029.

[7] Tang Shengping. Design of an agricultural sales management system based on microservices [J]. Southern Agricultural Machinery, 2021, 52(19): 146-148.

[8] Li Chenghan. The development of the supply and marketing system is stable and improving[N]. Yunnan Daily, 2021-08-08(005).DOI:10.38259/n.cnki.nynrb.2021.004678.

[9]Baoyu Jia,Zhaoji Yu,Yingzi Zhao. Design of online service reputation system for agricultural products sales platform based on P2P network[J]. Acta Agriculturae Scandinavica, Section B — Soil & Plant Science,2021,71(4):

[10] Xia Xinyu, Xi Conling, Chen Zhilin, Liu Dada, Zhou Cong. Development of personal subscription accounts based on springboot technology [J]. Computer Programming Skills and Maintenance, 2021(04):61-63.DOI:10.16184/j.cnki.comprg .2021.04.022.

[11] Wang Jiarui. Analysis of problems and countermeasures in the development of agricultural products e-commerce [J]. Southern Agriculture, 2021, 15(09): 132-134.DOI: 10.19415/j.cnki.1673-890x.2021.09.065.

[12] Cheng Zhijiang. Design and implementation of an e-commerce platform recommendation system for chronic disease groups [D]. Chongqing Three Gorges University, 2021. DOI: 10.27883/d.cnki.gcqsx.2021.000073.

[13]Wibowo Argo,Delima Rosa,Antonius Rachmat C. Designing and Developing an Agricultural Product Sales Application Catalog with a Hybrid Application Development Framework[J]. IOP Conference Series: Materials Science and Engineering,2021,1077(1):

[14] Tan Bibo. Application of big data in agricultural product logistics management system [J]. Southern Agriculture, 2021, 15(03): 219-220.DOI: 10.19415/j.cnki.1673-890x.2021.03.103.

[15]Ren GuoWen,Yu Miao,Yin DeShuai,Huang SenYan,Xu HuanChun,Yuan Meng. Design and optimization of integrated energy management network system based on internet of things technology[J]. Sustainable Computing: Informatics and Systems,2020(prepublish):

[16] Huang Hailong, Zhu Yiping, Lu Linfeng, Guan Xiaofeng. Issues and countermeasures on the construction of agricultural product quality and safety traceability systems [J]. Zhejiang Agricultural Sciences, 2020, 61(09): 1867-1868+1871.DOI: 10.16178 /j.issn.0528-9017.20200946.

[17] Ge Zhiyin. Research and application of e-commerce platform system based on user portraits [D]. Hunan Agricultural University, 2020.

[18] Chen Yan. Design and development of online agricultural product sales management system based on MVC architecture [J]. Information and Computers (Theoretical Edition), 2020, 32(12): 110-112.

[19] Jia Derunnan, Ruan Hongli, Li Wenyuan, Chen Dongsheng, Gao Hualing. Design of social e-commerce recommendation system for agricultural products [J]. Computer Knowledge and Technology, 2020, 16(13): 299-300.DOI: 10.14004/j.cnki. ckt.2020.1716.

[20] Zhang Fengda. Design and implementation of Shenzhen Haijixing e-commerce platform [D]. Southwest Jiaotong University, 2019.DOI:10.27414/d.cnki.gxnju.2019.003358.

Please follow and like + privately message the blogger to receive the project source code for free
 

Guess you like

Origin blog.csdn.net/Q_3461074420/article/details/135249019