ssm+mysql hotel accommodation reservation system-computer graduation project source code 87020

Table of contents

Summary

1 Read

1.1 Research background

1.2opening intention

1.3ssm stile

1.4论文结构YOCHA节安控 2

2Liquor store, residence and accommodation system structureSystem structure analysis 

2.1 Possibility analysis

2.2 System flow analysis

2.2.1 Data addition process

2.2.2 Several upgrades and improvements< /span>

2.2.3 several stationary drainage steps< /span>

2.3 System function analysis

2.3.1Functionality analysis

2.3.2Ineffectiveness analysis

2.4 System example analysis

2.5Chapter summary

3 Hotel accommodation reservation systemOverall design

3.1 System structure design

3.2 System function module design

3.2.1Overall functional module design

3.2.2User module design

3.2.3 Comment management module design

3.2.4Hotel management module design

3.3 ​​Database Design

3.3.1 Database conceptual structure design

3.3.2 Database logical structure design

3.4Chapter summary

4Hotel accommodation reservation systemDetailed design and implementation 

4.1User function module

4.1.1 Previous stage interface

4.1.2 UseNote interface

4.1.3 UseClimb interface 22< /span>

4.1.4 Hotel information interface

4.1.5 My AccountInterface

4.1.6 Liquor store information surface

4.2Management staff function model

4.2.1 Spreading image management interface

4.2.2 Usage management interface

4.2.3 Resource managementInterface< /span>

4.2.4 Model management interface

5迟统测试 31

5.1System testing purpose 31

5.2 System testing example 31

5.3 System results 32

结论 33

References 34

  

Summary

In the information society, there is a need for targeted ways to obtain information, but the expansion of the ways is basically the direction that people strive for. Due to deviations in the perspective, people can often obtain different types of information, which is also the most difficult problem for technology to overcome. subject. In view of problems such as the hotel accommodation reservation system, the hotel accommodation reservation system is researched and analyzed, and then a hotel accommodation reservation system is developed and designed to solve the problem.

The main functional modules of the hotel accommodation reservation system include system user management, announcement information management, resource management, hotel information, type management, reservation information, complaint information, hotel ranking, and unsubscription information. It adopts an object-oriented development model for software development and The hardware setup can well meet the needs of actual use, and the corresponding software setup and program coding work have been improved. MySQL is used as the main storage unit for background data, and the SSM framework, JAVA technology, and Ajax technology are used to develop the business system. Coding and its development realize 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 needs and technical issues of the hotel accommodation reservation system, prove the necessity and technical feasibility of the system, and 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 hotel accommodation reservation System and deployment operations use it.

Keywords: SSM technology; MYSQL; hotel accommodation reservation system

Abstract

In the information society, there is a need for targeted access to information, but the expansion of the access is basically the direction of people's efforts. Because of the deviation in 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 hotel accommodation reservation system, the hotel accommodation reservation system is studied and analyzed, and then the hotel accommodation reservation system is developed and designed to solve the problems.

The main functional modules of the hotel accommodation reservation system include system user management, announcement information management, resource management, hotel information, type management, reservation information, complaint information, hotel ranking, and unsubscription information. The object-oriented development mode is adopted for software development and hardware installation, which can well meet the actual use needs and improve the corresponding software installation and program coding, MySQL is used as the main storage unit of background data, and SSM framework, JAVA technology and Ajax technology are used to code and develop the business system, realizing all functions of the system. This report first analyzes the background, role and significance of the research, laying a foundation for the rationality of the research work. This paper analyzes the requirements and technical problems of the hotel accommodation reservation 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, and finally realizes the hotel accommodation reservation system and deploys and operates it.

Keywords:SSM technology; MYSQL; Hotel accommodation reservation syste

1 Read

1.1 Research background

In recent years, with the development of society, the flow of people staying in hotels has continued to increase, and the number of hotels has also increased. As a result, the amount of information in the management of hotel rooms has also continued to increase exponentially. Therefore, the traditional hotel information management method More and more problems are exposed, which consumes manpower and is inefficient. At this time, hotels are in urgent need of various systems that can enable hotel staff to manage the huge amount of information faster, more conveniently and more accurately.

