(with source code) springboot tourism website management system graduation project 060954

Table of contents

Summary 1

1 Introduction 1

1.1 Research Significance 1

1.2 Research status 1

1.3 Features of system development technology 1

1.4 Paper Structure and Chapter Arrangement 1

2 System analysis of tourism website management system 3

2.1 Feasibility analysis 3

2.2 System flow analysis 3

2.2.1 Data addition process 3

2.3.2 Data modification process 4

2.3.3 Data deletion process 4

2.3 System function analysis 4

2.3.1 Functional Analysis 4

2.3.2 Non-functional analysis 5

2.4 System use case analysis 6

2.5 Summary of this chapter 7

3 Overall Design of Tourism Website Management System 8

3.1 System architecture design 8

3.2 System function module design 8

3.2.1 Overall functional module design 9

3.2.2 User module design 9

3.2.3 Review Management Module Design 10

3.3 Database Design 10

3.3.1 Database conceptual structure design 10

3.3.2 Database logical structure design 14

3.4 Chapter Summary 17

4 Detailed design and implementation of tourism website management system 18

4.1 User Function Module 18

4.1.1 Front page interface 18

4.1.2 User login interface 18

4.1.3 User registration interface 2 1

4.1.4 Bulletin board interface 23

4.1.5 News interface 24

4.1.6 Hotel information details interface 25

4.2 Administrator function module 26

4.2.1 User management interface 26

4.2.2 Message management interface 28

4.2.3 Site management interface 29

4.2.4 More management interface 3 0

5 System Test 32

5.1 Purpose of system testing 3 2

5.2 System test cases 3 2

5.3 System test results 3 3

Conclusion 3 4

Reference 35

Thanks 36

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. topic. Aiming at problems such as tourism websites, research and analyze tourism websites, and then develop and design a tourism website management system to solve the problems.

The main functional modules of the tourism website management system include user management, area management, scenic spot management, hotel management, route management, scenic spot ticket purchase, hotel reservation, route reservation, adopting the object-oriented development mode for software development and hardware erection, It can well meet the needs of actual use, perfect the corresponding software setup and program coding work, adopt Mysql as the main storage unit of background data, and use Java technology and Ajax technology for business system coding and development, and realize this full functionality of the system. This report first analyzes the background, function and significance of the research, laying the foundation for the rationality of the research work. Analyze the various requirements and technical problems of the tourism website 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 tourism website management System and deployment runs use it.

Keywords : springboot technology; MYSQL; tourism website management system

Abstract

In the information society, there is a need for targeted information access, but the expansion of access is basically the direction of people's efforts. Due to the deviation of the perspective, people can often obtain different types of information, which is also the most difficult subject for technology to overcome. Aiming at the problems of tourism websites, this paper studies and analyzes the tourism websites, and then develops and designs the tourism website management system to solve the problems.

The main functional modules of the tourism website management system include user management, area management, scenic spot management, hotel management, route management, scenic spot ticket purchase, hotel reservation and route reservation. The object-oriented development mode is adopted for software development and hardware erection, which can well meet the needs of actual use, improve the corresponding software erection and program coding, and adopt MySQL as the main storage unit of background data, Using Java technology and Ajax technology to code and develop the business system, all the functions of the system are realized. This report first analyzes the background, function and significance of the research, which lays a foundation for the rationality of the research work. This paper analyzes the various requirements and technical problems of the tourism website management system, proves the necessity and technical feasibility of the system, and then makes a basic introduction to the technical software and design ideas needed to design the system. Finally, it realizes the tourism website management system and deploys it.

Keywords: Springboot technology; MYSQL; Tourism website management system

1 Introduction

1.1 Research Significance

