(Source code attached) Springboot Campus Shop Management System Graduation Project 28168

Table of contents

Summary

1 Read

1.1 Research background

1.2Research information

1.3Domestic researchSituation

1.4论文结构YO書节安控

2School commerce management systemSystem analysis 

2.1 Possibility analysis

2.1.1 Technical Feasibility Analysis

2.1.2 Economic Feasibility Analysis

2.1.3 Legal Feasibility Analysis

2.2 System function analysis

2.2.1 Functionality analysis

2.2.2 Ineffectiveness analysis

2.3 System example analysis

2.4 System flow analysis

2.4.1 Several flow steps

2.4.2 Business process

2-5Business flow diagram

2.5Chapter summary

3 Campus Shop Management SystemOverall Design

3.1 System function module design

3.1.1Overall functional module design

3.1.2User module design

3.1.3 Comment management module design

3.1.4Shop management module design

3.1.5Leasing management module design

3.2 Database Design

3.2.1 Database conceptual structure design

3.3.2 Database logical structure design

3.4Chapter summary

4Campus Shop Management SystemDetailed Design and Implementation 

4.1User function module

4.1.1 Previous stage interface

4.1.2 User registration interface

4.1.3 User login interface

4.1.4Announcement surface 

4.1.5Concession interface 

4.1.6Commerce information interface

4.2Manager function module

4.2.1Personnel management interface

4.2.2 Website management interface

4.2.3 Content management interface

4.2.4 Module management interface

5system examination

5.1 System examination example

5.2 System test result

in conclusion

references

  

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 application software are used to build the campus store management system using Java technology.

This design mainly implements a campus store management system that combines the advantages of humanization, high efficiency, and convenience, and completes functional modules such as pet store information, leasing information, and contract information. 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 campus store 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 Java+CSS technology is used to complete the system. development.​ 

Keywords: springboot; campus store management system; MySQL

Abstract

With the arrival of the internet trend, various industries are considering using the internet to promote themselves. The best way is to establish their own internet system, maintain and manage it. In practical applications, the working rules and development steps of the application software are constructed using Java technology to build a campus store management system.

This design mainly implements a campus store management system that combines the advantages of humanization, efficiency, and convenience, completing functional modules such as pet store information, rental information, and contract information. The system communicates with the server through a browser to achieve data interaction and changes. You only need to use a computer and move your fingers to operate the system, achieving data communication management. The entire system design process 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 and convenient services.

The campus store management system uses Java language, uses spring boot technology based on MVVM mode for development, and uses Eclipse compiler to compile. In terms of data, it mainly uses Microsoft's MySQL relational database as the data storage medium, and completes the system development with Java+CSS technology.

Keywords:springboot; Campus store management system; MySQL

1 Read

1.1 Research background

Today, there are nearly 3,000 colleges and universities in China. Since most of the colleges and universities occupy large areas and are therefore located in remote areas, the shops inside the campus play an important role. For example, the shops within our school's campus are different from the general shops in society where one shop has one landlord. There are many of them and the shops are distributed in a unified plan and are managed and leased by the school. In this way, they will face the problem of renting. Low efficiency; due to the use of paper documents to store and manage information in the past, the management method is old, which will lead to cumbersome management steps and troublesome management work; the timing and renewal of lease orders also require a series of cumbersome processes to complete, This leads to difficulties in the management of shops within the campus. Moreover, if you want to become a merchant of a campus store, you need to go through a series of processes such as on-site inspections and telephone inquiries to realize leasing. The process of becoming a merchant of a campus store is very cumbersome. Faced with these problems, I think that for different roles, administrators need to be able to store and manage users, store information, contract information, and rental information online, while users need to be able to view rental stores online, check personal information, and manage and manage them. For order management, merchants need to renew the lease of the store on the basis of ordinary users. If a campus store management system can be established, unified leasing management and user, contract, and store information management of stores within the campus can be realized online, which can save more manpower, material resources, and time.

1.2 Research situation

 With the continuous development of the domestic economic situation and today's network scale, China's Internet industry has entered a rare peak development period, which has attracted more and more people to pay attention to and devote themselves to the Internet industry. However, the unreasonable structures and methods in many management fields, the shortage of personnel and the increase in market management needs have caused more people to move closer to the Internet online management method.