Today, when Internet technology is ubiquitous, people's lives are inseparable from computers, using them for work, study and even shopping. For example, when people go on a business trip or travel abroad, they usually choose to book a room online in advance according to their own needs, which greatly saves the time of finding a room. At this time, the hotel needs a corresponding guest room reservation management system to manage guest rooms and reservation information.

For hotels with a large number of rooms, it is particularly important to use a hotel system to manage room information and reservation information. This system not only facilitates customers to make reservations, but also facilitates staff, greatly saving time. Therefore, it is necessary to develop a hotel accommodation reservation system.

1.2 Development significance

Hotel Accommodation Reservation System In terms of expression, it carries out information management of a large amount of hotel room information to facilitate the processing of customers' check-in and check-out. It also provides room reservation functions. Provide convenience to customers. Its functions are mainly manifested in the following aspects:

(1) Improve the management effect of the hotel

The hotel accommodation reservation system can save a lot of manpower and material resources, increase the hotel's service items, improve the hotel's service level, and reduce hotel management loopholes, thereby reducing the overall management cost and improving the hotel's economic effect. The complete reservation function can effectively prevent the phenomenon of unavailable rooms for rent or rebooking of rooms, thereby increasing the occupancy rate of rooms. Publish hotel event announcement information to customers in a timely manner to increase room revenue.

(2) Improve service quality

The computer itself processes information very quickly, which can greatly save guests waiting time when checking in, checking out, and paying. The comprehensive booking function allows users to quickly browse all hotel room information, allowing users to have a comprehensive understanding of the hotel and choose satisfactory rooms according to their own needs. Overall customer satisfaction.

(3) Improve work efficiency

Information management can greatly improve the speed and accuracy of business operations. The use of a database system to save data avoids the inefficiency of filling out paper orders, and its strict data checking can effectively avoid errors caused by careless manual operations. 1.3SSM framework

SSM is SpringMVC+Spring+Mybatis. These three frameworks have their own unique advantages, so combining them can create strong sparks. Designers can create Web applications without spending a lot of effort, and this program also has the characteristics of clear hierarchy, upgrade and update operations that do not affect normal use, and allows multiple uses. This composite framework forms a system with a complete structure, powerful functions and good structure: SpringMVC separates each module, Spring makes development more flexible and convenient, and uses Mybatis to allow developers to directly manipulate objects. Each level has a detailed division of labor and realizes each level. The decoupling between them makes the code more flexible and streamlined. This framework allows programmers to avoid individual errors during the development period that will lead to overall destruction, and to respond to new customer demands for the product in the later stages.

1.4 Paper structure and chapter arrangement

The paper will be organized hierarchically. In addition to the abstract, acknowledgments, and literature references, the main text will also analyze the website requirements, describe the general design and implemented functions, and finally list some debugging records. The main structure of the paper is as follows:

Chapter One Introduction. The first chapter mainly introduces the background of the project research, the current situation of system development and the research content and main work of this article.

Chapter 2: System requirements analysis. Chapter 2 mainly conducts demand analysis from the aspects of users and functions of the system.

Chapter 3: System Design. Chapter 3 mainly carries out functional design of the system framework, system function modules and database.

Chapter 4: System implementation. Chapter 4 mainly introduces the system framework construction and the implementation of the system interface.

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

Chapter 6: Summary.

2 Analysis of hotel accommodation reservation 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. Then, a feasibility analysis is performed on the system development, which usually includes technical feasibility, economic feasibility, etc. The feasibility analysis is also an analysis from the overall perspective of the project. Then the specific requirements of the project are analyzed. The analysis method is generally implemented 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 funds during the project startup period, so It is still economically feasible. Try to meet the needs of users with the least amount of money. Save money on labor costs and equipment costs. We will go further and further on the road of paperlessness and high efficiency.

So there is no problem with economic feasibility.

(2) Operational feasibility:

The design of this project refers to several cases of website development under this mode, analyzes their operation interfaces, and combines many cases to highlight people-oriented simplified operations, so people with basic computer knowledge can operate this project.

Therefore, there is no problem with operational feasibility.

(3) Technical feasibility:

Technical feasibility refers to the feasibility of building a framework, as well as the system's adaptability to technological upgrading when better technologies emerge, and the development time and cost ratio.

Existing Java technology can cater to the construction of all e-commerce systems. When developing this hotel accommodation reservation system, I used Java+MYSQL to run the overall program.

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

