Springboot+Mysql agricultural product sales management system source code 47627

Graduation project for undergraduate students

Springboot agricultural product sales management system

                Department name: School of Computer Science and Technology        

professional class:                            

student name:                           

Coaching sports:                           

job title:                            

Summary

With the advent of the Internet trend, all walks of life are considering using the Internet to promote themselves. The best way is to establish their own Internet system and maintain and manage it. In actual application, the working rules and development steps of the software are applied, and Java technology is used to build an agricultural product sales management system.

This design mainly implements an agricultural product sales management system that combines the advantages of humanization, high efficiency, and convenience, and completes functional modules such as product mall, product orders, product group purchasing, group buying information, and group shipping. The system communicates with the server through the browser to realize data interaction and changes. Just use a computer and move your fingers to operate the system and realize data communication management. The design process of the entire system fully considers issues such as data security, stability and reliability, and the operation process is simple. This system improves work efficiency and reduces errors and omissions in data storage through scientific management methods and convenient services.

The agricultural product sales management system uses Java language, is developed using springboot technology based on the MVVM model, and is written using the Eclipse compiler. In terms of data, Microsoft's MySQL relational database is mainly used as the data storage medium, and the front-end CSS technology is used to complete the development of the system. .

Keywords: Java development language; springboot framework technology; agricultural product sales management system;

Abstract

With the advent of the Internet trend, various industries are considering using the Internet to promote themselves. The best way is to establish their own Internet system, and maintain and manage it. In practical application, the working rules and development steps of the application software are used to build an agricultural product sales management system using Java technology.

This design mainly implements an agricultural product sales management system that integrates the advantages of humanization, efficiency, and convenience, and completes functional modules such as product mall, product order, product group purchase, group information, and group shipment. The system communicates with the server through a browser to achieve data interaction and change. You can operate the system by moving your fingers through a computer to achieve data communication management. The entire system design process fully considers the issues of data security, stability, and reliability, and the operation process is simple. This system improves work efficiency and reduces errors and omissions in data storage through scientific management methods and convenient services.

The agricultural product sales management system uses Java language, uses spring boot technology based on MVVM mode for development, and uses Eclipse compilers to write. In terms of data, it mainly uses Microsoft's MySQL relational database as the data storage medium, and cooperates with front-end CSS technology to complete the system development.

Key words:Java development language; Spring boot framework technology; Agricultural product sales management system;

Table of contents

Chapter 1 Introduction

1.1 Topic selection background 

1.2 Significance of the topic 

Chapter 2 Introduction to Related Technologies

2.1 B/S architecture

2.2 Introduction to springboot framework

2.3 MySQL database

Chapter 3 System Analysis

3.1  Feasibility analysis

3.1.1  Technical feasibility

3.1.2  Economic feasibility

3.1.3  Operational feasibility

3.2  System functional requirements

3.3  System performance requirements

Chapter 4 System Design

4.1  Overall goal

4.2  Overall structural design

4.3  Function module design

4.4  Database design

4.4.1  Concept design

4.4.2  Logic design

Chapter 5 System Implementation

5.1  Implementation of login module

5.2 Implementation of registration module 

5.3 Implementation of comment module 

5. 4 Implementation of product mall collection module 

5.5 Implementation of announcement management module 

5.6 Implementation of user management module 

5. 7 Implementation of product group purchase management module

5. 8 Implementation of product group purchase management module

Chapter 6 System Testing

6.1  Test purpose

6.2  Test cases

6.2.1 User login test 

6.2.2  Create data test

6.2.3  Modify data test

6.2.4  Query data test

6.3  Test results

Chapter 7 Conclusion

references

Acknowledgments

  1. introduction
    1. Background

Since the creation of the universe, everything has been constantly progressing, updating and eliminating the weak. Now, people have entered the Internet God Century, and more and more things and jobs can be replaced and executed online with data streams. There is no need to show up and go out to do things in person as before, and there is no need to walk on the streets to hand out leaflets to inform people as before. These paper carriers are slowly being eliminated due to their own shortcomings. They consume high paper and cost money to be published in journals. The fee-for-money option requires advance booking, which wastes people's time and energy and is gradually being phased out. Therefore, the method of saving time and energy by using data flow on the Internet to convey information and needs and then select the needs has been greatly accepted by people. In a short period of time, the Internet has become a mainstream communication method accepted by the world. The purpose of this graduation project is to provide farmers with a convenient way to sell and buy agricultural products, and to use development tools to create a system that satisfies both customers and users.

    1. The significance of the topic

In the current era, people have deeply felt the impact of the craze of the Internet information revolution. Breakthroughs in information and technology have made space distance no longer a limitation, truly realizing the ideal of a global village. The modern information network advertised by the Internet is rapidly expanding, and its radiation field has also expanded from a single exchange of information to all aspects of people's lives. From this general trend, we conclude that with the huge spread of information resources on the Internet, a new network-based information communication and exchange is gradually taking shape, which has brought huge benefits to you, yourself, others and even the world. The impact is both an opportunity and a challenge.

I searched for data in this area on the Internet and found that the confidence penetration rate in rural areas is very low. Farmers don't know how to use mobile phones. At most, they only make calls and send text messages. They usually don't know how to surf the Internet, let alone think of using the Internet. To sell the fruits of their labor - agricultural products, this undoubtedly greatly wastes the fruits of farmers' labor and national resources, and also greatly dampens people's enthusiasm for production and labor. Therefore, a system that can solve problems for farmers came into being. The development of this graduation project not only provides an online way for farmers to sell their agricultural products, saving them energy, time and money from having to go to the vegetable market in person or pushing a tricycle to the street to sell vegetables, but also makes it easier to buy Housewives who want to buy vegetables don’t have to spend a lot of time going to physical stores to purchase, which saves money and energy. This is definitely the system that farmers consider most useful and meets their expectations.

  1. Introduction to related technologies
    1. B/S architecture