In the initial stage of development, most of the tourism websites in our country, due to the lack of comprehensive understanding of the tourism industry and network operations, failed to identify the entry point, so that the tourism websites lacked characteristics and "selling points" after they were completed, and often copied the off-the-shelf products of other tourism websites. It has become the Chinese version of the websites of developed countries in the Internet industry such as Europe and the United States, or the epitome of large websites. As a result, the versions are similar in design and content, and the problem of repeated construction is serious. It has not formed a business model with a certain scale, nor has it reached the high success rate of online promotion and reservation, so that the sales of e-commerce in the entire tourism industry are pitifully small. . The security problem of tourism product transaction is the bottleneck of tourism website development. Whether it can ensure that the entire transaction process of tourism products can be safely completed on a dynamic and open tourism website is one of the first considerations for tourists to choose to buy tourism products on the website. However, most of the travel websites in my country have unsound online payment methods and lack of a unified standard system, and the security of online transactions is even more worrying. Malicious ordering and transaction errors are not uncommon. Therefore, consumers do not have a high degree of trust in online transactions of tourism products. Therefore, the problem of transaction insecurity has become the biggest obstacle in the development of tourism websites.

Therefore, what needs to be improved on this website is to enhance and expand the popularity and reputation of the tourism portal, and do a good job in network marketing. Tourism websites need to strengthen the construction of reputation system to ensure the credibility, security and symmetry of tourism websites, in order to expand their popularity and reputation, and create a characteristic brand of tourism portal websites. Formulate reasonable and scientific management and operation standards, and strengthen the guidance and regulation of the website. Actively guide, manage and build a good operating system for the website, and expand the publicity and strength of advertising information.

1.2 Research Status

Compared with foreign countries, my country's tourism e-commerce started a little later. Professional tourism websites began to appear in 1996. After that, tourism e-commerce developed rapidly and entered the first climax period in 2000. However, due to the influence of the world tourism industry in 2001, Affected by the overall negative growth situation, China's tourism industry experienced certain difficulties this year, and its growth rate declined; The wave of tourism e-commerce boom has entered a new "accelerated development period" since then. At present, there are more than 5,000 websites with certain tourism information capabilities in my country. Among them, there are more than 300 professional tourism companies, mainly including regional websites, professional websites and travel channels of portal websites.

However, tourism e-commerce is still in its infancy, and there is still a big gap compared with developed countries. Domestic netizens who have logged on to travel websites account for a small proportion of the total number of netizens, and the proportion of netizens who have made online travel reservations is even smaller. The overall development level of my country's tourism application system is very low, information service capabilities are limited, network marketing is just a fashion, the cultivation of consumers, the maturity of tourism e-commerce software and hardware environment, and the construction of government policies and regulations are urgent. unresolved issues. As a big country with rich tourism resources, my country is expected to use advanced information technology to help the tourism industry achieve rapid growth and usher in a greater leap.

1.3 Features of system development technology

(1) The backend of the web background management in the tourism website management system no longer uses the ancient jsp+javabean+servlet technology, but uses the current mainstream springboot framework, which reduces java configuration codes and simplifies programming codes. The current springboot framework It is also one of the frameworks chosen by many companies.

(2) The front end of the web background management in the tourism website management system uses a JavaScript framework, which can beautify the page design with ajax[8] and jquery[9].

(3) Mysql5.7 is used for the database in the tourism website management system, which has high execution efficiency.

1.4 Paper Structure and Chapter Arrangement

The thesis will be arranged in layers, except for the abstract acknowledgments and references, the main text will also analyze the requirements of the website, explain the general design and implemented functions, and finally list some commissioning records. The main structure of the thesis is as follows:

Chapter 1: Introduction. The first chapter mainly introduces the background of the subject research, the status quo of system development and the research status and main work of this paper.

Chapter Two: System Requirements Analysis. The second chapter mainly conducts demand analysis from the aspects of system users and functions.

Chapter Three: System Design. The third chapter mainly carries on the function design to the system frame, the system function module, the database.

Chapter Four: System Realization. The fourth chapter mainly introduces the construction of the system framework and the realization of the system interface.

Chapter Five: System Testing. Chapter 5 mainly tests some interfaces of the system and tests the main functions

Chapter Six: Summary.

2 Analysis of Tourism Website Management System

