The design and implementation of college students' mental health test based on WeChat applet.docx

Contents
1 Introduction 3
1.1 Project development background 3
1.2 Project development significance 3
1.3 Main content of the project 4
2 Related technology introduction and system environment development conditions 5
2.1 Related technology introduction 5
2.2 System environment development conditions 6
3 System requirements analysis and design 6
3.1 Feasibility analysis 7
3.2 Demand analysis 7
3.2.1 Overall system overview 8
3.2.2 Functional requirements 8
3.2.3 Non-functional requirements 10
3.2.4 Flow chart design 11
3.2.5 System sequence diagram design 11
3.2.5 System ER Figure Design 13
3.3 Database Design 14
3.3.1 Principles of Database Design 14
3.3.3 Database Table Design 15
4 System Function Module Realization 16
4.1 Front-end Function Page Realization 17
4.1.1 Login Registration Module Realization 17
4.1.2 Health List Video Module Realization 18
4.1.3 Realization of non-language text list module 19
4.1.4 Realization of test record module 20
4.2 Realization of back-end function page 20 4.2
Log function module 25
4.3 Installation and deployment 25
5 System testing 26
5.1 Purpose and significance of system debugging 26
5.2 Functional test cases 27
6 Summary 28
References: 29
Acknowledgements 30

Abstract: With the accelerated pace of people’s lives, the mental health of college students has always been one of the focus issues that the society pays attention to. All colleges and universities attach great importance to the mental health of students, and regularly organize psychological surveys of students to achieve The purpose of early detection and early treatment. This topic mainly uses the WeChat mini program mental health test system to achieve early prevention and early intervention.
This system mainly adopts the spring development framework system. The technologies used are mysql database, mybatis driver framework and tomcat server deployment. The integrated development tools used are mainly IDEA and jdk1.8.
Keywords: WeChat applet health system; spring; test design; mysql

Abstract: with the acceleration of people's pace of life, the mental health of college students has always been one of the focuses of social attention. Colleges and universities attach great importance to the mental health of students, and often organize psychological surveys on students, so as to achieve the purpose of early detection and treatment. This topic mainly through wechat small program mental health test system to achieve early prevention and early intervention.

The system mainly adopts spring development framework. The technologies used include MySQL database, mybatis driver framework and Tomcat server deployment. The integrated development tools used are mainly idea and JDK1.8.

The supermarket management system has the following major functions: supplier management, inventory management, category management, commodity management, cashier management, business management. In the following chapters, the function and implementation of each function will be introduced in turn.

Key words: wechat, small program, health system; spring; Test design; mysql

