/*
这段Java代码是一个后端接口控制器,用于处理与作业通知(Zuoyetongzhi)相关的HTTP请求。下面是每个功能点的简单解释:
### 后端接口功能解释
#### 1. 后端列表(page)
* 功能:获取满足某些条件的作业通知列表,并进行分页显示。
* 条件:从请求参数和会话中获取。
#### 2. 前端列表(list)
* 功能:与后端列表功能相似,但不需要进行用户权限验证。
#### 3. 查询(query)
* 功能:根据指定的条件查询作业通知,并返回查询结果。
* 条件:通过请求参数传入。
#### 4. 后端详情(info)和前端详情(detail)
* 功能:获取指定ID的作业通知的详细信息。
* ID:通过请求路径传入。
#### 5. 保存(save)和添加(add)
* 功能:保存或添加新的作业通知。
* 数据:通过请求体传入。
#### 6. 修改(update)
* 功能:更新作业通知的信息。
* 数据:通过请求体传入,全部更新。
#### 7. 删除(delete)
* 功能:删除指定的作业通知。
* ID:通过请求体传入。
#### 8. 提醒接口(remind)
* 功能:根据提醒的列名和类型,查询满足某些条件的作业通知。
* 条件:包括提醒开始和结束日期等,从请求参数和会话中获取。
#### 9. (按值统计)
* 功能:通过指定的列名进行统计,并返回结果。如果涉及到时间统计,会按照指定的时间统计类型进行处理。
* 列名和时间统计类型:通过请求路径传入。
#### 10. 分组统计(group)
* 功能:根据指定的列名进行分组统计。
* 列名:通过请求路径传入。
#### 11. 总数量(count)
* 功能:统计满足某些条件的作业通知的总数量。
* 条件:从请求参数和会话中获取。
### 注意事项
* 在处理会话中的用户名时,会根据不同的表(如“教师表”或“学生表”)获取不同的列(如`jiaoshizhanghao`或`zhanghao`)。这是为了区分不同用户的权限和数据范围。例如,教师可能只能看到自己的班级中的学生信息,而学生则能看到自己的所有信息。因此,在查询或处理数据时,需要根据用户所在的表和角色进行相应的处理。这也是许多后台管理系统常见的做法。
*/
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.ZuoyetongzhiEntity;
import com.entity.view.ZuoyetongzhiView;
import com.service.ZuoyetongzhiService;
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("/zuoyetongzhi")
public class ZuoyetongzhiController {
@Autowired
private ZuoyetongzhiService zuoyetongzhiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ZuoyetongzhiEntity zuoyetongzhi,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("jiaoshi")) {
zuoyetongzhi.setJiaoshizhanghao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("xuesheng")) {
zuoyetongzhi.setZhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<ZuoyetongzhiEntity> ew = new EntityWrapper<ZuoyetongzhiEntity>();
PageUtils page = zuoyetongzhiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zuoyetongzhi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ZuoyetongzhiEntity zuoyetongzhi,
HttpServletRequest request){
EntityWrapper<ZuoyetongzhiEntity> ew = new EntityWrapper<ZuoyetongzhiEntity>();
PageUtils page = zuoyetongzhiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zuoyetongzhi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ZuoyetongzhiEntity zuoyetongzhi){
EntityWrapper<ZuoyetongzhiEntity> ew = new EntityWrapper<ZuoyetongzhiEntity>();
ew.allEq(MPUtil.allEQMapPre( zuoyetongzhi, "zuoyetongzhi"));
return R.ok().put("data", zuoyetongzhiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ZuoyetongzhiEntity zuoyetongzhi){
EntityWrapper< ZuoyetongzhiEntity> ew = new EntityWrapper< ZuoyetongzhiEntity>();
ew.allEq(MPUtil.allEQMapPre( zuoyetongzhi, "zuoyetongzhi"));
ZuoyetongzhiView zuoyetongzhiView = zuoyetongzhiService.selectView(ew);
return R.ok("查询作业通知成功").put("data", zuoyetongzhiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ZuoyetongzhiEntity zuoyetongzhi = zuoyetongzhiService.selectById(id);
return R.ok().put("data", zuoyetongzhi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ZuoyetongzhiEntity zuoyetongzhi = zuoyetongzhiService.selectById(id);
return R.ok().put("data", zuoyetongzhi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ZuoyetongzhiEntity zuoyetongzhi, HttpServletRequest request){
zuoyetongzhi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
zuoyetongzhiService.insert(zuoyetongzhi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ZuoyetongzhiEntity zuoyetongzhi, HttpServletRequest request){
zuoyetongzhi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
zuoyetongzhiService.insert(zuoyetongzhi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody ZuoyetongzhiEntity zuoyetongzhi, HttpServletRequest request){
zuoyetongzhiService.updateById(zuoyetongzhi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
zuoyetongzhiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public
没有合适的资源?快使用搜索试试~ 我知道了~
(源码)基于Spring Boot框架的学院个人信息管理系统.zip

共689个文件
java:171个
svg:161个
vue:120个

1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 199 浏览量
2025-06-10
13:35:44
上传
评论
收藏 17.94MB ZIP 举报
温馨提示
# 基于Spring Boot框架的学院个人信息管理系统 ## 项目简介 本系统是一个基于Spring Boot框架开发的学院个人信息管理系统,采用JDK 1.8版本,是一个基于web的管理系统,主要面向学院、学生、教师等用户,提供信息管理服务。 ## 项目的主要特性和功能 1. 前台功能 首页展示展示系统的主要功能和导航。 课程信息可查询课程信息,具备下载、收藏和点赞功能。 新闻公告查询新闻公告的详细信息。 个人中心支持更新个人信息,管理个人收藏和发布的内容。 2. 管理员功能 登录系统通过后台登录,进而操作系统。 管理页面涵盖个人中心、学生管理、教师管理、课程分类管理、班级管理、课程信息管理等功能。 课程信息管理可查询、修改、删除课程信息,查看评论。 学生作业管理能够查询、修改、删除学生作业信息。
资源推荐
资源详情
资源评论




















收起资源包目录





































































































共 689 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论


t0_54program
- 粉丝: 1492
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 联盟小学小学教育信息化建设方案DOC(1).doc
- 浅析高等院校计算机网络教学存在的问题与对策(1).docx
- PLC编程教程专题知识讲座(1).pptx
- 【推荐下载】小谈污水泵站自动化系统控制及结构(1).pdf
- 计算机组装与维护2(CPU)(1).pptx
- 实验室考勤管理系统-计算机科学与技术毕业(设计)论文(1)(1).doc
- Oracle后台数据库设计规范(1).doc
- 软件开发与定制项目可行性分析报告(1).docx
- 计算机网络实验教程的实践与心得(1).docx
- 科普网站平台建设方案书(1)(1).doc
- 互联网教育进小学课堂的必要性分析及发展建议(1).docx
- 浅论企业在财务信息化环境下的新旧准则转换(1).docx
- 电子商务部门管理制度(1)(1).doc
- 大学毕业论文-—基于单片机汽车尾灯控制(1).doc
- 基因工程的应用(2)(1).ppt
- (完整版)photoshop试题汇编第七单元试题.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
