基于ssm校园疫情防控管理系统
校园疫情防控管理系统,主要的模块包括查看首页、个人中心、学生管理、教师管理、卫生部管理、疫情新闻管理、学生体温管理、学生签到管理、请假申请管理、健康档案管理、学生通知管理、教工通知管理、每日数据管理、系统管理等功能。系统中管理员主要是为了安全有效地存储和管理各类信息,还可以对系统进行管理与更新维护等操作,并且对后台有相应的操作权限。
要想实现校园疫情防控管理系统的各项功能,需要后台数据库的大力支持。管理员验证注册信息,收集的信息,并由此分析得出的关联信息等大量的数据都由数据库管理。本文中数据库服务器端采用了Mysql作为后台数据库,使Web与数据库紧密联系起来。在设计过程中,充分保证了系统代码的良好可读性、实用性、易扩展性、通用性、便于后期维护、操作方便以及页面简洁等特点。
基于ssm mysql开发的校园疫情系统
package com.example.controller; import com.example.common.Result; import com.example.entity.CommentInfo; import com.example.entity.Account; import com.example.service.CommentInfoService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.util.List; @RestController @RequestMapping(value = "/commentInfo") public class CommentInfoController { @Resource private CommentInfoService commentInfoService; @PostMapping public Result<CommentInfo> add(@RequestBody CommentInfo commentInfo, HttpServletRequest request) { Account user = (Account) request.getSession().getAttribute("user"); commentInfo.setUserId(user.getId()); commentInfoService.add(commentInfo); return Result.success(commentInfo); } @DeleteMapping("/{id}") public Result delete(@PathVariable Long id) { commentInfoService.delete(id); return Result.success(); } @PutMapping public Result update(@RequestBody CommentInfo commentInfo) { commentInfoService.update(commentInfo); return Result.success(); } @GetMapping("/{id}") public Result<CommentInfo> detail(@PathVariable Long id) { CommentInfo commentInfo = commentInfoService.findById(id); return Result.success(commentInfo); } @GetMapping public Result<List<CommentInfo>> all() { return Result.success(commentInfoService.findAll()); } @GetMapping("/all/{goodsId}") public Result<List<CommentInfo>> all(@PathVariable("goodsId") Long goodsId) { return Result.success(commentInfoService.findAll(goodsId)); } @GetMapping("/page/{name}") public Result<PageInfo<CommentInfo>> page(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize, @PathVariable String name, HttpServletRequest request) { return Result.success(commentInfoService.findPage(pageNum, pageSize, name, request)); } }
开发工具:idea (eclipse) 环境:jdk1.8 mysql
上一篇:
IDEA上Java项目控制台中文乱码