作者主页:夜未央5788
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
该高校运动会信息管理系统是以B/S架构为设计基础并基于SSM框架开发的系统。系统采用了Java语言和MySQL数据库来实现。
系统按预定的算法完成了创办运动会、广播公告公示、赛事项目拟订、报名参赛、赛后成绩录入、查看比赛成绩、院系人员的信息存储、反馈建议、访问日记等功能。
主要功能:
1.完成校运动会项目管理。具体包括项目的新增、修改、查询等功能。项目信息包括项目编号、项目名称、项目类别(男、女)、项目性质(团体、个人)等
2.完成运动员信息的管理。具体包括运动员信息的新增、修改、查询、删除等功能。运动员信息包括运动员编号、姓名、所在班级、性别等;
3.报名管理。完成运动员选择参赛项目的过程。
本项目分为管理员、教师、学生三种角色;
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.数据库:MySql 5.7版本;
6.是否Maven项目:是;
1. 后端:Spring+SpringMVC+Mybatis
2. 前端:JSP+CSS+JavaScript+jQuery
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中dbconfig.properties配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入http://localhost:8080/ 登录
@RolesAllowed("ADMIN")
@Controller
@RequestMapping("classes")
public class ClassesController {
@Autowired
private ClassesService classesService;
/**
* 查询所有班级信息
*
* @return
*/
@RequestMapping("/findAll.do")
public ModelAndView findAll() {
ModelAndView mv = new ModelAndView();
List classesList = classesService.findAll();
mv.addObject("classesList", classesList);
mv.setViewName("classes-list");
return mv;
}
/**
* 查询班级详细信息
*
* @param cId
* @return
*/
@RequestMapping("/findDetailsBycId.do")
public ModelAndView findDetailsBycId(Integer cId) {
ModelAndView mv = new ModelAndView();
Map map = classesService.findDetailsBycId(cId);
Classes classes = (Classes) map.get("classes");
List studentList = (List) map.get("studentList");
mv.addObject("studentList", studentList);
mv.addObject("classes", classes);
mv.setViewName("classes-details");
return mv;
}
/**
* 删除班级
*
* @param cId
* @return
*/
@RequestMapping("/deleteByPK.do")
public String deleteByIds(Integer[] cId) {
classesService.deleteByPK(cId);
return "redirect:findAll.do";
}
/**
* 遍历所有出班级
*
* @return
*/
@RequestMapping(value = "/findAllClasses.do", produces = "application/json; charset=utf-8")
@ResponseBody
public List findAllClasses() {
return classesService.findAllClasses();
}
/**
* 根据id查找班级信息,获取信息到模态框上
*
* @param id
* @return
*/
@RequestMapping(value = "/findById.do", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
@ResponseBody
public Classes findById(@RequestParam(name = "id") Integer id) {
return classesService.findById(id);
}
/**
* 插入班级信息
*
* @param classes
* @return
*/
@RequestMapping(value = "/insert.do", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
@ResponseBody
public String insert(@RequestBody Classes classes) {
try {
classesService.insert(classes);
} catch (Exception e) {
return "新增失败!";
}
return "200";
}
/**
* 修改班级信息
*
* @param classes
* @return
*/
@RequestMapping(value = "/update.do", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
@ResponseBody
public String update(@RequestBody Classes classes) {
try {
classesService.update(classes);
} catch (Exception e) {
return "修改失败!";
}
return "200";
}
}
@Controller
@RequestMapping("/equipment")
public class EquipmentController {
@Autowired
private EquipmentService equipmentService;
@Autowired
private BorrowService borrowService;
/**
* 查询所有运动器材信息
*
* @return
*/
@RequestMapping("/findAll.do")
public ModelAndView findAll() {
ModelAndView mv = new ModelAndView();
List equipmentList = equipmentService.findAll();
mv.addObject("equipment", equipmentList);
mv.setViewName("equipment-list");
return mv;
}
/**
* 器材借还记录
*
* @param eId
* @return
*/
@RequestMapping("/findDetailsByeId.do")
public ModelAndView findDetailsByeId(Integer eId) {
ModelAndView mv = new ModelAndView();
List borrowList = borrowService.selectByeId(eId);
mv.addObject("borrow", borrowList);
mv.setViewName("equipment-details");
return mv;
}
/**
* 器材管理
*
* @return
*/
@RequestMapping("/manage.do")
public ModelAndView manage() {
ModelAndView mv = new ModelAndView();
List equipmentList = equipmentService.findAll();
mv.addObject("equipment", equipmentList);
mv.setViewName("equipment-manage");
return mv;
}
/**
* 器材购入
*
* @param equipment
* @return
*/
@RequestMapping(value = "/insert.do", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
@ResponseBody
public String insert(@RequestBody Equipment equipment) {
try {
equipmentService.insert(equipment);
} catch (Exception e) {
return "新增失败!";
}
return "200";
}
/**
* 器材信息修改
*
* @param equipment
* @return
*/
@RequestMapping(value = "/update.do", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
@ResponseBody
public String update(@RequestBody Equipment equipment) {
System.out.println(equipment);
try {
equipmentService.update(equipment);
} catch (Exception e) {
return "修改失败!";
}
return "200";
}
/**
* 遍历器材列表
*
* @param id
* @return
*/
@RequestMapping(value = "/findById.do", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
@ResponseBody
public Equipment findById(@RequestParam(name = "id") Integer id) {
return equipmentService.findById(id);
}
/**
* 删除器材
*
* @param id
* @return
*/
@RequestMapping("/deleteById.do")
public String deleteByIds(Integer[] id) {
equipmentService.deleteById(id);
return "redirect:manage.do";
}
}
@Controller
@RequestMapping("/feedback")
public class FeedbackController {
@Autowired
private FeedbackService feedbackService;
/**
* 反馈信息插入
*
* @param feedback
* @return
*/
@RequestMapping(value = "/feedback.do", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
@ResponseBody
public String feedback(@RequestBody Feedback feedback) {
try {
feedbackService.insert(feedback);
} catch (Exception e) {
return "反馈失败!";
}
return "200";
}
/**
* 反馈信息列表
*
* @return
*/
@RequestMapping("/feedbackList.do")
public ModelAndView feedback() {
ModelAndView mv = new ModelAndView();
List feedbackList = feedbackService.findAll();
mv.addObject("feedback", feedbackList);
mv.setViewName("user-feedback");
return mv;
}
/**
* 删除反馈信息
*
* @param id
* @return
*/
@RequestMapping("/deleteById.do")
public String deleteByIds(Integer[] id) {
feedbackService.deleteById(id);
return "redirect:feedbackList.do";
}
}
如果也想学习本系统,下面领取。回复:212ssm