首页 > 其他分享 >216基于Springboot + vue实现的校园管理系统(含论文+答辩PPT)

216基于Springboot + vue实现的校园管理系统(含论文+答辩PPT)

时间:2024-09-09 23:21:47浏览次数:3  
标签:216 map vue Springboot tongzhihuifu toupiaoxinxi import com RequestMapping

作者主页:夜未央5788

 简介:Java领域优质创作者、Java项目、学习资料、技术互助

文末获取源码

项目介绍

基于Springboot + vue实现的校园管理系统(含论文+答辩PPT)

本系统包含管理员、用户、院校管理员三个角色。

管理员角色:用户管理、院校管理、单位类别管理、院校管理员管理、单位管理、通知推送管理、投票信息管理、通知回复管理等。

用户角色:个人中心管理、单位管理、通知推送管理、投票信息管理、通知回复管理等。

院校管理员角色:单位管理、通知推送管理、投票信息管理、通知回复管理等。

使用人群:
正在做毕设的学生,或者需要项目实战练习的Java学习者

由于本程序规模不大,可供课程设计,毕业设计学习演示之用

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 
4.数据库:MySql 5.7/8.0版本均可;

5.是否Maven项目:是;

技术栈

后端:SpringBoot+Mybaits

前端:Vue + elementui

使用说明

项目运行:
1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;
3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;
4. 运行项目,在浏览器中输入地址:
后台登录页面
http://localhost:8080/springboot6yjn8/admin/dist/index.html
管理员  abo 密码 abo
用户:用户1 密码:123456
院校管理员:院校管理员2 密码:123456
 

注意项目文件路径中不能含有中文、空格、特殊字符等,否则图片会上传不成功。

运行截图

论文

截图

相关代码

 TongzhihuifuController

package com.controller;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;

import com.entity.TongzhihuifuEntity;
import com.entity.view.TongzhihuifuView;

import com.service.TongzhihuifuService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 通知回复
 * 后端接口
 * @author 
 * @email 
 * @date 2021-03-09 11:06:58
 */