1 Introduction
1.1 Background of the project development
in the process of social change, the complex social life has undergone many changes, college students 'mental health problems has been one of the focal issues of social concern, various colleges and universities for students' mental health problems are quite seriously, Regularly organize psychological investigations of students to achieve the purpose of early detection and early treatment. Mental health has always been a matter of great concern to the whole society. Mental health can also be measured by some established indicators just like physical health. It is generally believed that mental health refers to having normal intelligence, positive emotions, moderate emotions, harmonious interpersonal relationships, good personality qualities, strong will and mature psychological behaviors. Healthy mental state and good mental quality are the conditions and foundations for a person's all-round development. As a component of modern society, college students living and studying in universities are very sensitive to the "barometer" of this era of social psychology. Moreover, as a special social group, college students have many special problems of their own, such as adapting to the new learning environment and tasks. The problem of adaptation to professional choice and learning, the conflict between ideals and reality, the handling and learning of interpersonal relationships, conflicts in love, and the choice of future careers, etc. How to enable them to avoid or eliminate the psychological stress, psychological crisis or psychological obstacles caused by the above-mentioned various psychological pressures, improve their physical and mental health, adapt to the current and developing social environment with a positive and normal mental state, and prevent mental illness and mental health With the occurrence of diseases, strengthening the mental health education of college students has become an urgent need and a common concern for all colleges and universities.
This system combines business requirements and shopping processes to tailor a supermarket management software. It mainly solves practical functions such as rapid product positioning and membership discount. The technology used is: Java language development, mysql8.0 as the database, and springboot development framework.
1.2 Significance of project development
With the development of society, the progress of science and technology and the prosperity of economy, society has put forward higher requirements for "talents." The task of modern colleges and universities is no longer to train students who are devoted to studying in the ivory tower, but to train a large number of students who can bravely face the challenges of the knowledge economy, adapt to the high-tech, high-efficiency, and high-competitive requirements of modern society, and have a good integration. Quality innovative talents. On the other hand, for every college student, the competition for talents in modern society puts them in the contradiction between the superiority of "the pride of heaven" and the ordinary feeling of "a commoner". Learning is no longer the only content that college students pay attention to. There is a collision between the vision of college students in the teenage years and the reality of college life. Self-integration and self-integration with society have become challenges and growth tasks faced by every college student. Therefore, it is very important to understand and treat the psychological condition of the students in the university, so I thought of developing this software-the design and implementation of the mental health test for college students based on the WeChat applet.
WeChat applet development can reduce development costs. Taking into account the compatibility of different platforms, WeChat applets can meet the needs of non-use, reduce the development cost of the program, save time cycles, and allow the system to use the advantages of WeChat to promote and simplify the corresponding process , As long as it can be completed by scanning the two-dimensional code tool.
(1) The status of foreign research
At present, some foreign countries have made some substantial progress in using wired networks to carry out student mental health education. Thousands of teachers are also using this Internet to effectively carry out psychological education for college students and netizens. The Internet is changing the relationship between students, teachers and parents in a radical way. Parents and teachers can keep in constant contact via email. John Poluektov, a spokesperson for Thinkwave.com, a California software manufacturer, said: "Parents now know more about what is happening in schools or units. No matter where we go, we will hear users say that it has changed the way education is operated. Especially for college netizens, there is no excuse for not knowing their development status, nor is there an excuse for not knowing where they are in school or work."
The combination of mobile Internet and college students' mental health testing will bring innovations in college students' mental health education, and will give college students various new opportunities for mental health education.
(2) Current status of domestic research
The research on the mental health of college students mainly uses questionnaires and psychometric methods. The main tools used are questionnaires and scales. The commonly used mental health measurement scales in my country mainly include the College Student Personality Questionnaire (UPI), the Symptom Self-Rating Scale (SCL-90), the Eggson Personality Questionnaire (EPQ), the Test Anxiety Scale Anxiety Self-Rating Scale and the Depression Self-Rating Scale Table (SAS/SDS) etc. In addition to the routine application of this type of scale, Meta is also used for analysis, and the most widely used is the SCL-90 scale. However, many of these scales are imported from foreign countries. Although there are norms, there is still a big difference in their scope of application. Some scholars believe that SCL-90 is not suitable for evaluating normal people, which is the empirical validity of Mu Gao. There are only a few students who think that the SCL-90 norm needs to be renewed, and they are also skeptical about the current poor mental health status of college students. Not only SCL-90, but other scales also have more problems in the evaluation of college students' mental health, and there are also the phenomenon of incorrect interpretation of psychological measurement results. In response to this situation, many scholars have begun to carry out related work, Buwang can develop heavy clothing suitable for the group of college students in our country. One case of the Mental Health Self-Rating Scale (SMHRS) for college students, which has been used more in recent years, has high reliability and validity; in addition, the Mental Health-related Rating Scale for Chinese College Students was developed by the Ministry of Education. This set of scales It is pertinent and has high application value as a tool for evaluating the mental health of college students.

1.3 The main content of the project
This paper conducts research and analysis based on the characteristics and requirements of the software. The main content: first introduces the background of the project development and the significance of the research; second, it introduces the theoretical knowledge and environment of the relevant technologies used in the project development process Use; The third is to analyze the system according to the needs of the business, and explain the meaning of development from multiple angles. The fourth is to analyze the content according to the needs, explain the development function, and the steps to achieve it. The fifth is to briefly introduce the test cases, so that after successfully completing the development of the program, through these tests, we can quickly and effectively find out the shortcomings of the system and modify and improve them in time.