(4) Legal feasibility:

From a developer's perspective, Java and MYSQL are open source and free online, and there will be no legal disputes regarding intellectual property rights.

From a user perspective, as long as contraband is no longer sold on the system, treaties and agreements are made with the system, and illegal payments are eliminated.

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

2.2 System process analysis

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

2.2.1 Data addition process

After the user successfully logs in to the system can add data. The number of added data is specific and generated by the system. The user cannot arbitrarily Fill in, except for the number, other added information is filled in by the user. The filled-in information is verified by the system. If the verification is legal, it will show that the data has been added successfully. Otherwise, the addition has not been successful. Figure2 -1 shows the process when adding data.

Figure 2-1 Data addition flow chart

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 is some useless data in the system, the relevant managers still a>These data can be deleted. Figure2-3 is the flow chart for data deletion.

Figure 2-3 Data deletion flow chart

2.3 System function analysis

2.3.1 Functional analysis

According to the roles of the hotel accommodation reservation system, I divided it into two parts: the system user management module and the administrator management module.

User management module:

(1) User registration and login: Users register as members and log in to the hotel accommodation reservation system; users add, delete, modify and check personal information, such as personal information and password changes.

(3) Announcement Board: On the home page navigation bar, we will see the menu "Announcement Message", we click to enter it In the future, you will see all announcements posted by administrators in the background;

(4)Hotel Information: On the homepage navigation bar we will see “Hotel Information ” After we click to enter this menu, we will see hotel information released by all administrators in the background. Information, you can like the hotel information you like. If you want to find this information faster next time, you can also collect and comment;

(5)Hotel information: On the homepage navigation bar we will see “Hotel information " After we click to enter this menu, we will see all the hotel information released by the administrator in the background. , we choose to know hotel’s reservation information, OK a>;+Comment+CollectionBooking+Complaint+Like

6Hotel ranking: Click "Hotel Ranking" on the homepage navigation bar to pop up is a list of hotel ranking information. You can click on any hotel ranking to learn its specific information. Including title name, hotel name, hotel star rating, comprehensive rating, etc.;

(6) My Favorites: Under "My" you can view and manage "My Favorites" information, view your favorites, and delete the favorites if you don't like them;

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

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

Administrator management module:

(1) Login: The administrator's account is directly set in the data table and does not require registration;

(2)AnnouncementManagement: When clicking "AnnouncementManagement" menu, there will be an announcementinformation submenu, you can do thisone a> modules are added, deleted, modified and checked;

(3)SystemUser management: When clicking "SystemWhen selecting the "User Management" menu, the administrator+system user three submenus will appear. You can Three modules perform add, delete, modify and check operations;

(4)Resource moduleManagement: When clicking "ResourcesWhen the menu "Management" appears,hotel information + information classificationthesetwo The sub-menu can manage the hotel information submitted by the user at the front desk, and at the same time manage the Add, delete, modify and check information;

(5)ModuleManagement: When clicking "Module Management"When this menu appears,hotel information + type information + reservation information + complaint information + hotel ranking + cancellation informationthis a>; submenus, which can add, delete, modify and check the six modulesSix

2.3.2 Non-functional analysis

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

Table3-1Liquor store, residence and accommodation system connectionNon Functional ability demand table

safety

Mainly refers to the installation of the hotel accommodation reservation system database. The use of the database and the setting of the password must comply with the standards.

reliability

Reliability means that the hotel accommodation reservation system can operate according to the user's instructions. After testing, the reliability is over 90%.

performance

Performance is a necessary condition for the hotel accommodation reservation 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 hotel accommodation reservation system and operate.

maintainability

The maintainability of hotel accommodation reservation system development is very important. After testing, there is no problem with maintainability.

2.4 Series example analysis

Through the analysis of 2.3 functions, the use case diagram of this hotel accommodation reservation system is obtained:

An example of a user role is shown in Figure 2-3.

Figure 2-3 Hotel accommodation reservation system user role use case diagram

The administrator of the web backend management maintains all data information in the entire hotel accommodation reservation system. An example of the administrator role is shown in Figure 2-4.

figure 2-4 Hotel accommodation reservation system administrator role use case diagram

2.5 Summary of this chapter