System analysis is a prerequisite for developing a project. Through system analysis, the basic needs of the main users of the system can be well understood, and this is also the reason for the development of the project. Further, feasibility analysis is carried out on system development, usually including technical feasibility, economic feasibility, etc. Feasibility analysis is also an analysis from the overall perspective of the project. Then it is to analyze the specific needs of the project, and the means of analysis are generally realized through the user's use case diagram. The following is a detailed introduction.

2.1 Feasibility Analysis

(1) Economic feasibility:

Most of the tools used in the project are currently popular open source and free, so in the early stage of development, the funds used for the project will be greatly reduced, and the development of the software will not be affected by the funds during the project start-up period, so It is still economically feasible. Try to use the least cost to meet the needs of users. Save funds for labor costs and equipment costs. It will go further and further on the road of paperless and high efficiency.

So there is no question of economic viability.

(2) Operation feasibility:

The design of this project refers to several development cases of websites under this mode, analyzes their operation interface, combines many cases together, and highlights the people-oriented and simplified operation, so people with basic computer knowledge can operate this project.

Therefore, there is no problem with operability.

(3) Technical feasibility:

Technical feasibility refers to the feasibility of building a framework, and the acceptability of system technology upgrades when better technologies emerge, and the ratio of development time to cost.

The existing springboot technology can cater to the construction of all e-commerce systems. When developing this tourism website management system, I used springboot+MYSQL to run the overall program.

In summary, there is no problem with the technical feasibility.

(4) Legal feasibility:

From the perspective of developers, springboot and MYSQL are open source and free online, and there will be no legal disputes in terms of intellectual property rights.

From the perspective of user use, as long as no contraband is sold on the system, a treaty agreement is made on the system, and illegal payments are eliminated.

In summary, there is no question of legal feasibility.

2.2 System flow analysis

The business process is to use some specific symbols and lines to demonstrate the user's process of using the system. When performing system analysis, the business process can help developers better understand the business, find errors, and improve the system.

2.2.1 Data addition process

After the user successfully logs in to the system, the operation of adding data can be realized. The number of adding data is specific and generated by the system, and the user cannot fill it in at will. Except for the number, the user can fill in other additional information by himself, and the filled information is verified by the system and verified to be legal. Passing shows that the data addition is successful. On the contrary, the addition is not successful. Figure 2-1 shows the process of adding data.

Figure 2-1 Flowchart of adding data

2.2.2 Data modification process

The process of data modification is similar to the process of data addition described above, as shown in Figure 2-2.

Figure 2-2 Data modification flow chart

2.2.3 Data deletion process

If there are some useless data in the system, the relevant management personnel can also delete these data. Figure 2-3 is the flow chart of data deletion.

Figure 2-3 Data deletion flow chart

2.3 System function analysis

2.3.1 Functional Analysis

According to the role of the tourism website management system, I divided it into three parts: the registered user management module, the merchant management module and the general administrator management module.

User management module:

(1) User registration and login: the user registers as a user and logs in to the tourism website management system; the user adds, deletes, modifies and checks personal information, such as personal data and password changes.

(2) Check the homepage information of the tourism website management system: the homepage information of the tourism website management system includes the homepage, announcements, news, attractions information, hotel information, route information, my (my account, my favorites, personal center) )wait.

(3) Announcements: Users can view, publish and comment on the submissions submitted by users under the menu of Announcements.

(4) News: The user reads the news and checks the news information released by the administrator.

(5) My Favorites: Under "My", you can view and manage the "My Favorites" information, you can view the favorites, and you can also delete the favorite information;

(6) My account: When the user clicks the "My" button in the upper right corner, a submenu will appear, click "My Account" to set the personal information and the password to log in to the system;

(7) Personal Center: When the user clicks the "My" button in the upper right corner, he will enter the corresponding background for information management;

Administrator management module:

(1)登录:管理员的账号是在数据表表中直接设置生成的,不需要进行注册;

(2)站点管理:当点击“站点管理”这一菜单的时候,会出现轮播图+公告栏两个子菜单,可以对这两个模块进行增删改查操作;

