Design and implementation of springboot football player training plan management system Graduation project - with source code 281444

Football player training plan management system

Summary

The rapid development of scientific and technological progress has caused great changes in people's daily life, and the rapid development of electronic information technology has made the application level of electronic information technology in various fields popularized and applied. The arrival of the information age has become an irresistible fashion trend, and the history of human development is entering a new era. In actual application, the working rules and development steps of the application software are used to build a football player training plan management system using Java technology.

This design mainly realizes the football player training plan management system which integrates the advantages of humanization, high efficiency and convenience, and completes training sign-in management, status record management, player management, coach management, player training plan management, subject management, leave management, Functional modules such as player sign-in management. The system communicates with the server through the browser to realize data interaction and change. The system improves work efficiency and reduces errors and omissions in data storage through scientific management methods and convenient services. The football player training plan management system uses Java language, adopts SSM technology based on MVC mode to develop, and uses Eclipse 2017 CI 10 compiler to write. In terms of data, it mainly uses Microsoft's MySQL relational database as the data storage medium, and cooperates with the front-end HTML +CSS technology completes the development of the system.

Key words: football player training plan; Java; MySQL; SSM

Football player training plan management system

Abstract

The rapid development of scientific and technological progress has caused great changes in people's daily life. The rapid development of electronic information technology has popularized and applied the application level of electronic information technology in various fields. The advent of the information age has become an irresistible fashion trend, and the history of human development is entering a new era. In practical application, according to the working rules and development steps of the application software, Java technology is used to build the football player training plan management system.

This design mainly realizes the football player training plan management system integrating the advantages of humanization, high efficiency and convenience, and completes the functional modules such as training sign in management, status record management, player management, coach management, player training plan management, subject management, leave management, player sign in management and so on. The system communicates with the server through the browser to realize the interaction and change of data. Through scientific management and convenient service, the system improves work efficiency and reduces errors and omissions in data storage. The sports meeting information management system uses Java language, adopts SSM technology based on MVC mode for development, and is written with eclipse 2017 CI 10 compiler. In terms of data, it mainly uses Microsoft's MySQL relational database as the data storage medium, and completes the development of the system with the foreground HTML + CSS technology.

Key words Football player training program; Java; MySQL; SSM

Table of contents

Chapter 1 Introduction

1.1  Research background and significance

1.2  Development Status

1.3  Organizational structure of this article

Chapter 2 Introduction to Related Technologies

2.1 J2EE technology

2.2 MVC pattern

2.3 MySQL database

2.4 B/S structure

2.5 SSM framework

2.6 Eclipse development tools

Chapter 3 System Analysis

3.1  Feasibility analysis

3.1.1  Technical Feasibility Analysis

3.1.2  Economic Feasibility Analysis

3.1.3  Operation Feasibility Analysis

3.2  Analysis of Functional Requirements

3.3  Analysis of non-functional requirements

3.4  Data flow analysis

Chapter 4 System Design

4.1  System architecture design

4.2  System function structure

4.3  Functional module design

4.4  Database design

4.4.1  Conceptual Model

4.4.2  Relational Model

4.4.3  Data Sheet

Chapter 5 System Implementation

5.1  Implementation of login module

5.2  Realization of User Subsystem Module 19

5.2. 1 Registration module 19

5.2. 2 Training sign-in module

5.2. 3 My sign-in module

5.2. 4 Status record module

5.2.5 My training plan module 26

5.3  Implementation of the Administrator Subsystem Module 27

5.3.1  Player Management Module 27

5.3.2  Personal data management module 28

5.3.3  Subject Management Module

5.3.4  Player sign-in management module

5.3.5  leave management module 35

Chapter 6 System Testing 37

6.1  Test purpose 37

6.2  Testing process 37

6.3  Test results 38

Chapter 7 Summary and Outlook

Reference 41

Thanks 42

  1. introduction
    1. research background and meaning

With the rapid development of computer technology and the popularization of computer technology, more and more computers are used in personnel management, including the field of sports. One of the most common is the use of information management technology in team training and game management. The team information management system is a very efficient and user-friendly software system based on computer database technology that can help coaches manage various information and data in the team. At present , our country has used this technology in some individual sports events at the national level, but there is no related software development for team events, and the construction of the database is relatively backward.