This chapter mainly determines the functions to be realized by the entire hotel accommodation reservation system through feasibility analysis, process analysis, functional requirements analysis, and system use case analysis of the hotel accommodation reservation system. It also provides standards for code implementation and testing of hotel accommodation reservation systems.

3 Overall design of hotel accommodation reservation system

The main contents discussed in this chapter includethe functional module design and database system design of the hotel accommodation reservation system.

3.1 System structure design

This hotel accommodation reservation system is architecturally divided into three layers: presentation layer (UI), business logic layer (BLL) and data layer (DL).

Figure 3-1 System architecture design diagram of hotel accommodation reservation system

Presentation layer (UI): Also known as the UI layer, it mainly completes the UI interaction function of the hotel accommodation reservation system. A good UI can improve the user experience and enhance the user's comfort when using the hotel accommodation reservation system. The UI interface design must also adapt to different versions of hotel accommodation reservation systems and different size resolutions to achieve good compatibility. The UI interaction function requirements are reasonable, and users must obtain consistent interaction results when performing interactive operations. This requires the presentation layer to be well connected with the business logic layer.

Business Logic Layer (BLL): Mainly completes the data processing function of this hotel accommodation reservation system. The data transmitted by the user from the presentation layer is processed by the business logic layer and delivered to the data layer. The data read by the system from the data layer is processed by the business logic layer and delivered to the presentation layer.

Data layer (DL): Since the data of this hotel accommodation reservation system is placed in the mysql database on the server side, the part that belongs to the service layer can be directly integrated into the business logic layer, so there is only a database in the data layer, which mainly completes this task. Data storage and management functions of hotel accommodation reservation system.

3.2 System function module design

3.2.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 hotel accommodation reservation system were analyzed based on the requirements. Then the next step is to start designing the architecture, main functions and database of this hotel accommodation reservation system. The hotel accommodation reservation system is derived based on the demand analysis in the previous chapter. Its overall design module diagram is shown in Figure 3-2.

Figure 3-2 Function module diagram of hotel accommodation reservation system

3.2.2 User module design

The backend manager can add, delete, modify and check the users registered in the frontend. The user module structure diagram is as follows:

Figure 3-3 Member user module structure diagram

3.2.3 Comment management module design

The hotel accommodation reservation system is an open platform for communication. Member users can communicate on the platform to increase the interaction between users. But at the same time, in order to better standardize the content of messages and give administrators the function of deleting inappropriate comments, a message management module needs to be specially designed. The specific structure diagram is as follows:

Figure 3-4 Structural diagram of message module

3.2.4 Hotel management module design

Hotel accommodation reservation system needs to store a lot ofhotel reservation information, and its module functional structure , the specific structure diagram is as follows:

Figure 3-5 Hotel module structure diagram

3.3 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.3.1 Database conceptual structure design

The following is the total E-R entity relationship diagram of the main database tables in the entire hotel accommodation reservation system.

Figure 3-6 Overall E-R relationship diagram of hotel accommodation reservation system

According to the total E-R relationship diagram of the database of the hotel accommodation reservation system, it can be concluded that the hotel accommodation reservation system requires many E-R diagrams. Here are some main database E-R model diagrams.

Figure 3-7 Unsubscribe information E-R relationship diagram

Figure 3-8 Hotel information E-R relationship diagram

Figure 3-9 Complaint information E-R relationship diagram

Figure 3-10 Comment E-R relationship diagram

3.3.2 Database logical structure design

From the total E-R relationship diagram in the hotel accommodation reservation 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.

unsubscribe_information表:

name

type

length

not null

primary key

Comment

unsubscribe_information_id

int

11

yes

yes

Unsubscribe information ID

order_no

varchar

64

no

no

order number

hotel_name

varchar

64

no

no

Hotel name

hotel_star

varchar

64

no

no

Hotel star rating

room_type

varchar

64

no

no

Room type

room_price

varchar

64

no

no

room price

user_information

int

11

no

no

User Info

user_name

varchar

64

no

no

username

contact_number

varchar

64

no

no

contact number

booking_days

varchar

64

no

no

Booking days

total_reservation_price

varchar

64

no

no

Total booking price

reason_for_unsubscription

text

0

no

no

Reason for unsubscribing

examine_state

varchar

16

yes

no

