springboot vue学院个人信息管理系统源码和论文

摘 要

随着社会的发展,学院个人信息的管理形势越来越严峻。越来越多的用户利用互联网获得信息,但学院个人信息鱼龙混杂,信息真假难以辨别。为了方便用户更好的获得学院个人信息,因此,设计一种安全高效的学院个人信息管理系统极为重要。

为设计一个安全便捷,并且使用户更好获取本学院个人信息,本文主要以安全、简洁为理念,实现用户快捷寻找学院个人信息,从而解决学院个人信息复杂难辨的问题。该系统以springboot架构技术为基础,采用Java语言和mysql数据库进行开发设计,通过对学院个人信息的分析,分析了其功能性和非功能性需求,设计了学院个人信息管理系统,该系统包括管理员,教师和学生三部分。同时还能为用户提供一个方便实用的学院个人信息管理系统,使得用户能够及时地找到合适自己的学院个人信息。个人用户在使用本系统时,可以浏览课程信息,在线论坛,新闻公告,留言板,后台管理,个人中心等;管理员在使用本系统时,可以通过后台管理员界面管理用户的信息。

关键词:学院个人信息;springboot;mysql数据库;Java

springboot vue学院个人信息管理系统源码和论文718

演示视频:

springboot vue学院个人信息管理系统源码和论文

Abstract

With the development of society, the management situation of college personal information is becoming more and more severe. More and more users use the Internet to get information, but the college personal information is mixed, the true information is difficult to distinguish. In order to facilitate users to better obtain college personal information, therefore, it is very important to design a safe and efficient college personal information management system.

In order to design a safe and convenient, and make users better access to the college's personal information, this paper mainly takes the concept of security and simplicity as the realization that users can quickly find the college's personal information, so as to solve the complex and difficult problem of the college's personal information. The platform is based on springboot architecture technology, using Java language and mysql database for development and design. Through the analysis of the college's personal information, the functional and non-functional requirements are analyzed, and the college's personal information management system is designed. The platform includes three parts: administrators, teachers and students. At the same time, it can also provide users with a convenient and practical college personal information management system, so that users can timely find their own college personal information. When using this platform, individual users can browse course information, online forums, news announcements, message boards, background management, personal center, etc. When using this platform, administrators can manage user information through the background administrator interface.

Key words: College personal information; springboot; mysql database; Java

 

package com.controller;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
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.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
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.XuexikechengEntity;
import com.entity.view.XuexikechengView;

import com.service.XuexikechengService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;

/**
 * 学习课程
 * 后端接口
 * @author 
 * @email 
 * @date 2023-03-02 11:33:51
 */