B/S architecture (browser/server) is currently the most widely used architecture, which can make system development, operation, and maintenance easy. You can use this structure when you have a database installed on your computer and a few very common browsers. The B/S structure can be directly used in the B/S system, and the B/S structure can greatly reduce the operation and maintenance of the system in practical applications. On the B/S platform, each database is independent of each other and has high security. Because the B/S architecture can clearly observe the business handled by the system, managers can make timely decisions, thereby avoiding corporate losses. The essential feature of the B/S architecture is centralized management. Users store the data generated by the system into the database to facilitate future applications, thereby meeting various needs.

The B/S model consists of three levels: a browser, a network server, and a database server. Data management adopts the presentation layer, application layer and data layer of most existing B/S systems. The Web browser is designed to meet user requirements and is an intermediate application layer used in data processing and logic processes, thus Form a distributed operating model. The logic of the B/S architecture is that the processing completed on the front end leaves the main business logic to the backend, while the front end is only responsible for a small number of requests, rendering, etc. Due to the rapid development of Internet technology, the B/S architecture makes the system accessible at any time and anywhere.

 

Figure 2-1 Three-layer structure diagram of B/S mode

    1. Introduction to springboot 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.

    1. 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 a database, and this logistics information management system 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.

  1. system analysis
    1. Feasibility Analysis

Feasibility analysis is also to analyze whether the project's development system is valuable for development, and whether it is really necessary to improve the management system's shortcomings in information dictation. Taking the design goals and implementation process of the agricultural product sales management system of this project as an example, if this system is developed, it is hoped that the user's management information problem can be solved well, and if this enables the agricultural product sales management system to develop the maximum value theory, and also It can solve users' problems to a certain extent in disguised form, so the research and development system of this project is the most valuable and meaningful system. But have the R&D goals achieved the desired results, and whether the scientific research tasks have the greatest utility and value after they are realized, and whether they are equal to all total costs. Therefore, the R&D stage is essentially the stage where the R&D system can be truly designed.

      1. technical feasibility

Technical feasibility means that the identified science and technology or the science and technology in decision-making methods do not break through the boundaries of the scientific and technological resources mastered by the organization or familiar to relevant personnel. In the process of technology research, attention should be paid to comprehensively investigating various key technical issues included in the system development process, selecting mature technologies as much as possible, carefully citing advanced technologies, paying attention to specific research platforms and developers, and evaluating the effectiveness of key technologies.

Java technology is key to the design and implementation of this agricultural product sales management system. Based on B/S architecture and MySQL database management, it is crucial for front-end applications and back-end database management. In order to effectively apply this program , it is necessary to maintain the characteristics of comprehensive functions, easy to understand and simple to use. When building database management, it is necessary to ensure that the data analysis information is complete, the data analysis information is stable, and the data analysis information is highly stable. In the early days, people had understanding and familiarity with the basic important knowledge points of Java. They had a brief grasp and familiarity with the MySQL database. In the early days, they had a general grasp and practice of basic courses such as software engineering testing and UML language. After By practicing the above courses, you will be able to develop, test and judge the corresponding information systems for the above courses.

Java can be combined with MySQL to develop an agricultural product sales management system, which must be reasonable and effective.

      1. economic feasibility

The feasibility of implementing the national economy mainly includes two aspects: first, the potential possibility of obtaining and utilizing various resources of the national economy from a certain plan to be implemented; second, the potential possibility of achieving the overall goal of the national economic development policy; second, the potential possibility of achieving the overall goal of the national economic development policy; It refers to the economic costs and benefits obtained in order to complete a certain national economic development policy implementation plan. Since the government's financial resources are limited, each financial resource obtained and utilized from the national economic development policy implementation plan is also limited. Therefore, every public policy measure faces a competition for public financial capital. But in general, "the occupation of social and economic resources of public policy measures is directly proportional to the expected value of its policy measure goals." Of course, this also touches on a cost-efficiency question. If the total cost of a certain method is equal to the profit, it is obvious that this socioeconomic policy measure is ineffective.

The original intention of developing this project was to save money. I did it by myself and basically did not need start-up capital. In addition, the entire process of project development is a self-study process, which is a win-win result. Therefore, in summary, the R&D advantages of this project outweigh the disadvantages, which is in line with the actual development of my country's current socialist market economy.

      1. operational feasibility

The registration and login page of the agricultural product sales management system is designed to be simple and easy to use. You can log in to the page through the most common page window, and use a computer to realize the login function. Therefore, users can log in as long as they usually use a computer. The R&D work environment of this operating system uses Java technology and the B/S structure. These R&D work environments make the system more complete, make the entire design more personalized, and make the user functions more concise and convenient. This management system has the advantages of easy operation, easy management, good interactivity, and is also very simple in actual operation. Therefore, this management system can also be designed commercially.

To sum up, the research and development of this equipment meets the technical, process and technical requirements, so its research and development is operable.

    1. System functional requirements

A common user information use case diagram is shown below.

Figure 3-1 Common user information use case diagram

The administrator use case diagram is shown below.

Figure 3-2 Administrator use case diagram

Table 3-1 Announcement browsing use case description

Description item

illustrate

Use case name

Announcement inquiry

Use case description

Users can view the details of the announcement

participants

user

Preconditions

The user is an ordinary user type and successfully entered the system

postcondition

Browse successfully

main event flow

(1) Users can browse the announcement modules and announcement contents

(2) Users can click on the announcement to read the announcement in detail.

Exception event flow

e1. Report 500 error

e2. Database connection exception

Table 3-1 Personal information management use case description

Use case name

Manage and modify personal information

participants

user

describe

Users view and modify personal information

Preconditions

The user is logged into the system

postcondition

none

event stream

(1) Users view personal information

(2) Users modify personal information