In today's highly developed information, information management reform has become a more extensive and comprehensive trend. In order to ensure the sustainable development of China's economy, the information age is increasingly updated, and the service industry is still booming. At the same time, with the rapid development of the information society, various management systems are faced with more and more data that need to be processed. How to enable managers to query, store, manage and share effective data in the vast data ocean in a convenient and fast way? Information has important practical significance for our study, work and life. The most important thing is that today's information management models and methods are constantly being applied in various fields and departments. It is not only a reform of technical methods, but also a great improvement in human resources and management efficiency. For the rapidly developing real estate industry, the traditional old management model and paper-based management methods not only waste a lot of manpower and resources, but are also difficult to adapt to today's store management market. The economic, technical and management feasibility of the real estate information management system was analyzed, and the system was implemented so that the management system can be operated independently by one person under any circumstances, which will definitely be the future management prospect.

1.3 Domestic research situation

Nowadays, our country's economy is booming, and the corresponding real estate industry is also developing rapidly. A large number of commercial real estate has been put into the market, and related leasing management work has become increasingly complex. How to better manage shops, especially combined with informatization The implementation of store management by means has become the focus of current research on store management. It is necessary to combine our own practical work experience and analyze and study the current situation at home and abroad to propose the construction of a store management information system based on information technology. In the process of managing a store, the most important parts are the relationship between the store, merchants, and leasing. These three parts extend to the control of sub-modules such as sales, orders, and information statistics. In the process of building the system, it is necessary to include issues such as merchant settlement, store login, lease agreement, and later lease renewals involved in the entire leasing process. Only in this way can we effectively and practically improve the efficiency of store leasing management and truly change the situation. Today’s store management model.

1.4 Paper structure and chapter arrangement

This article is divided into six chapters, and the chapters are arranged as follows:

The first chapter is the introduction. This chapter provides a detailed discussion and explanation of the background, status and significance of the system designed and implemented, and also briefly introduces the structure of the overall framework of the paper.

Chapter 2 is system requirements analysis. The main work done in this chapter is to analyze the technical, economic and operational feasibility of the system; it also analyzes the overall functional requirements and use cases of the system.

Chapter 3 is the design of the system, which mainly designs the functional structure of the system, and analyzes the conceptual structure and physical structure design of the system database.

Chapter 4 is about the implementation of the system. According to the division of system functions, the front-end customer functions and back-end administrator functions that the system needs to implement are analyzed and explained respectively.

Chapter 5: System Testing. Mainly test some interfaces of the system and test the main functions

Chapter 6: Summary.

2 System analysis of campus shop management system

System requirements analysis is a key link in system development. It plays a connecting role in the design and implementation of the system. System requirements analysis is to dig out the requirements of the system that needs to be built. If the analysis is accurate, it can accurately solve the problems encountered in reality. If the analysis is not in place, it will affect the implementation of the later system. Requirements analysis also accounts for a very large proportion of the excellence of a system. If the requirements analysis is not in place, the subsequent system design will be a design that deviates from navigation.

2.1 Feasibility analysis

System feasibility analysis is a discussion of system feasibility. When discussing the feasibility of the system, we mainly analyze it from the technical feasibility, economic feasibility and legal feasibility. If the three levels are passed, we think the system is relatively feasible.

2.1.1 Technical Feasibility Analysis

Campus Shop Management System The mysql database is used for storage and development tools such as IDEA and Tomcat are used in development, which can bring a lot to our writing work. convenience. The system is developed using thespringboot framework, which makes the system more scalable and maintainable, reduces java configuration code, and simplifies programming code. Currently framework is also one of the frameworks chosen by many companies. springboot

2.1.2 Economic feasibility analysis

From the economic feasibility point of view, the project requires a development PC during the development phase, and a web server and database server during the production phase. From an economic point of view, a personal PC is not too much of a problem. In terms of later system deployment and production, the investment in servers will not be too high, and it is relatively feasible from an economic perspective.

2.1.3 Legal feasibility analysis

