(Source code attached) SSM+ Online Bookstore Management System Computer Completion 41539

SSM online bookstore management system 

Summary

With the rapid development of science and technology, all aspects of society and all walks of life are striving to integrate with modern advanced technology and improve their own advantages through scientific and technological means. Of course, online bookstore management systems cannot be excluded. The online bookstore management system is a management system built with practical application as the development background, using software engineering principles and development methods, and using the SSM framework. The entire development process first conducts a requirements analysis on the software system to derive the main functions of the system. Then carry out the overall design and detailed design of the system. The overall design mainly includes system function design, system overall structure design, system data structure design and system security design, etc.; detailed design mainly includes the implementation of system database access, the specific implementation of main functional modules, and key code for module implementation, etc. Finally, the system was functionally tested, and the test results were analyzed and summarized to find out the deficiencies in the system and the areas that need improvement, which will provide convenience for future system maintenance, and also provide reference and help for the development of similar systems in the future. This kind of personalized online system management pays special attention to interaction coordination and mutual cooperation of management, which stimulates the creativity and initiative of managers, which is very beneficial to online bookstores.

The database used in this online bookstore management system is Mysql, which is developed using the SSM framework. During the design process, the system code was fully guaranteed to have good readability, practicality, easy scalability, versatility, easy later maintenance, easy operation, and simple page.

Keywords: Online bookstore management system, SSM, Mysql 

SSM Online Bookstore Management System

ABSTRACT

With the rapid development of science and technology, all aspects of society and all walks of life are trying to integrate with modern advanced technology, and improve their own advantages through scientific and technological means. Of course, the online bookstore management system cannot be excluded. The online bookstore management system is a management system based on the practical application, using software engineering principles and development methods, and adopting the SSM framework. The whole development process firstly analyzes the requirements of the software system and obtains the main functions of the system. Then the overall design and detailed design of the system. The overall design mainly includes system function design, system overall structure design, system data structure design and system security design; The detailed design mainly includes the realization of system database access, the specific realization of main functional modules, and the key code of module realization. Finally, the system is tested, and the test results are analyzed and summarized to find out the deficiencies and areas for improvement in the system, which provides convenience for future system maintenance, and also provides reference and help for future development of similar systems. This personalized online system management 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 online bookstores.

The online bookstore management system uses MySQL as the database and is developed using the SSM framework. In the design process, it fully guarantees the good readability, practicability, extensibility, universality, convenience for later maintenance, convenient operation and simple page of the system code.

Keywords: online bookstore management system, SSM, MySQL

Table of contents

Chapter 1 Introduction

1.1 Background and significance

1.2 Overview of research at home and abroad

1.3 Contents of the study

Chapter 2 Related Technologies

2.1 SSM framework

2.2 Introduction to JAVA

2.3 ECLIPSE development environment

2.4 Tomcat server

2.5 MySQL database

Chapter 3 System Analysis

3.1 Requirements analysis

3.2 System feasibility analysis

3.2.1 Technical feasibility: technical background

3.2.2 Economic feasibility

3.2.3 Operational feasibility:

3.3 Project design goals and principles

3.4 System process analysis

3.4.1 Operation process

3.4.2 Add information process

3.4.3 Deletion of information process

Chapter 4 System Design

4.1 System architecture

4.2 Development process design

4.3 Database design principles

4.4 Data sheet

Chapter 5 System Detailed Design

5.1 Front desk function module

5.2 Administrator function module

Chapter 6 System Testing  

6.1 Purpose of system testing

6.2 System testing method

6.3 Functional testing

in conclusion

Thanks

references

Chapter 1 Introduction

1.1 Background and significance

With the rapid development of society, the impact of computers is comprehensive and profound. With the continuous improvement of people's living standards, people's requirements for online bookstores in daily life are also constantly increasing, and the number of online bookstores is constantly increasing, making the development of online bookstore management systems a necessary and urgent matter. The online bookstore management system mainly uses computers to manage the information required by the online bookstore management system to increase user choices. It also facilitates timely query and modification of user information and timely understanding of user information. The online bookstore management system brings more convenience to users. The system cooperates with the database management system software to meet the needs of users. The application of computer technology in modern management has made computers an important tool for people to apply modern technology. It can effectively solve the problem of convenient and comprehensive acquisition of information and improve efficiency.