Additional information

(a) Users can change passwords

(b) Users can modify personal information, such as name, avatar, etc.

Table 3-1 Comment use case description

Use case name

Comment

participants

user

describe

User comments

Preconditions

User is logged in

postcondition

The content of the comments does not violate the rules

event stream

(1) Enter the comment data on the comment page and submit the comment

(2) Update and display the comment board

Additional information

(a) Comment content cannot be empty

Table 3-1 Collection use case description

Use case name

collect

participants

user

describe

User adds content to favorites

Preconditions

User is logged in

postcondition

none

event stream

(1) Add to favorites on the favorites page

(2) Update and display favorites

Additional information

none

Table 3-1 User management use case description

Description item

illustrate

Use case name

User action

Use case description

The administrator can manage users under the condition that the administrator correctly logs in to the background management.

participants

administrator

Preconditions

The administrator logs in successfully and jumps to the main background interface.

postcondition

Successful operation

main event flow

The administrator jumps to the user management page to query user details.

Administrators can delete user information

Exception event flow

e1. Report 500 error

e2. Database connection exception

Table 3-1 Product order management use case description

Description item

illustrate

Use case name

Product order operations

Use case description

The administrator can manage the product order module under the condition that the administrator correctly logs in to the backend management.

participants

administrator

Preconditions

Administrator successfully logged in

postcondition

Successful operation

main event flow

(1) The administrator enters the product order management page to query product order information

(2) Administrators can add, delete and edit product orders

(3) The administrator adds a new product order and jumps to the query page if the addition is successful.

Exception event flow

e1. Report 500 error

e2. Database connection exception

Table 3-1 Product group purchase management use case description

Description item

illustrate

Use case name

Product group purchasing operation

Use case description

The administrator can manage the product group purchasing module under the condition that the administrator correctly logs in to the backend management.

participants

administrator

Preconditions

Administrator successfully logged in

postcondition

Successful operation

main event flow

(1) The administrator enters the product group purchase management page and queries product group purchase information.

(2) Administrators can add, delete and edit product group purchases.

(3) The administrator adds a new product for group purchase, and jumps to the query page if the addition is successful.

Exception event flow

e1. Report 500 error

e2. Database connection exception

Table 3-1 Product mall management use case description

Description item

illustrate

Use case name

Product mall operation

Use case description

The administrator can manage the product mall module under the condition that the administrator correctly logs in to the backend management.

participants

administrator

Preconditions

Administrator successfully logged in

postcondition

Successful operation

main event flow

(1) The administrator enters the product mall management page and queries the product mall information.

(2) Administrators can add, delete and edit product malls

(3) The administrator adds a new product mall and jumps to the query page if the addition is successful.

Exception event flow

e1. Report 500 error

e2. Database connection exception

Table 3-1 Information management use case description

Description item

illustrate

Use case name

information operations

Use case description

Under the premise that the administrator correctly logs in to the background management, the information module can be managed.

participants

administrator

Preconditions

Administrator successfully logged in

postcondition

Successful operation

main event flow

(1) The administrator enters the information management page to query information about the information content.

(2) Administrators can delete information

Exception event flow

e1. Report 500 error

e2. Database connection exception

Table 3-1 Announcement management use case description

Use case name

Announcement management

participants

manager

describe

Managers provide functions such as adding, modifying, deleting, and reviewing

Preconditions

  1. Administrator successfully logs into the system
  2. Administrators can only modify and delete existing announcements

postcondition

none

event stream

(1) Administrators view modification announcements

(2) Manager adds announcement

(3) Manager deletes announcement

Additional information

(a) If the newly added announcement does not meet the requirements, the addition will fail.

(b) If the modified announcement does not meet the requirements, the modification will fail.

Table 3-1 Comment management use case description

Description item

illustrate

Use case name

Comment operation

Use case description

Under the condition that the administrator correctly logs in to the background management, the comment module can be managed.

participants

administrator

Preconditions

Administrator successfully logged in

postcondition

Successful operation

main event flow

(1) The administrator enters the comment management page and queries the information about the comment content.

(2) Administrators can delete data from user comments

Exception event flow

e1. Report 500 error

e2. Database connection exception

Table 3-1 File upload use case description

Use case name

File Upload

participants

user

describe

User uploads files to server

Preconditions

User is logged in

postcondition

none

event stream

Click the "Upload" button on the file upload page

Additional information

none

    1. System performance requirements

First, friendly interface. In the development and design of agricultural product sales management system, the friendliness of the interface is more important. Only by meeting this requirement can it reflect the humanized design characteristics and adapt to the convenience of user application system. The dynamic human-computer interaction design allows users to feel the experience when applying the system. Convenience of operation and improved user experience can help fully bring out the value of system mining design.

第二,稳定性要求。开发设计的农产品销售管理系统,需要保持其稳定,系统应用稳定才能有助于各项管理工作高效率完成,提升系统使用体验度。系统运行保障因外部异常造成系统崩溃,系统发生问题后数据能及时备份,第一时间恢复数据信息,保障系统良好运行。

第三,可扩展性。农产品销售管理系统的开发设计,需要满足可扩展性的要求,系统的设计需要考虑未来系统业务扩展问题,在测试不断应用下,功能需求会不断扩展,通过良好扩展性作用发挥,满足多样化的需要。

第四,满足需求。为能有效加强对大用户的需求,在开发农产品销售管理系统的过程中,要能和实际应用的需求紧密对接,保障系统的实用性。系统开发要能有前瞻性,由于管理系统建设是长期工程,不同阶段需要有先导发展蓝图以及行动纲领为指导。预见性地考虑教材订购信息管理的重要问题。系统的开发要能满足灵活性应用的需要,将系统的价值充分发挥出来。

  1. 系统设计
    1. 总体目标