Management system engineering is an organizational management technology with enterprise management system as the research object. It is also a comprehensive interactive course with the themes of system science, operations research and computer application technology. Its basic idea is to adhere to the overall concept and make overall plans , using relevant optimization analysis methods to improve the overall function of the management system. Football is a typical representative of a team event. As the team's competition and training progress, various data and information in the competition and training continue to increase. How to quickly and efficiently manage various information of the team, help coaches better manage the team, improve game performance and ranking, has become a common problem faced by teams. The traditional manual management method can no longer meet the needs of the team, even if Excel is used for management, it cannot meet the complex management requirements. Therefore, it is necessary to develop a whole set of school football team information management system based on computer database technology.

    1. development status

Due to the daily development of computer technology in the past few years, in modern life, all kinds of information processing operations we need are done by using computers. maintained. Therefore, it is necessary to realize the electronicization of the football player training plan management system to improve the efficiency and use efficiency of player training.

Because the traditional football player training plan management system at home and abroad is based on manual work, and human energy and work accuracy are limited, so the traditional football player training plan will inevitably have shortcomings such as low efficiency and low accuracy. A lot of waste of human resources. In the work of management, the computer machines involved are better than humans, and can meet the requirements of speed, accuracy, and low resource consumption. Based on these remarkable advantages, if we can design a complete football player training plan management system that meets specific future needs, the service quality of the player training plan will be greatly improved. With such a football player training plan management system, managers only need to deploy a small number of professionals to conduct daily data review, management and regular maintenance of the database. During the whole process, the administrator only needs to provide a small amount of necessary information, and most of the data processing work is completed by the database and related programs, saving a lot of time. If there is an error in some part of the information in the database, the administrator can reduce the time and effort spent in the troubleshooting process by batch modification and other methods. Therefore, it is necessary to develop a competent football player training program management system for administrators.

    1. Organization of this article

The first chapter is the introduction, the beginning of this article, some textual descriptions of the research background and research significance of this topic.

The second chapter studies the development techniques and development tools used in the football player training plan management system.

The third chapter is the system analysis part, including the description of the overall requirements of the system, the analysis of system requirements from a functional point of view, and the non-functional analysis of whether the system can be realized.

The fourth chapter is the system design part, an important part of this article, which provides the detailed design of the system architecture and the design description of some main functional modules.

The fifth chapter is the specific realization of the system, introducing the specific realization of each module of the system.

The sixth chapter tests and runs the system on the basis of the previous chapters.

Finally, the system is seriously summarized, so as to have a new prospect for the future.

  1. Related technology introduction
    1. J2EE technology

People can master many foreign languages, but what a computer scientist is proficient in is mostly programming languages, which are not human natural languages, such as C language, Java, Perl and so on. Since the "middleware" developed by different companies is not standardized enough, Sun launched J2EE and used this standard to solve the ills. It provides a good mechanism, allowing each layer to allow the corresponding server and components to run, making the system stable and usable, efficient in development, and easy to maintain.

    1. MVC pattern

The MVC model is a commonly used development model, which is mainly divided into M layer, V layer and C layer in terms of code implementation.

View (View) represents the user interaction interface. A web application may have many interfaces. In the MVC mode, the view only handles data collection, processing, and user requests, and does not include business process processing, business process Handled by the Model.

Model (Model) is the processing of business processes/states and the formulation of business rules. The process of the model processing the business process cannot be seen by other layers. It is like a black box. After receiving the data requested by the view, it returns the final processing result. The main core of MVC is the design of the business model. A typical application example is the popular EJB model, which further divides the model from the perspective of application technology implementation in order to make full use of existing components, but it cannot be used as A framework for applying design models.

The controller (Controller) can be understood as receiving the user's request, and then the view and the model are matched together to complete the user's request together. It has a very obvious role in dividing the control layer, and can clearly tell you that it is a distributor, which model and view to choose, and what kind of request from the user can be completed. The control layer does not do all the data processing, for example: the user clicks a connection, after the control layer receives the request, it does not process the business information, it just transmits the user's information to the model, and tells the model what to do, and then chooses the one that meets the requirements The view is returned to the user.

    1. MySQL database

The advancement of science and technology has brought many conveniences to daily life: classroom projectors use virtual imaging technology, digital cameras use photoelectric detection technology, for example, the records of goods entering and leaving warehouses in supermarkets require an information warehouse. This information warehouse is the database, and this football player training plan management system also needs the support of this technology [7].

