——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明






基于javaweb的SpringBoot疫情人员流动管理系统(java+jsp+ssm+springboot+maven+mysql)
一、项目简述 本系统主要实现的功能有: 社区疫情流动人员管理系统,住户管理,出入管理,访客管理,体温录入,高风险警示等等。
二、项目运行 环境配置:
Jdk1.8 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)
项目技术:
Springboot+ SpringMVC + MyBatis + Jsp + Html+ JavaScript + JQuery + Ajax + maven等等
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| package com.demo.controller;
/** * <p> * 前端控制器 * </p> *
*/ @Api(value = "获取菜单", tags = "获取菜单信息接口") @RestController @RequestMapping("/menus") @Slf4j public class MenuController {
@Resource private MenuService menuService;
@ApiOperation(value = "通过登录的用户ID获取菜单信息", notes = "通过登录的用户ID获取菜单信息") @GetMapping("") public String listMenus() { //获取当前用户的菜单列表 UserDto userSession = (UserDto) SecurityUtils.getSubject().getSession().getAttribute("userSession"); JSONObject jsonObject = new JSONObject(); List<MenuDTO> list = menuService.listByUserId(userSession.getUserId()); return JSONObject.toJSONString(list); }
}
package com.demo.utils;
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| }
@RequestMapping("/welcome") public String welcomePage() { return "page/sys/welcome"; }
@RequestMapping("/lookForPwd") public String lookForPwdPage() { return "page/sys/lookForPwd"; }
@RequestMapping("/register") public String registerPage() { return "page/sys/register"; }
@RequestMapping("/userInfo") public String setUserPage() { return "page/user/user-setting"; }
@RequestMapping("/updatePwd") public String updatePwdPage() { return "page/user/user-password"; }
@RequestMapping("/resident") public String residentPage() { return "page/residents/resident"; }
@RequestMapping("/addResident") public String addResidentPage() { return "page/residents/addResident"; }
@RequestMapping("/perilPage") public String perilPage() {
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| return visitorService.deleteVistors(ids); }
@PostMapping("/updateVisitor") public Result updateVistor(VistorDto vistorDto){ return visitorService.updateVistor(vistorDto); }
}
package com.demo.controller;
/** * <p> * 前端控制器 * </p> *
* * 注册码相关 */ @RestController @RequestMapping("/Usalt") @RequiresRoles(value = "admin" , logical = Logical.OR) public class UsersaltController { //添加注册码 @Autowired private UsersaltService usersaltService;
@GetMapping("/querySaltByParam") public JsonObject queryUserByParam(@RequestParam("page")Integer currentPage, @RequestParam("limit")Integer limit) { JsonObject<UsersaltDto> object = new JsonObject<>(); IPage<UsersaltDto> dtoIPage = usersaltService.querySaltByParam(currentPage,limit,null); object.setCode(0);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| } } package com.demo.controller;
@Controller @RequestMapping("/User") @Api(value = "页面跳转", tags = "页面跳转相关接口") public class IndexController { @RequestMapping("/login") public String loginPage() { return "page/sys/login"; }
@RequestMapping("/welcome") public String welcomePage() { return "page/sys/welcome"; }
@RequestMapping("/lookForPwd") public String lookForPwdPage() { return "page/sys/lookForPwd"; }
@RequestMapping("/register") public String registerPage() { return "page/sys/register"; }
@RequestMapping("/userInfo") public String setUserPage() { return "page/user/user-setting";
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| UserDto userSession = (UserDto) SecurityUtils.getSubject().getSession().getAttribute("userSession"); JSONObject jsonObject = new JSONObject(); List<MenuDTO> list = menuService.listByUserId(userSession.getUserId()); return JSONObject.toJSONString(list); }
}
package com.demo.utils;
public class CookieUtil {
public static void setCookie(String key, String value, String domain, HttpServletResponse response) {
}
public static String getCookieValue(HttpServletRequest request, String key) { Cookie[] cookies= request.getCookies(); Cookie cookie = null; if (cookies != null) { for (int i = 0; i < cookies.length; i++) { if (cookies[i].getName().equals(key)) { cookie = cookies[i]; } }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| /** * <p> * 登记记录表 前端控制器 * </p> *
*/ @Api(tags = "进出记录接口") @RestController @RequestMapping("/records") @RequiresRoles(value = {"user", "admin"}, logical = Logical.OR) public class RecordController { @Autowired private RecordService recordService;
@GetMapping("/getRecordByParam") public JsonObject getRecords(@RequestParam("page") Integer currentPage, @RequestParam("limit") Integer limit, @RequestParam(name = "params", required = false) String queryParams) {
JsonObject<RecordDto> object = new JsonObject<>(); if (queryParams != null) { JSONObject jsonObject = JSON.parseObject(queryParams); String keyword = jsonObject.getString("keyword"); IPage<RecordDto> dtoIPage = recordService.queryRecordByParam(currentPage, limit, keyword); object.setCode(0); object.setMsg("ok"); object.setCount(dtoIPage.getTotal()); object.setData(dtoIPage); return object; } else { IPage<RecordDto> dtoIPage = recordService.queryRecordByParam(currentPage, limit, null);
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=191422292105200et
https://javayms.pages.dev?id=191422292105200et