农产品销售管理系统主要服务于农产品销售管理系统管理,利用网络改变农产品销售管理系统模式,简化农产品销售管理系统管理流程,减轻传统农产品销售管理系统带来的工作负担和降低大量资源的消耗。本系统达到的目标主要有以下几点:

(1)通过简单的页面设计和便捷的功能操作,保证系统的简单性和实用性,形成良好的用户体验。

(2)本系统主要针对农产品销售管理系统需求进行设计开发,突出较强的针对性。

(3)能够具有一定的安全机制,保证问题记录的安全性。

    1. 总体结构设计

层次框图是一系列由多层矩形框架组成的树,其顶部为矩形框架,表示整个数据结构,下方的长方形立方体表示独立的数据,下方的长方形表示该数据的实际数据(不能进行分割)。由于这个架构的精炼,层级方块图描述的资料结构也愈加详尽,这个模型很好地满足了需求分析的要求。首先对最上层的信息进行分类,然后在图表中的每个路径上重复地进行优化,直至完整的数据结构被确定。

这个系统由两个模块组成,一个是管理员,二个是普通用户,这二个部分看起来是独立的,实际上却是连接着数据库,每个模块都有自己的权限,唯一不同的,就是访问的方式不同。在调研资料的基础上,完成了各个模块的功能。在对上述功能进行分析的基础上,本系统提出了两个主要的模块,每个单元可划分为若干小单元。

系统的功能结构图如下图所示。

 

图4-2 系统功能结构图

    1. 功能模块设计

1.登录模块:

本农产品销售管理系统的用户登录涉及到三类信息的判断:第一类是用户名和密码是否为空;第二类是验证码是否录入和正确;第三类就是用户登录信息、验证码和权限是否匹配通过。在该用户登录流程对会对用户名和密码是否为空进行判断,以及验证码是否正确进行判断,只有以上的几类信息中的一种存在问题的情况下都是无法登录成功的。

2.公告管理模块:

本农产品销售管理系统中的公告管理,管理方式都是对信息的三种基本操作:一种是完成公告信息的添加,在这里会对公告信息的录入情况来判断;一种是对公告信息的修改,另一种就是对公告信息的删除。其后两种操作都是要建立在第一种操作而生成的公告列表的基础上完成的。

3.产品团购管理模块

本农产品销售管理系统中的产品团购管理,管理方式都是对信息的三种基本操作:一种是完成产品团购信息的添加,在这里会对产品团购信息的录入情况来判断;一种是对产品团购信息的修改,另一种就是对产品团购信息的删除。其后两种操作都是要建立在第一种操作而生成的产品团购列表的基础上完成的。

4.产品商城模块

本农产品销售管理系统中的产品商城管理,管理方式都是对信息的三种基本操作:一种是完成产品商城的添加,在这里会对产品商城的录入情况来判断;一种是对产品商城的修改,另一种就是对产品商城的删除。其后两种操作都是要建立在第一种操作而生成的产品商城的基础上完成的。

    1. 数据库设计
      1. 概念设计

借助先进的系统,ER图使其他用户可以快速轻松地了解系统的功能以及他们之间的关系。根据农产品销售管理系统分析结果,整个农产品销售管理系统包括以下各个单元:用户、产品商城、产品团购、产品订单、拼团信息等。

系统的主要实体间关系E-R图如下图所示。

 

图4-3 总体ER图

      1. 逻辑设计

所有系统的应用数据相互区分。一旦在相应的系统中实现,它们将与自己相应的网络和服务器通信。所以这个系统可以连接这些数据。当我们选择桥梁截面时,以下将简要介绍如何建立系统。在单击上一个按键的时候,就会自动在对话框中弹出数据源的名字,之后再单击下一个按键时,就在填写相对应的身份验证和登录信息。按照系统功能设计的特点与职能模块的分类,农产品销售管理系统的总体设计和实施过程一共涉及到了几个资料表格。

以下就介绍了一些根据各类别主要数据库表的设计结构以及基本功能建立数据库

表bulk_shipment (拼团发货)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

bulk_shipment_id

int

10

0

N

Y

拼团发货ID

2

group_number

varchar

64

0

Y

N

拼团编号

3

product_name

varchar

64

0

Y

N

产品名称

4

product_type

varchar

64

0

Y

N

产品类型

5

group_purchase_price

int

10

0

Y

N

0

团购价格

6

group_user

int

10

0

Y

N

0

拼团用户

7

user_name

varchar

64

0

Y

N

用户姓名

8

user_phone

varchar

64

0

Y

N

用户电话

9

user_address

varchar

64

0

Y

N

用户地址

10

number_of_groups

varchar

64

0

Y

N

拼团数量

11

delivery_status

varchar

64

0

Y

N

配送状态

12

signing_status

varchar

64

0

Y

N

签收状态

13

recommend

int

10

0

N

N

0

智能推荐

14

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

15

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表collect (收藏)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

collect_id

int

10

0

N

Y

收藏ID:

2

user_id

int

10

0

N

N

0

收藏人ID:

3

source_table

varchar

255

0

Y

N

来源表:

4

source_field

varchar

255

0

Y

N

来源字段:

5

source_id

int

10

0

N

N

0

来源ID:

6

title

varchar

255

0

Y

N

标题:

7

img

varchar

255

0

Y

N

封面:

8

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

9

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表comment (评论)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

comment_id

int

10

0

N

Y

评论ID:

2

user_id

int

10

0

N

N

0

评论人ID:

3

reply_to_id

int

10

0

N

N

0

回复评论ID:空为0

4

content

longtext

2147483647

0

Y

N

内容:

5

nickname

varchar

255

0

Y

N

昵称:

6

avatar

varchar

255

0

Y

N

头像地址:[0,255]

7

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

9

source_table

varchar

255

0

Y

N

来源表:

10

source_field

varchar

255

0

Y

N

来源字段:

11

source_id