The reason for using the MySQL software is that it can be accessed by multiple users, and there are Archives, etc. in it. It will classify the data first, and then store them in tables separately. Such special operations will improve the speed of the data management system itself, allowing the database to be used flexibly. The code of MySQL is public, and allows others to compile and upgrade it twice. This feature can reduce the cost of users, and form a good website system after matching with suitable software. Although it has shortcomings, it is the mainstream application object of users in all aspects.

    1. B/S structure

B/S (Browser/Server) is a more convenient architecture than its predecessor architecture. It uses the Web server to complete the data transfer and exchange. You only need to download the browser as the client, then the work will achieve a "slimming" effect, and there is no need to consider the problem of non-stop installation of software.

    1. SSM framework

SSM is SpringMVC+Spring+Mybatis. These three frameworks have their own unique advantages, so combining them together can create a strong spark. The designer can create a web application program without consuming a lot of effort, and this program also has the characteristics of clear hierarchy, upgrade and update operations will not affect normal use, and allows multiple uses. This composite framework forms a system with complete structure, powerful functions and good structure: SpringMVC separates each plate, Spring makes development more flexible and convenient, using Mybatis allows developers to directly manipulate objects, each level of division of labor is detailed, and realizes each level The decoupling between them makes the code more flexible and streamlined. This framework enables programmers to avoid individual mistakes during the development period that lead to the destruction of the whole, and also to respond to new requirements from customers for the product in the later stage.

    1. Eclipse development tools

Eclipse is developed by Genuitec, a very powerful JavaEE integrated development environment, including: complete coding, debugging, testing and publishing functions [10], full support for JSP, Spring, CSS, JavaScript, SpringMVC, HTML, JSF, Mybatis, SQL and other technologies. In terms of architecture, the features of Eclipse can be divided into seven categories: JavaEE model; Web development tools, EJB development tools, JavaEE project deployment services, connectors for application servers, database services, and Eclipse integration help.

For each of the above functional categories, there are corresponding functional parts in Eclipse, and they are realized through a series of plug-ins. The modularity of Eclipse's structure allows it to independently expand and upgrade any one of the modules without affecting other modules. The powerful Eclipse application development platform is not only an Eclipse plug-in, but also a powerful integrated development environment for JavaEE [12].

  1. system analysis
    1. Feasibility Analysis

This design is based on the B/S mode, using Java and JSP technologies using MySQL database and Eclipse. The overall feasibility is divided into the following three aspects.

      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 JSP 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.

      1. 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.

      1. Operational Feasibility Analysis

The operation of this system to realize the function is very simple. The common configuration of ordinary computers 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 computer 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 football player training plan management system is operable. sex.

3.2 Analysis of Functional Requirements

Before system development and design, you should make a preliminary idea of ​​the functions, know what sections the management system has, what functions each section has, whether the overall design meets the needs of users, and then conduct a detailed analysis and summary of the developed system functions , so as to design a complete system and implement it. Communication analysis of users and developers to achieve the best understanding and make the system function to the best.

The coach use case diagram is shown below.

 

Figure 3-1 Coach use case diagram

The player use case diagram is shown below.

 

Figure 3-3 Player use case diagram

After analyzing the requirements of the football player training plan management system, the whole system is mainly divided into two parts: administrators, coaches, and players. The functions of the branches under each module are different. Describe the function as follows:

Player module:

Register an account.

Account login authentication.

Manage profile information, modify modifiable information items.

Check in for training, and check the records of whether the players have arrived at the same time.

Status records, while viewing the status records of players.

My training plan and view your personal training at the same time.

Leave management, ask for leave approval from the coach.

Coach Module:

Register an account.

Account login authentication.

Manage profile information, modify modifiable information items.

Check in for training, and check the records of whether the players have arrived at the same time.

Status records, while viewing the status records of players.

    1. Non-Functional Requirements Analysis

There are many non-functional requirements of the system, such as performance requirements, maximum number of users that can be carried, stability, and usability requirements. The analysis of this system takes into account the requirement of ease of use, because the system is used by people, so it is necessary to fully consider the user experience from the user's point of view, so that the system is easy to understand, easy to use and easy to operate.

    1. Data Flow Analysis