Approval Status

examine_reply

varchar

16

no

no

moderation reply

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

Update time

type_management table:

name

type

length

not null

primary key

Comment

type_management_id

int

11

yes

yes

Type management ID

room_type

varchar

64

no

no

Room type

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

Update time

system_user table:

name

type

length

not null

primary key

Comment

system_user_id

int

11

yes

yes

System user ID

user_name

varchar

64

no

no

username

user_gender

varchar

64

no

no

User gender

examine_state

varchar

16

yes

no

Approval Status

recommend

int

11

yes

no

Intelligent Recommendation

user_id

int

11

yes

no

User ID

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

Update time

subscription_information表:

name

type

length

not null

primary key

Comment

subscription_information_id

int

11

yes

yes

Booking information ID

order_no

varchar

64

no

no

order number

hotel_name

varchar

64

no

no

Hotel name

hotel_star

varchar

64

no

no

Hotel star rating

room_type

varchar

64

no

no

Room type

room_price

varchar

64

no

no

room price

user_information

int

11

no

no

User Info

user_name

varchar

64

no

no

username

contact_number

varchar

64

no

no

contact number

check_in_time

datetime

0

no

no

check in time

booking_days

int

11

no

no

Booking days

total_reservation_price

varchar

64

no

no

Total booking price

subscription_remarks

varchar

64

no

no

Reservation notes

order_status

varchar

64

no

no

Order Status

examine_state

varchar

16

yes

no

Approval Status

examine_reply

varchar

16

no

no

moderation reply

pay_state

varchar

16

yes

no

Payment status

pay_type

varchar

16

no

no

Payment Types

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

Update time

hotel_ranking table:

name

type

length

not null

primary key

Comment

hotel_ranking_id

int

11

yes

yes

Hotel ranking ID

title_name

varchar

64

no

no

title name

hotel_name

varchar

64

no

no

Hotel name

hotel_star

varchar

64

no

no

Hotel star rating

comprehensive_score

varchar

64

no

no

Overall rating

hotel_cover

varchar

255

no

no

hotel cover

hotels_address

varchar

64

no

no

Hotel address

hotel_profile

longtext

0

no

no

Hotel introduction

praise_len

int

11

yes

no

Number of likes

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

Update time

hotel_information table:

name

type

length

not null

primary key

Comment

hotel_information_id

int

11

yes

yes

Hotel information ID

hotel_name

varchar

64

no

no

Hotel name

hotel_star

varchar

64

no

no

Hotel star rating

comprehensive_score

varchar

64

no

no

Overall rating

room_type

varchar

64

no

no

Room type

room_price

int

11

no

no

room price

hotel_cover

varchar

255

no

no

hotel cover

hotels_address

varchar

64

no

no

Hotel address

room_introduction

longtext

0

no

no

Room introduction

hits

int

11

yes

no

Clicks

praise_len

int

11

yes

no

Number of likes

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

Update time

complaint_information表:

name

type

length

not null

primary key

Comment

complaint_information_id

int

11

yes

yes

Complaint information ID

hotel_name

varchar

64

no

no

Hotel name

hotel_star

varchar

64

no

no

Hotel star rating

user_information

int

11

no

no

User Info

user_name

varchar

64

no

no

username

contact_number

varchar

64

no

no

contact number

complaint_content

text

0

no

no

Complaints

examine_state

varchar

16

yes

no

Approval Status

examine_reply

varchar

16

no

no

moderation reply

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

Update time

comment table:

name

type

length

not null

primary key

Comment

comment_id

int

11

yes

yes

Comment ID

user_id

int

11

yes

no

Commenter ID

reply_to_id

int

11

yes

no

Reply to comment ID

content

longtext

0

no

no

content

nickname

varchar

255

no

no

Nick name

avatar

varchar

255

no

no

Avatar address

create_time

timestamp

0

yes

no

creation time

update_time

timestamp

0

yes

no

Update time

source_table

varchar

255

no

no

Source table

source_field

varchar

255

no

no

Source field

source_id

int

10

yes

no

Source ID

3.4 Summary of this chapter

The demand analysis of the entire hotel accommodation reservation 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 hotel accommodation reservation system