The system has no legal issues with third parties from a legal perspective. The system database uses the Mysql open source community database and the framework uses the open source Spring boot. System information and related content are also legal. The source code is managed using git open source, so it is legally feasible.

2.2 System function analysis

2.2.1 Functional analysis

I divide the campus store management system into three parts: registered user module, landlord user module and administrator module.

Registered user management module:

(1) User registration and login: Visitors can enter the system at any time and browse the information in the system. However, if they want to operate store information, they must have an account in this system. If they do not have an account, they can register as a member user to perform relevant operations. At the same time, users can also control personal information and operation information through the "My" button.

(2) View the homepage information of the campus store management system: The homepage information of the campus store management system includes the homepage, announcement information, leasing information, store information, and mine (my account, my collection, personal center).

(3) Rental information: When the user clicks the "Leasing Information" menu button, all the leasing information published by the administrator in the background will be displayed. You can view details, collect, like, comment, etc.;

(4) Store information: Users can view store information. When they find the store information they want to know, they can enter to view a detailed introduction. Clicking the "Lease" button will jump to the interface for filling out the leasing information. Fill in the rental information according to the prompts, click "Submit" and the rental will be completed. At the same time, you can like, collect, and comment;

(5) My Account: Click "My Account" under "My" at the front desk to manage and control personal information + password changes + your own collection of information.

Manager management module:

Management personnel include administrators and registered users. Administrators have the highest authority and can add, delete, modify, and check information on the campus store management system.

(1) Website management: The administrator can add, delete, modify and check the carousel images and announcement information displayed at the front desk of the system to facilitate users' viewing.

(2) Personnel management: Administrators can review and manage administrators in the campus store management system as well as users and landlords registered at the front desk.

(3) Content management: Administrators can control the leasing information displayed at the front desk of the campus store management system and the categories to which the information belongs.

(4) Module management: Under the "Module Management" menu, you can manage all the information operated by users and landlord users in the system, including store information, Lease information, contract information.

(5) Personal management: The administrator can click the "Personal Management" menu to set personal information and login passwords.

2.2.2 Non-functional analysis

The non-functional requirements of the campus store management system include the security, reliability, performance, scalability, etc. of the campus store management system. The details can be expressed in the following 3-1 table:

Table3-1School Commerce Management SystemNon Functional ability demand table

safety

Mainly refers to the installation of the campus store management system database, the use of the database and the setting of passwords must comply with standards.

reliability

Reliability means that the campus store management system can operate according to the instructions submitted by the user. After testing, the reliability is more than 90%.

performance

Performance is a necessary condition for the campus store management system to occupy the market, so it is best to have good performance.

Scalability

For example, the database reserves multiple attributes, such as the use of interfaces, to ensure the non-functional requirements of the system.

Ease of use

Users only need to follow the page display content of the campus store management system and operate.

maintainability

The maintainability of the campus store management system is very important. After testing, there is no problem with the maintainability.

2.3 Series example analysis

The complete UML use case diagrams of the campus store management system are Figure 2-1, Figure 2-2 and Figure 2-3 respectively.

Figure 2-1 shows the use case for registering user roles.

Figure 2-1 Campus store management system registered user role use case diagram

Figure 2-2 is a use case demonstration of the administrator role.

Figure 2-2 Campus store management system administrator role use case diagram

2.4 System process analysis

2.4.1 Number of fixed steps

One of the main purposes of developing a campus store management system is to enable users to rent store information. Figure 2-4 is the data flow diagram of the system.

Figure 2-4 Expanded view of store information operations

2.4.2 Business process

After analyzing the data flow of the campus store management system, let’s look at the business process of the system. Figure 2-5 is the business flow chart:

Figure 2-5 Business flow chart

2.5 Summary of this chapter

This chapter mainly determines the functions to be realized by the entire campus store management system through feasibility analysis, functional requirements analysis, system use case analysis, and system process analysis of the campus store management system. At the same time, it also provides standards for code implementation and testing of campus store management systems.

3 Overall design of campus shop management system

The main contents discussed in this chapter includethe functional module design and database system design of the campus store management system.

3.1 System function module design

3.1.1 Overall functional module design