int

10

0

N

N

0

来源ID:

表group_information (拼团信息)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

group_information_id

int

10

0

N

Y

拼团信息ID

2

group_number

varchar

64

0

Y

N

拼团编号

3

product_name

varchar

64

0

Y

N

产品名称

4

product_type

varchar

64

0

Y

N

产品类型

5

group_purchase_price

int

10

0

Y

N

0

团购价格

6

group_user

int

10

0

Y

N

0

拼团用户

7

user_name

varchar

64

0

Y

N

用户姓名

8

user_phone

varchar

64

0

Y

N

用户电话

9

user_address

varchar

64

0

Y

N

用户地址

10

number_of_groups

varchar

64

0

Y

N

拼团数量

11

pay_state

varchar

16

0

N

N

未支付

支付状态

12

pay_type

varchar

16

0

Y

N

支付类型: 微信、支付宝、网银

13

recommend

int

10

0

N

N

0

智能推荐

14

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

15

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表hits (用户点击)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

hits_id

int

10

0

N

Y

点赞ID:

2

user_id

int

10

0

N

N

0

点赞人:

3

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

4

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

5

source_table

varchar

255

0

Y

N

来源表:

6

source_field

varchar

255

0

Y

N

来源字段:

7

source_id

int

10

0

N

N

0

来源ID:

表notice (公告)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

notice_id

mediumint

8

0

N

Y

公告id:

2

title

varchar

125

0

N

N

标题:

3

content

longtext

2147483647

0

Y

N

正文:

4

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

5

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表ordinary_users (普通用户)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

ordinary_users_id

int

10

0

N

Y

普通用户ID

2

user_name

varchar

64

0

Y

N

用户姓名

3

user_gender

varchar

64

0

Y

N

用户性别

4

user_age

varchar

64

0

Y

N

用户年龄

5

examine_state

varchar

16

0

N

N

已通过

审核状态

6

recommend

int

10

0

N

N

0

智能推荐

7

user_id

int

10

0

N

N

0

用户ID

8

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

9

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表praise (点赞)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

praise_id

int

10

0

N

Y

点赞ID:

2

user_id

int

10

0

N

N

0

点赞人:

3

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

4

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

5

source_table

varchar

255

0

Y

N

来源表:

6

source_field

varchar

255

0

Y

N

来源字段:

7

source_id

int

10

0

N

N

0

来源ID:

8

status

bit

1

0

N

N

1

点赞状态:1为点赞,0已取消

表product_group_purchase (产品团购)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

product_group_purchase_id

int

10

0

N

Y

产品团购ID

2

group_number

varchar

64

0

N

N

拼团编号

3

product_name

varchar

64

0

Y

N

产品名称

4

product_type

varchar

64

0

Y

N

产品类型

5

group_purchase_price

int

10

0

Y

N

0

团购价格

6

number_of_participants

int

10

0

Y

N

0

拼团人数

7

number_of_people_remaining

int

10

0

Y

N

0

剩余人数

8

product_labeling

varchar

64

0

Y

N

产品标签

9

product_description

varchar

64

0

Y

N

产品描述

10

purchase_instructions

text

65535

0

Y

N

购买须知

11

product_image

varchar

255

0

Y

N

产品图片

12

product_details

longtext

2147483647

0

Y

N

产品详情

13

recommend

int

10

0

N

N

0

智能推荐

14

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

15

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表product_mall (产品商城)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

product_mall_id

int

10

0

N

Y

产品商城ID

2

product_name

varchar

64

0

Y

N

产品名称

3

product_type

varchar

64

0

Y

N

产品类型

4

product_price

int

10

0

Y

N

0

产品价格

5

product_labeling

varchar

64

0

Y

N

产品标签

6

product_description

varchar

64

0

Y

N

产品描述

7

purchase_instructions

text

65535

0

Y

N

购买须知

8

product_image

varchar

255

0

Y

N

产品图片

9

product_details

longtext

2147483647

0

Y

N

产品详情

10

recommend

int

10

0

N

N

0

智能推荐

11

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

12

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表product_order (产品订单)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

product_order_id

int

10

0

N

Y

产品订单ID

2

product_name

varchar

64

0

Y

N

产品名称

3

product_type

varchar

64

0

Y

N

产品类型

4

product_price

int

10

0

Y

N

0

产品价格

5

purchase_user

int

10

0

Y

N

0

购买用户

6

user_name

varchar

64

0

Y

N

用户姓名

7

user_phone

varchar

64

0

Y

N

用户电话

8

user_address

varchar

64

0

Y

N

用户地址

9

purchase_date

date

10

0

Y

N

购买日期

10

purchase_quantity

int

10

0

Y

N

0

购买数量

11

purchase_amount

varchar

64

0

Y

N

购买金额

12

purchase_notes

text

65535

0

Y

N

购买备注

13

delivery_status

varchar

64

0

Y

N

配送状态

14

signing_status

varchar

64

0

Y

N

签收状态

15

pay_state

varchar

16

0

N

N

未支付

支付状态

16

pay_type

varchar

16

0

Y

N

支付类型: 微信、支付宝、网银

17

recommend

int

10

0

N

N

0

智能推荐

18

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

19

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表slides (轮播图)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

slides_id

int

10

0

N

Y

轮播图ID:

2

title

varchar

64

0

Y

N

标题:

3

content

varchar

255

0

Y

N

内容:

4

url

varchar

255

0

Y

N

链接:

5

img

varchar

255

0

Y

N

轮播图:

6

hits

int

10

0

N

N

0

点击量:

7

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表upload (文件上传)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

upload_id

int

10

0

N

Y

上传ID

2

name

varchar

64

0

Y

N

文件名

3

path

varchar

255

0

Y

N

访问路径

4

file

varchar

255

0

Y

N

文件路径

5

display

varchar

255

0

Y

N

