(Source code attached) springboot shared electric bicycle management system computer completion 08401

Table of contents

Summary

1Introduction _

1.1 Background and significance

1.2 Overview of research at home and abroad

1.3 Research methods

1. 4 Paper structure and chapter arrangement

2 System analysis of shared electric bicycle management system 

2.1 Feasibility 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 Functional Analysis

2.2.2 Non-functional analysis

2.3 System use case analysis

2.4 System flow analysis

2.4.1 Data flow

2.4.2 Business Process

2.5 Summary of this chapter

3 Overall Design of Shared Electric Bike Management System

3.1 System function module design

3.1.1 Overall functional module design

3.1.2 User module design

3.1.3 Comment management module design

3.1.4 Vehicle Management Module Design

3.2 Database design

3.2.1 Database conceptual structure design

3.3.2 Database logical structure design

3.4 Summary of this chapter

4 Detailed design and implementation of shared electric bicycle management system 

4.1 User Function Module

4.1.1 Front page interface

4.1.2 User registration interface

4.1.3 User login interface

4.1.4 Vehicle information interface

4.1.5 Unlock interface

4.1.6 Sharing information interface

4.1.7 Personal account interface

4.2 Manager function module

4.2.1 System User Interface

4.2.2 Carousel chart management interface

4.2.3 Resource management interface

4.2.4 Site information management interface

4.2. 5  Vehicle information management interface

4.2. 6 Using the information management interface 

5 system test

5.1 System test cases

5.2 System test results

in conclusion

references

Acknowledgments  

Summary

In the information society, there is a need for targeted information acquisition channels, but the expansion of channels is basically the direction that people are striving for. Due to the deviation in their perspective, people can often obtain different types of information, which is also the most difficult technology to overcome. subject. Aiming at problems such as the shared electric bicycle management system, research and analysis on how to share the electric bicycle management system through the computer, and then develop and design the shared electric bicycle management system to solve the problem.

The main functional modules of the shared electric bicycle management system include site information, vehicle information, usage information, order information and other information maintenance. The object-oriented development model is adopted for software development and hardware erection, which can well meet the needs of actual use. , perfected the corresponding software construction and program coding work, adopted MySQL as the main storage unit of background data, and adopted java technology and Ajax technology to code and develop the business system, realizing all the functions of the system. This report first analyzes the background, role, and significance of the research, laying the foundation for the rationality of the research work. Analyze the various requirements and technical problems of the shared electric bicycle management system, prove the necessity and technical feasibility of the system, then give a basic introduction to the technical software and design ideas that need to be used in the design system, and finally realize the shared The bike management system and deployment runs using it.

Keywords : springboot; shared electric bicycle management system; MySQL

Abstract

In the information society, there is a need for targeted information acquisition channels, but the expansion of channels is basically the direction of people's efforts. Due to the deviation in perspective, people often can obtain different types of information, which is also the most difficult topic for technology to overcome. Research and analyze how to share electric bike management systems through computers, and then develop and design a shared electric bike management system to address issues such as shared electric bike management systems.

The main functional modules of the shared electric bicycle management system include maintenance of site information, vehicle information, usage information, order information, and other information. It adopts an object-oriented development model for software development and hardware installation, which can effectively meet practical usage needs. It improves the corresponding software installation and program coding work, adopts MySQL as the main storage unit for backend data, and adopts Java technology Ajax technology is used for coding and developing business systems, achieving all the functions of this system. This report first analyzes the background, role, and significance of the research, laying the foundation for the rationality of the research work. Analyze the various requirements and technical issues of the shared electric bicycle management system, prove the necessity and feasibility of the system, and then provide a basic introduction to the technical software and design ideas required for designing the system. Finally, implement the shared electric bicycle management system and deploy it for operation.

Keywords:springboot; Shared electric bicycle management system; MySQL

1Introduction _

1.1 Background and significance