(3)用户管理:当点击“用户管理”这一菜单的时候,会出现管理员+注册用户+商家三个子菜单,可以对这三个模块进行增删改查操作;

(4)内容管理:当点击“内容管理”这一菜单的时候,会出现新闻管理+新闻分类这两个子菜单,能够对用户在前台提交的新闻进行管理,同时对前台展示的新闻列表信息进行增删改查操作;

(5)更多管理:当点击“更多”这一菜单的时候,会出现地区管理+景点管理+酒店管理+路线管理+景点购票+酒店预定+路线预定这七个子菜单,管理员能够对这七个模块进行增删改查操作;

2.3.2 非功能性分析

旅游网站管理系统的非功能性需求比如旅游网站管理系统的安全性怎么样,可靠性怎么样,性能怎么样,可拓展性怎么样等。具体可以表示在如下3-1表格中:

表3-1旅游网站管理系统非功能需求表

安全性

主要指旅游网站管理系统数据库的安装,数据库的使用和密码的设定必须合乎规范。

可靠性

可靠性是指旅游网站管理系统能够安装用户的指示进行操作,经过测试,可靠性90%以上。

性能

性能是影响旅游网站管理系统占据市场的必要条件,所以性能最好要佳才好。

可扩展性

比如数据库预留多个属性,比如接口的使用等确保了系统的非功能性需求。

易用性

用户只要跟着旅游网站管理系统 的页面展示内容进行操作,就可以了。

可维护性

旅游网站管理系统 开发的可维护性是非常重要的,经过测试,可维护性没有问题

2.4 系统用例分析

通过2.3功能的分析,得出了本旅游网站管理系统的用例图:

用户角色用例如图2-3所示。

图2-3旅游网站管理系统用户角色用例图

web后台管理上的管理员是维护整个旅游网站管理系统中所有数据信息的。管理员角色用例如图2-4所示。

图2-4旅游网站管理系统管理员角色用例图

2.5本章小结

本章主要通过对旅游网站管理系统的可行性分析、流程分析、功能需求分析、系统用例分析,确定整个旅游网站管理系统 要实现的功能。同时也为旅游网站管理系统的代码实现和测试提供了标准。

3旅游网站管理系统总体设计

本章主要讨论的内容包括旅游网站管理系统的功能模块设计、数据库系统设计。

3.1 系统架构设计

本旅游网站管理系统 从架构上分为三层:表现层(UI)、业务逻辑层(BLL)以及数据层(DL)。

图3-1旅游网站管理系统系统架构设计图

表现层(UI):又称UI层,主要完成本旅游网站管理系统的UI交互功能,一个良好的UI可以打打提高用户的用户体验,增强用户使用本旅游网站管理系统时的舒适度。UI的界面设计也要适应不同版本的旅游网站管理系统以及不同尺寸的分辨率,以做到良好的兼容性。UI交互功能要求合理,用户进行交互操作时必须要得到与之相符的交互结果,这就要求表现层要与业务逻辑层进行良好的对接。

业务逻辑层(BLL):主要完成本旅游网站管理系统的数据处理功能。用户从表现层传输过来的数据经过业务逻辑层进行处理交付给数据层,系统从数据层读取的数据经过业务逻辑层进行处理交付给表现层。

数据层(DL):由于本旅游网站管理系统 的数据是放在服务端的mysql数据库中,因此本属于服务层的部分可以直接整合在业务逻辑层中,所以数据层中只有数据库,其主要完成本旅游网站管理系统的数据存储和管理功能。

3.2 系统功能模块设计

3.2.1整体功能模块设计

在上一章节中主要对系统的功能性需求和非功能性需求进行分析,并且根据需求分析了本旅游网站管理系统中的用例。那么接下来就要开始对本旅游网站管理系统的架构、主要功能和数据库开始进行设计。旅游网站管理系统根据前面章节的需求分析得出,其总体设计模块图如图3-2所示。

图3-2旅游网站管理系统功能模块图

