(with source code) springboot community express pick-up service system graduation project 051434

springboot community courier pick-up service system

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 the community express delivery service system, the community express delivery service system is researched and analyzed, and then the community express delivery service system is developed and designed to solve the problems.

The design of the community express delivery service system is mainly to consider the functions to be realized by the system in detail, and then design the interface after determining the functions to be realized. In the process, it is also necessary to consider how to better integrate the functions and pages. Combined, it is convenient for users to find the information they need easily and clearly, as well as the operability of the system platform in the later stage, and technology development can be carried out through a detailed understanding of the information content.

The development of the community express delivery service system uses the existing mature technical references, uses the source code as a template, analyzes the function adjustment and combines the actual needs of the community express delivery service system management, and discusses the management based on the community express delivery service system. use. 

Key words: community express delivery service system; Java language;

Springboot community express pickup service system

Abstract

In the information society, there is a need for targeted access to information, but the expansion of access is basically the direction that people are striving for. Because of the deviation from the perspective, people can often obtain different types of information, which is also the most difficult task for technology to overcome. Aiming at the problems of community express delivery service system, this paper studies and analyzes the community express delivery service system, and then develops and designs the community express delivery service system to solve the problems.

The design of the community express delivery service system mainly focuses on the detailed consideration of the functions to be realized by the system, and the interface design after determining the functions to be realized. In this process, it is also necessary to consider how to better combine the functions and pages, so that users can easily and clearly find the information they need, and the operability of the later stage of the system platform, and develop the technology through a detailed understanding of the information content.

The development of community express delivery service system utilizes the existing mature technical reference, takes the source code as a template, analyzes the combination of function adjustment and the actual demand of community express delivery service system management, and discusses the use of community express delivery service system management.

Key words: Community express delivery service system; Java language;

Table of contents

Chapter 1 Introduction 1

1.1  Selected topic and background 1

1.2  Research status at home and abroad1

1.3  Research Methods 2

Chapter 2 Introduction to Related Technologies 3

2.1  Myeclipse description 3 _

2. 2  Mysql description 4

2.3  Tomcat description 4 _

2.4 Introduction to springboot framework 5 

Chapter 3 System Analysis 6

3.1  Demand Analysis 6

3.2  Feasibility Analysis 6

3.1.1  Technical Feasibility Analysis 6

3.1.2  Economic feasibility analysis 6

3.1.3  Operation Feasibility Analysis 7

3. 3 Performance Analysis 7

3.4 System operation process 7

3.4.1 User login process 7

3.4.2 Information adding process 8

3.4.3 Information deletion process 9

Chapter 4 System Design 10

4.1  System architecture design 10

4.2 Development Process Design 11

4.3 Database Design 12

4. .3.1 Entity ER Figure 12

4.3.2 Data Table 13

Chapter 5 System Implementation 16

5.1 User Function Module 16

5. 2 Realization of administrator function module 24

Chapter 6 System Testing 29

6.1  Test purpose 29

6.2  Testing process 29

6.3  Test results 31

Chapter 7 Summary and Outlook 32

Reference 33

Thanks 35

  1. introduction

1.1 Selected topic and background

Since the 21st century, with the rapid development of Internet technology, the Internet has spread all over the world, and smart phones have become an indispensable part of people's daily life. Online shopping apps have opened up a new consumption experience for people, and the express service industry has also emerged. As an emerging industry in my country, the express delivery industry has developed rapidly under the impetus of network technology. Now large private enterprises such as SF Express, Yunda, Yuantong, and Shentong have emerged. Some small private enterprises are also sprouting and developing. Today, the supply of express delivery services exceeds demand. The competition among enterprises is also deteriorating day by day, and the social harms brought about by vicious competition are becoming more and more prominent, such as stealing express mails and fastenings and other bad behaviors. On the other hand, private express delivery companies do not have high requirements for the quality of employees, and professional training is also so-so, which has led to a significant reduction in the quality of corporate services. Secondly, there are still a large number of express delivery sites that adopt the traditional manual management method. Once the express delivery peak period or a large number of express deliveries are piled up, it is very easy to cause problems such as loss of express delivery. Human-machine statistical re-summarization is currently a relatively advanced express site management method. This method still has many shortcomings, such as data redundancy, lack of timeliness, etc. Constraints. In addition, the excessive and vicious competition within the industry, the constraints of relevant laws and regulations, and the increase in labor costs all hinder the development of the express delivery industry.