The system management will also carry out the overall intelligent operation through the computer. There are a lot of management and data storage involved in the shared electric bicycle management system, such as site information, vehicle information, usage information, order information, etc. The work brought huge challenges. In the face of a large amount of information, the traditional management system used notes to carry out detailed information statistics. Later, computers appeared, and the paper information was counted on the computer through computer input software. This method is relatively traditional, and it is troublesome to want statistical data information, and it is also affected by time and space, so a shared electric bicycle management system has been developed for this purpose; it provides a convenient management platform for users, which is convenient for administrators to view and maintain, and The group can edit and maintain the equipment information content according to the needs; for users, they can check the campus shared bicycle information at any time, and the administrator can obtain the data information of the system without leaving home, and it can also save users A lot of time, so the development of a shared electric bicycle management system has brought great convenience to the administrator, and it is also convenient for the administrator to process user information.

This paper's shared electric bicycle management system mainly involves programs, databases and computer technology. It covers a wide range of knowledge and can greatly improve the work efficiency of system personnel.

1.2 Overview of research at home and abroad

With the continuous development of the domestic economic situation, China's Internet has entered a rare peak development period, which makes Chinese and foreign capitalists turn to the Internet market one after another. However, the unreasonable structure of many management fields, the shortage of personnel and the increase of market management demands make more people have the awareness of Internet management.

In today's highly developed information, information management reform has become a more extensive and comprehensive trend. "The shared electric bicycle management system is based on Mysql database and realized on the basis of Java program design. In order to ensure the sustainable development of China's economy, the information age is updated day by day, 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 to be processed, how to enable managers to query, store, manage and share effective data information in a wide range of data in a convenient and fast way, which is of great importance to our study, work and life It has important practical significance. Therefore, domestic and foreign academic circles have conducted in-depth and extensive research on this, and a new research field-shared electric bicycle management system was born.

1.3 Research Methods

First of all, through engine search or reference to relevant literature, understand the background of the system development and the significance of the design system, and collect user demand information. Secondly, in terms of development tools, it was finally decided to use the springboot platform to design and develop this system, and MySQL was used as the tool for designing the database. That is, the user interface is implemented using Java language and connected with the database to achieve complete communication functions. After that, the general functional modules of the system are designed. It is mainly analyzed from the perspective of convenience for system users and system administrators to clarify the functions that the system should have. The final step is to test the system, discover existing problems and find solutions through use case testing. Utilize the existing development platform, combine the knowledge I have learned, and complete the design with the help of the teacher to ensure the usability and practicability of the system.

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 Shared Electric Bike 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

The storage of the shared electric bicycle management system uses the mysql database and the development tools such as IDEA and Tomcat are used in the development, which can bring a lot of convenience to our writing work. The system uses the springboot framework for development, which makes the system more scalable and maintainable, reduces java configuration code, and simplifies programming code. At present, the springboot framework is also one of the frameworks chosen by many enterprises.

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

From a legal perspective, the system has no other legal issues for third parties . The system database uses the Mysql open source community database, and the framework uses the open source Springboot. 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 shared electric bicycle management system into two parts: the administrator module and the ordinary user module.

Ordinary user management module:

(1) User registration and login: Tourists can enter the system at any time to browse the information in the system, but if they want to realize the operation of site information and vehicle information, they must have an account of this system. If they do not have an account, they can register as a user. Related operations, users can also control personal information and operation information through the "Personal Account" button.

(2) View the homepage information of the shared electric bicycle management system: The homepage information of the shared electric bicycle management system includes announcement information, shared information, personal accounts, personal collections, site information, vehicle information, and personal center.

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

(4) Announcement information: Users can view the announcement information released by the background administrator. When they find the announcement information they want to know, they can enter to view the detailed introduction.

(5) Vehicle information: When the user clicks the menu button "Vehicle Information", all the vehicle information released by the administrator in the background will be displayed, and the vehicle information can be searched by keywords. Select the required vehicle information and click to enter Detailed introduction interface of vehicle information. In the detailed interface, you can view the vehicle's vehicle number, vehicle status, billing price, remaining power, location and other information. At the same time, you can perform operations such as unlocking, likes, favorites, and comments;