3.2.2用户模块设计

后台管理员能够实现对前台注册的用户增删改查操作,用户模块结构图如下图:

图3-3用户用户模块结构图

3.2.3评论管理模块设计

旅游网站管理系统是一个交流性质的公开平台,用户用户和管理人员用户可以对平台上信息进行评论,增加用户之间的互动性。但是同时也为了更好的规范评论的内容,给予管理员删除不合适的言论的功能,所以需要专门设计一个评论管理模块,具体的结构图如下:

图3-4评论模块结构图

3.3 数据库设计

数据库设计一般包括需求分析、概念模型设计、数据库表建立三大过程,其中需求分析前面章节已经阐述,概念模型设计有概念模型和逻辑结构设计两部分。

3.3.1 数据库概念结构设计

下面是整个旅游网站管理系统 中主要的数据库表总E-R实体关系图。

图3-6旅游网站管理系统总E-R关系图

下面根据旅游网站管理系统的数据库总E-R关系图可以得出旅游网站管理系统需要很多E-R图,在此罗列出来一些主要的数据库E-R模型图。

图3-7注册用户E-R关系图

图3-8 路线预定E-R关系图

图3-9景点信息E-R关系图

图3-10景点购票E-R关系图

3.3.2 数据库逻辑结构设计

通过上一小节中旅游网站管理系统 中总E-R关系图上得出一共需要创建很多个数据表。在此我主要罗列几个主要的数据库表结构设计。

scenic_spot_ticket_purchase表:

名称

类型

长度

不是null

主键

注释

scenic_spot_ticket_purchase_id

int

11

景点购票ID

attraction_number

varchar

64

景点编号

scenic_spot_area

varchar

64

景点地区

business_hours

varchar

64

营业时间

appointment_telephone

varchar

16

预约电话

detailed_address

varchar

64

详细地址

ticket_price

int

11

门票价格

publisher

int

11

发布商家

user

int

11

用户

scheduled_number

int

11

预定数

total_cost

varchar

64

合计费用

scheduled_time

date

0

预定时间

pay_state

varchar

16

支付状态

pay_type

varchar

16

支付类型

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

scenic_spot_information表:

名称

类型

长度

不是null

主键

注释

scenic_spot_information_id

int

11

景点信息ID

attraction_number

varchar

64

景点编号

name_of_scenic_spot

varchar

64

景点名称

scenic_spot_area

varchar

64

景点地区

business_hours

varchar

64

营业时间

scenic_spot_cover

varchar

255

景点封面

appointment_telephone

varchar

16

预约电话

detailed_address

varchar

64

详细地址

publisher

int

11

发布商家

ticket_price

int

11

门票价格

number_of_tickets

int

11

门票数

scenic_spot_details

longtext

0

景点详情

hits

int

11

点击数

praise_len

int

11

点赞数

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

route_pre表:

名称

类型

长度

不是null

主键

注释

route_pre_id

int

11

路线预订ID

route_number

varchar

64

路线编号

route_name

varchar

64

路线名称

starting_point

varchar

64

起始点

destination

varchar

64

目的地

route_price

varchar

64

路线价格

distance_kilometers

varchar

64

路程公里

publisher

int

11

发布商家

user

int

11

用户

scheduled_time

date

0

预定时间

pay_state

varchar

16

支付状态

pay_type

varchar

16

支付类型

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

route_information表:

名称

类型

长度

不是null

主键

注释

route_information_id

int

11

路线信息ID

route_number

varchar

64

路线编号

route_name

varchar

64

路线名称

starting_point

varchar

64

起始点

destination

varchar

64

目的地

route_cover

varchar

255

路线封面

route_price

varchar

64

路线价格

distance_kilometers

varchar

64

路程公里

publisher

int

11

发布商家

route_details

longtext

0

路线详情

hits

int

11

点击数

praise_len

int

11

点赞数

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

registered_user表:

名称

类型

长度

不是null

主键

注释

registered_user_id

int

11

注册用户ID

remarks

varchar

64