1.2 Research status at home and abroad

The scale of express delivery companies in my country: Compared with other industries, the technical requirements of the express delivery industry are relatively low, and the cost is relatively low. Therefore, over the years, large and small express delivery private companies have emerged, but the real strength is China Post and others. Among the large state-owned enterprises and a small number of private enterprises, China Post Express Company has the largest scale and the largest number of branches, distributed in more than 200 countries and regions, and more than 200 mail processing centers have been established in China. SF Express, STO Express, and Yunda are representatives of large private enterprises. For example, SF Express, from its initial establishment in 1993 to 2010, has successively established thousands of business outlets in Hong Kong, Taiwan and other parts of the country, as well as South Korea and Singapore, and is still developing vigorously today. The shortcomings of my country's express delivery companies: (1) Market chaos: Due to the relatively low entry barriers to the express delivery industry, countless express delivery companies with varying scales and management levels have been established. Due to the large number of companies, the supply of express delivery markets exceeds In recent years, vicious competition between enterprises has been intensified, such as price wars between enterprises and bad behaviors such as stealing and fastening that often occur within enterprises, which have seriously affected the development of my country's express delivery industry. (2) Low service quality Because the courier job does not require a lot of professional skills, normal ordinary people can be engaged in the courier profession, which relieves the pressure on the labor market to a certain extent, but on the other hand leads to express delivery The professional level of employees has been reduced, the service attitude is not as good as before, and customer complaints are also increasing, which greatly reduces the reputation of express companies and also restricts the development of the express industry. (3) Poor emergency response capability: The express delivery system is often paralyzed due to external factors such as weather and festivals, such as the accumulation of express deliveries caused by snowstorms and the increase in the number of deliveries caused by shopping festivals such as Double Eleven. Due to the backward management system of express delivery companies, Thereby can't deal with emergencies in a timely and effective manner. In addition to the above reasons, a series of factors such as high fuel prices, rising labor costs and the introduction of foreign express delivery companies are restricting the progress and development of my country's express delivery industry.

All aspects of the American logistics industry have been at the forefront of the world for many years. From the 20th century to the present, it has experienced four stages of rapid development from budding to promotion to modernization and to today's information globalization. It adopts an integrated management method and puts the overall interests in the forefront. In the center, the traditional method of branch management is abandoned, and the entire enterprise is managed in a unified manner. In terms of the government's management of the enterprise, there is no specific management department, and regional management is still adopted. Each link of express delivery is managed according to the specific functions of the department. The government At the same time, a series of laws and regulations that are conducive to the development of the logistics industry have been formulated, and the company has also developed advanced identification technology and management systems to improve the operating efficiency of the company.

The development of the European logistics industry has gone through five stages from the 1950s to the present: (1) factory logistics stage (2) integrated logistics stage (3) supply chain logistics stage (4) global logistics stage (5) electronic logistics stage . At present, the scale of European express delivery companies is also increasing, and the use of modern technology and professional service models in enterprise management is also increasingly prominent. Most enterprises pay more attention to the mastery of core technology and the improvement of market regulation ability, and manage other aspects through the rational use of external resources.

1.3 Research Methods

Document analysis method: collect and read relevant subject documents, and on this basis, conduct analysis and research, select research subjects, and propose conceptual models.

Comparative analysis method: select representative community express delivery service systems at home and abroad, compare their structures and functions, summarize their advantages, and clarify their shortcomings.

Combining theory with practice: Systematically study information management system (MIS) related knowledge theory, on this basis, introduce knowledge such as information integration, information analysis theory and system construction method into the theoretical research of community express delivery service system.

This paper predicts the innovation: using the development point of view, starting from the demand point of view, based on the improvement of functions. Analyze the deficiencies of the existing community express delivery service system, study the functions that the comprehensive community express delivery service system should have, and put forward suggestions and opinions on how to improve the community express delivery service system in our country.

  1. Related technology introduction

2.1 Myeclipse Description

The software we usually use when we use Java to develop the system is Myeclipse, which is used to design the collection of Eclipse plug-ins for Java and JavaEE. Most of Myeclipse can realize the research and development of Mysql database and Javaee. Using Myeclipse greatly facilitates developers, and the progress of system development will also be improved.

2. 2 Mysql description 

Now the Mysql database can support many users on the network, and it can also adapt to the deployment or configuration of customer service machines and servers. Our server and client machines here are actually a software concept, and the computer hardware we use is also There is no one-to-one correspondence with them.

