ssm+mysql+Design and implementation of ssm-based curriculum ideological and political resource crowdsourcing system Graduation project - with source code 020838

SSM course ideological and political resource crowdsourcing 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 crowdsourcing system for curriculum ideological and political resources using Java technology.

This design mainly realizes the curriculum ideological and political resources crowdsourcing system which integrates the advantages of humanization, high efficiency, and convenience, and completes functional modules such as user management, received tasks, ideological and political tasks, publishing courses, ideological and political labels, and notification 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 job management system uses the Java language and is developed using the SSM technology based on the MVVM model. 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 to complete the system development.

Key words: curriculum ideological and political resource crowdsourcing system; Java language; 

Crowdsourcing system of Ideological and political resources in SSM course

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 application software, Java technology is used to build the crowdsourcing system of curriculum ideological and political resources.

This design mainly realizes the crowdsourcing system of curriculum ideological and political resources with the advantages of humanization, high efficiency and convenience, and completes the functional modules such as user management, received tasks, ideological and political tasks, publishing courses, ideological and political labels, notification 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 job management system uses Java language and SSM technology based on MVVM mode for development. In terms of data, Microsoft MySQL relational database is mainly used as the data storage medium, and the system development is completed with the foreground HTML + CSS technology.

Key words: Crowdsourcing system of curriculum ideological and political resources; Java language;

Table of contents

Chapter 1 Introduction 

1.1  Research Significance

1.2  Research Methods

1.3  Main work and paper structure

Chapter 2 Introduction to Related Technologies

2.1 Development Technology

2.2 MV VM mode

2. 3  B/S structure

2. 4  Mysql database

2.5  SSM framework _

2.5 Relationship between layers of SSM framework

Chapter 3 System Analysis

3.1  Feasibility analysis

3.1.1  Technical Feasibility

3.1.2  Economic feasibility

3.1.3  Social Feasibility

3.2 System function analysis and description

3.3 Performance Analysis 6

3.4 System operation process 7

3.4.1 Add information process 7

3.4.2 Operation process 7

3.4.3 Delete information process 8

Chapter 4 System Design

4.1 System architecture design

4.2 Development process design

4.3 Database design

4. .3.1 Entity ER Figure 13

4.3.2 Data Table 14

Chapter 5 System Implementation 

5.1  Realization of database connection module

5.2  Implementation of login module 16

5.3 Release the implementation of the course module

5.4 Realization of Ideological and Political Task Module 23

5.5 Realization of teacher user management module 24

5.6 Implementation of the received task management module 26

5.7 Implementation of ideological and political label management module 28

5.8 Realization of notification management module 30

Chapter 6 System Testing 31 

6.1  Test environment 31

6.2  Test objectives

6.3  Functional testing 31

6.4  Test results 32

Chapter 7  Summary and Outlook 34

Reference 35

Thanks 37

  1. introduction
    1. Significance

The development and research on the crowdsourcing system of curriculum ideological and political resources has far-reaching significance both in theory and in practice.

 (1) Theoretical significance

Based on the research basis of domestic and foreign scholars on curriculum resources and student curriculum resources, and aiming at the lack of research on the development and utilization of student curriculum resources, the author combines student curriculum with high school ideological and political, expands the research scope and field of high school ideological and political curriculum, and deepens The development of the political discipline itself. Strive to provide theoretical guidance for the teaching of ideological and political courses in senior high schools through systematic and in-depth research on the "curriculum ideological and political resource crowdsourcing system and its development".

 (2) Practical significance

Through this research, I can promote myself to unify the theoretical research of students with the exploration of educational practice. On the one hand, sorting out and summarizing the achievements and experiences I have gained in developing the curriculum ideological and political resource crowdsourcing system, reflecting on the shortcomings that still exist, and improving the strategy of capturing and developing the curriculum ideological and political resource crowdsourcing system. On the other hand, it is beneficial to change one's own views on course teaching and students, change one's own teaching behavior, and improve the professional development level of teachers.

    1. Research methods