@RestController
@RequestMapping("/tongzhihuifu")
public class TongzhihuifuController {
    @Autowired
    private TongzhihuifuService tongzhihuifuService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,TongzhihuifuEntity tongzhihuifu, HttpServletRequest request){
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yuanxiaoguanliyuan")) {
			tongzhihuifu.setYuanxiaozhanghao((String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("yonghu")) {
			tongzhihuifu.setYonghuzhanghao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<TongzhihuifuEntity> ew = new EntityWrapper<TongzhihuifuEntity>();
		PageUtils page = tongzhihuifuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tongzhihuifu), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,TongzhihuifuEntity tongzhihuifu, HttpServletRequest request){
        EntityWrapper<TongzhihuifuEntity> ew = new EntityWrapper<TongzhihuifuEntity>();
		PageUtils page = tongzhihuifuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tongzhihuifu), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( TongzhihuifuEntity tongzhihuifu){
       	EntityWrapper<TongzhihuifuEntity> ew = new EntityWrapper<TongzhihuifuEntity>();
      	ew.allEq(MPUtil.allEQMapPre( tongzhihuifu, "tongzhihuifu")); 
        return R.ok().put("data", tongzhihuifuService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(TongzhihuifuEntity tongzhihuifu){
        EntityWrapper< TongzhihuifuEntity> ew = new EntityWrapper< TongzhihuifuEntity>();
 		ew.allEq(MPUtil.allEQMapPre( tongzhihuifu, "tongzhihuifu")); 
		TongzhihuifuView tongzhihuifuView =  tongzhihuifuService.selectView(ew);
		return R.ok("查询通知回复成功").put("data", tongzhihuifuView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        TongzhihuifuEntity tongzhihuifu = tongzhihuifuService.selectById(id);
        return R.ok().put("data", tongzhihuifu);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        TongzhihuifuEntity tongzhihuifu = tongzhihuifuService.selectById(id);
        return R.ok().put("data", tongzhihuifu);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody TongzhihuifuEntity tongzhihuifu, HttpServletRequest request){
    	tongzhihuifu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(tongzhihuifu);
        tongzhihuifuService.insert(tongzhihuifu);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody TongzhihuifuEntity tongzhihuifu, HttpServletRequest request){
    	tongzhihuifu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(tongzhihuifu);
        tongzhihuifuService.insert(tongzhihuifu);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody TongzhihuifuEntity tongzhihuifu, HttpServletRequest request){
        //ValidatorUtils.validateEntity(tongzhihuifu);
        tongzhihuifuService.updateById(tongzhihuifu);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        tongzhihuifuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<TongzhihuifuEntity> wrapper = new EntityWrapper<TongzhihuifuEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yuanxiaoguanliyuan")) {
			wrapper.eq("yuanxiaozhanghao", (String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("yonghu")) {
			wrapper.eq("yonghuzhanghao", (String)request.getSession().getAttribute("username"));
		}

		int count = tongzhihuifuService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}

ToupiaoxinxiController

package com.controller;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;

import com.entity.ToupiaoxinxiEntity;
import com.entity.view.ToupiaoxinxiView;

import com.service.ToupiaoxinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 投票信息
 * 后端接口
 * @author 
 * @email 
 * @date 2021-03-09 11:06:58
 */
@RestController
@RequestMapping("/toupiaoxinxi")
public class ToupiaoxinxiController {
    @Autowired
    private ToupiaoxinxiService toupiaoxinxiService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,ToupiaoxinxiEntity toupiaoxinxi, HttpServletRequest request){
        EntityWrapper<ToupiaoxinxiEntity> ew = new EntityWrapper<ToupiaoxinxiEntity>();
		PageUtils page = toupiaoxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, toupiaoxinxi), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,ToupiaoxinxiEntity toupiaoxinxi, HttpServletRequest request){
        EntityWrapper<ToupiaoxinxiEntity> ew = new EntityWrapper<ToupiaoxinxiEntity>();
		PageUtils page = toupiaoxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, toupiaoxinxi), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( ToupiaoxinxiEntity toupiaoxinxi){
       	EntityWrapper<ToupiaoxinxiEntity> ew = new EntityWrapper<ToupiaoxinxiEntity>();
      	ew.allEq(MPUtil.allEQMapPre( toupiaoxinxi, "toupiaoxinxi")); 
        return R.ok().put("data", toupiaoxinxiService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(ToupiaoxinxiEntity toupiaoxinxi){
        EntityWrapper< ToupiaoxinxiEntity> ew = new EntityWrapper< ToupiaoxinxiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( toupiaoxinxi, "toupiaoxinxi")); 
		ToupiaoxinxiView toupiaoxinxiView =  toupiaoxinxiService.selectView(ew);
		return R.ok("查询投票信息成功").put("data", toupiaoxinxiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        ToupiaoxinxiEntity toupiaoxinxi = toupiaoxinxiService.selectById(id);
        return R.ok().put("data", toupiaoxinxi);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        ToupiaoxinxiEntity toupiaoxinxi = toupiaoxinxiService.selectById(id);
        return R.ok().put("data", toupiaoxinxi);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody ToupiaoxinxiEntity toupiaoxinxi, HttpServletRequest request){
    	toupiaoxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(toupiaoxinxi);
        toupiaoxinxiService.insert(toupiaoxinxi);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody ToupiaoxinxiEntity toupiaoxinxi, HttpServletRequest request){
    	toupiaoxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(toupiaoxinxi);
        toupiaoxinxiService.insert(toupiaoxinxi);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody ToupiaoxinxiEntity toupiaoxinxi, HttpServletRequest request){
        //ValidatorUtils.validateEntity(toupiaoxinxi);
        toupiaoxinxiService.updateById(toupiaoxinxi);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        toupiaoxinxiService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<ToupiaoxinxiEntity> wrapper = new EntityWrapper<ToupiaoxinxiEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = toupiaoxinxiService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}

如果也想学习本系统,下面领取。关注并回复:216springboot

标签:216,map,vue,Springboot,tongzhihuifu,toupiaoxinxi,import,com,RequestMapping
From: https://blog.csdn.net/hanyunlong1989/article/details/142071904

相关文章

  • 前端登录注册页面springboot+vue2全开发!
    需求目标:有“登录界面”和“注册界面”以及“功能操作界面”:我们打开程序会自动进入“登录界面”,如果密码输入正确则直接进入“功能操作界面”,在“登录界面”我们可以点击注册进入“注册页面”,注册好了可以再跳回到“登录界面”进行登录。代码实现:(1)登录操作后端开发见我博......
  • VUE: vscode中vue代码ctrl+左键点击不跳转
    引用依赖,js等代码ctrl+左键点击不跳转主要说法是@解析不到的问题,导致找不到安装插件Vetur和Vue-Official工程跟路径下添加jsconfig.json{//ThisfileisrequiredforVSCodetounderstandwebpackaliases"compilerOptions":{//Thismustbespecifiedi......
  • [开题报告]flask框架基于Vue的电商管理系统(python+程序+论文)
    本系统(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。系统程序文件列表开题报告内容研究背景随着互联网技术的飞速发展,电子商务已成为全球经济的重要组成部分,极大地改变了人们的消费习惯和商业运营模式。电商平台的兴起,不仅为消费者......
  • IIS:部署VUE前后端分离,重写URL
    启用IIS路由和ULR重写功能  详细过程:“IIS:URLrewrite转发请求-le.li-博客园(cnblogs.com)”配置URL重写后,与网站同级别路径有个web.config <?xmlversion="1.0"encoding="UTF-8"?><configuration><system.webServer><rewrite>......
  • vue3生命周期(钩子函数)
    在Vue3中,生命周期钩子被重命名并分为了不同的阶段,以更好地描述它们的用途。这些新的生命周期钩子包括:setup():这是一个新的入口点,在beforeCreate和created之前调用。onBeforeMount/onMounted:组件挂载前/后的生命周期钩子。onBeforeUpdate/onUpdated:组件更新前/后的生命......
  • Java 结合vue 和 阿里 写一个短信验证码功能
    要实现一个基于Java、Vue和阿里云的短信验证码功能,需要完成几个步骤。这个功能通常包括前端(Vue.js)和后端(JavaSpringBoot)部分,以及阿里云短信服务的集成。以下是一个大致的实现步骤:前提条件阿里云账户:需要有一个阿里云账户,并开通了短信服务。Java开发环境:确保有Java开发环境和......
  • springboot+vue+mybatis计算机毕业设计老年人健康管理系统+PPT+论文+讲解+售后
    近些年来,随着科技的飞速发展,互联网的普及逐渐延伸到各行各业中,给人们生活带来了十分的便利,老年人健康管理系统利用计算机网络实现信息化管理,使整个老年人健康管理的发展和服务水平有显著提升。本文拟采用Eclipse开发工具,JSP技术,SSM框架进行开发,后台使用MySQL数据库进行信息......
  • springboot+vue+mybatis计算机毕业设计网上购物系统+PPT+论文+讲解+售后
    本文首先实现了网上购物系统设计与实现管理技术的发展随后依照传统的软件开发流程,最先为系统挑选适用的言语和软件开发平台,依据需求分析开展控制模块制做和数据库查询构造设计,随后依据系统整体功能模块的设计,制作系统的功能模块图、E-R图。随后,设计框架,依据设计的框架撰写编码......
  • Vue.js 组件设计详解
    在现代Web开发中,组件化设计已经成为构建可维护和可扩展应用程序的关键策略之一。而Vue.js作为一个流行的前端框架,以其简单易用、灵活和高效的特点,成为开发者的首选之一。本文将详细介绍如何设计Vue组件,涵盖从基础到高级的概念和实践,包括组件的创建、通信、复用、优化和......
  • 实现一个基于 Spring Boot 和 Vue.js 的实时消息推送系统
    在现代互联网应用中,实时消息推送已经成为一个非常重要的功能。不论是即时通讯、通知系统,还是其他需要实时互动的应用场景,消息的实时性直接影响到用户的体验和应用的效率。在这篇文章中,我将详细介绍如何使用SpringBoot和Vue.js创建一个实时消息推送系统,并确保每个用户只......