The first-level data flow chart includes modules such as login and registration, user functions, and retrieval maintenance. The data used in the login and registration module stores user account documents, and the storage required by the user function module is the data file of each functional module of the user. The above data files are retrieved by keywords.

The layer-by-layer data flow diagram of the system is shown in the figure below.

 

Figure 3-2 System data flow diagram (one layer)

The second-tier data flow is the refinement of filling in login registration information and user functions in the first-tier data flow diagram. That is: fill in the login registration information and refine it into filling information, background review, and user functions into training sign-in management, status record management, player management, coach management, player training plan management, subject management, leave management, player sign-in management, etc. operate.

The layer 2 data flow diagram of the system is shown in the figure below.

 

Figure 3-4 System data flow diagram (second floor)

  1. system design
    1. System architecture design

At present, the main data access method of the B/S system is: the user can enter the system through the browser page, and the system can automatically process the request sent by the user to the server. The processing request is carried out in the background of the system. Perform corresponding operations on the page, and you can see the processing results delivered by the server. The football player training plan management system is mainly divided into view-model-control three-tier architecture design. In the view layer, it mainly operates the data fed back and displayed from the server to the client. In the model layer, it mainly deals with related business logic, data integration, etc., and the final control layer is between the view and the model. It is to adjust the relationship between the two layers and finally implement the data transfer.

The system architecture diagram is shown in the figure below.

 

Figure 4-1 System architecture diagram

    1. System function structure

The purpose of system design is to analyze all the functional structures included in the system, and make preparations for developers to design, develop and implement the system. After the preliminary demand investigation, analysis and sorting, the determined overall demand mainly includes multiple modules, namely: training sign-in management, status record management, player management, coach management, player training plan management, subject management, leave management, player Sign in management. The overall role of the system is divided into three parts, one is the player, the other is the coach, and the last is the administrator. The authority distribution is also obvious. In addition to browsing information, players also have the authority to query and manage their own account information, training check-in query, status record query, my training plan query, leave management query, and my check-in query; administrators Is the highest authority owner.

The functional structure diagram of the system is shown in the figure below.

Figure 4-2 System function structure diagram

 

    1. Functional module design

User Management Module

This module is designed for all users to log in. For example, players can only perform their own normal function operations (such as personal information modification) after logging in. Administrators and super administrators have different permissions after login, and administrators cannot exceed permissions. The super administrator can manage the data of the entire system, mainly the user's login authority and the user's operation authority in the system after login.

Subject Management Module

There is a training list relationship between players and subjects, and the relationship is one-to-many. According to the subject number, the subject data is transferred to the training list data, the operator is the player, and then the training list list is generated. The player can view the personal historical training list list and perform data processing. destroy.

Subject Maintenance Module

The operator enters the subject data, clicks the subject catalog input button, fills in the subject data to be entered in turn, clicks the submit button, submits the data to the database, and then refreshes the subject data page, and there are delete and edit buttons on the right of each data to complete the corresponding delete and update functions.

leave management module

Players and coaches have a leave application relationship. The relationship is one-to-many. According to the person who asks for leave, the leave application data is transferred to the leave application data, and the operator is a player, and then a list of leave applications is generated. Players can view the personal historical leave list and destroy the data.

Player leave maintenance module

The operator enters the player's leave data, clicks the player's leave input button, fills in the player's leave data to be entered in turn, clicks the submit button, submits the data to the database, and then refreshes the player's leave data page, and there are delete and edit buttons on the right of each data , to complete the corresponding delete and update functions.

Player Management Module

The operator enters the player code data, clicks the code input button, fills in the code data to be entered in turn, clicks the submit button, submits the data to the database, and then refreshes the code data page, and there are delete and edit buttons on the right of each data to complete the corresponding delete and update functions.

    1. Database Design
      1. conceptual model

For a system to be developed, ER diagrams allow others to understand the transactions of the system and the relationships between them faster and easier. According to the conclusions drawn in the system analysis stage, it is determined that there are multiple entities in the football player training plan management system, which are leave management, subject management, player information, player sign-in, training sign-in, and training plan.

The overall ER diagram of the system is shown in the figure below.

 

Figure 4-4 System overall ER diagram

      1. relational model

Player profile ( player profile id , name, gender, age, ethnicity, height, weight, heart rate, body fat rate, blood urea, hemoglobin, maximum oxygen uptake rate, recording time, physical examination report, player account)