The detailed design and implementation of the hotel accommodation reservation system is mainly based on the previous demand analysis of the hotel accommodation reservation system and the overall design of the hotel accommodation reservation system to design the page and implement the business logic. This article mainly introduces the hotel accommodation reservation system interface implementation and business logic implementation.

4.1User function module

4.1.1 Previous stage interface

When entering the hotel accommodation reservation system, the first thing that comes into view is the navigation bar of the system. Below is the carousel chart and system content. The main interface is shown in Figure 4-1 below.

Figure 4-1 Front page interface diagram

4.1.2 User registration interface

Those who are not formal members of the hotel reservation system can register online. If you do not have an account in the hotel reservation system, add "Register" and fill in your account number + password + confirmation password + nickname + email + mobile phone. After waiting for the number and then clicking the "Register" button, it will first verify whether there is any empty data entered, verify again whether the password and confirmation password are the same, and finally verify whether the entered account name is the same as the account name already registered in the database table. Only After all verifications are complete, the membership registration can be successful. The user registration interface is shown in Figure 4-2 below.

Figure 4-2 Front-end user registration interface diagram

The key code of registration logic is as follows.

/**

     * register

     * @return

     */

    @PostMapping("register")

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

        ​​​​//Query user

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

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

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

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

        if (list.size()>0){

            return error(30000, "User already exists");

        }

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

        service.insert(map);

        return success(1);

}

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

        BufferedReader br = null;

        StringBuilder sb = new StringBuilder("");

        try{

            br = reader;

            String str;

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

                sb.append(str);

            }

            br.close();

            String json = sb.toString();

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

        }catch (IOException e){

            e.printStackTrace();

        }finally{

            if (null != br){

                try{

                    br.close();

                }catch (IOException e){

                    e.printStackTrace();

                }

            }

        }

        return null;

    }

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

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

        baseMapper.insert(entity);

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

}

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;

        QueryWrapper wrapper = new QueryWrapper<User>();

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

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

            map.put("username", username);

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

        }

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

            map.put("email", email);

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

        }

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

            map.put("phone", phone);

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

        }else{

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

        }

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

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

        }

        //判断是否有这个用户

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

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

        }

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

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

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

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

        if (groupList.size()<1){

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

        }

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

        //查询用户审核状态

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

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

            if (res==null){

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

            }

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

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

            }

        }

        //查询用户状态

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

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

        }

        String md5password = service.encryption(password);

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

            // 存储Token到数据库

            AccessToken accessToken = new AccessToken();

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

            accessToken.setUser_id(byUsername.getUserId());

            tokenService.save(accessToken);

            // 返回用户信息

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

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

            JSONObject ret = new JSONObject();

            ret.put("obj",user);

            return success(ret);

        } else {

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

        }

}

    public String select(Map<String,String> query,Map<String,String> config){

        StringBuffer sql = new StringBuffer("select ");

        sql.append(config.get(FindConfig.FIELD) == null || "".equals(config.get(FindConfig.FIELD)) ? "*" : config.get(FindConfig.FIELD)).append(" ");

        sql.append("from ").append("`").append(table).append("`").append(toWhereSql(query, "0".equals(config.get(FindConfig.LIKE))));

        if (config.get(FindConfig.GROUP_BY) != null && !"".equals(config.get(FindConfig.GROUP_BY))){

            sql.append("group by ").append(config.get(FindConfig.GROUP_BY)).append(" ");

        }

        if (config.get(FindConfig.ORDER_BY) != null && !"".equals(config.get(FindConfig.ORDER_BY))){

            sql.append("order by ").append(config.get(FindConfig.ORDER_BY)).append(" ");

        }

        if (config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE))){

            int page = config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE)) ? Integer.parseInt(config.get(FindConfig.PAGE)) : 1;

            int limit = config.get(FindConfig.SIZE) != null && !"".equals(config.get(FindConfig.SIZE)) ? Integer.parseInt(config.get(FindConfig.SIZE)) : 10;

            sql.append(" limit ").append( (page-1)*limit ).append(" , ").append(limit);

        }

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

        return sql.toString();

}

    public List selectBaseList(String select) {

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

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

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

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

        }

        return list;

}

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轮播图管理界面图

轮播图管理关键代码如下所示。

@RequestMapping(value = "/del")

    @Transactional

    public Map<String, Object> del(HttpServletRequest request) {

        service.delete(service.readQuery(request), service.readConfig(request));

        return success(1);

}