In the previous chapter, the functional requirements and non-functional requirements of the system were mainly analyzed, and the use cases in this campus store management system were analyzed based on the requirements. Then the next step is to start designing the architecture, main functions and database of this campus store management system. The campus store management system is derived based on the demand analysis in the previous chapter. Its overall design module diagram is shown in Figure 3-1.

Figure 3-1 Function module diagram of campus store management system

3.1.2 User module design

The users of this system include administrators and users. The functions of the two user modules are basically the same. Users have one more registration function than administrators. Therefore, the structure diagram of the user module is used as an example for analysis. The user module structure diagram is used as an example for analysis. ,As shown below:

Figure 3-2 User module structure diagram

3.1.3 Comment management module design

The campus store management system is an open platform for communication. Users submit comments on the platform to increase interaction between users. But at the same time, in order to better standardize the content of comments and give administrators the function of deleting inappropriate comments, a comment management module needs to be specially designed. The specific structure diagram is as follows:

Figure 3-3 Structure diagram of comment management module

3.1.4 Store management module design

The campus store management system needs to store a lot of store information. Its module function structure, the specific structure diagram is as follows:

Figure 3-4 Shop module structure diagram

3.1.5 Rental management module design

One of the most important functions of the campus store management system is leasing. Its module function structure is as follows:

Figure 3-5 Structure diagram of rental information module

3.2 Database design

Database design generally includes three major processes: demand analysis, conceptual model design, and database table creation. The demand analysis has been explained in the previous chapter, and the conceptual model design has two parts: conceptual model and logical structure design.

3.2.1 Database conceptual structure design

The following is the main E-R entity relationship diagram of the main database tables in the entire campus store management system.

Figure 3-6 Overall E-R relationship diagram of the campus store management system

3.3.2 Database logical structure design

From the total E-R relationship diagram in the campus store management system in the previous section, it can be concluded that a total of many data tables need to be created. Here I mainly list several major database table structure designs.

Table comment (comment)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

comment_id

int

10

0

N

AND

Comment ID:

2

user_id

int

10

0

N

N

0

Commenter ID:

3

reply_to_id

int

10

0

N

N

0

Reply comment ID: empty is 0

4

content

longtext

2147483647

0

AND

N

content:

5

nickname

varchar

255

0

AND

N

Nick name:

6

avatar

varchar

255

0

AND

N

Avatar address: [0,255]

7

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

9

source_table

varchar

255

0

AND

N

Source table:

10

source_field

varchar

255

0

AND

N

Source field:

11

source_id

int

10

0

N

N

0

Source ID:

Table contract_information (contract information)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

contract_information_id

int

10

0

N

AND

Contract information ID

2

lease_title

varchar

64

0

AND

N

title for rent

3

lease_method

varchar

64

0

AND

N

Leasing method

4

shop_rent

varchar

64

0

AND

N

Shop rent

5

store_location

varchar

64

0

AND

N

Shop location

6

contract_name

varchar

64

0

AND

N

contract title

7

type_of_contract

varchar

64

0

AND

N

type of contract

8

signing_date

date

10

0

AND

N

Signing date

9

tenant_users

int

10

0

AND

N

0

Tenant user

10

landlord_user

int

10

0

AND

N

0

Landlord user

11

contract_content

varchar

255

0

AND

N

Contract content

12

recommend

int

10

0

N

N

0

Intelligent Recommendation

13

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

14

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table hits (user clicks)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

hits_id

int

10

0

N

AND

Like ID:

2

user_id

int

10

0

N

N

0

Liked by:

3

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

4

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

5

source_table

varchar

255

0

AND

N

Source table:

6

source_field

varchar

255

0

AND

N

Source field:

7

source_id

int

10

0

N

N

0

Source ID:

Table landlord_user (landlord user)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

landlord_user_id

int

10

0

N

AND

Landlord User ID

2

landlord_name

varchar

64

0

AND

N

Landlord name

3

landlord_gender

varchar

64

0

AND

N

Landlord gender

4

landlords_age

varchar

64

0

AND

N

Landlord age

5

examine_state

varchar

16

0

N

N

passed

Approval Status

6

recommend

int

10

0

N

N

0