Leave management ( leave management id , player, title of leave, time of leave, type of leave, content of leave, review status, review reply)

Subject management ( subject management id , training subjects)

Player check-in ( player check-in id , training subject, training title, coach, player account, name)

Training plan table ( training plan id , players, training name, training time, training subjects, training progress, training results, training plan, coach evaluation)

Winner list ( winner list id , event number, event name, project name, list ranking)

Training sign-in ( training sign-in id , training subject, assembly date, training title, training content, coach)

      1. data sheet

The logical structure of the database is to describe the ER diagram in the database with specific fields. Use fields and data type descriptions to materialize object characteristics, and finally form a database table structure with certain logical relationships. Part of the data structure table required by the football player training plan management system is shown in the following table.

training_sign table:

name

type

length

not null

primary key

note

training_sign_in_id

int

11

yes

yes

Training sign-in ID

training_subjects

varchar

64

no

no

training subjects

collection_date

date

0

no

no

collection date

training_title

varchar

64

no

no

training title

training_content

varchar

64

no

no

training content

coach

int

11

no

no

coach

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

training_schedule表:

name

type

length

not null

primary key

note

training_schedule_id

int

11

yes

yes

Training Schedule ID

player

int

11

no

no

player

training_name

varchar

64

no

no

training name

training_time_

date

0

no

no

training time

training_subjects

varchar

64

no

no

training subjects

training_progress

varchar

64

no

no

training progress

training_results

varchar

64

no

no

training results

training_program

text

0

no

no

training plan

coach_evaluation

text

0

no

no

coach evaluation

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

player_sign_in表:

name

type

length

not null

primary key

note

player_sign_in_id

int

11

yes

yes

Player check-in ID

training_subjects

varchar

64

no

no

training subjects

training_title

varchar

64

no

no

training title

coach

int

11

no

no

coach

player_account

int

11

no

no

player account

full_name

varchar

64

no

no

Name

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

player_information table:

name

type

length

not null

primary key

note

player_information_id

int

11

yes

yes

Player Profile ID

full_name

varchar

64

no

no

Name

gender

varchar

64

no

no

gender

age

varchar

64

no

no

age

nation

varchar

64

no

no

nationality

height

varchar

64

no

no

height

weight

varchar

64

no

no

body weight

heart_rate

varchar

64

no

no

heart rate

body_fat_ratio

varchar

64

no

no

body fat percentage

blood_urea

varchar

64

no

no

blood urea

hemoglobin

varchar

64

no

no

hemoglobin

maximum_oxygen_uptake_rate

varchar

64

no

no

VO2max

record_time

date

0

no

no

record time

medical_examination_report

varchar

255

体检报告

player_account

int

11

球员账号

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

leave_management表:

名称

类型

长度

不是null

主键

注释

leave_management_id

int

11

请假管理ID

player

int

11

球员

leave_title

varchar

64

请假标题

leave_time

date

0

请假时间

leave_type

varchar

64

请假类型

leave_content

text

0

请假内容

examine_state

varchar

16

审核状态

examine_reply

varchar

255

审核回复

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

account_management表:

名称

类型

长度

不是null

主键

注释

account_management_id

int

11

科目管理ID

training_subjects

varchar

64

训练科目

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

  1. 系统实现
    1. 登录模块的实现

系统的登录窗口是用户的入口,用户只有在登录成功后才可以进入访问。通过在登录提交表单,后台处理判断是否为合法用户,进行页面跳转,进入系统中去。

登录合法性判断过程:用户输入账号和密码后,系统首先确定输入输入数据合法性,然后在login.jsp页面发送登录请求,调用src下的mainctrl类的dopost方法来验证。

用户登录模块的IPO如下所示:

输入:用户名和密码。

处理:

1)检测用户输入的账号、密码是否正确及在数据库已对应存在。

2)从数据库中提取记录,并储存在本地的session中(timeout默认=30min)。

3)根据用户名,将其显示在系统首页上。

输出:是否成功的信息。

登录流程图如下所示。

 

图5-1登录流程图

系统登录界面如下所示。

 

图5-2系统登录界面

用户登录的逻辑代码如下。