(6) Unlocking: When the user wants to unlock the vehicle on the vehicle information details interface, click the "Unlock" button below, and it will jump to the unlocking information filling interface. Enter the unlocking information according to the interface prompts, click the "Submit" button, and the unlocking is completed. finished;

(7) Personal account: When the user clicks "Personal Account", the user can set up and manage personal information, password to log in to the system, and information collected by himself;

Administrator management module:

The administrator includes two parts: the administrator and the ordinary user. The administrator has the highest authority and realizes the operation of adding, deleting, modifying and checking the information of the shared electric bicycle management system.

(1) Carousel image/announcement information management: Administrators can add, delete, modify, and check the carousel image and announcement information displayed at the front desk of the system to facilitate user viewing.

(2) System users: When the administrator clicks on the "System User" menu, two sub-menus will be displayed: administrator and ordinary user. The administrator can add, delete, modify and query the information of these two roles;

(3)Resource management: When the administrator clicks the "Resource Management" menu, the two submenus of the news list and the news classification list will be displayed. The administrator can update and maintain the functions involved in these two departments to better serve front-end users;

(4) Module management: Under the "Module Management" menu, all information operated by ordinary users in the system can be managed, including site information, vehicle information, usage information, and order information.

2.2.2 Non-functional analysis

The non-functional requirements of the shared electric bicycle management system include the safety, reliability, performance, scalability, etc. of the shared electric bicycle management system. The details can be expressed in the following 3-1 table:

Table 3-1 Non-functional requirements table for shared electric bicycle management system

safety

It mainly refers to the installation of the database of the shared electric bicycle management system. The use of the database and the setting of the password must comply with the standards.

reliability

Reliability means that the shared electric bicycle 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 shared electric bicycle 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 shared electric bicycle management system and operate.

maintainability

The maintainability of the shared electric bicycle management system is very important. After testing, there is no problem with the maintainability.

2.3 System use case analysis

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

Figure 2-1 is a use case display of common user roles.

 

Figure 2-1 Common user role use case diagram of the shared electric bicycle management system

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

 

Figure 2-2 Use case diagram of administrator role of shared electric bicycle management system

2.4 System flow analysis

2. 4.1 Data flow

One of the main purposes of developing a shared electric bicycle management system is to enable users to unlock vehicle information. Figure 2-3 is the data flow diagram of the system.

 

Figure 2-3 Expanded view of vehicle information operation

2.4.2 Business process

After analyzing the data flow of the shared electric bicycle management system, let’s look at the business process of the system. Figure 2-4 is the business flow chart:

 

Figure 2-4 Business flow chart

2.5 Summary of this chapter

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

3 Overall Design of Shared Electric Bike Management System

The main contents discussed in this chapter include the functional module design and database system design of the shared electric bicycle 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 the shared electric bicycle management system were analyzed according to the requirements. Then the next step is to start designing the architecture, main functions and database of this shared electric bicycle management system. The shared electric bicycle 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 shared electric bicycle 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 taken as an example for analysis, and the structure diagram of the user module is analyzed as an example. ,As shown below:

 

Figure 3-2 User module structure diagram

3.1.3 Comment management module design

The shared electric bicycle 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 regulate 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 Comment management module structure diagram

3.1.4 Vehicle management module design

The shared electric bicycle management system needs to store a lot of vehicle information. Its module functional structure, the specific structure diagram is as follows:

 

Figure 3-4 Vehicle module structure diagram

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 Conceptual structure design of database

The following is the main ER entity relationship diagram of the main database tables in the entire shared electric bicycle management system.

 

Figure 3-6 Overall ER relationship diagram of the shared electric bicycle management system

3.3.2 Database logical structure design

From the total ER relationship diagram in the shared electric bicycle 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

Defaults

illustrate

1

comment_id