The research focus of this paper is the development strategy of curriculum ideological and political resource crowdsourcing system. The innovation of this article lies in: putting the development of curriculum resources in the perspective of high school ideological and political courses, and actively exploring the strategies of developing students' curriculum resources during and after the classroom teaching of this course.

The research methods used are: (1) Literature research method. Check out various research results of domestic and foreign scholars on curriculum resources and curriculum resources and their development and utilization, and lay a theoretical and writing foundation for defining the concept of curriculum ideological and political resources crowdsourcing system and discussing its development. (2) Survey and research method. Through course observation and open or semi-open interviews, communicate with teachers and students to obtain valuable information needed for research. (3) Experience summarization method. Summarize and reflect on the methods and approaches of developing the crowdsourcing system of curriculum ideological and political resources, and introduce relevant case analysis and explanations, and continuously improve the strategy of developing the crowdsourcing system of curriculum ideological and political resources.

    1. Main work and thesis structure

The main work of this paper is to study how to organically combine computer and information management, so as to realize the functional modules of the system in Dreamweaver by using Java language and Mysql database technology, and effectively develop a set of crowdsourcing system close to the practice of curriculum ideological and political resources. , effective management of curriculum ideological and political resource crowdsourcing system.

The paper structure is as follows:

Chapter 1 Introduction: It mainly analyzes the development background, research status, purpose, and significance of the curriculum ideological and political resource crowdsourcing system.

The second chapter development technology and software: mainly introduces the system development tools, and explains some special function technologies used in the development system.

Chapter Three System Analysis: It mainly analyzes the needs of the curriculum ideological and political resources crowdsourcing system, and analyzes its data flow and functions.

Chapter 4 System Design: mainly introduces the system design according to the system requirements, and the process of data development and function module design.

Chapter 5 System Implementation: This chapter mainly introduces the results of the realization of various functions of the system based on the screenshots of the system interface.

Chapter 6 System Testing: In this chapter, the system tests the functional modules and writes test cases to ensure that the major functions of the system are correct.

Chapter VII Summary and Outlook: Summarize the research content of the whole paper, summarize the characteristics of the whole paper, point out the shortcomings, and point out the direction for the next step.

  1. Related technology introduction
    1. Development Technology

The front-end part of the system is developed based on the MVVM model, using the B/S model, and the back-end part is developed based on the Java ssm framework.

Front-end part: The front-end framework adopts the popular progressive JavaScript framework Vue.js. Use Vue-Router and Vuex to achieve dynamic routing and global state management, Ajax to achieve front-end and back-end communication, Element UI component library to make the page quickly prototype, and the front-end of the project realizes responsiveness through grid layout, which can be adapted to PC, tablet, mobile, etc. Perfect layout display for different screen sizes.

Back-end part: use ssm as the development framework, and integrate MyBatis, Redis and other related technologies at the same time

    1. MVVM pattern

MVVM is shorthand for Model-View-ViewModel. It's essentially an improved version of MVC. MVVM is to abstract the state and behavior of the View in it, and let us separate the view UI from the business logic. Of course, ViewModel has already done these things for us. It can take out the data of Model and help deal with the business logic involved in View because of the need to display content. Microsoft's WPF brings new technical experience, such as Silverlight, audio , video , 3D , animation ..., which leads to more detailed and customizable software UI layer. At the same time, at the technical level, WPF also brings new features such as Binding, Dependency Property, Routed Events, Command, DataTemplate, and ControlTemplate. The origin of the MVVM (Model-View-ViewModel) framework is a new type of architectural framework developed and evolved from the application of the MVP (Model-View-Presenter) pattern combined with WPF . It is based on the original MVP framework and incorporates the new features of WPF to cope with the increasingly complex needs of customers.

    1. Mysql database