This online bookstore management system 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 increased 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. "Online bookstore management system" is based on Mysql database and implemented on the basis of SSM framework design. In order to ensure the sustainable development of China's economy, the information age is increasingly updated, and online shopping malls are booming. At the same time, with the rapid development of the information society, online bookstore management systems are faced with more and more information, so it is difficult to obtain their needs for efficient information. How to use a convenient and fast way to enable inquirers to navigate the vast online bookstore information? It is effective in querying, storing, managing and sharing information, and 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-online bookstore management system 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, the more traditional office software is still the main tool used by people, while the information management software of the relatively comprehensive and professional online bookstore management system is still not understood or recognized by most people. This topic aims to achieve homepage and site management (carousel images, bulletin boards) user management (administrators, system users) and content management (exchange forums, forum classifications, book information, information classification) through tag classification management and other methods. Mall management (book mall, category list, order list) and more management (feedback center) and other information management functions, so as to achieve efficient management of online bookstore management system information.

Chapter 2 Related Technologies

2.1  SSM framework

Today's popular "SSM combination framework" is the abbreviation of Spring + SpringMVC + MyBatis, which is sought after by many. The "combination SSM framework" is a team spirit of strong alliances, each performing its own duties, and coordination and complementation. A framework for web projects, usually simpler data sources. Spring is a lightweight inversion of control framework (IoC), but it is also an surface-oriented container (AOP). SpringMVC is often used in the classified working mode of the controller, which is separated from the model object, and the function of the program object is processed with the ATM. This decoupled treatment makes it easier to personalize the entire system. MyBatis is a good sustainability framework that supports ordinary SQL queries while allowing advanced mapping of stored procedures for data optimization. Due to the high development cost, difficulty in maintenance after development, and some difficult-to-solve problems during the development process of large-scale Java web applications, the "SSM Combination Framework" is adopted, which allows the establishment of a business hierarchy and provides a good solution to this problem. .

2.2 Introduction to JAVA

Java mainly uses CORBA technology and security model to protect data in Internet applications. It also provides full support for EJB (Enterprise JavaBeans), java servlet API, SSM (java server pages), and XML technology. The JAVA language is an object-oriented language that provides the most basic methods to complete specified tasks. Developers only need to know some concepts to write some applications. Java programs are relatively small and their code can run on small machines. Java is a computer programming language with three main features: encapsulation, inheritance, and polymorphism. It is widely used in enterprise web application development and mobile application development.

The difference between the Java language and general compilers and literal translation is that Java first converts the source code into bytecode and then converts it into an executable file for the JVM, which can run on a variety of different JVMs. Therefore, its cross-platform nature is achieved. While this made Java very slow in its early days, it has improved as Java has developed.

2.3 ECLIPSE development environment

ECLIPSE has extensive support, high compatibility and powerful functions. It is a collection of Eclipse plug-ins, generally suitable for JAVA and J2EE system development, and supports almost all databases on the market such as JDBC, Hibernate, AJAX, Struts, Java Servlet, Spring, and EJB3. Link tools and mainstream Eclipse product development tools.

ECLIPSE is a well-known development tool in the industry, and this tool is used in the development process of this platform. ECLIPSE is also called an enterprise-level work platform, which is based on the Eclipse IDE. ECLIPSE can help us with database research and development and the use of J2EE. In addition, it can also improve the system's operational capabilities, which is highlighted in the server integration process. ECLIPSE's functions are quite complete and can provide the necessary environmental support for J2EE integration to complete functions such as coding, testing, debugging and publishing. It can support SSM, HTML, SQL, Javascript, Struts, CSS, etc.

2.4 Tomcat server

Tomcat is a lightweight server, so it is not universally applicable to small and medium-sized enterprises. But when programmers need to develop or debug SSM framework programs, this server is usually the first choice. For a person with only basic computer knowledge, the computer system has a good Apache server and can access HTML pages very well. Although Tomcat is an extension of Apache, they can run independently and the two do not interfere with each other. When configured correctly, the Apache server provides technical support for the running of HTML pages, and Tomcat's task is to run Servle and SSM pages. Tomca also has certain HTML page processing capabilities.

2. 5 MySQL database

The language of Mysql is unstructured and users can work on the data. MySQL has attracted much attention because of its speed, reliability and adaptability. Most people agree that MySQL is the best choice for managing content without transactional processing. And because Mysql's language and structure are relatively simple, but its functions and amount of stored information are very powerful, it has been widely used.

