一、前言
快速发展的社会中,人们的生活水平都在提高,生活节奏也在逐渐加快。为了节省时间和提高工作效率,越来越多的人选择利用互联网进行线上打理各种事务,然后线上管理系统也就相继涌现。与此同时,人们开始接受方便的生活方式。他们不仅希望页面简单大方,还希望操作方便,可以快速锁定他们需要的线上管理方式。基于这种情况,我们需要这样一个界面简单大方、功能齐全的系统来解决用户问题,满足用户需求。
课题主要分为三大模块:即管理员模块和学生、教师模块,主要功能包括:学生、教师、科目、家教需求、家教预约、取消预约、通知公告等;
网络发展的越来越迅速,它深刻的影响着每一个人生活的各个方面。每一种新型事务的兴起都是为了使人们的生活更加方便。大学生家教管理系统是一种低成本、更加高效的电子商务方式,它已慢慢的成为一种全新的管理模式。人们不再满足于在互联网上浏览、发布信息和人与人之间的聊天,而是希望互联网能为人们的生活带来更多便利。伴随着网络的崛起,大学生家教管理开始变得越来越普遍[2]。
互联网发展的越来越快了,在当下社会节点,人们也开始越来越依赖互联网。通过互联网信息和数据,极大地满足用户要求[5]。如果想实现简单快捷方便的大学生家教管理,即时生效,无需重新打印。这时仅仅需要在背景中单击鼠标,它将立刻更新点击处一整行的所有内容。大学生家教管理系统使用了B/S模式,并且不需要安装第三方插件,他们甚至能直接在电脑上随机随地实现大学生家教管理,还能实现更加准确的提供家教需求。现社会无论各行各业都应尽量摒弃传递错误信息,尤其是口头传输信息。而网络却并不会像电话那样一次只能传输一次,效率低下还间连不断,每当处于高峰时段,用网络来处理信息也就会更加的容易。我们甚至可以通过网络技术节省时间和人力成本。大学生家教管理的方式得到了更好的改进。从而提高了整体的工作效率。
这样做的目的是节省时间,提高工作效率,享受当今社会最便捷、最周到的服务[6]。
线上管理大学生家教管理系统提供了良好的发展空间,随着人们生活质量的提高,人们对服务质量的要求越来越严格。人们希望拥有更好的大学生家教管理体验。而且,大学生家教管理有着使用常规电话交流比不了的便捷高效简单等优势。大学生家教管理系统就是为广大用户提供这样一个方便的系统,以满足人们的需求。
二、系统功能效果
三、核心代码
package com.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
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.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.service.ConfigService;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;
/**
* 登录相关
*/
@RequestMapping("config")
@RestController
public class ConfigController{
@Autowired
private ConfigService configService;
/**
* 列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ConfigEntity config){
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
PageUtils page = configService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ConfigEntity config){
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
PageUtils page = configService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), params));
return R.ok().put("data", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
ConfigEntity config = configService.selectById(id);
return R.ok().put("data", config);
}
/**
* 详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") String id){
ConfigEntity config = configService.selectById(id);
return R.ok().put("data", config);
}
/**
* 根据name获取信息
*/
@RequestMapping("/info")
public R infoByName(@RequestParam String name){
ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
return R.ok().put("data", config);
}
/**
* 保存
*/
@PostMapping("/save")
public R save(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);
configService.insert(config);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);
configService.updateById(config);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
configService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}
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.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.TongzhigonggaoEntity;
import com.entity.view.TongzhigonggaoView;
import com.service.TongzhigonggaoService;
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-01-12 08:33:48
*/
@RestController
@RequestMapping("/tongzhigonggao")
public class TongzhigonggaoController {
@Autowired
private TongzhigonggaoService tongzhigonggaoService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,TongzhigonggaoEntity tongzhigonggao,
HttpServletRequest request){
EntityWrapper<TongzhigonggaoEntity> ew = new EntityWrapper<TongzhigonggaoEntity>();
PageUtils page = tongzhigonggaoService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tongzhigonggao), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,TongzhigonggaoEntity tongzhigonggao,
HttpServletRequest request){
EntityWrapper<TongzhigonggaoEntity> ew = new EntityWrapper<TongzhigonggaoEntity>();
PageUtils page = tongzhigonggaoService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tongzhigonggao), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( TongzhigonggaoEntity tongzhigonggao){
EntityWrapper<TongzhigonggaoEntity> ew = new EntityWrapper<TongzhigonggaoEntity>();
ew.allEq(MPUtil.allEQMapPre( tongzhigonggao, "tongzhigonggao"));
return R.ok().put("data", tongzhigonggaoService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(TongzhigonggaoEntity tongzhigonggao){
EntityWrapper< TongzhigonggaoEntity> ew = new EntityWrapper< TongzhigonggaoEntity>();
ew.allEq(MPUtil.allEQMapPre( tongzhigonggao, "tongzhigonggao"));
TongzhigonggaoView tongzhigonggaoView = tongzhigonggaoService.selectView(ew);
return R.ok("查询通知公告成功").put("data", tongzhigonggaoView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
TongzhigonggaoEntity tongzhigonggao = tongzhigonggaoService.selectById(id);
return R.ok().put("data", tongzhigonggao);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
TongzhigonggaoEntity tongzhigonggao = tongzhigonggaoService.selectById(id);
return R.ok().put("data", tongzhigonggao);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody TongzhigonggaoEntity tongzhigonggao, HttpServletRequest request){
tongzhigonggao.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tongzhigonggao);
tongzhigonggaoService.insert(tongzhigonggao);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody TongzhigonggaoEntity tongzhigonggao, HttpServletRequest request){
tongzhigonggao.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tongzhigonggao);
tongzhigonggaoService.insert(tongzhigonggao);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody TongzhigonggaoEntity tongzhigonggao, HttpServletRequest request){
//ValidatorUtils.validateEntity(tongzhigonggao);
tongzhigonggaoService.updateById(tongzhigonggao);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
tongzhigonggaoService.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<TongzhigonggaoEntity> wrapper = new EntityWrapper<TongzhigonggaoEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = tongzhigonggaoService.selectCount(wrapper);
return R.ok().put("count", count);
}
}