Educational administration system (free source code acquisition)

Project Introduction

This system uses springboot, mybatis-plus, shiro, lombok and other technologies, uses json to transfer data and uses salt encryption to save the data, the front-end page is built using Vue and packaged in the static folder, using token to save the current user, when the user logs in After that, there is no need to log in again for a period of time, but only one role information is saved, that is: after logging in as root and then logging in as student, the root user will have no authority.

Built-in users:

  • student

    • Username: student

    • Password: student

  • teacher

    • Username: teacher

    • Password: teacher

  • Academic Affairs

    • Username: admin

    • Password: admin

  • System administrator

    • Username: root

    • Password: root

Operation mode

Function

  • College Management

  • personnel management

  • Course selection management

  • performance management

  • History Course Inquiry

  • etc.

Role

  • student

  • teacher

  • Academic Affairs

  • System administrator

permissions

  • student

    1. Course selection

    2. course selection

    3. quit class

    4. Course Selection Results

    5. history lesson

    6. Grade related

    7. Grades for this semester

    8. History result

  • teacher

    1. performance management

    2. Enter grades

    3. view class

    4. history class

    5. Classes start this semester

    6. View Course Student List

  • Academic Affairs

    1. View Course Student List

    2. course management

    3. Add courses

    4. view courses

    5. delete course

    6. modify course

  • System administrator

    1. Semester Management

    2. Set Current Semester

    3. Course selection management

    4. open course selection

    5. Close course selection

    6. College Management

    7. School of Management

    8. revise college

    9. delete college

    10. increase college

    11. role management

    12. role increase

    13. management role

    14. modify role

    15. delete role

    16. role empowerment

package com.tsubaki.controller;


import com.alibaba.fastjson.JSON;
import com.tsubaki.entity.School;
import com.tsubaki.entity.Term;
import com.tsubaki.response.Result;
import com.tsubaki.service.SchoolService;
import com.tsubaki.util.StringUtil;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.Nullable;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tsubaki
 * @since 2022-01-17
 */
@RestController
@RequestMapping("/school")
public class SchoolController {
    @Autowired
    private SchoolService schoolService;

    @ApiOperation("获取所有学院信息")
    @RequestMapping(value = "/getAll", method = RequestMethod.GET)
    public String getAllSchool(@Nullable String pageNum, @Nullable String pageSize) {
        Integer first = StringUtil.changeString(pageNum);
        Integer second = StringUtil.changeString(pageSize);
        Map<String, Object> map = schoolService.getAll(first,second);
        if ((long)(map.get("total")) == 0){
            return JSON.toJSONString(new Result().setCode(200).setMessage("当前无学院信息"));
        }

        return JSON.toJSONString(new Result().setCode(200).setData(map));
    }

    @ApiOperation("增加学院信息")
//    @RequiresPermissions("school:add")
    @RequestMapping(value = "/add", method = RequestMethod.POST)
    public String saveSchool(@RequestBody School school) {
        schoolService.saveOrUpdate(school);
        return JSON.toJSONString(new Result().setCode(200).setMessage("添加成功"));
    }

    @ApiOperation("修改学院信息")
    @RequiresPermissions("school:update")
    @RequestMapping(value = "/update", method = RequestMethod.PUT)
    public String setThisTerm(@RequestBody School school) {
        schoolService.saveOrUpdate(school);
        return JSON.toJSONString(new Result().setCode(200).setMessage("修改成功"));
    }

    @ApiOperation("删除学院")
//    @RequiresPermissions("school:delete")
    @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
    public String setThisTerm(Integer schoolId) {
//        schoolService.removeById(schoolId);
        if (schoolService.removeById(schoolId)){
//            System.out.println();
            return JSON.toJSONString(new Result().setCode(200).setMessage("删除成功"));
        }else {
            return JSON.toJSONString(new Result().setCode(500).setMessage("删除失败"));
        }
    }

}

 Educational management system - source code acquisition link https://gitee.com/wuyanzua/blog-applet

Guess you like

Origin blog.csdn.net/weixin_46228112/article/details/125521559