ssm web-based network rental system graduation project - with source code 250910

Table of contents

Summary

1 Introduction

1.1 Research Significance

1.2 Research status and development trend

1.3 Paper Structure and Chapter Arrangement

2 Systematic analysis of the network renting system 

2.1 Feasibility analysis

2.2 System flow analysis

2.2.1 Data addition process

2.2.2 Data modification process _

2.2.3 Data deletion process _

2.3 System function analysis

2.3.1 Functional Analysis

2.3.2 Non-functional analysis

2.4 System use case analysis

2.5 Summary of this chapter

3 Overall Design of the Network Rental System

3.1 System architecture design

3.2 System function module design

3.2.1 Overall functional module design

3.2.2 User module design

3.2.3 Comment management module design

3.2.4 Housing information management module design

3.2.5 Housing reservation management module design

3.3 Database design

3.3.1 Database conceptual structure design

3.3.2 Database logical structure design

3.4 Summary of this chapter

4 Detailed design and implementation of the network renting system 

4.1 User Function Module

4.1.1 Front page interface

4.1.2 User registration interface

4.1.3 User login interface 22

4.1.4 My account interface

4.1.5 Housing information interface

4.1.6 Housing details interface

4.3 Administrator function module

4.3.1 Site management interface

4.3.2 User Management Interface

4.3.3 Housing information interface

4.3.4 More management interfaces

5 System Test 31

5.1 Purpose of system testing 31

5.2 System test cases 31

5.3 System test results 32

Conclusion 33

References 34

thank you  

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 the problems of the network renting system and other problems, the research and analysis of the network renting system is carried out, and then the network renting system is developed and designed to solve the problems.

The main functional modules of the network rental system include user management, room type management, area management, housing information, and housing reservation. 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 setup and program coding work, adopted MySQL as the main storage unit of background data, adopted SSM framework, JAVA technology, Ajax technology to code and develop the business system, and realized all the functions 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 requirements and technical problems of the network rental 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 network rental system and Deployment runs use it.

Keywords : SSM technology; MYSQL; network rental 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 network rental system, this paper studies and analyzes the network rental system, and then develops and designs the network rental system to solve the problems.

The main functional modules of the network rental system include user management, house type management, regional management, house source information and house source 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 architecture and program coding, take MySQL as the main storage unit of background data, and adopt SSM framework, Java technology Ajax technology encodes and develops the business system, and realizes all the functions of the system. 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 network rental 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 network rental system and deploys it.

Keywords:SSM technology; MYSQL; Network rental system

1 Introduction

1.1 Research Significance

 Through the analysis of the current research status of the network renting system at home and abroad, the deficiencies in it are found; a new model of the network renting system is proposed. The system is composed of three parts: user information query module, housing information management module and rental management module; and a corresponding application system is developed on this platform, which realizes the online rental function and provides users with convenient and fast online rental services, thereby Improve people's awareness and utilization rate of online renting. This paper also briefly introduces the key technology of the system——Web programming language; finally, it gives the test results of the whole system. This system has good practicability and expansibility, can meet the needs of most people, and can be extended to other fields. The actual operation shows that the system is practical and reliable, and has achieved the expected goal. At the same time, some deficiencies and improvements are pointed out, and the next research direction is proposed. Hope to lay a good foundation for further in-depth research in the future.

1.2 Research status and development trend

With the rapid development of the Internet, more and more people use the Internet for various exchanges and communication, but they also face many security problems. In this case, how to ensure the information security in the network environment is a very important and urgent problem to be solved. At present, domestic and foreign scholars' research on network security technology mainly focuses on intrusion detection, firewall and so on. However, there are relatively few researches on user authentication technology. Since most of the current online housing rental systems require users to enter their real names and ID numbers to enter the room, the accuracy of user identities directly affects the stability and reliability of the entire system. In addition, with the advent of the e-commerce era, people pay more and more attention to the safety of online shopping, which requires us to improve the safety factor of online transactions. Therefore, it is imperative to study an efficient and reliable network rental authentication mechanism. Based on the in-depth study of the current mainstream authentication technology, combined with the current network topology, this paper designs a new network rental platform. It uses third-party software to manage and maintain various functional modules of the network rental system. The platform can effectively ensure that private data such as user identity information and house status are not leaked or tampered with. At the same time, it can also realize the identity verification of the tenant, so as to ensure the security of the tenant's property. Since the traditional means of identification can no longer meet the growing needs of people in modern society, how to build a more secure, reliable, efficient and easier-to-operate authentication mechanism is particularly important. The authentication technology based on public key cryptography shows unique advantages in solving this problem. It can not only resist various attacks, but also has high security, high efficiency and low cost. Therefore, it has received extensive attention and research.