Intelligent Recommendation

7

user_id

int

10

0

N

N

0

User ID

8

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

9

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table lease_information (lease information)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

lease_information_id

int

10

0

N

AND

Rental information ID

2

landlord_user

int

10

0

AND

N

0

Landlord user

3

store_location

varchar

64

0

AND

N

Shop location

4

shop_rent

varchar

64

0

AND

N

Shop rent

5

tenant_users

int

10

0

AND

N

0

Tenant user

6

contact_number

varchar

64

0

AND

N

contact number

7

business_content

varchar

64

0

AND

N

Business content

8

remarks

text

65535

0

AND

N

Remarks

9

recommend

int

10

0

N

N

0

Intelligent Recommendation

10

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

11

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Notice (announcement)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

notice_id

mediumint

8

0

N

AND

Announcement id:

2

title

varchar

125

0

N

N

title:

3

content

longtext

2147483647

0

AND

N

text:

4

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

5

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

Express praise (like)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

praise_id

int

10

0

N

AND

Like ID:

2

user_id

int

10

0

N

N

0

Liked by:

3

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

4

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

5

source_table

varchar

255

0

AND

N

Source table:

6

source_field

varchar

255

0

AND

N

Source field:

7

source_id

int

10

0

N

N

0

Source ID:

8

status

bit

1

0

N

N

1

Like status: 1 is like, 0 is canceled

Table registered_users (registered users)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

registered_users_id

int

10

0

N

AND

Register user ID

2

user_name

varchar

64

0

AND

N

username

3

user_gender

varchar

64

0

AND

N

User gender

4

user_age

varchar

64

0

AND

N

User age

5

examine_state

varchar

16

0

N

N

passed

Approval Status

6

recommend

int

10

0

N

N

0

Intelligent Recommendation

7

user_id

int

10

0

N

N

0

User ID

8

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

9

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table slides (carousel)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

slides_id

int

10

0

N

AND

Carousel image ID:

2

title

varchar

64

0

AND

N

title:

3

content

varchar

255

0

AND

N

content:

4

url

varchar

255

0

AND

N

Link:

5

img

varchar

255

0

AND

N

Carousel image:

6

hits

int

10

0

N

N

0

Number of clicks:

7

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

Table store_information (store information)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

store_information_id

int

10

0

N

AND

Store information ID

2

landlord_user

int

10

0

AND

N

0

Landlord user

3

contact_information

varchar

64

0

AND

N

Contact information

4

store_location

varchar

64

0

AND

N

Shop location

5

shop_area

varchar

64

0

AND

N

Shop area

6

store_status

varchar

64

0

AND

N

Store status

7

shop_rent

varchar

64

0

AND

N

Shop rent

8

shop_pictures

varchar

255

0

AND

N

Shop pictures

9

average_daily_pedestrian_flow

varchar

64

0

AND

N

average daily traffic

10

number_of_surrounding_shops

varchar

64

0

AND

N

Number of surrounding shops

11

length_of_time_not_rented

varchar

64

0

AND

N

Unrented time

12

shop_details

text

65535

0

AND

N

Shop details

13

hits

int

10

0

N

N

0

Clicks

14

praise_len

int

10

0

N

N

0

Number of likes

15

examine_state

varchar

16

0

N

N

Not reviewed

Approval Status

16

recommend

int

10

0

N

N

0

Intelligent Recommendation

17

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

18

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table upload (file upload)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

upload_id

int

10

0

N

AND

Upload ID

2

name

varchar

64

0

AND

N

file name

3

path

varchar

255

0

AND

N

access path

4

file

varchar

255

0

AND

N

file path

5

display

varchar

255

0

AND

N

display order

6

father_id

int

10

0

AND

N

0

Parent ID

7

you

varchar

255

0

AND

N

folder

8

type

varchar

32

0

AND

N

file type

Table user (user account: used to save user login information)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

user_id

mediumint

8

0

N

AND

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

2

state

smallint

5

0

N

N

1

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

3

user_group

varchar

32

0

AND

N

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

4

login_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Last Login Time:

5

phone

varchar

11

0

AND

N

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

6

phone_state

smallint

5

0

N