Mysql is a very popular relational database management system, and its appearance has always been a leader. It is not only very powerful, but also very convenient to use, and Mysql's cross-platform ability is also very good, software developers like it very much of these powerful advantages. Different from other relational databases, it has its own set of solutions for database management, and manages the database by setting corresponding permissions and roles for users. It can be seen that Mysql is a database management software suitable for high throughput, high reliability and high efficiency.

Advantage 1: Mysql sets different permissions for users with different identities to complete different business logics, which makes Mysql far exceed other relational databases in terms of security and integrity.

Advantage 2: Mysql can also support the data types of animation, graphics and sound, which means that multiple data types can also be supported by Mysql.

Advantage 3: Mysql can also be developed on multiple platforms, and various programming languages ​​for software development can realize the operation of Mysql database.

2. 3 Tomcat Description

Tomcat is a free server. The usage scenario is more suitable for situations where the number of visits is relatively small. It means that when Tomcat is installed on the computer, the access request of the front-end HTML page can be parsed through it. In fact, Tomcat is an extension of Apache, but it works relatively independently of Apache, so it can be seen that it runs relatively independently of Apache.

Tomcat was originally developed and applied by Davidson of Sun Company. After his efforts, he has continuously turned it into an open source server. It was also handed over to the Apache Software Foundation by the sun company. The ever-evolving tomcat server has undergone a lot of refactoring and combing in a recent version to make it more convenient to use. The Tomcat-based load balancing algorithm is an open source software implementation. There is no need to add additional hardware investment, and it is very convenient to implement, especially suitable for the expansion of general small business website servers at present and in the future. Judging from the current practice, it can be used as a reference for similar applications.

2.4 Introduction to spring boot framework

The Spring framework is an open source application framework on the Java platform that provides a container with inversion of control features. Although the Spring framework itself has no restrictions on the programming model, its frequent use in Java applications made it so popular that it was later used as a supplement or even a substitute for the EJB (EnterpriseJavaBeans) model. The Spring framework provides a series of solutions for development, such as using the core features of inversion of control, and implementing inversion of control through dependency injection to realize the containerization of the management object life cycle, using aspect-oriented programming for declarative transaction management, and integrating A variety of persistence technologies manage data access, provide a large number of excellent web frameworks to facilitate development, and so on. The Spring framework has the feature of inversion of control (IOC). IOC is designed to facilitate project maintenance and testing. It provides a method for unified configuration and management of Java objects through the Java reflection mechanism. The Spring framework uses the container to manage the life cycle of objects. The container can configure objects by scanning XML files or specific Java annotations on classes. Developers can obtain objects through dependency lookup or dependency injection. Aspect Oriented Programming(AOP) framework, the Spring AOP framework is based on the proxy mode, and can be configured at runtime; the AOP framework is mainly modularized for the cross concerns between modules. The AOP framework of the Spring framework only provides basic AOP features. Although it cannot be compared with the AspectJ framework, it can also meet the basic needs through integration with AspectJ. Functions such as transaction management and remote access under the Spring framework can be realized by using Spring AOP technology. Spring's transaction management framework brings an abstraction mechanism to the Java platform that enables local and global transactions, as well as nested transactions, to work with savepoints and in almost any environment on the Java platform. Spring integrates multiple transaction templates. The system can configure transactions through transaction templates, XML or Java annotations, and the transaction framework integrates functions such as messaging and caching. Spring's data access framework addresses common difficulties developers encounter when using databases in their applications. It not only provides support for all popular data access frameworks such as Java: JDBC, iBATS/MyBATIs, Hibernate, Java Data Objects (JDO), ApacheOJB and Apache Cayne, but also can be used with Spring's transaction management to provide data access Flexible abstraction. The Spring framework initially did not intend to build its own Web MVC framework . During the development process, its developers believed that the separation between the presentation layer and the request processing layer of the existing Struts Web framework and between the request processing layer and the model was not enough, so they created Spring MVC.


  1. system analysis

3.1 Demand Analysis

Before any project is developed and researched, it is necessary to make a careful analysis of the needs of the R&D system itself. Market research cannot be ignored. Determine the functional requirements of the users from the actual scene, so as to clarify the goals and develop the entire system. There is a more accurate positioning. In this chapter, it is necessary to analyze the performance of the system, the business process, and the data. The overall interface of the community express delivery service system is simple and the functions are complete.