1.3 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 One Introduction. The first chapter mainly introduces the background of the subject research, the status quo of system development and the research content 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 online house rental 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 Java technology can cater to the construction of all e-commerce systems. When developing this network rental system, I used Java+MYSQL to run the overall program.

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

(4) Legal feasibility:

From the perspective of developers, Java 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 network rental system, I divided it into two parts: the registered user management module and the administrator management module.

User management module:

(1) User registration and login: the user registers as a member and logs into the online rental system; the user adds, deletes, modifies and checks personal information, such as personal information and password modification.

(3) Bulletin board: On the navigation bar of the homepage, we will see the menu of " Bulletin News ". After we click to enter, we will see the bulletin information released by all administrators in the background;

(4) Housing information: On the navigation bar of the home page, we will see the menu of " Housing Information". After we click to enter, we will see all the housing information released by the administrator in the background. Like the listing information, if you want to find this information faster next time, you can also bookmark and comment;

(5) Housing information : On the navigation bar of the homepage, we will see the menu of " Housing Information ". After we click to enter, we will see all the housing information released by the administrator in the background . We choose to know For the reservation information of the listing , you can like + bookmark + book + comment ;

(6) 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) Login: The account of the administrator is directly set and generated in the data table, and no registration is required;

(2) Site management: When you click on the "Site Management" menu, two sub-menus will appear, carousel map + bulletin board, and you can add, delete, modify and check these two modules;

(3) User management: When you click on the "User Management" menu, two sub-menus for administrators and registered users will appear, and you can add, delete, modify and query these two

(4) Content management: When you click on the "Content Management" menu, there will be two sub-menus of housing information + information classification , which can manage the housing information submitted by the user at the front desk , and at the same time manage the housing information displayed at the front desk. Add, delete, modify and check the source information ;

(5) More management: When you click on the "More" menu, four sub-menus will appear: housing information + area management + room type management + housing reservation , and you can add, delete, modify and check these four modules ;

2.3.2 Non-functional analysis

The non-functional requirements of the online rental system, such as the security, reliability, performance, and scalability of the online rental system, etc. Specifically, it can be expressed in the following table 3-1:

Table 3- 1 Table of non-functional requirements of the network rental system

safety

Mainly refers to the installation of the network rental system database, the use of the database and the setting of the password must comply with the norms.

reliability

Reliability means that the network rental system can be installed and operated according to the user's instructions. After testing, the reliability is more than 90%.

performance

Performance is a necessary condition for the network rental system to occupy the market, so the best performance is good.

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 network renting system to operate.

maintainability

The maintainability of the development of the network rental system is very important. After testing, there is no problem with the maintainability

2.4 System use case analysis

Through the analysis of 2.3 functions, the use case diagram of this network rental system is obtained:

Figure 2-3 shows an example of a user role.

 

Figure 2-3 User role use case diagram of the network rental system

The administrator on the web background management maintains all data information in the entire network rental system. Figure 2-4 shows an example of an administrator role.

 

figure 2-4 Network rental system administrator role use case diagram

2.5 Summary of this chapter

This chapter mainly determines the functions to be realized by the entire network rental system through the feasibility analysis, process analysis, functional requirement analysis, and system use case analysis of the network rental system. At the same time, it also provides a standard for the code implementation and testing of the network rental system.

3 Overall Design of the Network Rental System

This chapter mainly discusses the functional module design and database system design of the network rental system.

3.1 System architecture design

The network renting system is divided into three layers from the structure: presentation layer (UI), business logic layer (BLL) and data layer (DL).

                              

 

Figure 3-1 System architecture design diagram of the network rental system

 

