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






基于javaweb的SSM美容院预约管理系统(java+ssm+jsp+jquery+mysql)
项目介绍
本系统分为管理员与普通用户两种角色; 管理员角色包含以下功能: 登录,首页,新增管理员,管理员信息列表,网站用户信息列表,新增新闻公告信息,新闻公告信息查询,美容项目类型信息查询,城市列表,美容院信息列表,美容项目信息查询,订单信息查询,美容项目评价信息列表等功能。 用户角色包含以下功能:
注册,登录,网站公告,美发分类,染发详情,加入购物车,下订单,活动详情,关键词搜索等功能。
环境需要
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 5.7版本;
技术栈
后端:SpringBoot
 
前端:JSP+CSS+JavaScript+jQuery
 
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录
 
——————————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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
   | @RequestMapping("cancel.action") public String cancel(String id) { 	this.front(); 	if (this.getSession().getAttribute("userid") == null) { 		return "redirect:/index/preLogin.action"; 	} 	Orders orders = this.ordersService.getOrdersById(this.getRequest().getParameter("id")); 	orders.setStatus("已取消"); 	this.ordersService.updateOrders(orders); 	return "redirect:/index/showOrders.action"; }
 
  @RequestMapping("orderdetail.action") public String orderdetail(String id) { 	this.front(); 	if (this.getSession().getAttribute("userid") == null) { 		return "redirect:/index/preLogin.action"; 	} 	Details details = new Details(); 	details.setOrdercode(id); 	List<Details> detailsList = this.detailsService.getDetailsByCond(details); 	this.getRequest().setAttribute("detailsList", detailsList); 	return "users/orderdetail"; }
 
  @RequestMapping("cate.action") public String cate(String id, String number) { 	this.front(); 	Jiancai goods = new Jiancai(); 	goods.setCateid(id); 	List<Jiancai> flimList = new ArrayList<Jiancai>(); 	List<Jiancai> tempList = this.jiancaiService.getJiancaiByCond(goods); 	int pageNumber = tempList.size(); 	int maxPage = pageNumber; 	if (maxPage % 12 == 0) { 		maxPage = maxPage / 12; 	} else { 		maxPage = maxPage / 12 + 1; 	} 	if (number == null) { 		number = "0"; 	} 	int start = Integer.parseInt(number) * 12; 	int over = (Integer.parseInt(number) + 1) * 12; 	int count = pageNumber - over; 	if (count <= 0) { 		over = pageNumber;
  | 
 
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 42 43 44 45 46 47
   | @RequestMapping("deleteJiancaiByIds.action") public String deleteJiancaiByIds() { 	String[] ids = this.getRequest().getParameterValues("jiancaiid"); 	for (String jiancaiid : ids) { 		this.jiancaiService.deleteJiancai(jiancaiid); 	} 	return "redirect:/jiancai/getAllJiancai.action"; }
 
  @RequestMapping("updateJiancai.action") public String updateJiancai(Jiancai jiancai) { 	this.jiancaiService.updateJiancai(jiancai); 	return "redirect:/jiancai/getAllJiancai.action"; }
 
  @RequestMapping("getAllJiancai.action") public String getAllJiancai(String number) { 	List<Jiancai> jiancaiList = this.jiancaiService.getAllJiancai(); 	PageHelper.getPage(jiancaiList, "jiancai", null, null, 10, number, this.getRequest(), null); 	return "admin/listjiancai"; }
 
  @RequestMapping("queryJiancaiByCond.action") public String queryJiancaiByCond(String cond, String name, String number) { 	Jiancai jiancai = new Jiancai(); 	if (cond != null) { 		if ("jiancainame".equals(cond)) { 			jiancai.setJiancainame(name); 		} 		if ("image".equals(cond)) { 			jiancai.setImage(name); 		} 		if ("cateid".equals(cond)) { 			jiancai.setCatename(name); 		} 		if ("price".equals(cond)) { 			jiancai.setPrice(name); 		} 		if ("recommend".equals(cond)) { 			jiancai.setRecommend(name); 		} 		if ("thestart".equals(cond)) { 			jiancai.setThestart(name); 		}
  | 
 
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
   | 		}
  		 		try { 			file.transferTo(targetFile); 		} catch (Exception e) { 			e.printStackTrace(); 		} 		model.addAttribute("imageFileName", fileName); 		return "savefile"; 	} } package com.action;
 
 
 
 
 
 
  @Controller public class BaseAction {
  	 	protected final Log log = LogFactory.getLog(getClass());
  	 	public Map<String, String[]> getParameters() { 		ServletRequestAttributes attrs = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); 		return attrs.getRequest().getParameterMap(); 	}
  	public HttpServletRequest getRequest() { 		ServletRequestAttributes attrs = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); 		return attrs.getRequest(); 	}
  	public HttpSession getSession() { 		HttpSession session = null;
   | 
 
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
   |  		 		try { 			file.transferTo(targetFile); 		} catch (Exception e) { 			e.printStackTrace(); 		} 		model.addAttribute("imageFileName", fileName); 		return "saveimage"; 	}
  	@RequestMapping(value = "/files.action") 	public String files(@RequestParam(value = "image", required = false) MultipartFile file, HttpServletRequest request, 			ModelMap model) { 		String path = request.getSession().getServletContext().getRealPath("/") + "upfiles/"; 		String fileName = file.getOriginalFilename(); 		int i = fileName.lastIndexOf("."); 		String name = String.valueOf(VeDate.getStringDatex()); 		String type = fileName.substring(i + 1); 		fileName = name + "." + type; 		File targetFile = new File(path, fileName); 		if (!targetFile.exists()) { 			targetFile.mkdirs(); 		}
  		 		try { 			file.transferTo(targetFile); 		} catch (Exception e) { 			e.printStackTrace(); 		} 		model.addAttribute("imageFileName", fileName); 		return "savefile"; 	} } package com.action;
 
 
 
  | 
 
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
   | @Resource private CartService cartService; @Autowired @Resource private UsersService usersService; @Autowired @Resource private JiancaiService jiancaiService;
 
  @RequestMapping("createCart.action") public String createCart() { 	List<Users> usersList = this.usersService.getAllUsers(); 	this.getRequest().setAttribute("usersList", usersList); 	List<Jiancai> jiancaiList = this.jiancaiService.getAllJiancai(); 	this.getRequest().setAttribute("jiancaiList", jiancaiList); 	return "admin/addcart"; }
 
  @RequestMapping("addCart.action") public String addCart(Cart cart) { 	this.cartService.insertCart(cart); 	return "redirect:/cart/createCart.action"; }
 
  @RequestMapping("deleteCart.action") public String deleteCart(String id) { 	this.cartService.deleteCart(id); 	return "redirect:/cart/getAllCart.action"; }
 
  @RequestMapping("deleteCartByIds.action") public String deleteCartByIds() { 	String[] ids = this.getRequest().getParameterValues("cartid"); 	for (String cartid : ids) { 		this.cartService.deleteCart(cartid); 	}
   | 
 
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 42 43 44 45 46 47 48
   | }
  // 推荐产品 	@RequestMapping("recommend.action") 	public String recommend(String number) { 		this.front(); 		Jiancai goods = new Jiancai(); 		goods.setRecommend("是"); 		List<Jiancai> flimList = new ArrayList<Jiancai>(); 		List<Jiancai> tempList = this.jiancaiService.getJiancaiByCond(goods); 		int pageNumber = tempList.size(); 		int maxPage = pageNumber; 		if (maxPage % 12 == 0) { 			maxPage = maxPage / 12; 		} else { 			maxPage = maxPage / 12 + 1; 		} 		if (number == null) { 			number = "0"; 		} 		int start = Integer.parseInt(number) * 12; 		int over = (Integer.parseInt(number) + 1) * 12; 		int count = pageNumber - over; 		if (count <= 0) { 			over = pageNumber; 		} 		for (int i = start; i < over; i++) { 			Jiancai x = tempList.get(i); 			flimList.add(x); 		} 		String html = ""; 		StringBuffer buffer = new StringBuffer(); 		buffer.append("  共为"); 		buffer.append(maxPage); 		buffer.append("页  共有"); 		buffer.append(pageNumber); 		buffer.append("条  当前为第"); 		buffer.append((Integer.parseInt(number) + 1)); 		buffer.append("页  "); 		if ((Integer.parseInt(number) + 1) == 1) { 			buffer.append("首页"); 		} else { 			buffer.append("<a href=\"index/recommend.action?number=0\">首页</a>"); 		} 		buffer.append("  "); 		if ((Integer.parseInt(number) + 1) == 1) { 			buffer.append("上一页"); 		} else {
   | 
 
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=291422322105200kj
https://javayms.pages.dev?id=291422322105200kj