/**

     * 登录

     * @param data

     * @param httpServletRequest

     * @return

     */

    @PostMapping("login")

    public Map<String, Object> login(@RequestBody Map<String, String> data, HttpServletRequest httpServletRequest) {

        log.info("[执行登录接口]");

        String username = data.get("username");

        String email = data.get("email");

        String phone = data.get("phone");

        String password = data.get("password");

        List resultList = null;

        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;

}

    1. 用户子系统模块的实现
      1. 注册模块

此页面实现运动员的注册,必须注册登录后才能使用系统大部分功能,用户名不允许重复如果重复将会注册失败,并弹出相应的提示,通过js实现对输入的验证。

用户注册流程图如下所示。

 

图5-3用户注册流程图

用户注册界面如下图所示。

 

图5-4用户注册界面

用户注册关键代码如下所示。

  /**

     * 注册

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

}

      1. 训练签到模块

用户在lyblist查看训练签到信息,先使用sql语句查询出所有签到表的数据,然后调用PageManager.getPages(url,4,sql, request ),返回一个ArrayList的对象,在for循环里,使用jsp得到每个ArrayList对象的数据,然后放入页面模板中,用户点击我要签到则跳转至lyb.jsp。

训练签到流程图如下所示。

 

图5-5训练签到流程图

训练签到界面如图所示。

 

图5-6训练签到界面

训练签到管理界面如图所示。

 

图5-7训练签到管理界面

训练签到添加关键代码如下所示。

package com.project.demo.constant;

/**

 */

public class FindConfig {

    public static String PAGE = "page";

    public static String SIZE = "size";

    public static String LIKE = "like";

    public static String ORDER_BY = "orderby";

    public static String FIELD = "field";

    public static String GROUP_BY = "groupby";

    public static String MIN_ = "_min";

    public static String MAX_ = "_max";

}

      1. 我的签到模块

我的签到过程中,首先使用getmap(id,"xinxi"),通过签到得到我的签到数据,将我的数据赋值给签到名单,调用CommDAO的insert方法将签到名单数据插入签到名单表中,最后查看个人历史签到记录,可以销毁历史签到数据。

我的签到流程图如下所示。

 

图5-8我的签到流程图

我的签到界面如图所示。

 

图5-9我的签到界面

      1. 状态记录模块

球员状态记录过程中,首先使用getmap(id,"xinxi"),通过状态记录ID得到球员状态数据,将球员状态数据赋值给状态记录,调用CommDAO的insert方法将状态数据插入记录表中,最后查看个人历史状态记录,可以销毁历史记录数据。

状态记录流程图如下所示。

 

图5-10状态记录流程图

状态记录界面如图所示。

 

图5-11状态记录界面

状态记录管理界面如图所示。

 

图5-12状态记录管理界面

状态记录关键代码如下所示。

@PostMapping("/add")

    @Transactional

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

        service.insert(service.readBody(request.getReader()));

        return success(1);

    }

    @Transactional

    public Map<String, Object> addMap(Map<String,Object> map){

        service.insert(map);

        return success(1);

}

      1. 我的训练计划模块

球员和教练提交训练计划,可以进行新增、查看、修改以及删除等相应的训练计划管理操作。当点击"新增训练"的按钮时,在训练计划添加界面进行详细信息的添加操作。当点击"查看训练计划"超级链接时,会显示所选的训练计划的信息,然后点击"返回"再返回到其主页面。

我的训练计划界面如图所示。

 

图5-13我的训练计划界面

我的训练计划管理界面如图所示。

 

图5-14我的训练计划管理界面

    1. 管理员子系统模块的实现
      1. 球员管理模块

球员在yhzhgl查看运动员信息,先使用sql语句查询出所有球员表的数据,然后调用PageManager.getPages(url,4,sql, request ),返回一个ArrayList的对象,在for循环里,使用jsp得到每个ArrayList对象的数据,在jsp页面中解析ArrayList对象,得到其各个键值对的值。

球员管理界面如下图所示。

 

图5-15球员管理界面

球员管理关键代码如下所示。

@PostMapping("/set")

@Transactional

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

        service.update(service.readQuery(request), service.readConfig(request), service.readBody(request.getReader()));

        return success(1);

}

      1. 个人资料管理模块