显示顺序

6

father_id

int

10

0

Y

N

0

父级ID

7

dir

varchar

255

0

Y

N

文件夹

8

type

varchar

32

0

Y

N

文件类型

表user (用户账户:用于保存用户登录信息)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

user_id

mediumint

8

0

N

Y

用户ID:[0,8388607]用户获取其他与用户相关的数据

2

state

smallint

5

0

N

N

1

账户状态:[0,10](1可用|2异常|3已冻结|4已注销)

3

user_group

varchar

32

0

Y

N

所在用户组:[0,32767]决定用户身份和权限

4

login_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

上次登录时间:

5

phone

varchar

11

0

Y

N

手机号码:[0,11]用户的手机号码,用于找回密码时或登录时

6

phone_state

smallint

5

0

N

N

0

手机认证:[0,1](0未认证|1审核中|2已认证)

7

username

varchar

16

0

N

N

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

8

nickname

varchar

16

0

Y

N

昵称:[0,16]

9

password

varchar

64

0

N

N

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

10

email

varchar

64

0

Y

N

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

11

email_state

smallint

5

0

N

N

0

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

12

avatar

varchar

255

0

Y

N

头像地址:[0,255]

13

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

    1. 表user_group (用户组:用于用户前端身份和鉴权)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

group_id

mediumint

8

0

N

Y

用户组ID:[0,8388607]

2

display

smallint

5

0

N

N

100

显示顺序:[0,1000]

3

name

varchar

16

0

N

N

名称:[0,16]

4

description

varchar

255

0

Y

N

描述:[0,255]描述该用户组的特点或权限范围

5

source_table

varchar

255

0

Y

N

来源表:

6

source_field

varchar

255

0

Y

N

来源字段:

7

source_id

int

10

0

N

N

0

来源ID:

8

register

smallint

5

0

Y

N

0

注册位置:

9

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

10

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

  1. 系统实现
    1. 登录模块的实现

用户登录的验证将不再局限于登录信息和权限的匹配验证,而是另外增加了一个验证码,只有界面上所有的编辑框数据都准确的情况下才能实现登录成功。管理员的登录和前台用户登录是一样的过程,其主要就是利用权限字段来完成对用户或管理员的角色识别。

用户登录流程图如下所示。

 

图5-1 用户登录流程图

登录界面如下图所示。

 

图5-1 登录界面

登录关键代码如下所示。

 /**

     * 登录

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

        }

}

    1. 注册模块的实现

系统的用户通过自行注册生成,在系统首页点击用户注册菜单,系统跳转到对应的注册页面。点击重置按钮,清空所填数据,点击注册按钮完成注册。

用户注册流程图如下所示。

 

图5-1 用户注册流程图

用户注册界面如下图所示。

 

图5-1 用户注册界面

注册逻辑代码如下:

/**

     * 注册

     * @param user

     * @return

     */

    @PostMapping("register")

    public Map<String, Object> signUp(@RequestBody User 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.setUserId(null);

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

        service.save(user);

        return success(1);

}

/**

     * 用户ID:[0,8388607]用户获取其他与用户相关的数据

     */

    @Id

    @GeneratedValue(strategy = GenerationType.IDENTITY)

    @Column(name = "user_id")

    private Integer userId;

    /**

     * 账户状态:[0,10](1可用|2异常|3已冻结|4已注销)

     */

    @Basic

    @Column(name = "state")

    private Integer state;

    /**

     * 所在用户组:[0,32767]决定用户身份和权限

     */

    @Basic

    @Column(name = "user_group")

    private String userGroup;

    /**

     * 上次登录时间:

     */

    @Basic

    @Column(name = "login_time")

    private Timestamp loginTime;

    /**

     * 手机号码:[0,11]用户的手机号码,用于找回密码时或登录时

     */

    @Basic

    @Column(name = "phone")

    private String phone;

    /**

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

     */

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

}

    1. 评论模块的实现

用户点击某个产品商城进入产品商城详细页,点击评论按钮进入评论页,提交评论信息,成功发布评论,管理员管理用户的评论信息。

发布评论流程图如下所示。

 

图5-1 发布评论流程图

发布评论界面如图所示。

 

图5-1 发布评论界面

    1. 产品商城收藏模块的实现

用户选择相应的产品商城收藏,通过id传参,找到id为此传参的产品商城,在收藏页提交收藏记录表单,生成收藏记录,用户在个人中心管理个人的收藏夹。

产品商城收藏界面如下图所示。

 

图5-1 产品商城收藏界面

产品商城的逻辑代码如下:

 @PostMapping("/add")

    @Transactional

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

        service.insert(service.readBody(request.getReader()));

        return success(1);

    }

    @Transactional

    public Map<String, Object> addMap(Map<String,Object> map){

        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){

        StringBuffer sql = new StringBuffer("INSERT INTO ");

        sql.append("`").append(table).append("`").append(" (");

        for (Map.Entry<String,Object> entry:body.entrySet()){

            sql.append("`"+humpToLine(entry.getKey())+"`").append(",");

        }

        sql.deleteCharAt(sql.length()-1);

        sql.append(") VALUES (");

        for (Map.Entry<String,Object> entry:body.entrySet()){

            Object value = entry.getValue();

            if (value instanceof String){

                sql.append("'").append(entry.getValue()).append("'").append(",");

            }else {

                sql.append(entry.getValue()).append(",");

            }

        }

        sql.deleteCharAt(sql.length() - 1);

        sql.append(")");

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

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

        query.executeUpdate();

    }

    1. 公告管理模块的实现

在主页左侧菜单栏中点击“公告管理”按钮,再从二级目录中点击“新增公告”按钮,进入到新增公告界面。在此处公告可以添加公告的标题。

在主页左侧菜单栏中点击“公告管理”按钮,再从二级目录中点击“查询公告”按钮,进入到查询公告界面。在此处公告可以查询当前所有公告记录。