Mysql has been updated many times, and the functional level has been very rich and perfect. From Mysql4 version to 5 version, a relatively large update has been made, and it has achieved good practical application results in actual commercial use. The latest version of Mysql supports the compression of information, and at the same time, it can also perform encryption to better meet the needs of information security. At the same time, after multiple updates of the system, the mirroring function of the database itself has also been greatly enhanced, the smoothness of operation and ease of use have been greatly improved, and the use and creation of drivers are also more efficient and faster. The biggest change is the optimization of the display of spatial information, which makes it easier to label and calculate coordinates on the application map. The powerful backup function also ensures that users will feel more at ease during the use process, and the supported Office features also support users' self-installation and use. The display form of information has also been greatly updated, and two very useful display areas have been added, one is the information area, which has classified tables and text, and the display of the interface is more refreshing and specific. The second is the information control of the instrument, which can display information in the instrument information area and compare multiple information at the same time, which brings great convenience to the actual use of users.

In the actual implementation process of the online examination system designed in this article, the main reason for choosing the Mysql database is that there will be a large number of databases that are frequently operated during the application and development of the enterprise application system, and the data security requirements It is also very high. Based on these factors, Mysql with a relatively high safety factor was finally selected to store the background data of the online examination system.

The overall structure diagram of the database management system is shown in the figure below.

               

 

Figure 2-1 Database structure             


    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 SpringMVVM+Spring+MySQL. 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 a complete structure, powerful functions and a good structure: SpringMVVM separates each plate, Spring makes development more flexible and convenient, allows developers to directly manipulate objects, and divides labor details at each level, and realizes each level. Decoupling 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. The relationship between the layers of the ssm framework:

Both the DAO layer and the Service layer can be developed independently, and the mutual coupling is very low, so they can be carried out independently. Such a model is especially advantageous in the process of developing large projects.

The Controller and View layers are developed together because of their high coupling, but they can also be developed independently of the first two layers as a whole. In this way, you only need to know the definition of the interface before the layer and the layer, and call the interface to complete the required logic unit application. Everything is very clear and simple.

  1. system analysis
    1. Feasibility Analysis

To develop any system, it is necessary to analyze its feasibility and consider its time and resource constraints, which can reduce the risk of system development. At the same time, after the analysis, not only can manpower be used reasonably, but also the consumption of various resources can be saved. The following three aspects of technology, economy and society will be introduced.

      1. technical feasibility

Technical feasibility mainly considers whether the technology used in the current project can meet the requirements, whether it can meet the requirements on equipment, and whether various auxiliary tools can provide assistance. This system uses the Java development language, the debugging is relatively simple, and the current computer hardware configuration can fully meet the development needs, so it is absolutely feasible technically. Software: Because the software development platforms are mature and feasible, they are fast, large in capacity, high in reliability, and low in price, which can fully meet the needs of the system. Using the Java programming language, there are no technical problems.

      1. economic feasibility

Both the Myeclipse development platform and the Mysql back-end database used in the system are free development tools. Therefore, the development cost is mainly concentrated in the later promotion and system maintenance. Compared with the higher-cost C/S model, the lower-cost B/S model is also selected, so there is almost no economic problem.

      1. social feasibility

This system is a self-developed system, starting from the crowdsourcing system for convenient and efficient management of curriculum ideological and political resources. So it's also possible socially.

    1. 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. To reduce costs, improve users' work efficiency, and develop a crowdsourcing system for course ideological and political resources based on computer and network technology.

The development and design of the curriculum ideological and political resource crowdsourcing system is an independent system. The previous database is used for data storage and development, mainly to realize the user roles and corresponding functional modules of the curriculum ideological and political resource crowdsourcing system, so that the curriculum ideological and political The management of the resource crowdsourcing system will not have management differences and low efficiency, but is just the opposite of traditional management information. The realization of the curriculum ideological and political resource crowdsourcing system can save resources, and the processing speed of business is also improved. Efficient and powerful.

3.3 System flow analysis

3.3.1 Add information process _