int

10

0

N

Y

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

Y

N

content:

5

nickname

varchar

255

0

Y

N

Nick name:

6

avatar

varchar

255

0

Y

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

Y

N

Source table:

10

source_field

varchar

255

0

Y

N

Source field:

11

source_id

int

10

0

N

N

0

Source ID:

Table cross_district_cycling (cross-district cycling)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

Defaults

illustrate

1

cross_district_cycling_id

int

10

0

N

Y

Cross-region riding ID

2

vehicle_number

varchar

64

0

Y

N

vehicle number

3

remaining_power

varchar

64

0

Y

N

remaining battery

4

billing_price

int

10

0

Y

N

0

Billing price

5

billing_unit

varchar

64

0

Y

N

unit of charging

6

use_users

int

10

0

Y

N

0

user

7

user_name

varchar

64

0

Y

N

username

8

unlock_time

datetime

19

0

Y

N

Unlock time

9

cross_region_name

varchar

64

0

Y

N

Cross-zone name

10

recommend

int

10

0

N

N

0

Intelligent Recommendation

11

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

12

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

Defaults

illustrate

1

hits_id

int

10

0

N

Y

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

Y

N

Source table:

6

source_field

varchar

255

0

Y

N

Source field:

7

source_id

int

10

0

N

N

0

Source ID:

Notice (announcement)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

Defaults

illustrate

1

notice_id

mediumint

8

0

N

Y

Announcement id:

2

title

varchar

125

0

N

N

title:

3

content

longtext

2147483647

0

Y

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:

Table order_information (order information)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

Defaults

illustrate

1

order_information_id

int

10

0

N

Y

订单信息ID

2

vehicle_number

varchar

64

0

Y

N

车辆编号

3

remaining_power

varchar

64

0

Y

N

剩余电量

4

billing_price

int

10

0

Y

N

0

计费价格

5

billing_unit

varchar

64

0

Y

N

计费单位

6

use_users

int

10

0

Y

N

0

使用用户

7

user_name

varchar

64

0

Y

N

用户姓名

8

closing_time

datetime

19

0

Y

N

关锁时间

9

return_site

varchar

64

0

Y

N

归还站点

10

pay_state

varchar

16

0

N

N

未支付

支付状态

11

pay_type

varchar

16

0

Y

N

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

12

recommend

int

10

0

N

N

0

智能推荐

13

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

14

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已取消

表site_information (站点信息)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

site_information_id

int

10

0

N

Y

站点信息ID

2

site_name

varchar

64

0

Y

N

站点名称

3

site_image

varchar

255

0

Y

N

站点图片

4

site_area

varchar

64

0

Y

N

站点地区

5

detailed_location

varchar

64

0

Y

N

详细位置

6

number_of_vehicles

varchar

64

0

Y

N

车辆数量

7

hits

int

10

0

N

N

0

点击数

8

praise_len

int

10

0

N

N

0

点赞数

9

recommend

int

10

0

N

N

0

智能推荐

10

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

11

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

创建时间:

表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

更新时间:

表use_information (使用信息)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

use_information_id

int

10

0

N

Y

使用信息ID

2

vehicle_number

varchar

64

0

Y

N

车辆编号

3

reminder_power

varchar

64

0

Y

N

提醒电量

4

remaining_power

varchar

64

0

Y

N

剩余电量

5

billing_price

int

10

0

Y

N

0

计费价格

6

billing_unit

varchar

64

0

Y

N

计费单位

7

use_users

int

10

0

Y

N

0

使用用户

8

user_name

varchar

64

0

Y

N

用户姓名

9

unlock_time

datetime

19

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

更新时间

表vehicle_information (车辆信息)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

vehicle_information_id

int

10

0

N

Y

车辆信息ID

2

vehicle_number

varchar

64

0

Y

N

车辆编号

3

vehicle_status

varchar

64

0

Y

N

车辆状态

4

billing_price

int

10

0

Y

N

0

计费价格