用户点击登录填写账号信息登录后,会切换内容为“某某用户欢迎您”和历史订单,并给出注销链接。当用户登录成功后会将个人信息保存在session作用域中,点击自己的用户名时,会跳转到个人详细信息页面,由后台通过Freemarker取出session作用域中的用户信息进行动态渲染,例如,邮箱、电话号码、用户名等等。同时页面上会显示修改个人信息和修改密码的按钮,这时客户可以修改自己的登录密码以保障账号的安全性,防止被人窃取账号,通过UserController.java的updatePassword()实现,同时也可以根据自己的个人信息是否变动做出相应的修改,通过updateUserInfo()实现。

密码修改流程图如下所示。

 

图5-16密码修改流程图

个人信息管理界面如下图所示。

 

图5-17个人信息管理界面

修改密码界面如下图所示。

 

图5-18修改密码界面

密码修改关键代码如下所示。

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;

}

      1. 科目管理模块

添加科目信息时,输入必填字段后,表现层的XiangmuController接受传过来的科目信息参数,再调用XiangmuController类的addXiangmu方法,经过XiangmuService业务层到XiangmuMapper持久层的处理,完成对整个添加科目信息的操作。addXiangmu方法也和用户管理中的addUser方法类似,同时做添加和修改工作。

修改科目信息时,选择需要修改的科目进行修改,调用XiangmuController控制器的editXiangmu方法,拿到该科目原本的信息并显示到页面,管理员再对需要修改的科目信息字段进行修改,完成后调用addXiangmu方法,调用业务层的updateByKey方法,更新数据库的科目信息表的数据。

科目管理流程图如下所示。

 

图5-19科目管理流程图

科目添加界面如下图所示。

 

图5-20科目添加界面

科目查询界面如下图所示。

 

图5-21科目查询界面

科目信息添加关键代码如下所示。

Connection conn = this.getConn();

try {

Statement st = conn.createStatement();

    ResultSet rs = st.executeQuery("select * from "+tablename);

    ResultSetMetaData rsmd = rs.getMetaData();

            int i = rsmd.getColumnCount();

     for(int j=1;j<=i;j++)

     {

     if(rsmd.getColumnName(j).equals("id"))continue;

if(rsmd.getColumnName(j).equals("ID"))continue;

if(rsmd.getColumnName(j).equals("iD"))continue;

if(rsmd.getColumnName(j).equals("Id"))continue;

     typemap.put(rsmd.getColumnName(j)+"---", rsmd.getColumnTypeName(j));

     collist.add(rsmd.getColumnName(j));

          sql+=rsmd.getColumnName(j)+",";

     }

     sql = sql.substring(0,sql.length()-1);

    sql+=") values(";

    rs.close();

    st.close();

} catch (SQLException e) {

e.printStackTrace();

}

      1. 球员签到管理模块

球员签到过程中,首先使用getmap(id,"xinxi"),通过球员签到得到签到数据,将球员签到数据赋值给教练,调用CommDAO的insert方法将签到数据插入球员签到表中,最后查看个人历史签到记录,可以销毁历史签到数据。

球员签到管理流程图如下所示。

 

图5-22球员签到管理流程图

球员签到界面如下图所示。

 

图5-23球员签到界面

      1. 请假管理模块

用户选择请假信息添加,教练在yundongyuan_list查看球员请假信息,点击请假,跳转至jifen_add.jsp,添加请假内容则将添加的请假时间数据封装在HashMap中,然后调用CommDAO的insert方法将请假类型插入球员请假记录表中。

请假管理管理流程图如下所示。

 

图5-24请假管理流程图

请假管理界面如下图所示。

 

图5-25请假管理界面

请假管理关键代码如下所示。

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;

}

  1. 系统测试
    1. 测试目的

在对该系统进行完详细设计和编码之后,就要对足球运动员训练计划管理系统的程序进行测试,检测程序是否运行无误,反复进行测试和修改,使之最后成为完整的软件,满足用户的需求,实现预期的功能。

    1. 测试过程

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

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

表6-1注册测试用例

测试性能

新用户注册

用例目的

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

前提条件

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

输入条件

预期输出

实际情况

各项基本信息输入不完整

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

一致

填写已存在的用户名

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

一致

两次密码输入不一致

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

一致

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

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

一致

胡乱填写电话号码

收不到验证码

一致

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

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

一致

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

表6-2登录测试用例

测试性能

用户或操作员登录系统

用例目的

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

前提条件

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

输入条件

预期输出

实际情况

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

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

