IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> Java知识库 -> 基于SSM+Eclipse+MySQL的球鞋商城(SSM毕业设计源码)(SSM在线商城) -> 正文阅读

[Java知识库]基于SSM+Eclipse+MySQL的球鞋商城(SSM毕业设计源码)(SSM在线商城)

项目类型:JAVA WEB项目(B/S架构)

项目名称:基于SSM的球鞋商城

用户类型:2个角色(管理员+购物者)
系统类型:前端购物界面+后台管理
设计模式:SSM

界面外观:未使用框架(CSS+JS)
开发工具:Eclipse
数据库:Mysql+Navicat
数据库表:10张
适用:软件工程、计算机科学与技术等?

?作者介绍:计科学长,免费指导降低查重,定期发布高质量手工开发源码,提供课程设计和毕业设计的指导!双1流高校刚毕业的学长,曾经也是个小白!

关注回复? ?学生? ?免费get一套JavaWeb源码

关注回复? ?ppt? ? ?免费get 367套毕设答辩ppt模板

关注获取地址:其他项目以及项目来源

毕设选题参考——JavaWeb毕业设计源码大全(Jsp源码+Servlet源码+SSM源码+SpringBoot源码)(持续更新)

?免费ppt资源:

目录

球鞋购物网站功能介绍

购物首页

商品详情

登录界面

注册界面

购物车

结算

个人订单(可以发起退款,如果不退款,则等待管理员发货)

在线留言(使用了富文本)

后台管理功能介绍

后台首页

用户管理

二级分类管理

球鞋管理

球鞋信息编辑

订单管理

订单管理可以直接筛选出多找那个状态的订单信息,包括了付款、未付款、代发货等。

留言管理

商城发布公告

项目结构

数据库设计

部分代码展示(GoodsController.java)


球鞋购物网站功能介绍

购物首页

商品详情

登录界面

注册界面

购物车

结算

个人订单(可以发起退款,如果不退款,则等待管理员发货)

在线留言(使用了富文本)

后台管理功能介绍

后台首页

用户管理

二级分类管理

球鞋管理

球鞋信息编辑

订单管理

订单管理可以直接筛选出多找那个状态的订单信息,包括了付款、未付款、代发货等。

留言管理

商城发布公告

项目结构

数据库设计

部分代码展示(GoodsController.java)


@Controller
public class AdminController {
	@Autowired
	private UserService userService;
	@Autowired
	public CategoryService categoryService;
	@Autowired
	public CategorySecondService categorySecondService;
	@Autowired
	public ProductService productService;
	@Autowired
	private OrderService orderService;
	@Autowired
	private MessageService messageService;
	@Autowired
	private GonggaoMapper gonggaoMapper;
	@RequestMapping("/admin/admin_findAll")
	public String admin_findAll(Model model,HttpServletRequest request) throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		List<User> userList = userService.admin_findAll();
		model.addAttribute("userList", userList);
		return "admin/user/list";
	}

	@RequestMapping("/admin/adminCategory_findAll")
	public String adminCategory_findAll(Model model, HttpServletRequest request)
			throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		List<Category> categoryList = categoryService.adminbFindCategory();
		/*for (Category category : categoryList) {
			System.out.println(category.getCname());
		}*/
		model.addAttribute("categoryList", categoryList);
		return "admin/category/list";
	}

	@RequestMapping("/admin/adminCategory_add")
	public String adminCategory_add(Model model,HttpServletRequest request) throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