N

0

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

7

username

varchar

16

0

N

N

Username: [0,16] The account name used by the user to log in

8

nickname

varchar

16

0

AND

N

Nickname: [0,16]

9

password

varchar

64

0

N

N

Password: [0,32] The password required for user login, consisting of 6-16 digits or English

10

email

varchar

64

0

AND

N

Email: [0,64] User's email, used to retrieve password or log in

11

email_state

smallint

5

0

N

N

0

Email certification: [0,1] (0 not certified | 1 under review | 2 certified)

12

avatar

varchar

255

0

AND

N

Avatar address: [0,255]

13

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

Table user_group (user group: used for user front-end identity and authentication)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

group_id

mediumint

8

0

N

AND

User group ID: [0,8388607]

2

display

smallint

5

0

N

N

100

Display order: [0,1000]

3

name

varchar

16

0

N

N

Name: [0,16]

4

description

varchar

255

0

AND

N

Description: [0,255] Describes the characteristics or scope of permissions of this user group

5

source_table

varchar

255

0

AND

N

Source table:

6

source_field

varchar

255

0

AND

N

Source field:

7

source_id

int

10

0

N

N

0

Source ID:

8

register

smallint

5

0

AND

N

0

Registration location:

9

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

10

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

3.4 Summary of this chapter

The demand analysis of the entire campus store management system mainly focused on the design of the overall system architecture and functional modules. The database system design was completed by establishing an E-R model and database logic system design.

4 Detailed design and implementation of campus shop management system

The detailed design and implementation of the campus store management system is mainly based on the previous demand analysis of the campus store management system and the overall design of the campus store management system to design the page and implement the business logic. It is mainly introduced from the two parts of campus store management system interface implementation and business logic implementation.

4.1User function module

4.1.1 Previous stage interface

When entering the campus store management system, the system is displayed in a top-middle-bottom layout. The first thing that catches the eye is the navigation bar of the system. Below is the carousel image, and then below is the announcement information. The main interface is displayed as shown in Figure 4- 1 shown.

Figure 4-1 Front page interface diagram

4.1.2 User registration interface

Users of the campus store management system can register and log in. When the user clicks the "Register" button in the upper right corner, fill in their account number + password + confirm password + nickname + email + mobile phone number, etc., and then click the "Register" button. It will first verify whether there is any empty data entered, then verify again whether the password and confirmation password are the same, and finally verify whether the entered account name and the registered account name in the database table are duplicates. Only after both verifications are correct, the user registration can be successful. . The user registration interface is shown in Figure 4-2 below.

Figure 4-2 Registration interface diagram

The registration key code is as follows.

/**

     * register

     * @param user

     * @return

     */

    @PostMapping("register")

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

        ​​​​//Query user

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

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

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

        if (list.size()>0){

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

        }

        user.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;

}

4.1.3 用户登录界面

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

图4-3用户登录界面图

登录关键代码如下所示。

 /**

     * 登录

     * @param data

     * @param httpServletRequest

     * @return

     */

    @PostMapping("login")

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

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

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

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

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

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

        List resultList = null;

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

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

            map.put("username", username);

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

        }

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

            map.put("email", email);

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

        }

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

            map.put("phone", phone);

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

        }else{

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

        }

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

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

        }

        //判断是否有这个用户

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

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

        }

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

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

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

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

        if (groupList.size()<1){

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

        }

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

        //查询用户审核状态

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

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

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

            if (res==null){

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

            }

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

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

            }

        }

        //查询用户状态

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

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

        }

        String md5password = service.encryption(password);

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

            // 存储Token到数据库

            AccessToken accessToken = new AccessToken();

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

            accessToken.setUser_id(byUsername.getUserId());

            tokenService.save(accessToken);

            // 返回用户信息

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

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

            JSONObject ret = new JSONObject();

            ret.put("obj",user);

            return success(ret);

        } else {

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

        }

}

4.1.4 公告栏界面

当点击导航栏上的“公告栏”的时候,就会进入对应的界面查看公告信息,公告栏界面如下图4-4所示。

图4-4 公告栏界面图

4.1.5 租赁资讯界面