一致

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

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

一致

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

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

一致

清洁剂管理试用例表如下所示。

表6-3请假管理测试用例

测试性能

用户进行请假管理的操作

用例目的

测试用户进行请假管理操作时,该功能是否正常

前提条件

用户进入科目详情页,该科目能够被请假管理

输入条件

预期输出

实际情况

对着某科目点击“请假管理”按钮

界面跳转至请假管理界面

一致

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

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

一致

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

提示“请假管理失败”

一致

科目管理测试用例表如下所示。

表6-4科目管理测试用例

测试性能

科目相关信息管理功能

用例目的

测试系统操作者对科目相关信息进行管理的功能是否正常

前提条件

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

输入条件

预期输出

实际情况

进入科目管理界面,点击“录入”按钮,填写所有必填项,点击提交

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

一致

进入科目管理界面,点击“录入”按钮,未填写一个或者多个必填项,点击提交

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

一致

进入科目管理界面,选择要修改的一条数据,点击该条数据后面的“修改”按钮 

节目跳转至修改界面

一致

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

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

一致

进入科目管理界面,点击某条数据后面的删除按钮

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

一致

    1. 测试结果

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

  1. 总结与展望

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

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

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

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

参考文献

[1]刘铭扬. 体教融合视域下校园足球发展现状及趋势研究[D].扬州大学,2021.

[2]黄煌卓. 长沙市雨花区“足球特色小学”足球训练与竞赛研究[D].吉首大学,2021.

[3]Bellinger Phillip. Re-thinking athlete training loads: little rocks and big rocks can be understood with a multivariable approach.[J]. Research in sports medicine (Print),2021:

[4]王小雨.校园足球课余训练改革[J].当代体育科技,2021,11(15):79-81.

[5]Zemková Erika,Zapletalová Ludmila. Back Problems: Pros and Cons of Core Strengthening Exercises as a Part of Athlete Training[J]. International Journal of Environmental Research and Public Health,2021,18(10):

[6]孙福临, 体育 大连青少年足球训练海岛扶持计划捐赠仪式. 洪波 主编,长海年鉴,北方联合出版传媒(集团)股份有限公司万卷出版公司,2019,321,年鉴.

[7]胡璞. 一种足球训练电子标志杆[P]. 湖北省:CN110314357B,2021-01-12.

[8]马俊帆,张敬源. 足球特色学校业余训练发展现状[C]//2020年第四届中国足球文化与校园足球发展论文摘要集.[出版者不详],2020:110-111.

[9]李敬凯.关于高校足球训练教学创新的探讨[J].科技风,2020(09):77.

[10]李浩.组合训练在高校足球训练中的应用研究[J].当代体育科技,2020,10(07):27-28.

[11]杨大轩,李展龙.浅析中小学足球队训练计划的制定策略[J].体育科技文献通报,2019,27(06):76-77+88.

[12]张学研.高校足球运动训练有效性的影响因素及对策研究[J].当代体育科技,2019,9(10):47-48.

[13]李皓.基于耗散结构理论对校园足球训练模式的启示[J].青少年体育,2019(03):51-52.

[14]肖剑峰.运用策略提升小学足球训练效果研究[J].当代体育科技,2019,9(09):32+34.

[15]刘传平.高校足球训练教学创新策略分析[J].农家参谋,2018(23):192.

[16]康昕宇,申良坤,弭非奇.足球训练中运用藤球训练方法的可行性研究[J].当代体育科技,2018,6(26):39-40. 

[17]刘涛. 足球理论与实践[M].北京体育大学出版社:, 201804.236.

致谢

伴随着设计的完成,大学生涯也随之即将结束。大学期间是我最珍惜的时光,大学时光中学会了很多,也成长了很多,这段时光中每一段回忆都刻在脑海中。感谢一起学习,一起成长同学们,和成长过程悉心教导的老师们,非常感激有你们的陪伴。

首先感谢我的指导老师,设计的完成离不开老师的一系列指导。在毕业设计的完成过程中,老师给出了很多中肯的建议,正是由于老师一丝不苟的工作态度,我的设计才能顺利的完成。

最后,感谢在大学生涯中每一位教导我的老师,是你们教给了我丰富的知识,更教会了我遇到问题时,如何去应对并解决。谢谢你们的帮助与支持。

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

Guess you like

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