//		List<Category> categoryList = categoryService.adminbFindCategory();
//		model.addAttribute("categoryList", categoryList);
		return "admin/category/add";
	}

	@RequestMapping("/admin/adminCategory_save")
	public String adminCategory_save(@RequestParam String cname,HttpServletRequest request)
			throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		Category addCategory = new Category();
		addCategory.setCname(cname);
		categoryService.addCategory(addCategory);
		return "redirect:/admin/adminCategory_findAll.action";
	}

	@RequestMapping("/admin/adminCategory_edit")
	public String adminCategory_delete(@RequestParam int cid, Model model,HttpServletRequest request)
			throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		Category existCategory = categoryService.findCategory(cid);
		model.addAttribute("existCategory", existCategory);
		return "admin/category/edit";
	}

	@RequestMapping("/admin/adminCategory_update")
	public String adminCategory_update(@RequestParam int cid,
			@RequestParam String cname,HttpServletRequest request) {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		Category category = new Category();
		category.setCid(cid);
		category.setCname(cname);
		categoryService.adminCategory_update(category);
		return "redirect:/admin/adminCategory_findAll.action";
	}

	@RequestMapping("/admin/adminCategory_delete")
	public String adminCategory_delete(@RequestParam int cid,HttpServletRequest request) throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		categorySecondService.adminCategorySecond_deleteByCid(cid);
		categoryService.deleteCategoryByCid(cid);
		return "redirect:/admin/adminCategory_findAll.action";
	}

	// admin 的二级分类的管理
	@RequestMapping("/admin/adminCategorySecond_findAllByPage")
	public String adminCategorySecond_findAllByPage(@RequestParam int page,Model model,HttpServletRequest request) {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		PageBean<Categorysecond> csPageBean = categorySecondService
				.adminCategorySecond_findAllByPage(page);
		/*List<Categorysecond> list = csPageBean.getList();
		for (Categorysecond categorysecond : list) {
			System.out.println(categorysecond.getCsname());
		}*/
		model.addAttribute("csPageBean", csPageBean);
		return "admin/categorysecond/list";
	}
	@RequestMapping("admin/adminCategorySecond_addPage")
	public String adminCategorySecond_addPage(Model model,HttpServletRequest request) throws Exception{
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		List<Category> categoryList = categoryService.adminbFindCategory();
		model.addAttribute("categoryList", categoryList);
		return "admin/categorysecond/add";
	}
	@RequestMapping("admin/adminCategorySecond_save")
	public String adminCategorySecond_save(@RequestParam String csname,@RequestParam int cid,HttpServletRequest request) throws Exception{
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		Categorysecond categorysecond = new Categorysecond();
		categorysecond.setCsname(csname);
		categorysecond.setCid(cid);
		categorySecondService.adminCategorySecond_save(categorysecond);
		return "redirect:/admin/adminCategorySecond_findAllByPage.action?page=1";
	}
	@RequestMapping("admin/adminCategorySecond_edit")
	public String adminCategorySecond_edit(@RequestParam int csid,Model model,HttpServletRequest request) throws Exception{
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		Categorysecond findByCsid = categorySecondService.findByCsid(csid);
		model.addAttribute("findByCsid", findByCsid);
		return "admin/categorysecond/edit";
	}
	@RequestMapping("admin/adminCategorySecond_update")
	public String adminCategorySecond_update(@RequestParam String csname,@RequestParam int csid,HttpServletRequest request){
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		Categorysecond categorysecond = new Categorysecond();
		categorysecond.setCsname(csname);
		categorysecond.setCsid(csid);
		categorySecondService.adminCategorySecond_update(categorysecond);
		return "redirect:/admin/adminCategorySecond_findAllByPage.action?page=1";
	}
	@RequestMapping("admin/adminCategorySecond_delete")
	public String adminCategorySecond_delete(@RequestParam int csid,HttpServletRequest request) throws Exception{
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		categorySecondService.adminCategorySecond_delete(csid);
		return "redirect:/admin/adminCategorySecond_findAllByPage.action?page=1";
	}
	//admin的球鞋管理
	@RequestMapping("/admin/adminProduct_findAllByPage")
	public String adminProduct_findAllByPage(@RequestParam int page, Model model,HttpServletRequest request)
			throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		PageBean<Product> allProPageBean = productService.findAllProduct(page);
		model.addAttribute("allProPageBean", allProPageBean);
		return "admin/product/list";
	}

	@RequestMapping("/admin/adminProduct_addPage")
	public String adminProduct_addPage(Model model,HttpServletRequest request) throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		//查询出所有的二级分类
		List<Categorysecond> cslist = categorySecondService.findAll();
		/*for (Categorysecond categorysecond : cslist) {
			System.out.println(categorysecond.getCsname());
		}*/
		model.addAttribute("cslist", cslist);
		return "admin/product/add";
	}

	@RequestMapping("/admin/adminProduct_save")
	public String adminProduct_save(Product product,HttpServletRequest request,MultipartFile file) throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		product.setPdate(new Date());