备注

examine_state

varchar

16

审核状态

recommend

int

11

智能推荐

user_id

int

11

用户ID

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

3.4本章小结

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

4旅游网站管理系统详细设计与实现

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

4.1用户功能模块

4.1.1 前台首页界面

当进入旅游网站管理系统的时候,首先映入眼帘的是系统的导航栏,下面是轮播图以及系统内容,其主界面展示如下图4-1所示。

图4-1 前台首页界面图

4.1.2用户登录界面

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

图4-2用户登录界面图

登录关键代码如下所示。

/**

* 登录

* @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.3用户注册界面

不是旅游网站管理系统中正式用户的是可以在线进行注册的,如果你没有本旅游网站管理系统的账号的话,添加“注册”,当填写上自己的账号+密码+确认密码+昵称+邮箱+手机号等后再点击“注册”按钮后将会先验证输入的有没有空数据,再次验证密码和确认密码是否是一样的,最后验证输入的账户名和数据库表中已经注册的账户名是否重复,只有都验证没问题后即可用户注册成功。其用用户注册界面展示如下图4-3所示。

图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.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用户管理界面图

用户管理关键代码如下所示。

public String encryption(String plainText) {

String re_md5 = new String();

try {

MessageDigest md = MessageDigest.getInstance("MD5");

md.update(plainText.getBytes());

byte b[] = md.digest();

int i;

StringBuffer buf = new StringBuffer("");

for (int offset = 0; offset < b.length; offset++) {

i = b[offset];

if (i < 0)

i += 256;

if (i < 16)

buf.append("0");

buf.append(Integer.toHexString(i));

}

re_md5 = buf.toString();

} catch (Exception e) {

e.printStackTrace();

}

return re_md5;

}

4.3.2留言管理界面

旅游网站管理系统中的管理人员是可以对前台用户发布的留言进行管控的,界面如下图4-8所示。

图4-8留言管理界面图

4.3.3站点管理界面

旅游网站管理系统中的管理人员在“站点管理”这一菜单中是可以对前台显示的轮播图以及公告栏进行管控。界面如下图4-9所示。

图4-9站点管理界面图

站点管理关键代码如下所示。

@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.4更多管理界面

旅游网站管理系统中的管理人员在“更多管理”这一菜单下是可以对旅游网站管理系统内的地区管理、景点管理、酒店管理、路线管理、景点购票、酒店预定、路线预定进行管控的,其管理界面如下图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();

}

5系统测试

5.1系统测试的目的

系统开发到了最后一个阶段那就是系统测试,系统测试对软件的开发其实是非常有必要的。因为没什么系统一经开发出来就可能会尽善尽美,再厉害的系统开发工程师也会在系统开发的时候出现纰漏,系统测试能够较好的改正一些bug,为后期系统的维护性提供很好的支持。通过系统测试,开发人员也可以建立自己对系统的信心,为后期的系统版本的跟新提供支持。

5.2 系统测试用例

系统测试包括:用户登录功能测试、酒店展示功能测试、酒店添加、酒店搜索、密码修改功能测试,如表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.3 系统测试结果

通过编写旅游网站管理系统的测试用例,已经检测完毕用户登录模块、酒店查看模块、酒店添加模块、酒店搜索模块、密码修改功能测试,通过这5大模块为旅游网站管理系统的后期推广运营提供了强力的技术支撑。

结论

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

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

参考文献

[1]邢剑飞,翁晶晶,李晓,孙菲,郭云天,吕韦琰. 一种基于物联网的乡村智慧旅游管理系统[P]. 浙江省:CN114422541A,2022-04-29.

[2]侯猛,李莉莉. 一种智慧物联旅游管理系统[P]. 重庆市:CN111035160B,2022-04-22.

[3]于建韬.智慧旅游管理系统的分析与应用[J].佳木斯职业学院学报,2022,38(03):155-157.

[4]Guo Wenru,Ahmed Syed Hassan. Safety Risk Assessment of Tourism Management System Based on PSO-BP Neural Network[J]. Computational Intelligence and Neuroscience,2021,2021.

[5]Huang, Xiaofei,Jagota, Vishal,Espinoza Muñoz, Einer,Flores Albornoz, Judith. Tourist hot spots prediction model based on optimized neural network algorithm[J]. International Journal of System Assurance Engineering and Management,2021(prepublish).

[6]Sun Wanxin,Tsai Sang-Bing. Research on the Construction of Smart Tourism System Based on Wireless Sensor Network[J]. Mathematical Problems in Engineering,2021,2021.

[7]邓永涛,胡文文,潘涛,张颖,陈欢.基于JavaEE和微信公众号的微信矩阵旅游管理系统[J].电子测试,2021(08):77-78+47.DOI:10.16520/j.cnki.1000-8519.2021.08.032.

[8]郑清兰.“互联网+”旅游管理系统的设计与实现[J].攀枝花学院学报,2021,38(02):55-61.DOI:10.13773/j.cnki.51-1637/z.2021.02.010.

[9]周巧凤.浅谈智慧旅游管理系统提高景区绩效水平[J].中国管理信息化,2020,23(18):107-108.

[10]张文正.RBF神经网络的旅游管理系统安全风险评价[J].现代电子技术,2020,43(13):65-68.DOI:10.16652/j.issn.1004-373x.2020.13.016.

[11]杨雪.旅游管理信息化探析[J].旅游纵览(下半月),2020(08):60-61.

[12]刘旸,丁仲德.基于旅游管理系统理论的青岛市导游素质提升策略研究[J].中共青岛市委党校.青岛行政学院学报,2019(06):85-89.DOI:10.13392/j.cnki.zgqd.2019.06.016.

[13]黄强,林宏贵,张鹏飞,裴玮.基于北斗位置服务的GIS可视化旅游管理系统设计与实现——以四姑娘山为例[J].技术与市场,2018,25(12):19-23.

[14]朱娜.大数据时代下《旅游管理信息系统》教学改革初探[J].现代营销(经营版),2018(12):213-214.DOI:10.19921/j.cnki.1009-2994.2018.12.173.

[15]张舒瑶.基于我国旅游管理信息化问题的探讨[J].现代经济信息,2018(22):357.

[16]. 论贵州“旅普”基础数据在旅游管理中的应用[C]//.贵州省旅游资源大普查地学旅游研究论文集.,2017:344-350.

[17]周子涵. 大连森林动物园旅游管理系统的设计与实现[D].大连理工大学,2016.

致 谢

逝者如斯夫,不舍昼夜。转眼间,大用户用户活便已经接近尾声,人面对着离别与结束,总是充满着不舍与茫然,我亦如此,仍记得那年秋天,我迫不及待的提前一天到了学校,面对学校巍峨的大门,我心里充满了期待:这里,就是我新生活的起点吗?那天,阳光明媚,学校的欢迎仪式很热烈,我面对着一个个对着我微笑的同学,仿佛一缕缕阳光透过胸口照进了我心里,同时,在那天我认识可爱的室友,我们携手共同度过了这难忘的两年。如今,我望着这篇论文的致谢,不禁又要问自己:现在,我们就要说再见了吗?

感慨莫名,不知所言。遥想当初刚来学校的时候,心里总是想着工科学校会过于板正,会缺乏一些柔情,当时心里甚至有一点点排斥,但是随着我对学校的慢慢认识与了解,我才认识到了她的美丽,她的柔情,并且慢慢的喜欢上了这个校园,但是时间太快了,快到我还没有好好体会她的美丽便要离开了,但是她带给我的回忆,永远不会离开我,也许真正离开那天我的眼里会满含泪水,我不是因为难过,我只是想将她的样子映在我的泪水里,刻在我的心里。最后,感谢我的老师们,是你们教授了我们知识与做人的道理;感谢我的室友们,是你们陪伴了我如此之久;感谢每位关心与支持我的人。

少年,追风赶月莫停留,平荒尽处是春山。

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

Guess you like

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