Presentation layer (UI): Also known as UI layer, it mainly completes the UI interaction function of the online housing rental system. A good UI can improve the user experience of users and enhance the comfort of users when using the online housing rental system. The UI interface design should also adapt to different versions of the network rental system and different size resolutions to achieve good compatibility. The requirements for UI interaction functions are reasonable, and users must obtain consistent interaction results when performing interactive operations, which requires a good connection between the presentation layer and the business logic layer.

Business Logic Layer (BLL): It mainly completes the data processing function of the network rental system. The data transmitted by the user from the presentation layer is processed and delivered to the data layer through the business logic layer, and the data read by the system from the data layer is processed and delivered to the presentation layer through the business logic layer.

Data layer (DL): Since the data of this network rental 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 the network The data storage and management function of the rental system.

3.2 System function module design

3.2.1 Overall functional module design

In the last chapter, the functional requirements and non-functional requirements of the system are mainly analyzed, and the use cases in this network rental system are analyzed according to the requirements. Then the next step is to start designing the architecture, main functions and database of this network rental system. The network rental system is obtained based on the requirements analysis in the previous chapters, and its overall design module diagram is shown in Figure 3-2.

 

Figure 3-2 Functional block diagram of the network rental system

3.2.2 User module design

The background manager can add, delete, modify and check the users registered in the front desk. The structure diagram of the user module is as follows:

 

Figure 3-3 Structure Diagram of Member User Module

3.2.3 Comment management module design

The online house rental system is an open platform of communication nature. Member users can communicate on the platform to increase the interaction between users. But at the same time, in order to better regulate the content of the message and give the administrator the function of deleting inappropriate comments, it is necessary to design a message management module. The specific structure diagram is as follows:

 

Figure 3-4 Structure diagram of message module

3.2.4 Housing information management module design

The network rental system needs to store a lot of housing information, and its module function structure, the specific structure diagram is as follows:

 

Figure 3-5 Housing module structure diagram

3.2.5 Housing reservation management module design

One of the most important functions of the network rental system is reservation . Its module function structure, the specific structure diagram is as follows:

 

Figure 3-5 Structure Diagram of Housing Reservation Module

3.3 Database design

Database design generally includes three major processes: requirements analysis, conceptual model design, and database table establishment. Requirements analysis has been explained in the previous chapters, and conceptual model design has two parts: conceptual model and logical structure design.

3.3.1 Conceptual structure design of database

The following is the ER entity relationship diagram of the main database tables in the entire network rental system.

Figure 3-6 Overall ER relationship diagram of the online housing rental system

 

According to the total ER relationship diagram of the database of the network rental system, it can be concluded that the network rental system needs many ER diagrams, and some main database ER model diagrams are listed here.

 

Figure 3-7 Registered user ER relationship diagram

 

Figure 3-8 ER relationship diagram for housing reservation

 

Figure 3-9 ER relationship diagram of housing information

 

Figure 3-10 Comment ER relationship diagram

3.3.2 Database logical structure design

From the total ER relationship diagram in the network rental system in the previous section, it can be concluded that a lot of data tables need to be created. Here I mainly list several major database table structure designs.

room_type_management table:

name

type

length

not null

primary key

note

room_type_management_id

int

11

yes

yes

Room Type Management ID

layout_of_a_house_or_an_apartment

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

registered_user table:

name

type

length

not null

primary key

note

registered_user_id

int

11

yes

yes

registered user ID

user_name

varchar

64

yes

no

username

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

regional_management table:

name

type

length

not null

primary key

note

regional_management_id

int

11

yes

yes

Region Management ID

region

varchar

64

no

no

area

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

listing_reservation table:

name

type

length

not null

primary key

note

listing_reservation_id

int

11

yes

yes

Listing reservation ID

reservation_number

varchar

64

no

no

order number

listing_no

varchar

64

no

no

Listing number

listing_title

varchar

64

no

no

listing title

layout_of_a_house_or_an_apartment

varchar

64

no

no

room type

region

varchar

64

no

no

area

rent

varchar

64

no

no

rent

deposit

varchar

64

no

no

Deposit

user_name

int

11

no

no

username

contact_number

varchar

64

no

no

contact number

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

listing_information表:

name

type

length

not null

primary key

note

listing_information_id

int

11

yes

yes