公告展示界面如下图所示。

 

图5-1 公告展示界面

公告管理界面如下图所示。

 

图5-1 公告管理界面

公告管理逻辑代码如下所示。

  @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();

    }

    1. 用户管理模块的实现

用户通过注册了方可获得登录使用权限,此时选择普通用户选项,系统就会自动转到用户注册工作面,在注册该部分信息时系统会自动调用add函数,然后在给定的文本框中填写有关该用户的基础信息后选择确认即可完成注册。检索用户信息,在新增用户信息以后,在检索工具栏中填写对应的用户信息,系统就会将该用户有关的所有信息展示出来。

用户管理流程图如下所示。

 

图5-1 用户管理流程图

用户管理界面如下图所示。

 

图5-1 用户管理界面

    1. 产品产品团购管理模块的实现

管理员执行产品订单管理,并可以操作相关内容,例如添加,查看,编辑和删除。通过单击“添加产品订单”,可以通过产品订单添加界面添加详细信息。单击查看字段级别链接以查看有关所选字段级别的信息。然后单击“提交”跳转重返到添加页面。添加成功后的信息会载入到产品订单查询列表中,管理员可进行编辑以及修改。

产品订单管理流程图如下所示。

 

图5-1 产品订单管理流程图

产品订单管理如下图所示。

 

图5-1 产品订单管理界面

    1. 产品团购管理模块的实现

管理员执行产品团购管理,并可以操作相关内容,例如添加,查看,编辑和删除。通过单击“添加产品团购”,可以通过产品团购添加界面添加详细信息。单击查看字段级别链接以查看有关所选字段级别的信息。然后单击“提交”跳转重返到添加页面。添加成功后的信息会载入到产品团购查询列表中,管理员可进行编辑以及修改。

产品团购添加流程图如下所示。

 

图5-1 产品团购添加流程图

产品团购添加如下图所示。

 

图5-1 产品团购管理界面

  1. 系统测试
    1. 测试目的

在这个产品被投入使用前,首先需要进行试用,这是重要的环节。考虑到某个部分的开发没有缺陷情况下,把各种模块拼接,也有一定概率就存在矛盾。这就好比每个人都很独特,但聚在一起就显得杂乱无章,需要保证有默契的配合。对于测试,要看它的各项内容是否契合的原则。若与最初定下的标准有一定程度上的出入,那么就需要做出一些调整,让最终的大方向朝着目标前进。

测试是为了发现在开发的程序中所存在的问题,测试这一工作是非常艰巨的,而又是非常困难的,这一部分在程序的设计中占有很大比例,可以说一个程序的开发工作量要是占据了百分至六十,那么剩下的百分之四十必然是测试这一部分,甚至更高。

    1. 测试用例
      1. 用户登录测试

用户登录功能测试:

表5-1 用户登录功能测试表

用例名称

用户登录系统

目的

测试用户通过正确的用户名和密码可否登录功能

前提

未登录的情况下

测试流程

1) 进入登录页面

2) 输入正确的用户名和密码

预期结果

用户名和密码正确的时候,跳转到登录成功界面,反之则显示错误信息,提示重新输入

实际结果

实际结果与预期结果一致

      1. 创建数据测试 

在系统中,创建功能也是基础功能之一,因此创建功能的测试很有代表性。在此章节主要列举在创建时各种情况下系统结果的测试。由于系统涉及创建功能操作过多,因此将多处统称创建功能。

创建数据用例如下表所示。

表6-5 创建数据测试用例

测试用例编号

YL_05

测试用例名称

系统使用者进行创建数据

测试用例描述

使用者输入要创建的数据

系统入口

浏览器

步骤

预期结果

实际结果

输入完整并且格式正确的数据

提示“创建成功”,并显示所有数据

预期结果

核心位置数据但非必要位置不输入数据

提示“创建成功”,并显示所有数据

预期结果

核心数据位置不输入数据

提示“创建失败”

预期结果

      1. 修改数据测试 

在系统中,修改功能是系统主要实现功能,因此修改功能的测试很有代表性。在此章节主要列举在修改时各种情况下系统结果的测试。由于系统涉及修改功能操作过多,因此将多处数据表记录修改和状态修改统称修改功能。

修改数据用例如下表所示。

表6-6 修改数据测试用例

测试用例编号

YL_06

测试用例名称

系统使用者进行修改数据

测试用例描述

使用者对可修改的数据项进行修改

系统入口

浏览器

步骤

预期结果

实际结果

将现有数据修改成正确的数据

提示“修改成功”,并显示所有数据

预期结果

将现有数据修改成错误的数据

提示“修改失败”

预期结果

      1. 查询数据测试 

在系统中,查询功能是使用系统使用最多也是最基础的功能,因此查询功能的测试很有代表性。在此章节主要列举在查询时各种情况下系统结果的测试。

查询数据用例如下表所示。

表6-7 查询数据测试用例

测试用例编号

YL_05

测试用例名称

系统使用者进行查询数据

测试用例描述

全部查询以及输入关键词查询

系统入口

浏览器

步骤

预期结果

实际结果

界面自动查询全部

显示对应所有记录

预期结果

输入已存在且能匹配成功的关键字

显示所查询到的数据

预期结果

输入不存在的关键字

显示数据界面为空

预期结果

    1. 测试结果

在本次测试的过程主要针对所有功能下的添加操作,修改操作和删除操作,并以真实数据一一进行相关功能项目的输入,最终能够保证每个项目涉及的功能都是能够正常运行,因此能够保证本次设计的,已实现的功能能够正常运行并且相关数据库的信息也同样保证正确。

结  论