5

billing_unit

varchar

64

0

Y

N

计费单位

6

remaining_power

int

10

0

Y

N

0

剩余电量

7

reminder_power

varchar

64

0

Y

N

提醒电量

8

location

varchar

64

0

Y

N

所在位置

9

vehicle_image

varchar

255

0

Y

N

车辆图片

10

hits

int

10

0

N

N

0

点击数

11

praise_len

int

10

0

N

N

0

点赞数

12

recommend

int

10

0

N

N

0

智能推荐

13

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

14

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

3.4本章小结

整个共享电动单车管理系统的需求分析主要对系统总体架构以及功能模块的设计,通过建立E-R模型和数据库逻辑系统设计完成了数据库系统设计。

4 共享电动单车管理系统详细设计与实现

共享电动单车管理系统的详细设计与实现主要是根据前面的共享电动单车管理系统的需求分析和共享电动单车管理系统的总体设计来设计页面并实现业务逻辑。主要从共享电动单车管理系统界面实现、业务逻辑实现这两部分进行介绍。

4.1用户功能模块

4.1.1 前台首页界面

当进入共享电动单车管理系统的时候,系统以上中下的布局进行展示,首先映入眼帘的是系统的导航栏,下面是轮播图,再往下是公告,其主界面展示如下图4-1所示。

 

图4-1 前台首页界面图

4.1.2 用户注册界面

共享电动单车管理系统的用户时可以进行注册登录,当用户右上角“注册”按钮的时候,当填写上自己的账号+密码+确认密码+昵称+邮箱+手机号等后再点击“注册”按钮后将会先验证输入的有没有空数据,再次验证密码和确认密码是否是一样的,最后验证输入的账户名和数据库表中已经注册的账户名是否重复,只有都验证没问题后即可用户注册成功。其用用户注册界面展示如下图4-2所示。

 

图4-2注册界面图

注册关键代码如下所示。