当访客点击校园商铺管理系统中导航栏上的“租赁资讯”后将会进入到该“租赁资讯”列表的界面,然后选择想要看的租赁资讯,点击进入到详细界面,同时可以进行点赞、收藏、评论操作,租赁资讯界面如下图4-5 所示。

图4-5租赁资讯界面图

4.1.6商铺详情界面

当用户点击“商铺信息”这一菜单按钮,会显示管理员在后台发布的所有的商铺信息,支持通过关键词对商铺进行搜索,选择需要的商铺点击可以进入到商铺详细的介绍界面,在详细界面可以查看到商铺的房东用户、商铺面积、联系方式、商铺状态、商铺位置等信息,同时可以进行租赁、点赞、收藏、评论操作,商铺界面如下图4-6所示。

图4-6 商铺详情界面图

4.2管理人员功能模块

4.2.1人员管理界面

校园商铺管理系统中的管理人员在“人员管理”这一菜单是中可以对注册的用户、房东用户以及管理员人员进行管控。界面如下图4-7所示。

图4-7人员管理界面图

人员管理的逻辑代码如下:

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

    }

4.2.2 网站管理界面

管理员点击“网站管理”这一菜单会显示轮播图以及公告信息这个子菜单,管理员可以对前台展示的轮播图以及公告信息进行设置,界面如下图4-8所示。

图4-8网站管理界面图

网站管理逻辑代码如下所示。

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

    }

4.2.3 内容管理界面

内容管理主要管理员是对租赁资讯以及租赁资讯所属的分类进行管控,包含了用户对租赁资讯提交的评论信息,界面如下图4-9所示。

图4-9内容管理界面图

4.2.4 模块管理界面

校园商铺管理系统中的管理人员在“更多管理”这一菜单下是可以对校园商铺管理系统内的商铺信息、租赁信息、合同信息进行管控的,其管理界面如下图4-10所示。

图4-10模块管理界面图

5系统测试

5.1 系统测试用例

系统测试包括:用户登录功能测试、商铺信息展示功能测试、租赁信息添加、合同信息搜索、密码修改,如表5-1、5-2、5-3、5-4、5-5所示:

用户登录功能测试:

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

用例名称

用户登录系统

目的

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

前提

未登录的情况下

测试流程

1) 进入登录页面

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

预期结果

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

实际结果

实际结果与预期结果一致

商铺信息查看功能测试:

表5-2 商铺信息查看功能测试表

用例名称

商铺信息查看

目的

测试商铺信息查看功能

前提

测试流程

点击商铺信息

预期结果

可以查看到所有商铺信息

实际结果

实际结果与预期结果一致

管理员添加租赁信息界面测试:

表5-3 管理员添加租赁信息界面测试表

用例名称

添加租赁信息测试用例

目的

测试租赁信息添加功能

前提

管理员用户正常登录情况下

测试流程

1)管理员点击租赁信息,然后点击添加后并填写信息。

2)点击进行提交。

预期结果

提交以后,页面首页会显示新的租赁信息 

实际结果

实际结果与预期结果一致

合同信息搜索功能测试:

表5-4合同信息搜索功能测试表

用例名称

合同信息搜索测试

目的

测试合同信息搜索功能

前提

测试流程

1)在搜索框填入搜索关键字。

2)点击搜索按钮。

预期结果

页面显示包含有搜索关键字的合同信息

实际结果

实际结果与预期结果一致

密码修改搜索功能测试:

表5-5 密码修改功能测试表

用例名称

密码修改测试用例

目的

测试管理员密码修改功能

前提

管理员用户正常登录情况下

测试流程

1)管理员密码修改并完成填写。

2)点击进行提交。

预期结果

使用新的密码可以登录

实际结果

实际结果与预期结果一致

5.2 系统测试结果

通过编写校园商铺管理系统的测试用例,已经检测完毕用户登录模块、商铺信息展示模块、租赁信息添加模块、合同信息搜索模块、密码修改模块,通过这5大模块为校园商铺管理系统的后期推广运营提供了强力的技术支撑。

结论