本次农产品销售管理系统利用了Web应用同现实研发方案工作进行相结合,在系统功能开始编码之前,作者花费了大量时间在图书馆内进行资料文献的收集和总结,通过大量文献的分析,能够发现,农产品销售管理系统管理的方式在产品销售中扮演的位置是越来越重要,而使用的方式也是越来越多元化,也正是因为这个原因,作者深深的希望能够开发出一种专门针对农产品销售管理系统,以满足用户的需求。

在本次农产品销售管理系统中,利用了目前市场上普遍使用的Java技术,以及数据库管理功能MySQL,和目前比较流行的springboot框架,最后配合使用到了VUE页面布局技术进行系统界面的布置,以现实生活的用户运动过程为标准,设计实现了公告查询、资讯浏览、产品团购、产品商城、点赞收藏、在线评论等功能,并维护好后台的信息和整体系统的稳定性。

但是由于作者受到了技术水平的限制,在有限的时间,只能够将系统功能模拟时的功能实现,在许多功能方面仍然存在很大的弊端,而这些弊端需要不断的测试,不断的总结,不断的改进。例如本次系统设计中,在数据储存的方面并不够全面,很容易出现信息泄露的风险;例如针对用户权限的设置同样不够全面完整,没有考虑权限在实际情况的运用是否能够完美执行。而在这之后的日子里,作者将会继续学习Java技术和相关的信息技术,对系统功能进行更加完整的,详细的分析,将系统功能一一进行完善,帮助使用者完成相应的操作。

参考文献

[1]余鹏翔,石军锋.基于SpringBoot框架的群养母猪饲喂站管理系统设计与试验[J].中国农机化学报,2023,44(03):149-155+241.DOI:10.13733/j.jcam.issn.2095-5553.2023.03.021.

[2]李罡,周正茂. 基于Java技术实现内存键值数据管理的方法及其装置[P]. 北京市:CN114840498B,2022-09-13.

[3]陈瑞瑞.基于关联规则Apriori算法的农产品销售管理系统设计[J].信息与电脑(理论版),2022,34(10):94-96.

[4]王曼维,杨荻,李岩,及松洁.基于SpringBoot框架的智慧医疗问诊系统设计与实现[J].中国医学装备,2022,19(03):133-136.

[5]高志平. 基于SpringBoot框架与ITIL方法的运维管理系统的设计与实现[D].华东师范大学,2021.DOI:10.27149/d.cnki.ghdsu.2021.001482.

[6]唐盛平.基于微服务的一种农业销售管理系统设计[J].南方农机,2021,52(19):146-148.

[7]刘玲, 初级农产品销售客户管理系统V1.0. 重庆市,重庆森庆科技有限公司,2021-09-23.

[8]He Xinbin,Bai Yongbin,Yue Lisen,Wang Haixiao,Liu Yi. Design and Implementation of Information System Based on Java Technology Platform[J]. Journal of Physics: Conference Series,2021,2033(1).

[9]刘欣,李亮亮,牛聪. 基于Vue和SpringBoot框架的流域监管平台的研究和应用[C]//《中国防汛抗旱》杂志社,中国水利学会减灾专业委员会,水利部防洪抗旱减灾工程技术研究中心(中国水利水电科学研究院防洪抗旱减灾研究中心).第十一届防汛抗旱信息化论坛论文集.第十一届防汛抗旱信息化论坛论文集,2021:118-122.DOI:10.26914/c.cnkihy.2021.024864.

[10]Qu Xiaona. Application of Java Technology in Dynamic Web Database Technology[J]. Journal of Physics: Conference Series,2021,1744(4).

[11]谭碧波.大数据在农产品物流管理系统中的应用[J].南方农业,2021,15(03):219-220.DOI:10.19415/j.cnki.1673-890x.2021.03.103.

[12], 专科(678人) 软件技术(Java方向)(225人). 朱金瑞 主编,河南财经政法大学年鉴,中州古籍出版社,2018,525-526,年鉴.DOI:10.38722/y.cnki.ycjzf.2020.001067.

[13]陈燕.基于MVC架构的农产品在线销售管理系统设计与开发[J].信息与电脑(理论版),2020,32(12):110-112.

[14]Tian Ming Huang. Design and Implementation of App System for Legal Consulting Based on JAVA Technology[J]. Procedia Computer Science,2020,166(C).

[15]Lei Yu,Cheng Li,Lei Wei,Hu WenYa. Marine biological monitoring and managing system based on Java technology[J]. MIPPR 2019: REMOTE SENSING IMAGE PROCESSING, GEOGRAPHIC INFORMATION SYSTEMS, AND OTHER APPLICATIONS,2020,11432.

[16]朱希敏. 基于关联分析的农产品销售管理系统的研究与设计[D].重庆三峡学院,2019.DOI:10.27883/d.cnki.gcqsx.2019.000046.

[17]刘骁, 农产品销售服务管理系统V1.0. 广西壮族自治区,防城港市丰禾曲辰农业科技有限公司,2018-12-04.

[18]SJ/T 11683-2017, Java语言源代码缺陷控制与测试指南[S].

致  谢

On the occasion of the completion of this thesis, I would like to thank my supervisor. In the web design class of the instructor, I learned a lot, which also laid a certain foundation for my internship. The instructor also made many suggestions for my design and gave me careful guidance. They patiently guided me to improve the problem, gave me the experience of writing thesis, and often encouraged me. In addition, I would like to thank the front-end classmates who taught me to improve this project. For this project, I completed it while learning, and there are many things to start with. I don’t understand it very well, but my front-end development classmates very patiently guided me to complete this project. In the back-end development of the system, the back-end development technology used was often explained to me, which helped me better write the paper. Completed, I would like to express my heartfelt thanks to the classmates who helped me and the instructors who have always taught me, and wish me a successful career.

To receive the project source code for free, please follow●Like, collect and send a private message to the blogger, thank you-,

Guess you like

Origin blog.csdn.net/weixin_bysj703/article/details/131939820#comments_30326688