Add information, the numbering system uses the automatic numbering mode, no user fills in, the user adds information and enters the information, the system will automatically confirm the information and data, if the verification is successful, the information is valid and added to the database, if the information is invalid, re-enter the information. Figure 3-3 shows the process of adding information.

 

                                                          Figure 3-3 Flowchart of adding information

3.3.2 Operation process

If the user wants to enter the system, he first enters the system login interface, selects the login type to log in through the correct user name and password, the system will check the login information, the information is correct, and then enter the corresponding function interface, prompting that the information is wrong and the login fails. The system operation process is shown in Figure 3-4.

 

                                                   Figure 3-4 Operation flow chart

3.3.3 Delete information process

The user selects the information to delete and clicks the Delete button. The system prompts whether to delete the information. If the user wants to delete the information, the system will delete the information. System database deletion information. Figure 3-5 shows the flow chart of deleting information.

 

                                                            Figure 3-5  Flow chart of deleting information


  1. system design
    1. System architecture design

An overview design analysis of the system project of the curriculum ideological and political resource crowdsourcing system. The main content includes the specific analysis of the curriculum ideological and political resource crowdsourcing system. The database is designed. The data uses mysql database, and the system design adopts a more humanized The operation design can deal with and give feedback to the error information in the system in time.

The design of the curriculum-based ideological and political resources crowdsourcing system is based on existing computers, which can realize detailed understanding and statistical analysis of user management, received tasks, ideological and political tags, notification management, release of courses, ideological and political tasks, etc. The module relationship diagram established according to the system functional requirements is as follows: 

                                   

 

           Figure 4-1 Administrator function module diagram

       

    1. Development process design

The development of the course ideological and political resources crowdsourcing system analyzes the management module and the database used by the system, writes generation development, planning and operation are the necessary three steps to build an information management application program, which determines whether the system can truly realize the preset functions And whether it can 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 curriculum ideological and political resource crowdsourcing 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

    1. 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) Publish the course management ER diagram, as shown in Figure 4-3:

                          

 

                                                   Figure 4-3 Publish course entity property graph

 (2) The ER diagram of ideological and political task management is shown in Figure 4-4:

                            

 

                                                 Figure 4-4 Entity Diagram of Ideological and Political Task Management

These functions can fully meet the needs of the curriculum ideological and political resource crowdsourcing 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

Convert ER diagram of database conceptual design into relational database. In a relational database, the data relationship is composed of data tables, but the structure of the table is expressed in the fields of the table.

teacher_user table

name

type

length

not null

primary key

note

teacher_user_id

int

11

yes

yes

Teacher User ID

full_name

varchar

64

no

no

Name

gender

varchar

64

no

no

gender

age

varchar

64

no

no

age

title

varchar

64

no

no

job title

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

received_task表:

name

type

length

not null

primary key

note

received_task_id

int

11

yes

yes

Received task ID

publisher

int

11

no

no

publisher

receiver

int

11

no

no

Receiver

course_name

varchar

64

no

no

Course Title

chapter

varchar

64

no

no

chapter

chapter_name

varchar

64

no

no

chapter name

label_name

varchar

64

no

no

label name

picture_content

varchar

255

no

no

picture content

task_status

varchar

64

no

no

task status

chapter_content

text

0

no

no

chapter content

ideological_and_political_content

text

0

no

no

Ideological and political content

task_requirements

text

0

no

no

mission requirements

reply_message

text

0

no

no

reply message

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

publish_courses table:

name

type

length

not null

primary key

note

publish_courses_id

int

11

yes

yes

Publish Course ID

publisher

int

11

no

no

publisher

course_name

varchar

64

no

no

Course Title

chapter

varchar

64

no

no

chapter

chapter_name

varchar

64

no

no

chapter name

label_name

varchar

64

no

no

label name

picture_content

varchar

255

no

no

picture content

state

varchar

64

no

no

state

chapter_content

text

0

no

no

chapter content

ideological_and_political_content

text

0

no

no

Ideological and political content

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

book_information table:

name

type

length

not null

primary key

note

notification_management_id

int

11

yes

yes

Notification Management ID