The role of Mysql database in the programming process is very extensive, bringing convenience to users for data query. The application of Mysql database is highly flexible and powerful, so only a small piece of code is needed to implement a certain function, unlike other programs that require writing large pieces of code. Generally speaking, the language of Mysql database is relatively simpler.

Data process analysis is primarily a repository of data storage, which is performed on a computer rather than a real-life repository. Data is stored in a fixed format, not in an unordered manner. The definition is: it has a fixed format for a long time and can be stored in a shared computer memory. Database management mainly includes data storage, modification and addition, and the establishment of data tables. In order to ensure the normal operation of system data, some capable processors can manage it without requiring professional people to handle it. The establishment of the data table can adjust the data in the data table, recombine and reconstruct the data to ensure the security of the data. Due to the powerful functions of the database, the development of this system mainly uses Mysql for data management.

Chapter 3 System Analysis

3.1 Requirements analysis

The online bookstore management system is mainly designed to improve the work efficiency of staff and satisfy users more conveniently and quickly, to better store all data information and provide quick and convenient retrieval functions. Each module of the system is reasonably designed through many of today's developed systems. Analysis to determine user operability, following the principles of system optimization developed, after comprehensive investigation and research.

Analysis of the functions to be realized by the system. For the convenient management of the current network, the system should realize that users can directly view all data information on the platform, and can add, delete or modify online bookstore management system information online according to needs, which can save time. , there is no need to waste time like the traditional method, which is really difficult to meet the various needs of users. Therefore, the development of online bookstore management systems can not only meet the needs of users, but also improve the work efficiency of administrators and reduce the original unnecessary workload.

3.2 System feasibility analysis

3.2.1Technical feasibility: technical background

This corporate website is developed in the Windows operating system, and the current performance of the PC is already capable of serving as a web server for ordinary websites. The technology used in system development is also owned by itself, and it is also one of the widely used technologies today.

The development environment and configuration of the system can be installed by yourself. The system uses SSM development tools and the relatively mature Mysql database to interact with the system's front-end and back-end data. The database is modified and maintained according to technical language and combined with needs, which can make the website The operation is more stable and secure, thereby completing the development of the website.

(1) Hardware feasibility analysis

The design of the online bookstore management system 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 uploading of the platform after completion. The server has certain requirements. The server must be chosen with relatively high security. Then it must be smooth when opening the website and cannot be paused for too long. It must be cost-effective and secure.

(2) Software feasibility analysis

The entire system is developed using cloud computing. The advantages of cloud computing are the scalability of traffic and intelligent adjustment based on traffic, ensuring the security of the system and the timely backup of data information.

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.2.2 Economic feasibility

Before the development of the online bookstore management system, the market research and other logistics company-related management systems were done without any fees. They were all through the developers' own efforts. All the work was done by themselves. When encountering Most of the problems that are difficult to solve by oneself are solved with the help of classmates and instructors. Therefore, the development of an online bookstore management system is completely economically feasible without any expenses.

Using relatively mature technology, the system is developed based on the SSM framework and uses the Mysql database. Therefore, the system does not require high human and financial resources to develop and is economically feasible.

3.2.3 Operational feasibility: 

The operability mainly refers to the user experience after the online bookstore management system is designed, and the administrator can manage relevant data information at any time through the system, and the two user roles of administrator and user can be easily and clearly entered. Go to your own system interface, and you can operate the functional modules simply and clearly through the interface navigation menu, which facilitates the operation needs of user information and the administrator to manage data information. For system operations, no professional is required to directly operate and manage the functional modules. So the operability of the system is completely possible. The operation of this system also uses the interface window to log in, so as long as the operator knows simple computer operations, it is completely fine.

3.3 Project design goals and principles

1. Basic requirements for online bookstore management system

(1) Functional requirements: Can manage homepage, site content (carousel, bulletin board) system users (administrators, ordinary users) public content (information list, information classification) mall management (bookstore mall list, category list, order list) ) and other functional modules.

(2) Performance: It can be used on different operating systems without errors, so that different types of users can perform expected operations without errors and conveniently after logging into the corresponding interface.

(3) Security and confidentiality requirements: Users must pass identity verification to enter the system, and user permissions also need to be limited according to the type of user.

(4) Environmental requirements: Supports multiple platforms and can be used under multiple operating systems such as Windows series and Vista systems.

2. Development goals

The main development goals of the online bookstore management system are as follows:

(1) Realize the systematization, standardization and automation of management system information relationships;

(2) Reduce the workload of maintenance personnel and enable users to control and manage information.