首先从系统得功能方面来说,程序整体性的完成了租赁信息、合同信息、商铺信息等信息的维护管理,本论文分析了应用平台的主要体系架构以及各个功能模块,对所系统的功能、用例、流程以及功能进行了简单介绍,最后每个模块的测试结果基本满足应用平台的要求。

目前本毕业设计已经基本完成了系统的设计与实现,用户可以在系统中进行。当然,本系统仍然存在一些不够完善的地方,有的功能模块完成后展示的效果还不够完美,比如由于技术掌握不够系统没有实现课题进行移动端的开发等等,因此有待于日后持续加强学习,不断地探索和改进,以使本系统的各个功能模块更加完善。

参考文献

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

[2]苏佳旭,白燕,温晓东.基于Web前端与MySQL数据库的自然灾害应急信息共享平台设计与实现[J].电脑知识与技术,2023,19(05):74-77.DOI:10.14004/j.cnki.ckt.2023.0274.

[3]佟羽齐,刘德华,张栎柯,李剑波,张俊杰.基于SpringBoot框架的钻前管理系统的设计与实现[J].信息与电脑(理论版),2023,35(02):111-113.

[4]杨一帆.服务于MySQL数据库的在线监测系统设计[J].自动化技术与应用,2022,41(10):179-182.DOI:10.20033/j.1003-7241.(2022)10-0179-04.

[5]林佳一.混合式教学在高职MySQL数据库课程的实践研究[J].电脑知识与技术,2022,18(26):133-135.DOI:10.14004/j.cnki.ckt.2022.1737.

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

[7]Diptiben Ghelani,Tan Kian Hua. A Perspective Review on Online Food Shop Management System and Impacts on Business[J]. Advances in Wireless Communications and Networks,2022,8(1).

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

[9]林易康, 基于Java的web应用程序控制管理软件. 湖北省,武汉东湖学院,2021-10-01.

[10]Witsarut Sriratana,Vittaya Khagwian,Sutham Satthamsakul. Analysis of Electric Current by Using MySQL Database on Web Server for Machine Performance Evaluation: A Case Study of Air Conditioning System[J]. 제어로봇시스템학회 국제학술대회 논문집,2020.

[11]熊翊豪,王兢,张浩然.智能中小型商铺货物管理系统设计[J].科学技术创新,2020(21):83-84.

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

[13]张文娟.互联网时代校园商铺平台系统的设计与实现[J].信息记录材料,2020,21(06):159-160.DOI:10.16009/j.cnki.cn13-1295/tq.2020.06.095.

[14]肖睿,崔雪炜,艾华,潘亚,张娟. Java面向对象程序开发及实战[M].人民邮电出版社:大数据开发实战系列, 201801.209.

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

[16]Wu Hongyan. Construction of Online Teaching System Based on SpringBoot Framework for Normal University Students’ Informatization Teaching Ability Training[P]. 2022 2nd International Conference on Education, Information Management and Service Science (EIMSS 2022),2022.

致  谢

文章能够得以完成,这其中离不开我敬爱的老师的帮助,虽然没有直接指出问题的所在,但也通过言语指点了我,并给出了相对应的建议,让我能够更加快速地成长,在此,由衷地表达我的谢意。

首先,主要感谢的是我的指导老师,是他在我完成我的作品时给了我巨大的肯定,这一点给了我巨大信心,让我有信心完成这项作品。并且还在我的制作过程中给了我不少的建议,让我少走了很多的弯路。为我指出了具体的方向,找到了主干的我,便沿着主干的枝丫逐渐深入,剖析每一个脉络。并且在我的系统的初步完成时,也给我指出了我系统存在的不足和缺陷,让我深刻认识到了自己的不足。

其次还要感谢为我提供参考资料的同学,是他们给了我前人的经验,让我得以站在巨人的肩膀上作为我的起点,这些资料也给我带来了巨大的帮助。

最后还要感谢我的父母,他们给了我最大的支持,也充分肯定了我的作品,这个给了我极大的鼓舞,也奠定了我成功的基础,没有这些人对我的帮助,也就不会有我今天的成功。对此再次感谢各位的帮助。

免费领取项目源码,请关注点赞+私聊

Guess you like

Origin blog.csdn.net/VXbishe/article/details/134625603