title_name

varchar

64

no

no

title name

notice_content

text

0

no

no

notification content

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

ideological_and_political_tasks表:

name

type

length

not null

primary key

note

ideological_and_political_tasks_id

int

11

yes

yes

Ideological and Political Task ID

publisher

int

11

no

no

publisher

course_name

varchar

64

no

no

Course Title

chapter

varchar

64

no

no

chapter

chapter_name

varchar

64

no

no

chapter name

label_name

varchar

64

no

no

label name

picture_content

varchar

255

no

no

picture content

chapter_content

text

0

no

no

chapter content

ideological_and_political_content

text

0

no

no

Ideological and political content

task_requirements

text

0

no

no

mission requirements

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

ideological_and_political_label表:

name

type

length

not null

primary key

note

ideological_and_political_label_id

int

11

yes

yes

Ideological and political label ID

label_name

varchar

64

no

no

label name

label_description

text

0

no

no

label description

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

grade_leader table:

name

type

length

not null

primary key

note

grade_leader_id

int

11

yes

yes

Grade Leader ID

full_name

varchar

64

no

no

Name

gender

varchar

64

no

no

gender

age

varchar

64

no

no

age

title

varchar

64

no

no

job title

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

  1. System implementation
    1. Implementation of the database connection module

从web系统查询数据的根本的查询步骤:

Step1: 进行检查并且过滤来自用户的系统数据;

Step2: 成立起一个合适的数据库进行连接;

Step3: 进行查询系统数据库;

Step4: 获得查询的结构;

Step5: 把查询的结果展示给用户。

Step6: 数据库连接断开,释放资源。

数据库连接原理如下图所示。

 

图5-1数据库连接原理

数据库连接关键代码如下所示。

/**

 * 临时访问牌(AccessToken)表实体类

 *

 */

@TableName("access_token")

@Data

@EqualsAndHashCode(callSuper = false)

public class AccessToken implements Serializable {

    private static final long serialVersionUID = 913269304437207500L;

    /**

     * 临时访问牌ID

     */

    @TableId(value = "token_id", type = IdType.AUTO)

    private Integer tokenId;

    /**

     * 临时访问牌

     */

    @TableField(value = "token")

    private String token;

    /**

     * 最大寿命:默认2小时

     */

    @TableField(value = "maxage")

    private Integer maxage;

    /**

     * 创建时间:

     */

    @TableField(value = "create_time")

    private Timestamp createTime;

    /**

     * 更新时间:

     */

    @TableField(value = "update_time")

    private Timestamp updateTime;

    /**

     * 用户信息

     */

    @TableField(value = "user_id")

    private Integer user_id;

}

    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;

        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. 发布课程模块的实现

如果发布课程数据的信息需要修改,管理员可以通过查询发布课程数据的基本信息来查询发布课程数据,查询发布课程数据是通过ajax技术来进行查询的,需要传递发布课程数据的标题、编号等参数然后在返回到该页面中,可以选中要修改或删除的那条信息,如果选中了超过一条数据,页面会挑一个窗口提醒只能选择一条数,如果没有选中数据会挑一个窗口题型必须选择一条数据。当选择确认修改的时候,后台会根据传过来的id到数据库查询,并将结果返回到修改页面中,可以在修改页面中修改刚刚选中的信息当点击确认的时候from表单会将修改的数据提交到后台并保存到数据库中,就是说如果提交的数据数据库中存在就修改,否则就保存。

发布课程数据展示界面如下图所示。

 

                                                                   图5-1发布课程界面

    1. 思政任务模块的实现

此页面的关键是编写思政任务信息,包括思政编号,名称,详情等。单击提交按钮以完成信息的添加。如果未写入完整的思政任务信息,例如,如果未写入思政编号,系统将给出相应的错误提示,并且无法成功输入。数据以概念的形式以onsubmit =“return checkForm()”的形式写入以进行检查,checkForm()函数是一种用于写入数据的不同类型的校对方法,是不是为空也是经过form表单中的οnsubmit=”return checkForm()来检查。