//		上传图片
		if (file != null) {
			String path = request.getServletContext().getRealPath(
					"/products");
			String uploadFileName = file.getOriginalFilename();
			String fileName = UUIDUtiils.getUUID()+uploadFileName;
			File diskFile = new File(path + "//" + fileName);
			file.transferTo(diskFile);
			product.setImage("products/" + fileName);
		}
		System.out.println(product.getImage());
		productService.adminProduct_save(product);
		return "redirect:/admin/adminProduct_findAllByPage.action?page=1";
	}
	
	@RequestMapping("admin/adminProduct_deletecs")
	public String adminProduct_deletecs(@RequestParam int pid,HttpServletRequest request) throws Exception{
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		productService.adminProduct_deletecs(pid);
		return "redirect:/admin/adminProduct_findAllByPage.action?page=1";
	}
	/**
	 * 编辑球鞋
	 * 
	 * @param pid
	 * @param model
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("admin/adminProduct_edit")
	public String adminProduct_edit(@RequestParam int pid,Model model,HttpServletRequest request) throws Exception{
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		Product product = productService.finbProductByPid(pid);
		model.addAttribute("findByPid", product);
		//查询出所有的二级分类
		List<Categorysecond> cslist = categorySecondService.findAll();
		model.addAttribute("cslist", cslist);
		return "admin/product/edit";
	}
	
	@RequestMapping("/admin/adminProduct_update")
	public String adminProduct_update(Product product,HttpServletRequest request,MultipartFile file) throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		product.setPdate(new Date());
//		上传图片
		if (!file.isEmpty()) {
 			String path = request.getServletContext().getRealPath(
					"/products");
			String uploadFileName = file.getOriginalFilename();
			String fileName = UUIDUtiils.getUUID()+uploadFileName;
			File diskFile = new File(path + "//" + fileName+".jpg");
			file.transferTo(diskFile);
			product.setImage("products/" + fileName+".jpg");
		}
		 
		productService.adminProduct_update(product);
		return "redirect:/admin/adminProduct_findAllByPage.action?page=1";
	}

	/** 订单管理模块  **/
	
	@RequestMapping("/admin/adminOrder_findAllByPage")
	public String adminOrder_findAllByPage(@RequestParam int page, Model model,HttpServletRequest request)
			throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		
		PageBean<Orders> allProPageBean = orderService.findAllOrderByStateAndPage(page);
		model.addAttribute("pageBean", allProPageBean);
		return "admin/order/list";
	}
	
	//adminOrder_findByState
	@RequestMapping("/admin/adminOrder_findByState")
	public String adminOrder_findByState(@RequestParam int page,@RequestParam int state, Model model,HttpServletRequest request)
			throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		
		PageBean<Orders> allProPageBean = orderService.findAllOrderByStateAndPage(state,page);
		model.addAttribute("pageBean", allProPageBean);
		return "admin/order/list";
	}
	
	//订单详情
	//adminOrder_findOrderItem
	@RequestMapping("/admin/adminOrder_findOrderItem")
	public String adminOrder_findOrderItem(@RequestParam int oid, Model model,HttpServletRequest request)
			throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		
		Orders orderItems = orderService.findOrderByOid(oid);
		model.addAttribute("orderItems", orderItems);
		return "admin/order/list";
	}
	
	//更新订单状态
	@RequestMapping("/admin/adminOrder_updateState")
	public String adminOrder_updateState(@RequestParam int oid, @RequestParam int status, Model model,HttpServletRequest request)
			throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		
		orderService.updateOrderStatus(oid, status);
		
		return "redirect:/admin/adminOrder_findAllByPage.action?page=1";
	}
	
	//后台留言管理 
	@RequestMapping("/admin/adminMessage_findAllByPage")
	public String adminMessage_findAllByPage(@RequestParam int page, Model model,HttpServletRequest request)
			throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		
		PageBean<Message> pageBean = messageService.findAllMessageByPage(page);
		model.addAttribute("pageBean", pageBean);
		
		return "admin/message/list";
	}
	
	@RequestMapping("/admin/adminMessage_delete")
	public String adminOrder_updateState(@RequestParam int messageid, Model model,HttpServletRequest request)
			throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		
		messageService.deleteMessage(messageid);
		
		return "redirect:/admin/adminMessage_findAllByPage.action?page=1";
	}
	
	
	// 显示留言板全部留言
	@RequestMapping("/admin/adminGonggao_findAllByPage")
	public String adminGonggao_findAllByPage(@RequestParam int page, Model model,
			HttpServletRequest request) throws Exception {
		PageBean<Gonggao> pageBean = new PageBean<>();
//		设置这是第几页
		pageBean.setPage(page);
//		设置4个
		int limitPage =4;
		pageBean.setLimitPage(limitPage);
//		设置一共多少页
		int totlePage = 0;
//		查询一共有多少页
		;
		totlePage = (int) gonggaoMapper.countByExample(new GonggaoExample());
		if(Math.ceil(totlePage % limitPage)==0){
			totlePage=totlePage / limitPage;
		}else{
			totlePage=totlePage / limitPage+1;
		}
		pageBean.setTotlePage(totlePage);
		int beginPage= (page-1)*limitPage;
		GonggaoExample example = new GonggaoExample();
		example.setLimit(limitPage);
		if(beginPage<0)beginPage=0;
		example.setOffset(beginPage);
		//球鞋集合
		List<Gonggao> list = gonggaoMapper.selectByExample(example) ;
		pageBean.setList(list);
			model.addAttribute("pageBean", pageBean);
		return "/admin/gonggao/list";
	} 
	
	@RequestMapping("/admin/adminGonggao_delete")
	public String adminGonggao_delete(@RequestParam int id, Model model,HttpServletRequest request)
			throws Exception {
		Adminuser adminuserLogin = (Adminuser) request.getSession().getAttribute("adminuserLogin");
		if(adminuserLogin==null){
			request.getSession().setAttribute("message","对不起您还没有登录");
			return "admin/index";
		}
		GonggaoExample example = new GonggaoExample();
		Criteria criteria = example.createCriteria();
		criteria.andIdEqualTo(id);
		gonggaoMapper.deleteByExample(example);
 		
		return "redirect:/admin/adminGonggao_findAllByPage.action?page=1";
	}

毕设选题参考——JavaWeb毕业设计源码大全(Jsp源码+Servlet源码+SSM源码+SpringBoot源码)(持续更新)

  Java知识库 最新文章
计算距离春节还有多长时间
系统开发系列 之WebService(spring框架+ma
springBoot+Cache(自定义有效时间配置)
SpringBoot整合mybatis实现增删改查、分页查
spring教程
SpringBoot+Vue实现美食交流网站的设计与实
虚拟机内存结构以及虚拟机中销毁和新建对象
SpringMVC---原理
小李同学: Java如何按多个字段分组
打印票据--java
上一篇文章      下一篇文章      查看所有文章
加:2021-10-09 16:08:22  更:2021-10-09 16:09:28 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/23 21:38:00-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码