2 Related technology introduction and system environment development conditions
2.1 Related technology introduction
WeChat developer tool is a developer tool specially designed by Tencent for WeChat applets. It is not only lightweight and convenient, but also not very demanding on the computer. Therefore, the corresponding development can be completed on a general computer. In the process of system debugging and testing, you can complete the system test link without downloading third-party plug-ins, which can be completed through a developed debug debugger.
The system is accessed based on a browser, adopts the springboot integrated rapid development framework, the front end uses the vue method, based on the es5 syntax, and the development tool IntelliJ IDEA 2020.1.1 x64. Because the development tool is embedded with the Tomcat service operation mechanism, it can be No need to download Tomcat server separately.
As an object-oriented development language, Java not only absorbs the various advantages of many languages, but also its entire ecology is the best openness among all languages. In learning, you can find many similar functional codes for later Refer to learning, like the current asp.net development language to a large extent imitates the thinking of java. If you learn java programming and master another language, you will learn very quickly because of its simplicity and structure-oriented It reduces the complexity of code management, makes the programming process clearer, and the logic decoupling is more hierarchical.
As a project version management software, Maven can better manage the use of jar packages. There was no Maven management tool before, and many versions of jar packages need to be downloaded online. Sometimes the incompatibility between versions affects the use of the system. Play, sometimes different bugs appear, after using the Mavern project, this difficult problem can be eliminated very well.
MySQL is an open source relational database. Because it is open source, there is no copyright dispute. Now many companies are using MySQL as database storage. Not only its storage rate is relatively fast, but it can also be used for secondary development. Customize a database that is more suitable for the company.
The bottom layer of Vue's syntax implements the principle of two-way data binding. When re-detailing or releasing the project, there is no need to restart the project. The implementation of the code function module can be reflected on the browser to achieve fast response. Some compilable languages ​​need to load a lot of plug-ins before they can be started.
Spring encapsulates a lot of java class library files. During the development process, you don’t need to write too many complicated class files. You only need to quote the spring framework to complete the needs of rapid development. Therefore, the logic code of Java programming becomes more complicated. Clear, the decoupling between the various layers is also relatively strong, the reusability has also been well played, making the development difficulty easier and easier, its main two features are dependency injection, interface-oriented thinking; (AOP) Aspects of thinking;
IntelliJ IDE and eclipse comparison, these two are Java programming language development tools, and the difference, IDEA and third-party plug-in market access more, development efficiency and intelligent prompts are smarter than eclipse, in terms of environment IDEA is also faster in configuration generation, and the interface design is also relatively clean and simple.
HBuilder is a development technology based on H5 grammar such as HTML, js, css, etc., which makes it easy for developers to learn. The data binding involved is based on Vue grammar, and it is faster than traditional jquery in development efficiency. Of course, HBuilder also retains With support for jquery, the two grammars can be combined with the needs of the project and can be mixed development. The development tool itself is written by java, so it has good compatibility with native project plug-ins.

2.2 System environment development conditions
The system adopts the B/S architecture, the front-end framework is developed with WeChat developer tools, and the background data is realized using MYSQL
serial number. Software environment version remarks
1 windows operating system 10
2 database MYSQL 8.0
3 programming development tool software IDEA 2020.2
4 WeChat Developer tool 1.05

3 System requirements analysis and design
As the software development process in the early stage, the project needs to be analyzed. First of all, we must understand what the business does and what functions it implements, and subdivide the use background of each functional module in the functional module. In this way, in software development, the defects of the architecture design will not reproduce the underlying data structure of the secondary design. In addition, there are some non-functional special details, such as database performance, security considerations, and network speed reflection time. They are all used as constraints for demand analysis, and they are also targets that need to be analyzed at runtime after the project is developed.

3.1 Feasibility analysis The feasibility analysis of
the system is essential in the process of system development. The feasibility study is to evaluate whether the problem can be solved and to solve it with the least time and the least cost. In order to achieve the above goals, the advantages and disadvantages of the methods to solve these problems must be considered, and the economic benefits brought by the development of these systems must also be considered. Here we can use technical feasibility, operational feasibility, and economic feasibility to conduct a feasibility study of our system.

3.1.1 Technicality: The system designed in this project mainly adopts layui front-end development, the back-end uses java language and springboot integrated development framework, uses mysql database, according to one's own major, combined with online access to case lists and library materials, development and realization There is no big problem.
3.1.2 Economics: To develop a mature software, it takes a long process. Here, the design to the software requirements analysis, planning, development personnel, testing links, and debugging process all require capital and manpower input. And the development of this set of software can be learned through online open source source code and related materials. The hardware and computer use are all used by oneself, so the development cost can be ignored.
3.1.3 Operability: The functions designed by this system mainly include login module, student management module, teacher management module, course management module, classroom management module. The relevant knowledge of these functional modules are commonly used functions that are usually designed. It is achievable in operation.
3.1.3 Operability: The functions designed in this system mainly include membership management module, test management, content management, and system settings. The relevant knowledge of these functional modules are commonly used functions that are usually designed and can be operated. Achieved.

3.2 Demand analysis
By understanding the needs of users, we can know that simple-to-operate systems are more likely to be favored by users, and can manage information accurately and completely. After the WeChat Mini Program Psychological Test Platform did the corresponding analysis of the requirements, it came to the conclusion that the system is mainly divided into two roles: back-end administrators and front-end ordinary users.
The administrator module is mainly for data update management. The functions are divided into system member management module, test management, content management, and system settings; front-end users mainly include my data, notification announcements, mental health videos, language and text testing, and non-verbal text testing.