管理员点击左侧菜单“思政任务管理”,页面跳转到思政信息管理外观,调用后台测量查询所有课程信息。并将信息密封到数据集合List,绑定到请求对象,然后页面跳转到相应的Java,显示出思政任务信息,单击删除按钮完成思政信息的删除。

思政任务流程图如下图所示。

 

图5-1思政任务流程图

思政任务界面如下图所示。

 

                                                     图5-1思政任务界面

思政任务管理关键代码如下所示。

@RequestMapping(value = "/del")

    @Transactional

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

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

        return success(1);

}

    1. 教师用户管理模块的实现

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

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

 

图5-1教师用户界面图

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

@RequestMapping("/get_list")

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

        Map<String, Object> map = service.selectToPage(service.readQuery(request), service.readConfig(request));

        return success(map);

}

    1. 已接任务管理模块的实现

用户已接任务后后台会自动生成已接列表。从session中取出该用户信息,前台发起请求,将对应的用户信息、baozhangpId参数信息从前台传递BaozhangController类里,匹配到create()方法,create()方法调用BaozhangServiceImpl类的createBaozhang()方法获取数据,调用本类的getCartBaozhangItem()方法得到已接任务列表。

已接任务推荐界面如下所示。

 

图5-1已接任务界面

已接任务管理关键代码如下:

    @RequestMapping(value = "/del")

    @Transactional

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

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

        return success(1);

}

    

    1. 思政标签管理模块的实现

此页面的关键是编写思政标签信息,包括思政标签编号,名称,详情等。单击提交按钮以完成信息的添加。如果未写入完整的思政标签信息,例如,如果未写入思政标签编号,系统将给出相应的错误提示,并且无法成功输入。数据以概念的形式以onsubmit =“return checkForm()”的形式写入以进行检查,checkForm()函数是一种用于写入数据的不同类型的校对方法,是不是为空也是经过form表单中的οnsubmit=”return checkForm()来检查。

管理员点击左侧菜单“思政标签管理”,页面跳转到思政标签信息管理外观,调用后台测量查询所有课程信息。并将信息密封到数据集合List,绑定到请求对象,然后页面跳转到相应的Java,显示出思政标签信息,单击删除按钮完成思政标签信息的删除。

思政标签流程图如下图所示。

 

图5-1思政标签信息流程图

思政标签界面如下图所示。

 

图5-1思政标签信息界面

思政标签添加关键代码如下所示。

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. 通知管理模块的实现

通知功能整体流程:用户浏览通知信息时,同时会显示通知的状态,系统会在其显示详细信息的页面时便会判断通知的状态,若图书状态为可通知,则会显示通知信息的链接按钮。在用户点击通知按钮时,会先通过拦截器判断用户是否登录,若未登录,会跳转至登录页面,提示用户先登录,若为登录用户就会跳转至填写通知信息的页面,填写好通知信息之后,点击提交按钮,通知成功之后返回提示信息,告知用户通知成功。

通知管理界面如下图所示。

 

图5-1通知管理界面图

通知管理关键代码如下所示。

   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、服务器端

操作系统:Windows 7

Web服务器:Tomcat7.0

数据库:Mysql

开发语言:Java

2、客户端

浏览器:Internet Explorer10

界面布局:DIV+CSS

分辨率:最佳效果1027*768以上像素

3、开发工具

Visual Studio Code

Myeclipse

    1. 测试目标

系统测试是用于检查软件的质量、性能、可靠性等是否符合用户需求。一套严谨的、规范的、完善的测试过程将大大提高软件的质量、可信度、可靠性,降低软件的出错率,降低用户风险系数。通过在计算机上对系统进行测试试验并从中发现此系统中存在的问题和错误然后加以修改,使之更加符合用户需求。

1.测试的目的是通过测试来发现程序在执行过程中的错误的过程。

2.好的测试方案是可以检验出还未被发现的错误的方案。