The feasibility of requirements is to analyze and discuss what kind of requirements the developed system can meet. Whether the developed system platform meets the previous requirements. Only in the development of a pre-assessment system can the requirements be completed prior to system development and implementation. If it is not feasible for you to develop a system that does not function properly, then it is development failure. Whether the development system is useful or not can fulfill the requirements discussed before. The following analyzes the actual needs of the community express delivery service system.

System design needs to start with the actual needs of users and administrators to understand what functions they need to implement and what administrative work they can include.

Considering the design characteristics of the community courier pick-up service system, several requirements should be met:

(1) It can carry out the management of the community express delivery service system through the network, and promote the information management of the community express delivery service system.

(2) Learning methods become more diverse and management is more standardized;

(3) It provides a free channel to ensure real-time and effective communication of data.

3.2 Feasibility analysis

This design is based on the B/S mode, and the Java technology is used to implement the MySQL database and Myeclipse. The overall feasibility is divided into the following three aspects.

3.2.1 Technical Feasibility Analysis

The so-called technical feasibility refers to whether the functions planned in the early stage can be satisfied within a limited time. Whether there will be problems that cannot be solved in the development and design. Whether the completed project can be well applied, if there are shortcomings, whether there is great difficulty in later maintenance. After evaluating the system, it was determined that existing technology could achieve the goals. Using Java technology to realize dynamic pages, embedding low-dependency design patterns, flexible databases, and stable servers, the operating efficiency of the entire system is greatly improved. It can be seen that achieving the goal at the technical level is not a nonsense.

3.2.2 Economic Feasibility Analysis

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.

3.2.3 Operation Feasibility Analysis

The operation of this system to realize the functions is very simple. The common configuration of ordinary mobile phones can run this software, and as long as you have a rough understanding of the basic common sense of computer use, you can use this software smoothly. The mobile phone has the ability to connect to the Internet and can access the system normally. It does not require the operator to have any superb ability. It only needs to understand the business process and operate correctly according to professional knowledge. Therefore, the community express delivery service system is operational and feasible. sex.

 3.3 Performance Analysis

For performance analysis, compared with the traditional management method, the traditional management method uses manual statistics and management of data information with paper and pen, and this method is more troublesome for storing and finding certain data information. With the advent of computer networks, this traditional method is difficult to adapt to the development of the current society. It not only reduces people's work efficiency, but also requires a lot of manpower and material resources, which is relatively high in terms of time and cost. Reduce costs, improve user efficiency, and develop a set of community express delivery service systems based on computer and network technology.

The development and design of the community express delivery service system is an independent system, and the data storage and development are carried out with the previous database, mainly to realize the user roles and corresponding functional modules of the community express delivery service system, so that the community express delivery service The management of the system will not have management differences and low efficiency, but is just the opposite of traditional management information. The realization of the community express delivery service system can save resources, and the processing speed of business is also improved, fast, efficient, and functional powerful.

3.4 System operation process

3.4.1 User login process

The first hurdle for system security is that users who want to enter the system must enter their own login information through the login window before they can log in. Only after the information entered by the user is accurate can they enter the operating system interface and perform function modules. The corresponding operation, if the information entered by the user is incorrect, a prompt box will appear in the window, and the user fails to log in. Return to the first step to re-enter, as shown in Figure 3-1.

                               Figure 3-1 User use case diagram

 

3.4.2 Information adding process

For the community express pick-up service system, you need to add the required community express pick-up service system work data information at any time. For users to add information, you need to fill in the community express pick-up service system to be added according to the content of the check box on the adding interface. Work data information. After the information input is completed, judge whether the data information meets the requirements. If the information meets the requirements, the addition is completed. If the information added by the user does not meet the requirements, you need to return to the first step, re-enter the data information, and then perform the judgment operation, as shown in the figure 3-2 shown.

 

      Figure 3-2 Information adding flow chart

3.4.3 Information deletion process

No matter which user role enters the unreasonable system operation interface, it can perform different information content operation functions. For the deletion of system data information, once the user deletes the information, the deleted data information will not be restored. Therefore, the user When deleting data, it is necessary to judge whether the content to be deleted is determined to be deleted. After confirming that it is correct, choose to confirm the deletion operation, as shown in Figure 3-3.

 

 

  Figure 3-3 Information deletion flow chart

  1. system design

4.1 System architecture design