3.2.1 System overview
The project management system is mainly based on the B/S design model. The functions of the system design are: membership management module, test management, content management, and system settings. The system structure is shown in

Insert picture description here


Figure 3-1 : Figure 3-1 Structure Diagram

3.2.2 Functional requirements
This system is designed to use modern computer network technology to integrate traditional information propaganda methods, and to complete it in accordance with the practical process. At the same time, the service was improved, and a WeChat intelligent parking system platform was initially designed to facilitate related business operations. In order to make the system play a greater role in various management and realize computerized and efficient management, the development target function requirements are now introduced as follows:
(1) Administrator login module The
administrator has the right to manage the system, but all Registration and the use of permissions need to be authorized by the super administrator. After the administrator enters the home page, the user can authorize related functions, such as user management, test management, content management, and system settings.

Insert picture description here


(2) Member management module
An administrator with certain management authority, can view the member list, and the corresponding member addition, deletion, modification, and query operations.

Insert picture description here


(3) Test management module Administrators
with certain management authority can view the data in the language and non-language text lists, as well as the corresponding addition, deletion, modification, and query operations.

Insert picture description here


(4) Content management module Administrators
with certain management authority can perform announcement management, view data of video lists, and corresponding add, delete, modify, and query operations.

Insert picture description here


(5) System Settings Management Module Administrators
with certain management authority can view and modify the role list and administrator's data.

Insert picture description here


3.2.3 Non-functional requirements
The system not only needs to meet functional requirements, but also needs to meet invisible non-functional requirements, such as system compatibility, user interface integrity, and web access fluency. The main points are summarized as follows :
Category requirement description
Compatibility supports multi-browser access.
The interface website is overall beautiful, with coordinated elements.
Security access control is not attacked, preventing SQL injection.
3.2.4 Flowchart design The
workflow of the mental health test management system is: The administrator logs in to the system with an account and password, and can manage membership, system testing, content management, and system settings. The following is the overall flow chart design as shown in Figure 3-2:

Insert picture description here


3.2.5 System sequence diagram design
A separate and interrelated things that need to be represented constitute the sequence of the system. The sequence diagram will more intuitively show the connection between the modules, and make the functions of the modules more clearly expressed. Several important sequence diagrams of this system are as follows:
(1) Login module sequence diagram The
login module acts as a verification role. Only the administrator information in the middle of the database can successfully log in and enter the system homepage. The sequence diagram of the login module is shown in the figure.

Insert picture description here


(2) Timing diagram of
test module The test module records the content of answering questions. When the user enters the test content, he can choose what he needs to answer according to the content of the question. When the question is completed, the record will be saved in the record table. The record table will Return the successfully added record to the user, prompting that the addition is complete. The sequence diagram of the test module is shown in the figure.

Insert picture description here


3.2.5 System ER diagram design The
system administrator can manage the user's related attribute account, password, name, profession, class, etc.; also can view the test management attribute test name, tester, creation time, and result evaluation ; You can also manage the system administrators and roles on the authority; you can also perform corresponding operations on the title and content in the content management. Figure 3-3 System ER attribute diagram:

Insert picture description here


Administrator attribute table: login time, account number, status, login id, password

Insert picture description here


Insert picture description here


Insert picture description here


Insert picture description here


3.3 database design
3.3.1 principles of database design
When building a table, the primary key of the table should be as few as possible, and when establishing a foreign key relationship between the table and the table, it should also be as few as possible to minimize the complexity of database queries and CRUD operations; system recovery operations, in the design of the database The file considers that if the table is damaged, it can be quickly restored in a short time, reducing cost. In the process of database system development, the following characteristics generally need to be met: field redundancy is less, that is, when designing table fields, try to reduce unnecessary and redundant fields, and when setting table parameter types, reasonably control the length of parameter fields ; Confidentiality and security should be strong, do not set system keywords in the table to prevent SQL injection attacks; the management between tables should be rationalized, try to reduce more than three management table queries, and reduce SQL queries Decrease in system performance.
3.3.3 Design of the database table
Member management table (user_name): user number, user name, user password, gender, name, profession, class, counselor Table 3-1 Member management table (user_name)
field name field description type/ Length Constraint Remarks
user_id User Number Bigint PK
username User Name Varchar(20) NOT NULL
password User Password Varchar(20) NOT NULL
sex Gender Varchar(20)
Userreal Name Varchar(20)
Zhuanye Professional Varchar(20)
Banji Class Varchar(20)
Fudaoyuan Counselor Varchar(20)

