基于javaweb+mysql的springboot小区智慧园区管理系统(java+springboot+mybatis+jquery+jsp+mysql)
私信源码获取及调试交流
运行环境
Java≥8、MySQL≥5.7
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SpringBoot小区智慧园区管理系统(java+springboot+mybatis+jquery+jsp+mysql)
项目介绍 本项目为后台管理系统,分为管理员与业主两种角色; 管理员主要功能包括: 首页、公告查询、轮播图、资源管理、园区咨询、咨询分类、系统用户、模块管理;
业主主要功能包括: 首页、公告查询、园区咨询、修改密码、投诉服务、报修管理、业主信息、房屋信息等;
环境需要 1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 5.7版本;
5.是否Maven项目:否;
技术栈
环境配置: Jdk1.8 + Mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)
项目技术: JSP +SpringBoot + MyBatis + Json+ Css + JavaScript + JQuery + Ajax + PageHelper+ Maven等等。
使用说明 运行项目,输入http://localhost:8080/ 登录
首页展示页面:
登录展示页面:
园区咨询展示:
房屋信息展示:
后台管理统计展示:
资讯分类管理展示页:
资讯管理展示页:
咨询详情页展示:
房屋信息管理控制层:
@RestController
public class RoomController {
@Autowired
RoomService service;
@GetMapping("/api/getAllRooms")
public ResBody getAllRooms(@RequestParam int page,
@RequestParam int limit) {
ResBody resBody = new ResBody();
int count = service.getCount();
List<Room> list= service.getAllRooms(page, limit);
resBody.setCount(count);
resBody.setData(list);
resBody.setCode(0);
@GetMapping("/api/getAllToususByUser")
public ResBody getAllToususByUser(@RequestParam int page,
@RequestParam int limit, HttpSession session){
ResBody resBody = new ResBody();
User user = (User) session.getAttribute("user");
int count = service.getCount(user.getId());
List<Tousu> list= service.getAllToususByUser(page, limit,user.getId());
resBody.setCount(count);
resBody.setData(list);
resBody.setCode(0);
return resBody;
RoomService service;
@GetMapping("/api/getAllRooms")
public ResBody getAllRooms(@RequestParam int page,
@RequestParam int limit) {
ResBody resBody = new ResBody();
int count = service.getCount();
List<Room> list= service.getAllRooms(page, limit);
resBody.setCount(count);
resBody.setData(list);
resBody.setCode(0);
return resBody;
@PostMapping("/api/addRoom")
ResBody resBody = new ResBody();
User user = (User) session.getAttribute("user");
if (user!=null){
tousu.setUser_id(user.getId());
int i = service.addTousu(tousu);
if (i == 1){
resBody.setCode(200);
resBody.setMsg("添加成功");
}else{
resBody.setCode(500);
resBody.setMsg("添加失败");
List<User> list= service.getUsers(page, limit);
resBody.setCount(count);
resBody.setData(list);
resBody.setCode(0);
return resBody;
@PostMapping("/api/addUser")
public ResBody addUser(@RequestBody User user) {
ResBody resBody = new ResBody();
int i = service.addUser(user);
if (i == 1){
if (i == 1){
resBody.setCode(200);
resBody.setMsg("删除成功");
}else{
resBody.setCode(500);
resBody.setMsg("删除失败");
return resBody;
@GetMapping("/api/findRoom")
public ResBody findBuilding(@RequestParam int page,
@RequestParam int limit,
@RequestParam String name) {
int count = 0;
用户管理控制层:
@RestController
public class UserController {
@Autowired
UserService service;
@GetMapping("/api/getUsers")
public ResBody getUsers(@RequestParam int page,
@RequestParam int limit) {
ResBody resBody = new ResBody();
int count = service.getCount();
List<User> list= service.getUsers(page, limit);
resBody.setCount(count);
resBody.setCode(200);
resBody.setMsg("添加成功");
}else{
resBody.setCode(500);
resBody.setMsg("添加失败");
return resBody;
@PostMapping("/api/updateTousu")
public ResBody updateTousu(@RequestBody Tousu tousu) {
ResBody resBody = new ResBody();
int i = service.updateTousu(tousu);
if (i == 1){
resBody.setCode(200);
public class TousuController {
@Autowired
TousuService service;
@GetMapping("/api/getAllTousus")
public ResBody getAllTousus(@RequestParam int page,
@RequestParam int limit) {
ResBody resBody = new ResBody();
int count = service.getCount();
List<Tousu> list= service.getAllTousus(page, limit);
resBody.setCount(count);
resBody.setData(list);
resBody.setCode(0);
int i = service.delRoom(id);
if (i == 1){
resBody.setCode(200);
resBody.setMsg("删除成功");
}else{
resBody.setCode(500);
resBody.setMsg("删除失败");
return resBody;
@GetMapping("/api/findRoom")
public ResBody findBuilding(@RequestParam int page,
@RequestParam int limit,
return resBody;
投诉管理控制层:
@RestController
public class TousuController {
@Autowired
TousuService service;
@GetMapping("/api/getAllTousus")
public ResBody getAllTousus(@RequestParam int page,
@RequestParam int limit) {
ResBody resBody = new ResBody();
int count = service.getCount();
List<Tousu> list= service.getAllTousus(page, limit);
resBody.setCount(count);
resBody.setData(list);
resBody.setCount(count);
resBody.setData(list);
resBody.setCode(0);
return resBody;
@GetMapping("/api/getAllToususByUser")
public ResBody getAllToususByUser(@RequestParam int page,
@RequestParam int limit, HttpSession session){
ResBody resBody = new ResBody();
User user = (User) session.getAttribute("user");
int count = service.getCount(user.getId());
List<Tousu> list= service.getAllToususByUser(page, limit,user.getId());
resBody.setCode(200);
resBody.setMsg("删除成功");
}else{
resBody.setCode(500);
resBody.setMsg("删除失败");
return resBody;
@GetMapping("/api/findRoom")
public ResBody findBuilding(@RequestParam int page,
@RequestParam int limit,
@RequestParam String name) {
int count = 0;
if (user == null){
resBody.setCode(500);
resBody.setMsg("登录失败,请重新登录");
}else {
session.setAttribute("user",user);
resBody.setCode(200);
resBody.setMsg("登录成功");
return resBody;
@PostMapping("/api/updatePass")
public ResBody updatePass(@RequestBody Map<String, Object> params,
public class AdminController {
@Autowired
AdminService service;
private static final Logger LOG = LoggerFactory.getLogger(AdminController.class);
@PostMapping("/admin/loginByPassword")
public ResBody loginByPassword(@RequestBody Map<String, Object> params,
HttpSession session) {
ResBody resBody = new ResBody();
String email = params.get("email").toString();
String password = params.get("password").toString();
Admin admin = service.findAdmin(email,password);
if (admin == null){
resBody.setCode(500);
return resBody;
@PostMapping("/api/loginByPassword")
public ResBody loginByPassword(@RequestBody Map<String, Object> params,
HttpSession session) {
ResBody resBody = new ResBody();
String phone = params.get("phone").toString();
String password = params.get("password").toString();
User user = service.loginByPassword(phone,password);
if (user == null){
resBody.setCode(500);
resBody.setMsg("删除失败");
return resBody;
@GetMapping("/api/findTousu")
public ResBody findTousu(@RequestParam int page,
@RequestParam int limit,
@RequestParam String name) {
ResBody resBody = new ResBody();
int count = 0;
List<Tousu> list= new ArrayList<>();
if (name.isEmpty()){
count = service.getCount();
list= service.getAllTousus(page, limit);
int i = service.updatePass(user.getId(),newPsw);
if (i != 1){
resBody.setCode(500);
resBody.setMsg("修改失败,后台出错");
}else {
session.setAttribute("user",user);
resBody.setCode(200);
resBody.setMsg("修改成功");
return resBody;
房屋信息管理控制层:
@RestController
public class RoomController {