作者主页:夜未央5788
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
项目介绍
项目主要功能包括:
数据分析:柱状图分析、折线图分析、统计数据等,每10秒自动刷新
用户管理:用户信息管理、用户投诉管理、投诉反馈信息、黑名单管理;
座位管理:实时座位管理、座位使用预约记录,由管理员进行用户的座位预约操作;
密码管理:重置密码;
环境需要
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 8.0版本;
6.是否maven项目:是;
技术栈
1. 后端:SpringBoot+Mybatis
2. 前端:Thymeleaf+HTML+CSS+LayUI+bootstrap
使用说明
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入localhost:8080/index.html 登录
运行截图
代码相关
投诉管理控制器
@Controller
public class ComplainController {
@Autowired
ComplainServiceImpl complainService;
//来到投诉页面
@RequestMapping("/toComplain")
public String toComplainPage(Map<String,Object> map){
List<Complain> complains = complainService.getAll();
map.put("cps",complains);
return "Complain";
}
//AJAX通过请求返回投诉列表
@GetMapping("/complainList")
@ResponseBody
public Msg ComplainData(@RequestParam(value = "pn",defaultValue = "1")Integer pn){
PageHelper.startPage(pn,6);
List<Complain> complains = complainService.getAll();
PageInfo<Complain> page=new PageInfo<Complain>(complains,5);
return Msg.success().add("pageInfo",page);
}
/*更新ps中的处理状态*/
@PutMapping("/updatePs")
@ResponseBody
public Msg updatePss(Integer cpid){
boolean b = complainService.updatePs(cpid);
if (b == true){
return Msg.success().add("va_msg","ps状态更新成功");
}else{
return Msg.fail().add("va_msg","ps状态更新失败");
}
}
/*根据cpid删除投诉数据*/
@DeleteMapping("/deleteCp/{cpid}")
@ResponseBody
public Msg deleteCp2(@PathVariable("cpid") int cpid){
boolean b = complainService.deleteCp(cpid);
if (b == true){
return Msg.success().add("va_msg","cp删除成功");
}else{
return Msg.fail().add("va_msg","cp删除成功");
}
}
//点击编辑按键传入userid查询用户,返回用户信息
@GetMapping("/queryCpByID/{cpid}")
@ResponseBody
public Msg queryUserID(@PathVariable("cpid") Integer cpid){
Complain cpByID = complainService.getCpByID(cpid);
return Msg.success().add("cp",cpByID);
}
}
座位管理控制器
@Controller
public class SeatController {
@Autowired
SeatServiceImpl seatService;
/*
* 获取数据库座位信息,返回map中
* */
@GetMapping("/seat")
public String seat(Map<String,Object> map){
List<Seat> seats = seatService.getAll();
map.put("seats",seats);
return "SeatResver";
}
//前端发起请求来修改座位状态,置为0
@PutMapping("/updateSeatState/{seatid}")
@ResponseBody
public Msg updateState(@PathVariable("seatid") Integer seatid){
boolean b = seatService.updateSeatState(seatid);
if (b){
return Msg.success().add("va_msg","状态位置0成功!");
}else {
return Msg.fail().add("va_msg","状态位置0失败!");
}
}
//前端发起请求来修改座位状态,置为1
@PutMapping("/updateSeatStateYY")
@ResponseBody
public Msg updateState1(@RequestParam("seatid") Integer seatid,
@RequestParam("status") String status){
boolean b = seatService.updateSeatState1(seatid,status);
if (b){
return Msg.success().add("va_msg","预约成功!");
}else {
return Msg.fail().add("va_msg","预约失败!");
}
}
}
分析管理控制器
@Controller
public class StatisticController {
@Autowired
StatisticServiceImpl statisticService;
/*
* 到图表分析页面
* */
@GetMapping("/charts")
public String toChartsPage(){
return "Charts";
}
/*
* 获取全部数据
* */
@GetMapping("/user22")
public String getAllUser(Map<String,Object> map){
List<Statistic> statistics = statisticService.getAll();
map.put("statistics",statistics);
return "SeatChart";
}
/*
* 获取信息展示到页面中
* */
@GetMapping("/getStaInfo")
@ResponseBody
public Msg staInfo(){
List<Statistic> statistics = statisticService.getAll();
return Msg.success().add("statistics",statistics);
}
}
如果也想学习本系统,下面领取。回复:073springboot