基于javaweb+springboot的家政服务网站系统设计和实现(java+Springboot

文章正文
发布时间:2024-10-24 12:55

基于javaweb+springboot的家政服务网站系统设计和实现(java+Springboot+ssm+mysql+jsp+maven)

一、项目简述

本系统主要实现的功能有:
项目功能较多,包括用户的注册登录,家政0员务的查看, 分类,预订,以及支付,订单信息的查看,后台管理员的 人员管理,服务类别管理,订单分配,数据统计,家政维 护等等功能。

二、项目运行
1运行环境:

环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持) 项目技术: Springboot+ SpringMVC + MyBatis + ThymeLeaf + JavaScript + JQuery + Ajax + maven

观看详情:

请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

String[] ids = this.getRequest().getParameterValues("ordersid"); for (String ordersid : ids) { this.ordersService.deleteOrders(ordersid); } return "redirect:/orders/getAllOrders"; } // 更新数据 @RequestMapping("/updateOrders") public String updateOrders(Orders orders) { this.ordersService.updateOrders(orders); return "redirect:/orders/getAllOrders"; } // 显示全部数据 @RequestMapping("/getAllOrders") this.getRequest().setAttribute("message", "密码错误"); return "admin/index"; } } return "admin/main"; } // 修改密码 @RequestMapping("/editpwd") public String editpwd() { String adminid = (String) this.getSession().getAttribute("adminid"); String password = this.getRequest().getParameter("password"); // 更新数据 @RequestMapping("/updateOrders") public String updateOrders(Orders orders) { this.ordersService.updateOrders(orders); return "redirect:/orders/getAllOrders"; } // 显示全部数据 @RequestMapping("/getAllOrders") public String getAllOrders(String number) { List<Orders> ordersList = this.ordersService.getAllOrders(); PageHelper.getPage(ordersList, "orders", null, null, 10, number, this.getRequest(), null); return "admin/listorders"; } // 按条件查询数据 (模糊查询) @RequestMapping("/queryOrdersByCond") public String queryOrdersByCond(String cond, String name, String number) { Orders orders = new Orders(); if (cond != null) { if ("ordercode".equals(cond)) { orders.setOrdercode(name); } Admin adminpojo = new Admin(); adminpojo.setUsername(username); List<Admin> adminlist = this.adminService.getAdminByCond(adminpojo); if (adminlist.size() == 0) { this.getRequest().setAttribute("message", "用户名不存在"); return "admin/index"; } else { Admin admin = adminlist.get(0); if (password.equals(admin.getPassword())) { this.getSession().setAttribute("adminid", admin.getAdminid()); this.getSession().setAttribute("adminname", admin.getUsername()); this.getSession().setAttribute("realname", admin.getRealname()); this.getSession().setAttribute("role", admin.getRole()); } else { this.getRequest().setAttribute("message", "密码错误"); return "admin/index"; } } return "admin/main"; } // 修改密码 @Autowired @Resource private OrdersService ordersService; @Autowired @Resource private UsersService usersService; // 准备添加数据 @RequestMapping("/createOrders") public String createOrders() { List<Users> usersList = this.usersService.getAllUsers(); this.getRequest().setAttribute("usersList", usersList); return "admin/addorders"; } // 添加数据 @RequestMapping("/addOrders") public String addOrders(Orders orders) { this.ordersService.insertOrders(orders); return "redirect:/orders/createOrders"; } // 通过主键删除数据 @RequestMapping("/deleteOrders") if ("address".equals(cond)) { orders.setAddress(name); } if ("contact".equals(cond)) { orders.setContact(name); } if ("workdate".equals(cond)) { orders.setWorkdate(name); } if ("worktime".equals(cond)) { orders.setWorktime(name); } } List<String> nameList = new ArrayList<String>(); List<String> valueList = new ArrayList<String>(); nameList.add(cond); valueList.add(name); PageHelper.getPage(this.ordersService.getOrdersByLike(orders), "orders", nameList, valueList, 10, number, this.getRequest(), "query"); } // 通过主键删除数据 @RequestMapping("/deleteOrders") public String deleteOrders(String id) { this.ordersService.deleteOrders(id); return "redirect:/orders/getAllOrders"; } // 批量删除数据 @RequestMapping("/deleteOrdersByIds") public String deleteOrdersByIds() { String[] ids = this.getRequest().getParameterValues("ordersid"); for (String ordersid : ids) { this.ordersService.deleteOrders(ordersid); } users.setRegdate(name); } } List<String> nameList = new ArrayList<String>(); List<String> valueList = new ArrayList<String>(); nameList.add(cond); valueList.add(name); PageHelper.getPage(this.usersService.getUsersByLike(users), "users", nameList, valueList, 10, number, this.getRequest(), "query"); name = null; cond = null; return "admin/queryusers"; } // 按主键查询数据 @RequestMapping("/getUsersById") } // 添加数据 @RequestMapping("/addUsers") public String addUsers(Users users) { this.usersService.insertUsers(users); return "redirect:/users/createUsers"; } // 通过主键删除数据 @RequestMapping("/deleteUsers") public String deleteUsers(String id) { this.usersService.deleteUsers(id); return "redirect:/users/getAllUsers"; } // 批量删除数据 @RequestMapping("/deleteUsersByIds") public String deleteUsersByIds() { String[] ids = this.getRequest().getParameterValues("usersid"); for (String usersid : ids) { this.usersService.deleteUsers(usersid); } return "redirect:/users/getAllUsers"; } // 更新数据 @RequestMapping("/getAdminById") public String getAdminById(String id) { Admin admin = this.adminService.getAdminById(id); this.getRequest().setAttribute("admin", admin); return "admin/editadmin"; } public AdminService getAdminService() { return adminService; } public void setAdminService(AdminService adminService) { this.adminService = adminService; } } 订单控制器: //定义为控制器 @Controller // 设置路径 @RequestMapping(value = "/orders", produces = "text/plain;charset=utf-8") public class OrdersController extends BaseController { // 按主键查询数据 @RequestMapping("/getUsersById") public String getUsersById(String id) { Users users = this.usersService.getUsersById(id); this.getRequest().setAttribute("users", users); return "admin/editusers"; } public UsersService getUsersService() { return usersService; } public void setUsersService(UsersService usersService) { this.usersService = usersService; } } 管理员控制器: //定义为控制器 @Controller admin.setAddtime(VeDate.getStringDateShort()); this.adminService.insertAdmin(admin); return "redirect:/admin/createAdmin"; } // 通过主键删除数据 @RequestMapping("/deleteAdmin") public String deleteAdmin(String id) { this.adminService.deleteAdmin(id); return "redirect:/admin/getAllAdmin"; } // 批量删除数据 @RequestMapping("/deleteAdminByIds") public String deleteAdminByIds() { String[] ids = this.getRequest().getParameterValues("adminid"); for (String adminid : ids) { this.adminService.deleteAdmin(adminid); } return "redirect:/admin/getAllAdmin"; } // 更新数据 @RequestMapping("/updateAdmin") public String updateAdmin(Admin admin) { this.adminService.updateAdmin(admin); return "redirect:/admin/getAllAdmin"; if ("worktime".equals(cond)) { orders.setWorktime(name); } } List<String> nameList = new ArrayList<String>(); List<String> valueList = new ArrayList<String>(); nameList.add(cond); valueList.add(name); PageHelper.getPage(this.ordersService.getOrdersByLike(orders), "orders", nameList, valueList, 10, number, this.getRequest(), "query"); name = null; cond = null; return "admin/queryorders"; } // 按主键查询数据 @RequestMapping("/getOrdersById") public String getOrdersById(String id) { List<String> valueList = new ArrayList<String>(); nameList.add(cond); valueList.add(name); PageHelper.getPage(this.usersService.getUsersByLike(users), "users", nameList, valueList, 10, number, this.getRequest(), "query"); name = null; cond = null; return "admin/queryusers"; } // 按主键查询数据 @RequestMapping("/getUsersById") public String getUsersById(String id) { Users users = this.usersService.getUsersById(id); this.getRequest().setAttribute("users", users); return "admin/editusers"; } public UsersService getUsersService() { @RequestMapping(value = "/admin", produces = "text/plain;charset=utf-8") public class AdminController extends BaseController { // 注入Service 由于标签的存在 所以不需要getter setter @Autowired @Resource private AdminService adminService; // 管理员登录 1 验证用户名是否存在 2 验证密码是否正确 @RequestMapping("/login") public String login() { String username = this.getRequest().getParameter("username"); String password = this.getRequest().getParameter("password"); Admin adminpojo = new Admin(); adminpojo.setUsername(username); List<Admin> adminlist = this.adminService.getAdminByCond(adminpojo); if (adminlist.size() == 0) { this.getRequest().setAttribute("message", "用户名不存在"); return "admin/index"; } else { Admin admin = adminlist.get(0); if (password.equals(admin.getPassword())) { List<String> nameList = new ArrayList<String>(); List<String> valueList = new ArrayList<String>(); nameList.add(cond); valueList.add(name); PageHelper.getPage(this.usersService.getUsersByLike(users), "users", nameList, valueList, 10, number, this.getRequest(), "query"); name = null; cond = null; return "admin/queryusers"; } // 按主键查询数据 @RequestMapping("/getUsersById") public String getUsersById(String id) { Users users = this.usersService.getUsersById(id); admin.setRole(name); } if ("addtime".equals(cond)) { admin.setAddtime(name); } } List<String> nameList = new ArrayList<String>(); List<String> valueList = new ArrayList<String>(); nameList.add(cond); valueList.add(name); PageHelper.getPage(this.adminService.getAdminByLike(admin), "admin", nameList, valueList, 10, number, this.getRequest(), "query"); name = null; cond = null; return "admin/queryadmin"; } // 按主键查询数据 @RequestMapping("/getAdminById") public String getAdminById(String id) { this.usersService = usersService; } } 管理员控制器: //定义为控制器 @Controller // 设置路径 @RequestMapping(value = "/admin", produces = "text/plain;charset=utf-8") public class AdminController extends BaseController { // 注入Service 由于标签的存在 所以不需要getter setter @Autowired @Resource private AdminService adminService; // 管理员登录 1 验证用户名是否存在 2 验证密码是否正确 @RequestMapping("/login") public String login() { String username = this.getRequest().getParameter("username"); String password = this.getRequest().getParameter("password"); Admin adminpojo = new Admin(); adminpojo.setUsername(username); List<Admin> adminlist = this.adminService.getAdminByCond(adminpojo); if (adminlist.size() == 0) { this.getRequest().setAttribute("message", "用户名不存在"); return "admin/index"; public String login() { String username = this.getRequest().getParameter("username"); String password = this.getRequest().getParameter("password"); Admin adminpojo = new Admin(); adminpojo.setUsername(username); List<Admin> adminlist = this.adminService.getAdminByCond(adminpojo); if (adminlist.size() == 0) { this.getRequest().setAttribute("message", "用户名不存在"); return "admin/index"; } else { Admin admin = adminlist.get(0); if (password.equals(admin.getPassword())) { this.getSession().setAttribute("adminid", admin.getAdminid()); this.getSession().setAttribute("adminname", admin.getUsername()); @RequestMapping("/addUsers") public String addUsers(Users users) { this.usersService.insertUsers(users); return "redirect:/users/createUsers"; } // 通过主键删除数据 @RequestMapping("/deleteUsers") public String deleteUsers(String id) { this.usersService.deleteUsers(id); return "redirect:/users/getAllUsers"; nameList.add(cond); valueList.add(name); PageHelper.getPage(this.adminService.getAdminByLike(admin), "admin", nameList, valueList, 10, number, this.getRequest(), "query"); name = null; cond = null; return "admin/queryadmin"; } // 按主键查询数据 @RequestMapping("/getAdminById") public String getAdminById(String id) { Admin admin = this.adminService.getAdminById(id); this.getRequest().setAttribute("admin", admin); return "admin/editadmin"; } public AdminService getAdminService() { // 按主键查询数据 @RequestMapping("/getAdminById") public String getAdminById(String id) { Admin admin = this.adminService.getAdminById(id); this.getRequest().setAttribute("admin", admin); return "admin/editadmin"; } public AdminService getAdminService() { return adminService; } } return "redirect:/users/getAllUsers"; } // 更新数据 @RequestMapping("/updateUsers") public String updateUsers(Users users) { this.usersService.updateUsers(users); return "redirect:/users/getAllUsers"; } // 显示全部数据 @RequestMapping("/getAllUsers") public String getAllUsers(String number) { users.setRegdate(name); } } List<String> nameList = new ArrayList<String>(); List<String> valueList = new ArrayList<String>(); nameList.add(cond); valueList.add(name); PageHelper.getPage(this.usersService.getUsersByLike(users), "users", nameList, valueList, 10, number, this.getRequest(), "query"); name = null; cond = null; return "admin/queryusers"; } // 按主键查询数据 @RequestMapping("/getUsersById") public String getUsersById(String id) { // 添加数据 @RequestMapping("/addOrders") public String addOrders(Orders orders) { this.ordersService.insertOrders(orders); return "redirect:/orders/createOrders"; } // 通过主键删除数据 @RequestMapping("/deleteOrders") public String deleteOrders(String id) { this.ordersService.deleteOrders(id); return "redirect:/orders/getAllOrders"; } // 批量删除数据 @RequestMapping("/deleteOrdersByIds") public String deleteOrdersByIds() { String[] ids = this.getRequest().getParameterValues("ordersid"); for (String ordersid : ids) { this.ordersService.deleteOrders(ordersid); String[] ids = this.getRequest().getParameterValues("usersid"); for (String usersid : ids) { this.usersService.deleteUsers(usersid); } return "redirect:/users/getAllUsers"; } // 更新数据 @RequestMapping("/updateUsers") public String updateUsers(Users users) { this.usersService.updateUsers(users); return "redirect:/users/getAllUsers"; } // 显示全部数据 @RequestMapping("/getAllUsers") } 用户信息控制器: //定义为控制器 @Controller // 设置路径 @RequestMapping(value = "/users", produces = "text/plain;charset=utf-8") public class UsersController extends BaseController { // 注入Service 由于标签的存在 所以不需要getter setter @Autowired @Resource private UsersService usersService; // 准备添加数据 @RequestMapping("/createUsers") public String createUsers() { return "admin/addusers"; } // 添加数据 PageHelper.getPage(usersList, "users", null, null, 10, number, this.getRequest(), null); return "admin/listusers"; } // 按条件查询数据 (模糊查询) @RequestMapping("/queryUsersByCond") public String queryUsersByCond(String cond, String name, String number) { Users users = new Users(); if (cond != null) { if ("username".equals(cond)) { users.setUsername(name); } if ("password".equals(cond)) { users.setPassword(name); } if ("realname".equals(cond)) { users.setRealname(name); } if ("sex".equals(cond)) { users.setSex(name); } if ("regdate".equals(cond)) { users.setRegdate(name); } } List<String> nameList = new ArrayList<String>(); List<String> valueList = new ArrayList<String>(); nameList.add(cond); valueList.add(name); PageHelper.getPage(this.usersService.getUsersByLike(users), "users", nameList, valueList, 10, number, this.getRequest(), "query"); name = null; cond = null; return "admin/queryusers"; } orders.setStatus(name); } if ("address".equals(cond)) { orders.setAddress(name); } if ("contact".equals(cond)) { orders.setContact(name); } if ("workdate".equals(cond)) { orders.setWorkdate(name); } if ("worktime".equals(cond)) { orders.setWorktime(name); } } List<String> nameList = new ArrayList<String>(); List<String> valueList = new ArrayList<String>(); nameList.add(cond); valueList.add(name); PageHelper.getPage(this.ordersService.getOrdersByLike(orders), "orders", nameList, valueList, 10, number, this.getRequest(), "query"); name = null; cond = null; return "admin/queryorders";

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

首页
评论
分享
Top