3.好的测试是发现了到目前为止还未被发现的错误的测试。

4.该系统能够完成用户管理、已接任务、思政标签、通知管理、发布课程、思政任务等功能,做到所开发的系统操作简单,尽量使系统操作不受用户对电脑知识水平的限制。

    1. 功能测试

下表是课程思政资源众包系统功能的测试用例,检测了课程思政资源众包系统中对精品推荐信息的增加,删除,修改,查询操作是否成功运行。观察系统的响应情况,得出该功能也达到了设计目标,系统运行正确。

前置条件;管理员登录系统。

表6-1思政任务管理的测试用例

功能描述

用于思政任务管理

测试目的

检测思政任务管理时的各种操作的运行情况

测试数据以及操作

预期结果

实际结果

点击添加思政任务,必填项合法输入,点击保存

提示添加成功

与预期结果一致

点击添加思政任务,必填项输入不合法,点击保存

提示必填项不能为空

与预期结果一致

点击修改思政任务,必填项修改为空,点击保存

提示必填项不能为空

与预期结果一致

点击修改思政任务,必填项输入不合法,点击保存

提示必填项不能为空

与预期结果一致

点击删除思政任务,选择思政任务删除

提示删除成功

与预期结果一致

点击搜索思政任务,输入存在的思政任务名

查找出思政任务

与预期结果一致

点击搜索思政任务 ,输入不存在的思政任务名

不显示思政任务

与预期结果一致

下表是思政标签管理功能的测试用例,检测了思政标签管理的操作是否成功运行。观察系统的响应情况,得出该功能也达到了设计目标,系统运行正确。

前置条件;管理员登录系统。

表6-2 思政标签管理的测试用例

功能描述

用于思政标签管理

测试目的

检测思政标签管理时各种操作的情况

测试数据以及操作

预期结果

实际结果

未选择思政标签,点击提交

提示请选择思政标签

与预期结果一致

未上传附件,点击提交

提示请选择附件

与预期结果一致

未选择原因,点击提交

提示请选择原因

与预期结果一致

    1. 测试结果

根据以上测试情况,测试结果如下表所示。

表6-1测试结果表

测试项目

测试结果

登录测试

成功

修改密码测试

成功

思政标签管理测试

成功

思政任务测试

成功

通知管理

成功

已接任务管理测试

成功

发布课程测试

成功

用户管理测试

成功

  1. 总结与展望

本研究针对课程思政资源众包系统地需求建模,数据建模及过程建模分析设计并实现课程思政资源众包系统的过程。给出系统应用架构并分析优劣势,通过功能分解图,系统组件图描述功能需求。设计建立了数据库,给出系统关键数据结构的定义。通过类关系图描述组件间的协作关系,给出各个类的定义方法。通过描述每一个类的字段,属性及方法实现课程思政资源众包系统  的前后端代码。最终给出系统集成整合方法,完成课程思政资源众包系统  地设计与实现。

在此项目的开发中,先要按照产品经理做出的产品模型铺出大体的页面,并在其中找好页面的逻辑关系,并且中途总结一些页面上的问题重新反馈给产品经理,当静态页面的搭建的大体已经完善时,就需要和负责后台开发的技术开发者联系,来接好前后台的数据接口,可以让后台的信息在前台显示出来,在这个项目实现中,不光明白了前端开发和产品经理的联系,也明白了后台在整个系统中起到了什么作用,因为前后台的连接,用户可以对系统进行操作,可以在输入自己的相关信息后,通过后台加工,完成对数据库的查找、修改、添加,而理解了这些关系与实现的方法后。再去完善整个系统的功能就更加清晰与简单了。此次的项目它涉及了前台与后台系统的搭建,在学校所学的知识基础上,此次的项目,让我对于一个系统的前端开发,以及后台的作用都有了一个更深切的认知。

参考文献

[1]王常珏,段尧清,朱泽.基于SSM的政府数据治理联盟链框架构建[J/OL].情报科学:1-18[2022-03-16].http://kns.cnki.net/kcms/detail/22.1264.g2.20220309.1213.002.html

