大家好!我是职场程序猿,感谢您阅读本文,欢迎一键三连哦。
💞当前专栏:微信小程序毕业设计
精彩专栏推荐👇🏻👇🏻👇🏻
①前端:微信小程序开发工具
② 后端:Java
高清演示视频-编号:171
https://pan.quark.cn/s/b2f44f423421
https://download.csdn.net/download/m0_46388260/89223478
【如需全文请按文末获取联系】
本微信小程序高校学生事务管理系统有管理员,教师,学生三个角色。管理员和教师主要在后台操作,学生在微信端操作,功能方向主要关于学生资料的管理,考试管理,试题管理,各种通知等。
设计的功能结构图如下图所示:
(1) 试卷信息的实体属性图如下:
(2)管理员实体属性图如图4.13所示:
(3)学生集合信息实体属性图如图4.14所示:
学生信息管理
管理员对学生信息进行添加,修改,删除,查询操作。具体界面的展示如图5.1所示。
教师信息管理
管理员可以对教师信息进行添加,修改,删除,删除,审核操作。具体界面如图5.2所示。
教务处通知管理
管理员可以对教务处通知信息进行添加,修改,删除操作。界面如下图所示:
试卷管理
教师可以对试卷信息进行添加,修改,删除操作。界面如下图所示:
试题管理
教师可以对试题信息进行添加,修改,删除,查询,打印操作。界面如下图所示:
我的
用户在我的里面可以操作关于我的各种操作。
首页
用户登录后可以在首页查看各种通知信息以及公告信息。界面如下图所示:
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 java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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.DaibanshixiangEntity;
import com.entity.view.DaibanshixiangView;
import com.service.DaibanshixiangService;
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 2022-02-26 18:00:12
*/
@RestController
@RequestMapping("/daibanshixiang")
public class DaibanshixiangController {
@Autowired
private DaibanshixiangService daibanshixiangService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,DaibanshixiangEntity daibanshixiang,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
daibanshixiang.setXuehao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<DaibanshixiangEntity> ew = new EntityWrapper<DaibanshixiangEntity>();
PageUtils page = daibanshixiangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, daibanshixiang), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,DaibanshixiangEntity daibanshixiang,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
daibanshixiang.setXuehao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<DaibanshixiangEntity> ew = new EntityWrapper<DaibanshixiangEntity>();
PageUtils page = daibanshixiangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, daibanshixiang), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( DaibanshixiangEntity daibanshixiang){
EntityWrapper<DaibanshixiangEntity> ew = new EntityWrapper<DaibanshixiangEntity>();
ew.allEq(MPUtil.allEQMapPre( daibanshixiang, "daibanshixiang"));
return R.ok().put("data", daibanshixiangService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(DaibanshixiangEntity daibanshixiang){
EntityWrapper< DaibanshixiangEntity> ew = new EntityWrapper< DaibanshixiangEntity>();
ew.allEq(MPUtil.allEQMapPre( daibanshixiang, "daibanshixiang"));
DaibanshixiangView daibanshixiangView = daibanshixiangService.selectView(ew);
return R.ok("查询待办事项成功").put("data", daibanshixiangView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
DaibanshixiangEntity daibanshixiang = daibanshixiangService.selectById(id);
return R.ok().put("data", daibanshixiang);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
DaibanshixiangEntity daibanshixiang = daibanshixiangService.selectById(id);
return R.ok().put("data", daibanshixiang);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody DaibanshixiangEntity daibanshixiang, HttpServletRequest request){
daibanshixiang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(daibanshixiang);
daibanshixiangService.insert(daibanshixiang);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody DaibanshixiangEntity daibanshixiang, HttpServletRequest request){
daibanshixiang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(daibanshixiang);
daibanshixiang.setUserid((Long)request.getSession().getAttribute("userId"));
daibanshixiangService.insert(daibanshixiang);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody DaibanshixiangEntity daibanshixiang, HttpServletRequest request){
//ValidatorUtils.validateEntity(daibanshixiang);
daibanshixiangService.updateById(daibanshixiang);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
daibanshixiangService.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<DaibanshixiangEntity> wrapper = new EntityWrapper<DaibanshixiangEntity>();
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 = daibanshixiangService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
如需对应的论文或源码,以及其他定制需求,也可以下方微信联系我。