(3) Convenient to query information and manage information, etc.;

(4) Improve the efficiency of problem handling and increase operator utilization through network operations;

(5) Taking into account the diversity of users, the interface is required to be simple and easy to operate.

3. Design principles

This online bookstore management system adopts SSM framework and Mysql database development, which fully guarantees the stability and integrity of the system.

The design ideas for the design and implementation of the online bookstore management system are as follows:

  1. The operation is simple and convenient, the system interface is safe and good, the page layout is simple and clear, and it is convenient to query relevant information of the online bookstore management system.

2. Instant visibility: The information processed by the online bookstore management system will be immediately available for query at the corresponding location, thereby realizing the system function of "instant release and immediate effect".

3. Complete functions: can manage home page, site management (carousel, bulletin board) user management (administrator, system user) content management (communication forum, forum classification, book information, information classification) mall management (book mall) , classification list, order list) more management (feedback center) management, modification and maintenance operations of the system management module.

3.4 System process analysis

3.4.1 Operation process

System login flow chart, as shown in the figure:

Figure 3-1 Login flow chart

3.4.2 Add information process

Add an information flow diagram, as shown in the figure:

Figure 3-2 Add information flow chart

3.4.3 Deletion of information process

Delete information flow chart, as shown in the figure:

Figure 3-3 Deletion information flow chart

Chapter 4 System Design

4. 1 System architecture

The structure of the online bookstore management system is shown in Figure 4-1:

Figure 4-1 System structure

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

Figure 4-2 Login structure diagram

The administrator structure diagram is shown in Figure 4-3.

Figure 4-3 Administrator structure diagram

4. 2 Development process design

The analysis of system process is to adjust and organize the system design plan by investigating the identification, feasibility, operability, system analysis and processing capabilities of the problems involved in the system to ensure that the system can reach the ideal state. These operations require a series of process tests focusing on registration and login to ensure the integrity of the database, thereby controlling the security of information management involved in the system and ensuring the normal conversion of information input and output. Then, complete the drawing work of the flow chart through practical operations.

The development of the online bookstore management system involves analyzing the management module and the database used by the system, writing code, and testing the system, as shown in Figure 4-4.

Figure 4-4 Development system flow chart

4.3 Database design principles

When learning programming, we all know that database design is based on the system functions that need to be designed. We need to establish a database relational model to store data information, so that when we are in the program, there is no need to add data to the program page, thereby improving the system s efficiency. The database stores a lot of information and can be said to be the core and foundation of the information management system. The database also provides addition, deletion, modification and inspection, allowing the system to quickly find the information it wants instead of finding it in the program code. Each part of the information table in the database is accurately combined, arranged and combined into a data table according to certain relationships.

Planning through the functions of the online bookstore management system is divided into several entity information. The entity information will be explained through the ER diagram. The main entity diagrams of this system are as follows:

The administrator information attribute diagram is shown in Figure 4-5.

Figure 4-5 Administrator information entity attribute diagram

The user information management entity attribute diagram is shown in Figure 4-6.

Figure 4-6 User information attribute diagram

The administrator system menu entity attribute diagram is shown in Figure 4-7.

Figure 4-7 Administrator system menu entity attribute diagram

The attribute diagram of the user profile management entity is shown in Figure 4-8.

Figure 4-8 User profile management entity attribute 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.

book_mall

Field Name

type

length

not null

primary key

Field description

book_mall_id

int

11

yes

primary key

Book mall ID

author

varchar

64

no

author

press

varchar

64

no

the publisher

publication_time

varchar

64

no

Published date

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

The main content of the text product

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

cart

Field Name

type

length

not null

primary key

Field description

cart_id

int

11

yes

primary key

Cart ID

title

varchar

64

no

title

img

varchar

255

yes

picture

user_id

int

10

yes

User ID

create_time

timestamp

0

yes

creation time

update_time

timestamp

0

yes

Update time

state

int

1

yes

Status in use

price

double

8

yes

unit price

price_ago

double

8

yes

original price

price_count

double

10

yes

total price

num

int

8

yes

quantity

goods_id

mediumint

8

yes

merchandise

type

varchar

64

yes

Categories

description

varchar

255

no

describe

chart

Field Name

type

length

not null

primary key

Field description

chart_id

int

10

yes

primary key

Chat ID

user_id

int

11

yes

User ID

title

varchar

64

no

title

content

longtext

0

yes

content

nickname

varchar

32

yes

Nick name

avatar

varchar

255