4.2.2系统用户界面

酒店住宿预定系统中的管理人员是可以对前台注册的用户进行管理的,也可以对管理员进行管控。界面如下图4-8所示。

图4-8系统用户管理界面图

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

public List selectBaseList(String select) {

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

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

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

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

        }

        return list;

}

4.2.3资源管理界面

酒店住宿预定系统中的管理人员在“资源管理”这一菜单下是可以对酒店住宿预定系统内的酒店资讯、资讯分类进行管控的,其管理界面如下图4-9所示。

图4-9资源管理界面图

4.2.4 模块管理界面

酒店住宿预定系统中的管理人员在“模块管理”这一菜单下是可以对酒店住宿预定系统内的酒店信息、类型信息、预定信息、酒店排名、退订信息、投诉信息进行管控的,其管理界面如下图4-10所示。

图4-10模块管理界面图

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、Java技术、MYSQL,这些技术都是在以前的学习中学到了,其中许多的设计思路和方法都是在以前不断地学习中摸索出来的经验,其实对于我们来说工作量还是比较大的,但是正是由于之前的积累与准备,才能顺利的完成这个项目,由此看来,积累经验跟做好准备是十分重要的事情。

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

参考文献

[1]张丽景,张文川.基于对比分析法的高职“MySQL数据库”课程设计——以兰州石化职业技术大学为例[J].现代信息科技,2022,6(21):188-191.DOI:10.19850/j.cnki.2096-4706.2022.21.046.

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

[3]谢霜.基于Java技术的网络管理体系结构的应用[J].网络安全技术与应用,2022(10):14-15.

[4]丁鹏,梁彬. 带有在线预定酒店系统图形用户界面的显示屏幕面板[P]. 四川省:CN307575205S,2022-09-30.

[5]苏婉怡,揣小龙,赵国松,王煜尧.基于Java技术的考试系统关键点研究[J].无线互联科技,2022,19(18):58-60.

[6]杨玉莲.基于SSM框架的智能煤质化验室综合管理系统[J].煤矿现代化,2022,31(05):100-104+109.DOI:10.13606/j.cnki.37-1205/td.2022.05.005.

[7]唐小玲.基于SSM框架的资质管理系统开发解析[J].科学技术创新,2022(26):80-83.

[8]黄人薇,朱冬玲,唐世文.课程目标达成度评价设计与实践的研究——以MySQL数据库基础与应用为例[J].电脑与电信,2022(09):34-38.DOI:10.15966/j.cnki.dnydx.2022.09.012.

[9]杨迎.Java技术在嵌入式系统中的作用探讨[J].无线互联科技,2022,19(14):96-98.

[10]张若淼,吴明霞.基于评论情感分析需求的酒店客房预定系统[J].电脑编程技巧与维护,2021(12):13-14+20.DOI:10.16184/j.cnki.comprg.2021.12.005.

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

[12]蔡浪,刘彬.基于SSM框架的医院感染信息实时监测系统设计与实现[J].现代信息科技,2021,5(18):24-27.DOI:10.19850/j.cnki.2096-4706.2021.18.007.

[13]Sufian Khwaldeh,Rami S. Alkhawaldeh,Ra’ed Masa’deh,Issam AlHadid,Ala’aldin Alrowwad. The impact of mobile hotel reservation system on continuous intention to use in Jordan :[J]. Tourism and Hospitality Research,2020,20(3).

[14]付晓.会场预定——会议酒店预定翻译案例[J].中国会展,2020(13):72-73.

[15]郭泉恩,周佳蜜,罗丹利.酒店网络预定的影响因素及国外经验借鉴——以庐山为例[J].广西经济管理干部学院学报,2019,31(04):43-50.

[16]沈力娜.商务酒店电话预定服务存在的问题及对策[J].现代交际,2019(04):52-53.

[17]Li-Yang Hsieh. Exploring the Behavior Intention of Online Travel Agency Hotel Reservation with Technology Acceptance Model[P]. Intelligent Science and Technology,2019.

致  谢

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

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

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

免费领取项目源码,请关注❥点赞收藏并私信博主,谢谢~

Guess you like

Origin blog.csdn.net/vx2_Biye_Design/article/details/133784603