An overview design analysis of the system project of the community express delivery service system, the main content is the specific analysis of the community express delivery service system, the database is designed, the data uses the mysql database, and the design of the system adopts a more humanized operation design , for the error information of the system, it can be processed and fed back in time.

The design of the community-based courier replacement service system is based on existing computers, which can realize administrators, homepage, site management (bulletin boards, carousel maps), user management (administrators), content management (articles, article types) and more management ( Apply for detailed understanding and statistical analysis of courier, courier, ordinary user, courier pick-up, excellent courier, courier status, area management, etc. The module relationship diagram established according to the system functional requirements is as follows:

        Figure 4-1 Administrator function module diagram

The design of the community-based courier replacement service system is based on existing computers, which can realize detailed understanding and statistical analysis of users, home pages, bulletin boards, life information, application for couriers, excellent couriers, and mine. The module relationship diagram established according to the system functional requirements is as follows:

 

        Figure 4-2 User function module diagram

4.2 Development process design

The development of the community courier service system analyzes the management module and the database used by the system, writes the development, planning and operation are the necessary three steps to build the information management application program, which determines whether the system can really realize the preset functions and Can it be implemented after successful design. In the development process, each stage must be developed in strict accordance with the linear sequence, and each work generated in the corresponding stage can be verified and checked by technology. Make sure that it is correct after the completion of one stage, and will not cause drag and drop phenomenon in the next stage, so that the system can be guaranteed after the design function is completed.

Judging from the successful development experience of the community express delivery service system, the above method has the most obvious effect and minimizes the complexity of system development. As shown in Figure 4-2.

 

         Figure 4-2 Flow chart of the development system

4.3 Database design

Database is the foundation and core of information system. The quality of database design directly affects the success or failure of information system development. Creating a database table first determines the attributes of entities and the relationships between entities. Create a data table based on the relationship.

4.3.1 Entity ER Diagram

The database is the most important step in the entire software programming. For the database problem, it is mainly to determine the number of databases and the creation of structural formulas. The display system uses Mysql to manage the database to ensure data security and stability.

Conceptual models are designed to abstract real-world information and model the information world. It is a powerful tool for database design. Database conceptual model design can describe the conceptual model of the real world through ER diagrams. An ER diagram of a system shows the links between entities in the system. Moreover, the Mysql database is a database with relatively strong self-protection capabilities. The following figure is mainly an ER diagram of database entities:

(1) The ER diagram of express delivery information management, as shown in Figure 4-3:

 

 Figure 4-3 Entity attribute map of express delivery information

 (2) The ER diagram of express status management is shown in Figure 4-4:

 

   Figure 4-4 Express status management entity diagram

These functions can fully meet the needs of the community courier pick-up service system. The function of this system is relatively comprehensive, as shown in Figure 4-5 below the system function structure.

                              Figure 4-5 System function structure diagram

 

4.3.2 Data Sheet

According to the detailed analysis requirements of the data structure, we can analyze according to the requirements of the input and output data volume, determine what table, the relationship between the structure, we can verify, adjust and improve, query and browse the process, can realize the database, In order to make users have more requirements for data and functions.

Based on the characteristics of the database management system used by the system, the conceptual model of the database is converted and constructed. However, this system only needs to fully consider the functions of the community express delivery service system, and the organization is relatively clear.

regional_management table:

name

type

length

not null

primary key

note

regional_management_id

int

11

yes

yes

Regional 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

ordinary_users table:

name

type

length

not null

primary key

note

ordinary_users_id

int

11

yes

yes

common user ID

gender

varchar

64

no

no

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

express_status table:

name

type

length

not null

primary key

note

express_status_id

int

11

yes

yes

Courier Status ID

express_number

varchar

64

no

no

Postal code

name

varchar

64

no

no

name

type

varchar

64

no

no

type

weight

varchar

64

no

no

weight

specifications

varchar

64

no

no

Specification

number

varchar

64

no

no

quantity

cost

varchar

64

no

no

cost

publisher

int

11

no

no

publisher

courier

int

11

no

no

Courier

express_status

varchar

64

no

no

Express status

leaving_a_message

text

0

no

no

message

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

express_pick_up table:

name

type

length

not null

primary key

note

express_pick_up_id

int

11

yes

yes

Express pick up ID

express_number

varchar

64

no

no

Postal code

name

varchar

64

no

no

name

type

varchar

64

no

no

type

specifications

varchar

64

no

no

Specification

weight

varchar

64

no

no

weight

express_map

varchar

255

no

no

express map

number

int

11

no

no

quantity

take_place

varchar

64

no

no

Alternate location

deadline

date

0

no

no

time deadline

cost

varchar

64

no

no

cost

publisher

int

11

no

no

publisher

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

excellent_courier表:

name

type

length

not null

primary key

note

excellent_courier_id

int

11

yes

yes

Excellent courier ID

full_name

varchar

64

no

no

Name

gender

varchar

64

no

no

gender

contact_number

varchar

64

no

no

contact number

region

varchar

64

no

no

area

head_portrait

varchar

255

no

no

avatar

resume

text

0

简历

hits

int

11

点击数

praise_len

int

11

点赞数

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

apply_for_courier表:

名称

类型

长度

不是null

主键

注释

apply_for_courier_id

int

11

申请快递员ID

full_name

varchar

64

姓名

contact_number

varchar

64

联系电话

current_address

varchar

64

现住地址

gender

varchar

64

性别

is_there_a_car

varchar

64

是否有车

driver_license

varchar

255

驾驶证

id

varchar

64

身份证

user

int

11

用户

remarks

varchar

64

备注

examine_state

varchar

16

审核状态

examine_reply

varchar

255

审核回复

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

courier表

名称

类型

长度

不是null

主键

注释

courier_id

int

11

快递员ID

contact_address

varchar

64

联系地址

is_there_a_car

varchar

64

是否有车

driving_certificate

varchar

255

驾驶证明

gender

varchar

64

性别

region

varchar

64

区域

examine_state

varchar

16

审核状态

recommend

int

11

智能推荐

user_id

int

11

用户ID

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

  1. 系统实现
    1. 用户功能模块

社区快递代取服务系统登录界面,通过填写账号、密码、等信息进行登录,如图5-1所示。

 

图5-1登录界面图

登录关键代码如下。

/**

     * 登录

     * @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, "账号或密码不正确");

        }

}

用户注册,通过填写账号、密码、昵称、手机、邮箱、身份等信息,输入完成后选择提交即可注册成功,如图5-2所示。

 

图5-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;

}

用户可以获取所有申请快递员的列表并对其进行搜索。包括申请快递员基本信息,如姓名、现住地址、是否有车、身份证、备注、联系电话、性别、驾驶证、用户,有申请快递员的描述以及展示图片等。

申请快递员界面如下图所示。

 

图5-3申请快递员界面图

用户可以获取所有生活资讯的列表并对其进行搜索。包括生活资讯基本信息,如点赞、收藏、发表评论,有生活资讯的描述以及展示图片等。

生活资讯界面如下图所示。

 

图5-4生活资讯界面

用户在进我的账户课查询个人资料、修改密码,有我的账户的描述以及展示图片等。

我的账户界面如下图所示。

 

图5-5我的账户界面

    1. 管理员功能模块的实现

管理员界面要尽量简洁大方,使用户能够方便找到需要的功能首页、公共管理、用户管理、系统内容、系统模块、帖子分类、论坛帖子、资源中心,且要易于修改和维护,同时还要保证用户合法和系统安全。

首页界面如下图所示。

 

图5-6管理员首页界面

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

@RequestMapping(value = {"/count_group", "/count"})

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

        Query count = service.count(service.readQuery(request), service.readConfig(request));

        return success(count.getResultList());

}

管理员对系统用户的管理,在yhzhgl.jsp实现管理员用户的管理,包括录入、删除、修改,修改密码通过SESSION获取用户名,然后输入新密码,提交到mod.jsp中,使用sql命令更新密码。

用户管理界面如下图所示。

图5-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;

    }

该功能包括对快递员进行添加、删除、修改,编辑。首先管理员进入后台主页,在左边菜单栏选择相应的功能操作。

首先管理员点击进入快递员shangcheng_list.jsp,可以选择删除、或者修改,如果管理员点击删除,则将通过js提示管理员是否删除onClick="return confirm('真的要删除?')",如果删除后将请求sh.jsp进行数据库数据删除,如果管理员选择修改快递员,将跳转至shangjia_updt2.jsp,然后管理员修改后,页面请求shangjia_updt2_list.jsp来操作数据库完成快递员的修改。

快递员管理界面如下图所示。

 

图5-8快递员管理界面图

 

图5-9快递员添加界面图

该功能包括对快递代取进行添加、删除、修改,编辑。首先管理员进入后台主页,在左边菜单栏选择相应的功能操作。

首先管理员点击进入快递代取shangcheng_list.jsp,可以选择删除、或者修改,如果管理员点击删除,则将通过js提示管理员是否删除onClick="return confirm('真的要删除?')",如果删除后将请求sh.jsp进行数据库数据删除,如果管理员选择修改快递代取,将跳转至shangjia_updt2.jsp,然后管理员修改后,页面请求shangjia_updt2_list.jsp来操作数据库完成快递代取的修改。

快递代取界面如下图所示。

 

图5-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()

    

  1. 测试

6.1测试目的

在对该系统进行完详细设计和编码之后,就要对社区快递代取服务系统程序进行测试,检测程序是否运行无误,反复进行测试和修改,使之最后成为完整的软件,满足用户的需求,实现预期的功能。

6.2测试过程

在软件的测试过程中,通常测试人员需要针对不同的功能模块设计多种测试用例。通过测试用例能够及时发现代码业务逻辑上是否与真实的业务逻辑相对应,及时发现代码上或逻辑上的缺陷,以此来来完善系统,提高软件产品的质量,使软件具有良好的用户体验。

注册测试用例表如下所示。

表6-1注册测试用例

测试性能

新用户注册

用例目的

测试系统新用户个人信息注册功能的功能和安全性

前提条件

进入注册页面填写个人信息

输入条件

预期输出

实际情况

各项基本信息输入不完整

不允许注册,无法点击注册按钮

一致

填写已存在的用户名

系统显示出提示信息,要求重新填写

一致

两次密码输入不一致

系统显示出提示信息,要求重新填写

一致

填写的各项信息没有符合提示的长度和字符要求

系统显示出提示信息,要求重新填写

一致

胡乱填写电话号码

收不到验证码

一致

填写验证码与收到的不一致

系统显示提示信息告知用户验证码错误,不予注册

一致

登录测试用例表如下所示。

表6-2登录测试用例

测试性能

用户或操作员登录系统

用例目的

测试用户或操作员登录系统时功能是否正常

前提条件

进入用户登录页面或操作员登录页面

输入条件

预期输出

实际情况

各项信息不予填写,直接点击登陆按钮

不允许登录,提示填写账号相关信息

一致

填写错误的登录名或密码后点击登录系统

提示用户名或密码错误,要求重新填写进行登录

一致

填写与验证码信息不一致的信息

系统显示出提示信息,表明验证码错误,要求重新填写

一致

快递状态管理测试用例表如下所示。

表6-3快递状态管理测试用例

测试性能

用户进行快递状态管理的操作

用例目的

测试用户进行快递状态管理操作时,该功能是否正常

前提条件

用户进入快递状态详情页,该快递状态能够被受理

输入条件

预期输出

实际情况

对着某快递状态点击“受理”按钮

界面跳转至受理界面

一致

在受理界面,输入必填项,点击“提交”按钮

提示“受理成功”,并返回上一级界面

一致

在受理界面,填写受理表单的时候未输入完整,点击“提交”按钮

提示“受理失败”

一致

优秀快递员测试用例表如下所示。

表6-4优秀快递员测试用例

测试性能

发布技术相关信息管理功能

用例目的

测试系统操作者对优秀快递员相关信息进行管理的功能是否正常

前提条件

登录系统进入相关管理页面

输入条件

预期输出

实际情况

进入优秀快递员界面,点击“录入”按钮,填写所有必填项,点击提交

提示“录入成功”,并返回查询界面

一致

进入优秀快递员界面,点击“录入”按钮,未填写一个或者多个必填项,点击提交

提示“录入失败”,请填写必填项

一致

进入优秀快递员界面,选择要修改的一条数据,点击该条数据后面的“修改”按钮 

节目跳转至修改界面

一致

在修改界面,修改可修改项后,点击“提交”按钮

提示“修改成功”,并返回查询界面

一致

进入优秀快递员界面,点击某条数据后面的删除按钮

提示“是否要删除该数据”,如果用户点击“确定”按钮,则成功删除该条数据,并提示“删除成功”,之后返回查询界面

一致

6.3测试结果

经过对此系统的测试,得出该系统足以满足用户日常需求,在功能项目和操作等方面也能满足操作员对于其他用户的管理。但是,还有很多功能有待添加,这个系统仅能满足大部分的需求,还需要对此系统的功能更进一步的完善,这样使用起来才能更加的完美。

第7章 总结与展望

通过社区快递代取服务系统的开发,本人巩固了之前学过的知识,如今将平时所学到的知识融合在设计中,在设计过程中,做了很多的准备,首先,在数据库系统的设计过程中,尤其是在数据库的工作原理、工作特点,对其深刻的讨论,与此同时,对于小型站点来说,最好服务器的选择,其次,利用所学的知识点分析所做的系统,并在此基础上设计。

目前本系统已经上线,正在试运行阶段,用户反馈良好,基本完成用户所需,试运行过程中没有出现阻断性问题,有一些不足和小问题也及时予以修正,系统上线后,为了保证数据的安全性,对系统进行了备份操作,系统备份是每两个月备份一次,数据库备份为每周备份一次,系统部署在社区快递代取服务系统的云平台服务器中。

本次系统上线成功后,得到了用户的高度认可,但是在功能上和性能上还需做进一步的研究处理,使其有更高的性能和更好的用户体验。

系统在以后的升级过程中,需要解决一系列用户所提出的问题,例如打印过程中如何避免浏览器的兼容性问题,大量用户访问时,如何保持较高的响应速度,在系统今后的升级过程中将着重解决这些安全性问题。

参考文献

[1]赵吉波. 基于创新扩散理论的社区便利店代收快递采纳意愿影响因素研究[D].北京邮电大学,2021.

[2]汪宸,徐俊杰.提货量与快递代收站点加盟满意度的关系:基于个体门店的检验[J].财贸研究,2020,31(07):75-84.

[3]王硕.新零售时代社区物流终端配送模式研究[J].福建电脑,2020,36(06):78-80.

[4]贺香山,谷励.电子商务环境下的封闭社区快递配送问题[J].全国流通经济,2020(02):24-25.

[5]徐俊杰,曹曦,姜凌.快递代收服务的形成逻辑与供给组织[J].企业经济,2019(08):139-145.

[6]张利娜,夏文婷.智能快递柜使用现状调研[J].电子商务,2018(06):49-50+94.

[7]苏今.物流末端配送中快递代收行为法律问题刍议——基于代收成本分担视角的代收法律框架构建[J].中国流通经济,2018,32(05):118-128.

[8]武钰淇.网购环境下社区物业应对快递管理难题的对策分析[J].商场现代化,2018(01):67-68.

[9]诸涛,倪蔚颖.电商物流“最后一公里”快递收发点发展现状和对策研究[J].现代商业,2017(17):9-12.

[10]Singh Samiksha,Doyle Pat,Campbell Oona M R,Rao G V R,Murthy G V S. Transport of pregnant women and obstetric emergencies in India: an analysis of the '108' ambulance service system data.[J]. BMC pregnancy and childbirth,2018,16(1):

[11]侯珂,刘潇.建立“利安快递代收点”的调查问卷分析[J].现代企业,2018(07):26+38.

[12]张大成,葛沛雨.社区物流服务中心构建可行性研究[J].上海商学院学报,2018,17(01):98-104.

[13] Zhang Feng, Luo Mengwen, Liu Yushan. The status quo and countermeasures of logistics development in small and medium-sized urban communities [J]. Transportation Enterprise Management, 2018, 31(01): 55-58.

[14] Zeng Jun. Focus on the integration of community convenience stores, look at the third-party express collection method of Landian [J]. Chuangyebang, 2018 (01): 80.

[15] Zheng Ying. Countermeasure analysis of community property to deal with express delivery management problems under the online shopping environment [J]. Journal of Beihua University (Social Science Edition), 2018, 16(05): 31-35.

[16] FedEx Express Honors 'Employee Heroes' for Exceptional Customer and Community Service[J]. Wireless News,2019:

thank you

With the completion of the design, the college career is coming to an end. The time in college is the time I cherish the most. I have learned a lot and grown a lot during the time in college. Every memory during this time is engraved in my mind. Thanks to the students who studied and grew up together, and the teachers who taught me during the growth process, I am very grateful for your company.

First of all, I would like to thank my instructor. The completion of the design is inseparable from a series of guidance from the teacher. During the completion of the graduation project, the teacher gave many pertinent suggestions. It is precisely because of the teacher's meticulous work attitude that my design can be successfully completed.

Finally, I would like to thank every teacher who taught me during my college career. You have taught me a wealth of knowledge and taught me how to deal with and solve problems when I encounter them. Thank you for your help and support.

Get the source code of the project for free, please pay attention to like + private message

Guess you like

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