no

avatar

create_time

timestamp

0

yes

creation time

update_time

timestamp

0

yes

Update time

reply_id

int

11

yes

Reply ID

comment

Field Name

type

length

not null

primary key

Field description

comment_id

int

11

yes

primary key

Comment ID

user_id

int

11

yes

Commenter ID

reply_to_id

int

11

yes

Reply to comment ID

content

longtext

0

no

content

nickname

varchar

255

no

Nick name

avatar

varchar

255

no

Avatar address

create_time

timestamp

0

yes

creation time

update_time

timestamp

0

yes

Update time

source_table

varchar

255

no

Source table

source_field

varchar

255

no

Source field

source_id

int

10

yes

Source ID

feedback_center

Field Name

type

length

not null

primary key

Field description

feedback_center_id

int

11

yes

primary key

Feedback center ID

problem_description

longtext

0

no

Problem Description

feedback_date

date

0

no

Feedback date

user_no

int

11

no

user ID

user_name

varchar

64

no

username

examine_state

varchar

16

yes

Approval Status

examine_reply

varchar

16

no

moderation reply

recommend

int

11

yes

Intelligent Recommendation

create_time

datetime

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

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

system_user

Field Name

type

length

not null

primary key

Field description

system_user_id

int

11

yes

primary key

System user ID

user_no

varchar

64

yes

user ID

user_name

varchar

64

no

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 Detailed Design

5.1 Front desk function module

Online bookstore management system, you can view the homepage, communication center, announcements, book information, book mall, feedback center, my (my account, my collection, my address, my shopping cart, my order) on the system homepage , personal center) and other contents, as shown in Figure 5-1.

Figure 5-1 System function interface diagram

The homepage function code is as follows:

package com.project.demo.utils;

import java.util.UUID;

/**

 * <p>

 * Efficient GUID generation algorithm (sequence), based on Snowflake, implements 64-bit auto-incrementing ID algorithm. <br>

 */

public class IdWorker {

    private IdWorker() {

    }

    /**

     * Machine code of host and process

     */

    private static Sequence worker = new Sequence(0, 0);

    public static long getId() {

        return worker.nextId();

    }

    /**

     * Due to js precision issues, it can only be processed to 15 digits, so it is generally converted into a string.

     * @return

     */

    public static String getIdAsString() {

        return String.valueOf(getId());

    }

    /**

     * <p>

     * Get UUID with "-" removed

     * </p>

     */

    public static synchronized String get32UUID() {

        return UUID.randomUUID().toString().replace("-", "");

    }

}

The entity class uses the java class to map the database table in the database. Taking AccessToken.java as an example, it contains the name of the database table, the primary key field in the table, and the mapping between other fields in the table and Java attributes. The code is as follows:

/**

 * Temporary access token (AccessToken) table entity class

 *

 */

@TableName("access_token")

@Data

@EqualsAndHashCode(callSuper = false)

public class AccessToken implements Serializable {

    private static final long serialVersionUID = 913269304437207500L;

    /**

     * Temporary access badge ID

     */

    @TableId(value = "token_id", type = IdType.AUTO)

    private Integer tokenId;

    /**

     * Temporary access badge

     */

    @TableField(value = "token")

    private String token;

    /**

     *Maximum lifespan: Default 2 hours

     */

    @TableField(value = "maxage")

    private Integer maxage;

    /**

     * Creation time:

     */

    @TableField(value = "create_time")

    private Timestamp createTime;

    /**

     * 更新时间:

     */

    @TableField(value = "update_time")

    private Timestamp updateTime;

    /**

     * 用户信息

     */

    @TableField(value = "user_id")

    private Integer user_id;

}

   

   用户注册,在用户注册页面通过填写用户名、密码、姓名、手机、邮箱、地址等信息完成用户注册,如图5-2所示。在个人中心页面通过填写用户名、密码、姓名、性别、上传图片、手机、邮箱、地址等信息进行信息更新,如图5-3所示。

图5-2用户注册界面图