Listing Information ID

listing_no

varchar

64

no

no

Listing number

listing_title

varchar

64

no

no

listing title

layout_of_a_house_or_an_apartment

varchar

64

no

no

room type

region

varchar

64

no

no

area

photo

varchar

255

no

no

photo

rent

int

11

no

no

rent

deposit

int

11

no

no

Deposit

address

varchar

64

no

no

address

housing_facilities

text

0

no

no

Listing facilities

surrounding_environment

text

0

no

no

Surroundings

details

longtext

0

no

no

details

hits

int

11

yes

no

hits

praise_len

int

11

yes

no

Likes

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

note

comment_id

int

11

yes

yes

Comment ID

user_id

int

11

yes

no

Reviewer 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 network rental system mainly focuses on the design of the overall system architecture and functional modules, and the database system design is completed by establishing the ER model and database logic system design.

4 Detailed design and implementation of the network renting system

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

4.1用户功能模块

4.1.1 前台首页界面

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

 

图4-1 前台首页界面图

4.1.2 用户注册界面

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

 

图4-2 前台用户注册界面图

注册逻辑关键代码如下所示。

/**

     * 注册

     * @return

     */

    @PostMapping("register")

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

        // 查询用户

        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, "用户已存在");

        }

        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]金珊珊.基于SSM框架的心血管外科护理信息自动管理系统设计[J].自动化技术与应用,2022,41(04):170-173.

[2]伍锦生,伍健聪,黄子斌,李定波,付式斌. 公租房管理系统及公租房签到方法[P]. 广东省:CN114331585A,2022-04-12.

[3]王春丽.基于SSM框架的会议管理信息系统设计与实现[J].电脑编程技巧与维护,2022(03):83-85.DOI:10.16184/j.cnki.comprg.2022.03.016.

[4]戴靓婕.MySQL数据库在自动测试系统中的应用研究[J].长江信息通信,2022,35(03):162-164.

[5]冯凯.“MySQL数据库”课程教学中常见问题探析[J].无线互联科技,2021,18(24):158-159.

[6]陈洁.“MySQL数据库安全”课程教学方法优化分析[J].无线互联科技,2021,18(24):160-161.

[7]黄咏怡, 住房保障 公租房信息系统“双贯标”建设. 马兴瑞 主编,广东年鉴,广东年鉴社,2020,412,年鉴.DOI:10.39320/y.cnki.ygdnj.2021.001641.

[8]钱丽平. 基于区块链和代理重加密的网上租房系统研究[D].南京邮电大学,2021.DOI:10.27251/d.cnki.gnjdc.2021.000758.

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

[10]季杰,陈强仁,朱东.基于Vue.js租房网系统的设计与实现[J].电脑知识与技术,2020,16(16):91-92.DOI:10.14004/j.cnki.ckt.2020.1980.

[11]周海锐. 基于区块链的租房系统设计与实现[D].北京邮电大学,2020.DOI:10.26969/d.cnki.gbydu.2020.002490.

[12]Duqing Qu, Guangzhong Hu, Cong Deng , Yuan Liu. Web Online Teaching Answering System based on Java Technology[J]. Frontiers in Economics and Management,2020,1(5).

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

[14]陈钰.面向租房族的家具系统设计研究[J].西部皮革,2019,41(11):112-113.

[15]郭伟明.公租房智能化管理系统对租户使用行为管理的作用研究[J].上海房地,2019(01):22-24.DOI:10.13997/j.cnki.cn31-1188/f.2019.01.008.

[16]田磊, 异乡好居租房买房后台新系统[简称: Uhouzz租房买房后台CRM]V1.0. 天津市,天津异乡好居网络科技有限公司,2018-07-19.

[17]陈坤韡,卫悦文,何凯.公租房选配网络系统构建及价值分析[J].上海房地,2017(12):31-33.

[18]陈坤韡,卫悦文,何凯.公租房选配网络系统构建及价值分析[J].中国房地产,2017(23):24-28.DOI:10.13562/j.china.real.estate.2013.23.016.

致  谢

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

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

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

点赞+收藏+关注 → 私信领取本源代码、数据库
 

Guess you like

Origin blog.csdn.net/weixin_61498557/article/details/131080723