@RestController
@RequestMapping("/xuexikecheng")
public class XuexikechengController {
    @Autowired
    private XuexikechengService xuexikechengService;


    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,XuexikechengEntity xuexikecheng,
		HttpServletRequest request){
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("jiaoshi")) {
			xuexikecheng.setJiaoshizhanghao((String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("xuesheng")) {
			xuexikecheng.setZhanghao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<XuexikechengEntity> ew = new EntityWrapper<XuexikechengEntity>();

		PageUtils page = xuexikechengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xuexikecheng), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,XuexikechengEntity xuexikecheng, 
		HttpServletRequest request){
        EntityWrapper<XuexikechengEntity> ew = new EntityWrapper<XuexikechengEntity>();

		PageUtils page = xuexikechengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xuexikecheng), params), params));
        return R.ok().put("data", page);
    }

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(XuexikechengEntity xuexikecheng){
        EntityWrapper< XuexikechengEntity> ew = new EntityWrapper< XuexikechengEntity>();
 		ew.allEq(MPUtil.allEQMapPre( xuexikecheng, "xuexikecheng")); 
		XuexikechengView xuexikechengView =  xuexikechengService.selectView(ew);
		return R.ok("查询学习课程成功").put("data", xuexikechengView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        XuexikechengEntity xuexikecheng = xuexikechengService.selectById(id);
        return R.ok().put("data", xuexikecheng);
    }

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



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



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


    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        xuexikechengService.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<XuexikechengEntity> wrapper = new EntityWrapper<XuexikechengEntity>();
		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("jiaoshi")) {
			wrapper.eq("jiaoshizhanghao", (String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("xuesheng")) {
			wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
		}

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






    /**
     * (按值统计)
     */
    @RequestMapping("/value/{xColumnName}/{yColumnName}")
    public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("xColumn", xColumnName);
        params.put("yColumn", yColumnName);
        EntityWrapper<XuexikechengEntity> ew = new EntityWrapper<XuexikechengEntity>();
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("jiaoshi")) {
            ew.eq("jiaoshizhanghao", (String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("xuesheng")) {
            ew.eq("zhanghao", (String)request.getSession().getAttribute("username"));
		}
        List<Map<String, Object>> result = xuexikechengService.selectValue(params, ew);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        for(Map<String, Object> m : result) {
            for(String k : m.keySet()) {
                if(m.get(k) instanceof Date) {
                    m.put(k, sdf.format((Date)m.get(k)));
                }
            }
        }
        return R.ok().put("data", result);
    }

    /**
     * (按值统计)时间统计类型
     */
    @RequestMapping("/value/{xColumnName}/{yColumnName}/{timeStatType}")
    public R valueDay(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,HttpServletRequest request) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("xColumn", xColumnName);
        params.put("yColumn", yColumnName);
        params.put("timeStatType", timeStatType);
        EntityWrapper<XuexikechengEntity> ew = new EntityWrapper<XuexikechengEntity>();
        String tableName = request.getSession().getAttribute("tableName").toString();
        if(tableName.equals("jiaoshi")) {
            ew.eq("jiaoshizhanghao", (String)request.getSession().getAttribute("username"));
        }
        if(tableName.equals("xuesheng")) {
            ew.eq("zhanghao", (String)request.getSession().getAttribute("username"));
        }
        List<Map<String, Object>> result = xuexikechengService.selectTimeStatValue(params, ew);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        for(Map<String, Object> m : result) {
            for(String k : m.keySet()) {
                if(m.get(k) instanceof Date) {
                    m.put(k, sdf.format((Date)m.get(k)));
                }
            }
        }
        return R.ok().put("data", result);
    }

    /**
     * 分组统计
     */
    @RequestMapping("/group/{columnName}")
    public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("column", columnName);
        EntityWrapper<XuexikechengEntity> ew = new EntityWrapper<XuexikechengEntity>();
        String tableName = request.getSession().getAttribute("tableName").toString();
        if(tableName.equals("jiaoshi")) {
            ew.eq("jiaoshizhanghao", (String)request.getSession().getAttribute("username"));
        }
        if(tableName.equals("xuesheng")) {
            ew.eq("zhanghao", (String)request.getSession().getAttribute("username"));
        }
        List<Map<String, Object>> result = xuexikechengService.selectGroup(params, ew);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        for(Map<String, Object> m : result) {
            for(String k : m.keySet()) {
                if(m.get(k) instanceof Date) {
                    m.put(k, sdf.format((Date)m.get(k)));
                }
            }
        }
        return R.ok().put("data", result);
    }




    /**
     * 总数量
     */
    @RequestMapping("/count")
    public R count(@RequestParam Map<String, Object> params,XuexikechengEntity xuexikecheng, HttpServletRequest request){
        String tableName = request.getSession().getAttribute("tableName").toString();
        if(tableName.equals("jiaoshi")) {
            xuexikecheng.setJiaoshizhanghao((String)request.getSession().getAttribute("username"));
        }
        if(tableName.equals("xuesheng")) {
            xuexikecheng.setZhanghao((String)request.getSession().getAttribute("username"));
        }
        EntityWrapper<XuexikechengEntity> ew = new EntityWrapper<XuexikechengEntity>();
        int count = xuexikechengService.selectCount(MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xuexikecheng), params), params));
        return R.ok().put("data", count);
    }


}

  • 5
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值