注册代码如下:

  /**

     * 注册

     * @return

     */

    @PostMapping("register")

    public Map<String, Object> signUp(HttpServletRequest request) throws IOException {

        // 查询用户

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

        Map<String,Object> map = service.readBody(request.getReader());

        query.put("username",String.valueOf(map.get("username")));

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

        if (list.size()>0){

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

        }

        map.put("password",service.encryption(String.valueOf(map.get("password"))));

        service.insert(map);

        return success(1);

}

    public Map<String,Object> readBody(BufferedReader reader){

        BufferedReader br = null;

        StringBuilder sb = new StringBuilder("");

        try{

            br = reader;

            String str;

            while ((str = br.readLine()) != null){

                sb.append(str);

            }

            br.close();

            String json = sb.toString();

            return JSONObject.parseObject(json, Map.class);

        }catch (IOException e){

            e.printStackTrace();

        }finally{

            if (null != br){

                try{

                    br.close();

                }catch (IOException e){

                    e.printStackTrace();

                }

            }

        }

        return null;

    }

    public void insert(Map<String,Object> body){

        E entity = JSON.parseObject(JSON.toJSONString(body),eClass);

        baseMapper.insert(entity);

        log.info("[{}] - 插入操作:{}",entity);

}

图5-3个人中心界面图

图书商城,在图书商城息页面可以查看图书名称、分类、图片、作者、价格、数量、出版社等详细内容,还可以进行购买或收藏等操作,如图5-4所示。

图5-4图书商城界面图

图书资讯,在图书资讯页面可以查看资讯标题、类型、图片、发布日期等详细内容,还可以进行评论或收藏等操作,如图5-5所示。

图5-5图书资讯界面图

5.2管理员功能模块

管理员登录,通过填写注册时输入的账号、密码、角色进行登录,如图5-6所示。

图5-6管理员登录界面图