/**

     * 注册

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

}

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.1.7个人账户界面

当用户点击导航栏上“个人账户”可以对个人的资料、登录系统的密码以及自己收藏的信息进行设置管理,个人账户界面如下图4-7所示。

 

图4-7 个人账户界面图

4.2管理人员功能模块

4.2.1系统用户界面

共享电动单车管理系统中的管理人员在“系统用户”这一菜单是中可以对注册的普通用户及管理员人员进行管控。界面如下图4-8所示。

 

图4-8系统用户界面图

系统用户的逻辑代码如下:

 @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-9所示。

        

 

图4-9轮播图管理界面图

4.2.3 资源管理界面

资源管理主要管理员是对新闻列表以及新闻列表所属的分类进行管控,包含了用户对新闻列表提交的评论信息,界面如下图4-10所示。

       

 

图4-10资源管理界面图

资源管理逻辑代码如下所示。

  @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.4 站点信息管理界面

管理员点击“站点信息”会显示出所有的站点信息,支持输入站点名称或者站点图片对站点信息进行查询,如果想要添加新的站点信息,点击“添加”按钮,输入站点名称、站点图片、站点地区、详细位置、车辆数量等信息,点击“提交”按钮就可以添加了,同时可以选择某一条站点信息,点击“删除”进行删除,也可以对用户提交的站点信息评论的信息进行管控。界面如下图4-11所示。

         

 

图4-11站点信息管理界面图

4.2.5车辆信息管理界面

管理员点击“车辆信息”会显示出所有的车辆信息,支持输入车辆编号或者车辆状态对车辆信息进行查询,如果想要添加新的车辆信息,点击“添加”按钮,输入车辆编号、车辆状态、计费价格、剩余电量、所在位置等信息,点击“提交”按钮就可以添加了,同时可以选择某一条车辆信息,点击“删除”进行删除,也可以对用户提交的车辆信息评论的信息进行管控。界面如下图4-12所示。

      

 

图4-12车辆信息管理界面图

4.2.6使用信息管理界面

管理员点击“使用信息”会显示出所有的使用信息,支持输入车辆编号或者剩余电量对使用信息进行查询,如果想要添加新的使用信息,点击“添加”按钮,输入相关信息,点击“提交”按钮就可以添加了,同时可以选择某一条使用信息,点击“删除”进行删除,也可以点击后面的“关锁”按钮对使用信息的关锁信息进行更新维护。界面如下图4-13所示。

    

 

图4.13使用信息管理界面图

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 系统测试结果

通过编写共享电动单车管理系统的测试用例,已经检测完毕用户登录模块、车辆信息展示模块、车辆信息添加模块、车辆信息搜索模块、密码修改模块,通过这五大模块为共享电动单车管理系统的后期推广运营提供了强力的技术支撑。

结论

至此,共享电动单车管理系统已经结束,在开发前做了许多的准备,在本系统的设计和开发过程中阅览和学习了许多文献资料,从中我也收获了很多宝贵的方法和设计思路,对系统的开发也起到了很重要的作用,系统的开发技术选用的都是自己比较熟悉的,比如Web、Java技术、MYSQL,这些技术都是在以前的学习中学到了,其中许多的设计思路和方法都是在以前不断地学习中摸索出来的经验,其实对于我们来说工作量还是比较大的,但是正是由于之前的积累与准备,才能顺利的完成这个项目,由此看来,积累经验跟做好准备是十分重要的事情。

当然在该系统的设计与实现的过程中也离不开老师以及同学们的帮助,正是因为他们的指导与帮助,我才能够成功的在预期内完成了这个系统。同时在这个过程当中我也收获了很多东西,此系统也有需要改进的地方,但是由于专业知识的浅薄,并不能做到十分完美,希望以后有机会可以让其真正的投入到使用之中。

参考文献

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

[2]彭跃进,陈旭舟,潘双平,叶鸿斌,杨立权. 一种基于智慧灯杆的共享单车管理系统[P]. 广东省:CN218601952U,2023-03-10.

[3]刘丹青,李超,王青海.基于Java技术的藏汉双语学前教育云平台设计与实现[J].信息技术,2023,47(02):17-23.DOI:10.13274/j.cnki.hdzj.2023.02.004.

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

[5]沈志元,张文健.基于Java技术的医院管理系统的设计与实现[J].电脑知识与技术,2022,18(32):38-40+54.DOI:10.14004/j.cnki.ckt.2022.1994.

[6]匡宇,王崇东.基于生态视域的共享单车管理系统创新设计研究[J].工业设计,2021(10):102-103.

[7]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).

[8]赵三珊,李文清,田浩毅.基于能源区块链的电动车共享充电桩管理系统[J].智能城市,2021,7(11):8-11.DOI:10.19301/j.cnki.zncs.2021.11.004.

[9]石天敏.基于Java的共享单车管理系统的设计与实现[J].电子技术与软件工程,2021(03):213-215.

[10]孟俊贞,刘野,赵继伟.基于GIS的共享单车管理系统实现及应用[J].测绘与空间地理信息,2020,43(11):25-28.

[11]王真河. 新型智能化共享单车系统的设计与实现[D].厦门大学,2020.DOI:10.27424/d.cnki.gxmdu.2020.003331.

[12]吴瑞卿. 聚焦里程焦虑的电动车电量管理系统交互设计[D].东南大学,2020.DOI:10.27014/d.cnki.gdnau.2020.000257.

[13]周永康. 一种基于STM32的智能电动自行车充电桩控制系统[D].浙江工业大学,2020.DOI:10.27463/d.cnki.gzgyu.2020.001516.

[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]卞巍皓,阳若淼,康子良等. 基于蓝牙技术的共享单车规范化停车管理系统[C]//中国科学技术协会,中华人民共和国交通运输部,中国工程院.2019世界交通运输大会论文集(上).2019世界交通运输大会论文集(上),2019:1392-1398.

致  谢

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

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

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

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

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

Guess you like

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