基于SpringBoot的招生管理系统的设计与实现

背景

本次设计任务是要设计一个招生管理系统,通过这个系统能够满足管理员和学生的招生公告管理功能。系统的主要功能包括首页、个人中心、学生管理、专业信息管理、专业报名管理、录取通知管理、系统管理等功能。

管理员可以根据系统给定的账号进行登录,登录后可以进入招生管理系统,对招生管理系统所有模块进行管理。包括查看和修改自己的个人信息以及登录密码。

该系统为每一个用户都分配了一个用户账号,用户通过账号的登录可以在系统中查看招生公告信息及对个人信息进行修改等功能。

系统设计

招生管理系统的功能分为管理员和学生两个部分,系统的主要功能包括首页、个人中心、学生管理、专业信息管理、专业报名管理、录取通知管理、系统管理等内容。任何用户只要进入网站不需登录也可浏览到的信息,后台管理是针对已登录的用户看到满意的招生公告信息而设计的。

1、一般用户的功能及权限
所谓一般用户就是指还没有注册的过,他们可以浏览主页面上的信息。但如果要进入后台进行信息管理时,要登录注册,只有注册成功才有的权限。

2、管理员的功能及权限
学生信息的添加和管理,招生公告详细信息添加和管理和文档信息添加和管理,这些都是管理员的功能。

3、系统功能结构图
系统功能结构图是系统设计阶段,系统功能结构图只是这个阶段一个基础,整个系统的架构决定了系统的整体模式,是系统的根据。招生管理系统的整个设计结构如图。

在这里插入图片描述

数据库设计

系统ER图

概念模型与数据建模用户的观点一致,用于信息世界的建模工具。通过E-R图可以清楚地描述系统涉及到的实体之间的相互关系。

在这里插入图片描述
个人中心实体图如图:
在这里插入图片描述

数据库设计

数据库概念结构设计后,可以数据库概念转化实际的数据模型,这是一种数据库的逻辑结构,就是将概念结构与支持数据库管理系统的模型相符合。

由于涉及到的数据表较多,此处只展示部分的数据表。

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

系统详细设计

系统功能模块

招生管理系统,在系统首页可以查看首页、专业信息、招生公告、个人中心、后台管理等内容进行详细操作,如图。

在这里插入图片描述

管理员功能模块

管理员登录,在系统首页通过填写用户名、密码选择角色进行操作,登录后就可以使用了。管理员登录系统后,可以对首页、个人中心、学生管理、专业信息管理、专业报名管理、录取通知管理、系统管理等功能模块进行相应操作

在这里插入图片描述

学生管理,在学生管理页面可以对索引、学号、姓名、性别、头像、手机等内容进行修改或删除等操作。
在这里插入图片描述

代码实现

由于涉及到的代码比较多,此处只展示部分的代码实现。

专业信息

@RestController
@RequestMapping("/zhuanyexinxi")
public class ZhuanyexinxiController {
    @Autowired
    private ZhuanyexinxiService zhuanyexinxiService;


    


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

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

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(ZhuanyexinxiEntity zhuanyexinxi){
        EntityWrapper< ZhuanyexinxiEntity> ew = new EntityWrapper< ZhuanyexinxiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( zhuanyexinxi, "zhuanyexinxi")); 
		ZhuanyexinxiView zhuanyexinxiView =  zhuanyexinxiService.selectView(ew);
		return R.ok("查询专业信息成功").put("data", zhuanyexinxiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        ZhuanyexinxiEntity zhuanyexinxi = zhuanyexinxiService.selectById(id);
        return R.ok().put("data", zhuanyexinxi);
    }

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



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

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

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        zhuanyexinxiService.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<ZhuanyexinxiEntity> wrapper = new EntityWrapper<ZhuanyexinxiEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


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



}

专业报名

@RestController
@RequestMapping("/zhuanyebaoming")
public class ZhuanyebaomingController {
    @Autowired
    private ZhuanyebaomingService zhuanyebaomingService;


    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,ZhuanyebaomingEntity zhuanyebaoming,
		HttpServletRequest request){
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("xuesheng")) {
			zhuanyebaoming.setXuehao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<ZhuanyebaomingEntity> ew = new EntityWrapper<ZhuanyebaomingEntity>();
		PageUtils page = zhuanyebaomingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zhuanyebaoming), params), params));

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

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(ZhuanyebaomingEntity zhuanyebaoming){
        EntityWrapper< ZhuanyebaomingEntity> ew = new EntityWrapper< ZhuanyebaomingEntity>();
 		ew.allEq(MPUtil.allEQMapPre( zhuanyebaoming, "zhuanyebaoming")); 
		ZhuanyebaomingView zhuanyebaomingView =  zhuanyebaomingService.selectView(ew);
		return R.ok("查询专业报名成功").put("data", zhuanyebaomingView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        ZhuanyebaomingEntity zhuanyebaoming = zhuanyebaomingService.selectById(id);
        return R.ok().put("data", zhuanyebaoming);
    }

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



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

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

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        zhuanyebaomingService.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<ZhuanyebaomingEntity> wrapper = new EntityWrapper<ZhuanyebaomingEntity>();
		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("xuesheng")) {
			wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
		}

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







}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爱coding的同学

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值