Test list management (ceshishi): id, tester, test name, result evaluation, test time
Table 3-2 Test Information Table (produceMsg)
Field Name Field Description Type/Length Constraint Remarks
id id Bigint PK
Question_user Tester Varchar(20) NOT NULL
Question_title Test name Double NOT NULL
Result_pg Result evaluation Varchar(20)
Question_date Test time datetime

Announcement list (notice): id, title, content, creation time
Table 3-3 Announcement list (order)
Field name Field description Type/length constraint Remark
id id Bigint PK
Notice_name Title Varchar(20) NOT NULL
Contetn Content Double NOT NULL
Create_date Creation time Int

Video management list (video_manager): id, title, content, reply, video address, reply person, reply time

Table 3-4 Video Management List (video_manager)
Field Name Field Description Type/Length Constraint Remarks
id id Bigint PK
Titele Title Varchar(20) NOT NULL
content Content Text NOT NULL
replay Reply Text
Videw_src Video address Text
Replay_user Reply to Text
date_tiem Reply time Datatiem

Administrator information table (admin): ID, account number, password, status, login time, login ip, department
Table 3-5 Administrator information table (admin)
field name field description type/length constraint remarks
user_id user number Bigint PK
username User name Varchar(20) NOT NULL
password User password Varchar(20) NOT NULL
Status Status Int
dengshijian Last login time Varchar(20)
dengip Last login id Varchar(20)
Bumen Department Varchar(20)

4 System function module realization
This system uses the architecture of combining java and mysql to develop the application of the WeChat system program. All the things and operations closely related to the WeChat applet in the system are timed through a class file related to the database. The implementation greatly enhances the coupling of the code. When the information such as the type of the database is changed, it is completely possible to directly modify the related categories and files, and it is no longer necessary to do anything on each page because of this. modify. In addition, this system also solves the difficulty of simplified Chinese well, that is, it is solved by adding multiple forms of coding language in the configuration file. Another important feature of this system is that the system is All operations of the database are individually written in a category, so that all databases in the system can be operated only by accessing this category, and there is no need to do a classification operation to write the database for each category page. To a large extent Thereby enhancing the overall integration of the system.

4.1 Realization of the front-end functional page
4.1.1 Realization of the login and registration module
This page is used as the entrance of the front-end page. Only registered users can perform system evaluation and testing. In the registration module, the parameters are mainly set for user name, name, gender, password, and counseling. After completing the registration, you can enter the system with your account and password.

Insert picture description here


Part of the code is as follows:
postRequest('/app/member/login',{username:this.data.username,password:this.data.password}).then(res=>{ wx.reLaunch({ url:'/pages /index/index' }) Algorithm implementation: the front-end login page accesses the /app/member/login path through a post request. When the result of success is returned, the system will access the front-end page's home page/pages/index according to the url in the wx.Relanuchs method /index 4.1.2 Implementation of the health list video module When the user clicks on the health list page in the health section, they can jump to the video center. The user can click any item to view the video content, video title and creation time. The main code is as follows: Pageable pageable = new Pageable(pageNumber, 10); Page page = tVideoService.list(pageable, new TVideo()); setJson(page, AppAPIUtil.jsonConfig); Algorithm implementation:





Insert picture description here







The new Pageable object method is mainly used to record the parameters of the paging. The tVideoService.list() method is used to query all the contents of the video, save the query results to the page, and call the AppAPIUtil.jsonConfig configuration parameters to format them into json and return to the front-end page .

4.1.3 Implementation of
the non-verbal text list module This module mainly uses a short video to allow users to answer what happened in the video. Right below the video, there will be questions that need to be answered. When the user clicks the I want to test button, it will jump to Test page, proceed to my answer window.

Insert picture description here


The main code is as follows:
http.postRequest('/app/nonver_question/list',{pageNumber: that.data.pageNumber}).then(res=>{ if (type == 1) { page = that.data.page. concat(data.content); } Algorithm implementation: This page calls the /app/nonver_question/list interface through a post request to get the list page of all test videos. When the result is queried, it will pass the data attribute in res to change all values Loop to the page.



4.1.4 Implementation of the test record module
When the user completes the verbal or non-verbal question and answer, the details will be displayed in the test record. When the user clicks, he will see the content of the test detail page, as well as the evaluation result, and the created time.

Insert picture description here


Design and Implementation of College Students’ Mental Health Test Based on WeChat Mini Program.docx: Click to download """