[2]许爱琪,柳松. 一种MySQL数据库全流量镜像系统及方法[P]. 上海市:CN114064767A,2022-02-18.

[3]李艳杰.基于JAVA与MySQL数据库的移动端题库练习系统的设计与实现[J].黑龙江科学,2022,13(02):56-57.

[4]李双,郭晨晨,李佳虎,张慧娥.基于SSM框架的智能驾校系统的设计与开发[J].电脑知识与技术,2022,18(03):62-63+65.

[5]王一竹.基于MySQL的图书馆信息管理系统设计[J].电脑编程技巧与维护,2022(01):93-95+116.

[6]郭静.基于SSM框架的高校新生预报到系统的设计与实现[J].电子技术与软件工程,2022(02):232-235.

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

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

[9]徐旭,李明明,夏辉,陈曦,王天宇,肖硕,雍旭.基于SSM框架的互联网+多元监管下构建医疗设备质量控制管理服务平台研究[J].中国医学装备,2021,18(12):106-110.

[10]李春生,李朝霞,刘涛,胡亚楠.基于SSM的科研室管理系统的研究与设计[J].计算机技术与发展,2021,31(12):148-154.

[11]胡世洋,赖森林.浅论SSM框架在构建“微农”信息服务中的应用[J].电脑知识与技术,2021,17(34):4-6.

[12]李耀,李路兰,王明宇,杨广,王伟,孙新杰.基于SSM框架的创新创业申报系统的构建——以六盘水师范学院为例[J].电脑知识与技术,2021,17(33):47-48+52.

[13]王晨. 基于JAVA的教室查询系统研究[C]//.第三十五届中国(天津)2021’IT、网络、信息技术、电子、仪器仪表创新学术会议论文集.,2021:16-19.

[14]Jun Ma, Jun Mao, Long Chen , Lili Yin. Design and Implementation of Multi-terminal Debugging System based on SSM Framework[J]. International Core Journal of Engineering,2021,7(7).

[15]Xiaojie Guo,Tingmei Wang*. Design and Implementation of Graduate Information Management System Based on SSM Framework[J]. Journal of Simulation,2020,8(2).

[16]Ping Wanxin,Chen Yuankun,Hou Xiaoyan. Design of Campus Bicycle Rental Management System Based on SSM Framework[J]. Journal of Physics: Conference Series,2019,1314.

[17]李莹, 电子信息 易云云数据库MySQL上线. 翟立新 主编,中关村年鉴,北京出版集团公司北京出版社,2018,205,年鉴.

[18]Taizhi Lv, Juan Zhang. Non-Book Resource Management of Library based SSM Framework[J]. Scientific Journal of Economics and Management Research,2019,1(4).

[19]肖睿,程宁,田崇峰,金志雄,杜毅. MySQL数据库应用技术及实战[M].人民邮电出版社:, 201801.177.

[20] Chen Xiaobing, Qian Wei, Guo Xu, Li Tiezheng. Research on MySQL database attack and security protection technology [C]//. Proceedings of the Sixth National Network Security Level Protection Technology Conference., 2017:89-93.

thank you

On the completion of this thesis, I would like to thank my advisor. In the instructor's web design class, I learned a lot at that time, which laid a certain foundation for my internship process, and the instructor also made many suggestions for my design and gave them careful guidance. I have patiently guided me to improve all the problems, and I have given my friends who wrote papers to encourage me from time to time. In addition, I would like to thank the front-end students who taught me how to improve this project. For this project, I realized it while studying. There are many things to start with. I don't really understand it, but the front-end development students guided me very patiently to complete this project. In the back-end development of the system, the back-end development technology used will also explain to me from time to time, which helps me to better understand the paper. Finished, I would like to express my heartfelt thanks to the classmates who helped me and the instructors who have been teaching me, and I wish you success in your career.

Like+Favorite+Follow → private message to receive the source code and database

Guess you like

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