代理代码如下:

   /**

     * 登录

     * @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;

        QueryWrapper wrapper = new QueryWrapper<User>();

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

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

            map.put("username", username);

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

        }

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

            map.put("email", email);

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

        }

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

            map.put("phone", phone);

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

        }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.selectBaseList(userGroupService.select(groupMap, new HashMap<>()));

        if (groupList.size()<1){

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

        }

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

        //查询用户审核状态

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

            String res = service.selectExamineState(userGroup.getSourceTable(),byUsername.getUserId());

            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, "账号或密码不正确");

        }

}

    public String 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 sql.toString();

}

    public List selectBaseList(String select) {

        List<Map<String,Object>> mapList = baseMapper.selectBaseList(select);

        List<E> list = new ArrayList<>();

        for (Map<String,Object> map:mapList) {

            list.add(JSON.parseObject(JSON.toJSONString(map),eClass));

        }

        return list;

}

管理员登录进入网上书店管理系统可以查看后台首页、站点管理(轮播图、公告栏)用户管理(管理员、系统用户)内容管理(交流论坛、论坛分类、图书资讯、资讯分类)商城管理(图书商城、分类列表、订单列表)更多管理(反馈中心)等信息,还可以根据需要进行修改或删除等详细操作,如图5-7所示。

图5-7管理员系统功能界面图

用户管理,在用户管理页面中可以查看用户名、密码、姓名、性别、头像、手机、邮箱、地址等信息,并可根据需要进行修改或删除等操作,如图5-8所示。

图5-8用户管理界面图

图书分类管理,在图书分类管理页面中可以查看分类信息,并可根据需要进行修改或删除等详细操作,如图5-9所示。

图5-9图书分类管理界面图

图书信息管理,在图书信息管理页面中可以查看图书名称、分类、图片、作者、价格、数量、出版社等内容,并且根据需要进行修改或删除等详细操作,如图5-10所示。

图5-10图书信息管理界面图

订单信息管理,在订单信息管理页面中可以查看订单编号、图书名称、分类、图片、价格、数量、总价格、购买日期、买家、用户名、手机、地址、备注、是否支付、审核回复、审核等内容,并且根据需要进行发货、修改或删除等详细操作,如图5-11所示。

图5-11订单信息管理界面图

系统公告管理,在系统公告管理页面中可以查看公告标题、类型、图片、发布日期等内容,并且根据需要进行修改或删除等详细操作,如图5-12所示。

图5-12系统公告管理界面图

6章  系统测试

6.1系统测试的目的

程序设计不能保证没有错误,这是一个开发过程,在错误或错误的过程中都是难以避免的。虽然这是不可避免的,但我们不能使这些错误始终存在于系统中,错误可能会造成无法估量的后果,如系统崩溃,安全信息泄露,系统无法正常启动等,为了避免这些问题,我们需要测试程序,再测试过程中发现问题,并纠正它们,从而使系统更长时间稳定成熟。本章的作用是发现这些问题,并对其进行修改,虽然耗时费力,但对于长期使用而言是非常重要和必要系统的开发。

软件在设计后必须进行测试,调试过程中使用的方法是软件测试方法。在开发新软件时,系统测试是检查软件是否合格的关键步骤,以及是否符合设计目标的参考。测试主要是查看软件中数据的准确性,正确的操作与否,以及操作的结果,还有哪些方面需要改进。

网上书店管理系统的实现,对于系统中功能模块的实现及操作都必须通过测试进行来评判系统是否可以准确的实现。在网上书店管理系统正式上传使用之前必须做的一步就是系统测试,对于测试发现的错误及时修改处理,保证系统准确无误的供给用户使用。

6.2系统测试方法

在对网上书店管理系统进行测试的时候在找到问题的情况下必须在第一时间找到解决问题的办法,不要存在侥幸的心理,这样才能让网上书店管理系统开发的质量可以过关,并且开发的周期会大大缩短,还有就是在测试时,不要出现重复性的错误,遇到一个错误问题,要将整个网上书店管理系统开发所牵扯的该问题都必须一一解决,提高网上书店管理系统平台的安全性、稳定性。

白盒测试与黑盒测试是测试中比较常用的两种方法。

①结构测试俗称白盒测试:这种测试是在对程序的处理过程与结构都有详尽谅解的前提下,顺从程序内部的逻辑而完成的系统测试,以确定系统中所有的通路都能够遵照设计要求正常工作,不出现任何偏差。

②功能测试又成黑盒测试:主要是针对程序功能能够按照设计正常实现的一种检测,在程序接口处进行,检测程序手法数据是否正常,与外部信息的交换是否完整。

6.3功能测试

用户登录测试:

模块名称

测试用例

预期结果

实际结果

是否通过

登录模块

用户名:admin   密码:123  

弹出错误提示,提示密码错误

弹出错误提示,提示密码错误

通过

登录模块

用户名:123   

密码:admin   

弹出错误提示,提示用户名错误

弹出错误提示,提示用户名错误

通过

登录模块

用户名:admin   

密码:admin   

管理员登录成功

管理员登录成功

通过

删除分类测试:

模块名称

测试用例

预期结果

实际结果

是否通过

删除分类模块

分类名:最新通知  

删除成功、页面自动跳转

删除成功、页面自动跳转

通过

修改密码测试:

模块名称

测试用例

预期结果

实际结果

是否通过

修改密码模块

原密码:666

新密码:123

确认密码:123  

弹出错误提示,提示原密码错误

弹出错误提示,提示原密码错误

通过

修改密码模块

原密码:admin   新密码:123

确认密码:333  

弹出错误提示,提示确认密码不一致

弹出错误提示,提示确认密码不一致

通过

修改密码模块

原密码:admin   新密码:123

确认密码:123  

密码修改成功

密码修改成功

通过

通过对功能的测试,网上书店管理系统的基本功能都是可行的,不管是系统里面的功能,还是界面的设计都是可值得推广宣传的。

结  论

此时项目已经完成,即使实施的时间不是很长,但是这个过程中需要准备很长的一段时间去对系统设计开发所实际到的技术进行学习。在学习的过程中,我逐渐认识得到了我自身存在的一些不足。对于一些控制是必要的应用技能,能够理解,整个过程中仅仅是一个掌握了常用的性能和控制方法,我觉得挺容易的。从该系统中,系统的分析和设计的调查数据,并且已经经历了几个月,并努力几个月,该系统已经完成。很显然,该系统仍有很多不成熟,在系统设计过程中有许多技术缺陷存在。在设计的过程中也涉及到了很多自己无法解决的问题,主要通过找专业的网站和论坛来解决这些问题,对于圆满完成我的毕业设计,他们也贡献了很大一部分力量。系统的开发环境和配置都是可以自行安装的,系统使用Java开发工具,使用比较成熟的Mysql数据库进行对系统前台及后台的数据交互,根据技术语言对数据库,结合需求进行修改维护,可以使得系统运行更具有稳定性和安全性,从而完成实现系统的开发。

回顾毕业设计的整个过程,既付出汗水也收获了很多。虽然经历了各种各样的困难,自己的不断研究探索,系统的实现仍有不足之处。

在以后的学习及工作中,我仍然继续学习计算机方面的技术,让我在后期的平台开发中可以更好更快的实现需求功能。我相信我可以让更多的好工作,做出更大的贡献。


致  谢

网上书店管理系统的完成,如何实现的更好,其中付出的努力是很大的,这段时光将会终身难忘。

首先要感谢我的指导老师,谢谢您在设计和论文中给我的指导。在您的细心指导下我才能快速的掌握系统的相关功能,在您的大力帮助下我才能将课本上的知识与自己的项目结合,真正的做到学以致用。感谢您经常牺牲自己的休息时间,利用其丰富的教学和项目经验对我进行指导。

感谢所有教过我的老师,为我倾注了大量的心血,正是你们的谆谆教诲、严谨教学才使我能顺利的完成学业,再此向你们表示深深的感谢。

感谢我的同学们,对我的大力支持及帮助,正是你们不断的帮助、鼓励,给我带来了极大的动力,最终系统可以顺利的运行。我们在交流、谈论的这段时间,将是我未来的财富,我要深深地感谢你们!

毕业在即,在今后的工作和生活中,我会铭记师长们的教诲、同学们的帮助,继续不懈努力和追求,来报答所有支持和帮助过我的人!。

参考文献

[1]刘学玉.JAVA编程语言在计算机软件开发中的应用[J].电子技术与软件工程,2022(01):57-60.

[2]王宇,夏丽丽,何颖刚.基于SSM框架的高校毕业论文管理系统的设计与实现[J].电子技术与软件工程,2021(22):26-29.

[3]吴迪.Java编程语言在计算机软件开发中的应用[J].信息与电脑(理论版),2021,33(20):29-31.

[4]刘茜颖,张艳红.基于SSM的线上教育系统设计与实现[J].电脑编程技巧与维护,2021(10):45-46+59.DOI:10.16184/j.cnki.comprg.2021.10.017.

[5]曹瑞燕.Java语言在软件开发中的应用[J].信息记录材料,2021,22(10):96-97.DOI:10.16009/j.cnki.cn13-1295/tq.2021.10.045.

[6]罗权,李境达,刘勇奇,万仕荣,金幸庆,郑登广.Java语言的乡村旅游软件设计[J].电子世界,2021(17):170-171.DOI:10.19353/j.cnki.dzsj.2021.17.069.

[7]杜继明.Java语言中的图像处理[J].信息记录材料,2021,22(09):124-125.DOI:10.16009/j.cnki.cn13-1295/tq.2021.09.058.

[8]张彦芳,靳继红.基于JSP的网上书店管理系统设计[J].信息技术与信息化,2021(08):110-112.

[9]Jun Ma, Jun Mao, Long Chen , Lili Yin. Design and Implementation of Multi-terminal Debugging System based on SSM Framework[J]. International Core Journal of Engineering,2021,7(7):

[10]蔡俊豪,王桂荣.Java在互联网的应用分析[J].电子技术,2021,50(06):44-45.

[11]林国富,段润英.Java语言程序设计课程教学改革探究[J].科学咨询(教育科研),2021(06):110-111.

[12]曹华山.SSM框架在Web应用开发中的设计与实现[J].无线互联科技,2021,18(11):108-109.

[13]陈钊.SSM框架在Web应用开发中的设计与实现研究[J].电脑知识与技术,2021,17(10):226-227.DOI:10.14004/j.cnki.ckt.2021.1097.

[14]Xiaojie Guo,Tingmei Wang*. Design and Implementation of Graduate Information Management System Based on SSM Framework[J]. Journal of Simulation,2020,8(2):

[15]Hu Xin,Yan Chaobing. Development and application of JAVA language development test evaluation system software[J]. Journal of Computational Methods in Sciences and Engineering,2020,20(4):

[16]孟敏,张卓云.基于JSP技术网上书店管理系统的设计与实现[J].河北软件职业技术学院学报,2020,22(01):7-11.DOI:10.13314/j.cnki.jhbsi.2020.01.003.

[17]于虹,甄彤,祝玉华.浅析网上书店的实现[J].福建电脑,2019,35(07):71-73.DOI:10.16707/j.cnki.fjpc.2019.07.024.

[18]秦佳.基于MVC模型的网上书店管理系统设计与实现[J].电子技术与软件工程,2019(05):44.

[19]Ankali Sanjay B,Parthiban Latha. Dictionary Based Approach to Detect Cross Language Clones of C and Java Language[J]. Journal of Computational and Theoretical Nanoscience,2018,15(11):

[20] Li Fengxiang. Development and design of online bookstore management system [J]. Wireless Internet Technology, 2018, 15(07): 52-53.

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

Guess you like

Origin blog.csdn.net/ID3461074420/article/details/134854763