项目编号:BS-SC-036

一,项目简介

系统整体介绍:

本系统主要基于Springboot框架开发实现,实现了一个以茶叶为主题的商城系统。在本商城系统中,可以实现在线购买酒水,在线支付,管理个人订单,管理个人收货地址,确认收货等功能。用户浏览商城的茶叶产品后可以将茶叶商品添加到购物车中,然后下单支付购买。用户登陆后可以在个人中心中管理自己的购物车信息、订单信息、收货地址信息等。同样在商城前端页面中提供了全文搜索功能,用户可以根据酒水的相关功效或禁忌来查询符合自己要的酒水商品。

系统同样提供了强大的后台管理系统,在后台管理模块中可以实现能前台注册用户的管理操作,可以管理所有用户的订单信息,根据订单支付情况进行发货等操作。同样可以管理产品的分类,可以管理商品的信息,以图文的形式来添加商品信息。为了更好了了解商品的销售情况,在后台使用echart实现了商品销售的图形报表和订单的统计报表功能。

系统使用了SpringSecurity框架来管理系统的用户登陆和权限认证操作,以保证系统的安全性。本系统功能完整,页面简洁大方,运行无误,适合做毕业设计使用。

相似性推荐:根据用户的浏览商品的相似性做协同过滤运算,从而给用户进行商品的推荐。

浏览记录查询:用户的浏览和搜索记录后台会进行记录,在用户进行搜索时会根据搜索关键词的总量进行排行,从而实现推荐的效果

二,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

后台开发技术:springboot+springmvc+mybatis+ Springsecurity

前台开发技术:jsp+jquery+ajax+bootstrap

三,系统展示

系统首页

分类展示

商品详情

全文检索:记录用户检索历史记录并可以根据历史记录来进行快速搜索

根据品牌进行搜索

相似性推荐:根据用户的浏览商品的相似性做协同过滤运算,从而给用户进行商品的推荐

用户注册

用户登陆

登陆后可以进行商品购买

下单后可个人中心可以查看我的订单,并可以取消订单

个人中心管理个人收货地址

后台管理员登陆

用户管理

轮播图管理

商品分类动态维护

商品品牌管理

商品管理

订单管理

图形统计报表

四,核心代码展示

package com.yw.eshop.controller.front;import com.yw.eshop.domain.Carousel;
import com.yw.eshop.domain.Product;
import com.yw.eshop.domain.ProductType;
import com.yw.eshop.domain.SearchHistory;
import com.yw.eshop.service.CarouselService;
import com.yw.eshop.service.ProductService;
import com.yw.eshop.service.ProductTypeService;
import com.yw.eshop.service.SearchHistoryService;
import com.yw.eshop.service.CarouselService;
import com.yw.eshop.service.ProductService;
import com.yw.eshop.service.ProductTypeService;
import com.yw.eshop.service.SearchHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;import java.util.List;/*** 前端首页控制接口*/
@Controller
@RequestMapping("/front")
public class FrontIndexController {@Autowired//轮播图private CarouselService carouselService ;@Autowired//商品类型private ProductTypeService productTypeService ;@Autowired//商品private ProductService productService ;@Autowiredprivate SearchHistoryService searchHistoryService;@RequestMapping("/index")public String index(Model model){//轮播图List<Carousel> carousels = carouselService.queryCarouselAll();model.addAttribute("allcarouselFigures",carousels);//分类List<ProductType> productTypes = productTypeService.queryProductTypeAll();model.addAttribute("allProductTypes",productTypes);//新品List<Product> newProducts = productService.queryNewProduct(6);model.addAttribute("newProducts", newProducts);//查询热搜词List<SearchHistory> searchHistorys = searchHistoryService.querySearchHistoryPages(10);model.addAttribute("searchHistorys",searchHistorys);//排行榜List<Product> rankings = productService.queryProductRankings();model.addAttribute("rankings", rankings);//白酒ProductType productType = new ProductType();productType.setProductTypeName("白酒");Product product = new Product();product.setProductType(productType);List<Product> list = productService.queryProductsByType(product, 5);model.addAttribute("list", list);//红酒productType.setProductTypeName("红酒");product.setProductType(productType);product.getProductType().setProductTypeName("红酒");List<Product> list2 = productService.queryProductsByType(product, 12);model.addAttribute("list2", list2);//洋酒productType.setProductTypeName("洋酒");product.setProductType(productType);List<Product> list3 = productService.queryProductsByType(product, 5);model.addAttribute("list3", list3);//养生酒productType.setProductTypeName("养生酒");product.setProductType(productType);List<Product> list4 = productService.queryProductsByType(product, 12);model.addAttribute("list4", list4);return "front/index/index";}
}
package com.yw.eshop.controller.front;import com.yw.eshop.domain.User;
import com.yw.eshop.service.UserService;
import com.yw.eshop.utils.EncryptionUtils;import com.yw.eshop.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;/*** 前端用户登陆退出*/
@Controller
@RequestMapping("/front/login")
public class FrontLoginController {@Autowiredprivate UserService userService;@RequestMapping("/loginPage")public String loginPage(){return "front/login";}@RequestMapping("/login")@ResponseBodypublic String login(String username, String password, String code, String autoLogin,HttpServletRequest request, HttpSession session, HttpServletResponse response){String code1 = (String) session.getAttribute("code");if(StringUtils.isEmpty(code)||!code.equalsIgnoreCase(code1)){return "验证码错误";}if(!StringUtils.isEmpty(username)){User user = userService.queryUserByName(username, 1);if(user==null){return "用户名不存在";}else {String psw1 = user.getPassword();if(psw1.equals(EncryptionUtils.encryptMD5(password))){System.out.println("登录成功");session.setAttribute("user",user);if(!StringUtils.isEmpty(autoLogin)&&autoLogin.equals("1")){Cookie username_cookie = new Cookie("username", username);username_cookie.setMaxAge(3600*24*7);username_cookie.setPath(request.getContextPath());response.addCookie(username_cookie);}else {Cookie username_cookie = new Cookie("username", username);username_cookie.setMaxAge(0);username_cookie.setPath(request.getContextPath());response.addCookie(username_cookie);}return "登录成功";}else {return "密码错误";}}}else {return "用户名为空";}}@RequestMapping("/logout")public void logout(HttpSession session,HttpServletRequest request,HttpServletResponse response) throws IOException {session.removeAttribute("user");Cookie[] cookies = request.getCookies();if(cookies!=null){for (Cookie cookie : cookies) {if ("username".equals(cookie.getName())) {cookie.setMaxAge(0);cookie.setPath(request.getContextPath());response.addCookie(cookie);}}}response.sendRedirect(request.getContextPath()+"/front/login/loginPage");}
}
package com.yw.eshop.controller.front;import com.yw.eshop.domain.Order;
import com.yw.eshop.domain.OrderProduct;
import com.yw.eshop.domain.User;
import com.yw.eshop.service.OrderProductService;
import com.yw.eshop.service.OrderService;
import com.yw.eshop.service.OrderProductService;
import com.yw.eshop.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;import javax.servlet.http.HttpSession;
import java.util.List;/*** 前台订单控制器*/
@Controller
@RequestMapping("front/order")
public class FrontOrderController {@Autowiredprivate OrderService orderService;@Autowiredprivate OrderProductService orderProductService;/*** 前台个人中心订单查询* @param session* @param model* @return*/@RequestMapping("index")private String index(HttpSession session, Model model){try {User user = (User) session.getAttribute("user");if (user == null) {return "redirect:/front/login/loginPage";} else {List<Order> list = orderService.queryAllOrder(user.getId());for (Order order : list) {List<OrderProduct> orderProducts = orderProductService.queryOrderProByOrderId(order.getId());order.setList(orderProducts);}model.addAttribute("list", list);return "front/order/order";}}catch (Exception e){e.printStackTrace();model.addAttribute("errMessage","服务器繁忙"+e.getMessage());return "500";}}/***  前台用户取消订单:条件是未发货状态* @param id* @param model* @return*/@RequestMapping("/delete")@ResponseBodypublic String delete(String id, Model model){model.addAttribute("id", id);try {int i = orderService.delete(id);if (i==0){model.addAttribute("errMessage","服务器繁忙操作失败");return "500";}}catch (Exception e){model.addAttribute("errMessage",e.getMessage());return "500";}//return "forward:/front/order/index";model.addAttribute("url", "/front/order/index");return "success";}/***  前台用户确认收货:条件是己发货状态* @param id* @param model* @return*/@RequestMapping("/update")@ResponseBodypublic String update(String id,Integer status, Model model){model.addAttribute("id", id);try {int i = orderService.updateStatus(id,status);if (i==0){model.addAttribute("errMessage","服务器繁忙操作失败");return "500";}}catch (Exception e){model.addAttribute("errMessage",e.getMessage());return "500";}//return "forward:/front/order/index";model.addAttribute("url", "/front/order/index");return "success";}
}
package com.yw.eshop.controller.front;import com.alibaba.fastjson.JSON;
import com.yw.eshop.domain.*;
import com.yw.eshop.service.*;
import com.yw.eshop.domain.*;
import com.yw.eshop.utils.UUIDUtils;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yw.eshop.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;import javax.servlet.http.HttpSession;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;/*** 购物车处理控制品接口*/
@Controller
@RequestMapping("front/shop_cart")
public class ShopCartController {@Autowiredprivate ReceiveAddressService receiveAddressService;@Autowiredprivate ShopCartProductService shopCartProductService;@Autowiredprivate ShopCartService shopCartService;@Autowiredprivate OrderService orderService;@Autowiredprivate OrderProductService orderProductService;@RequestMapping("/shopCart")public String index(HttpSession session, Model model){try{User user =(User) session.getAttribute("user");if (user ==null){return "redirect:/front/login/loginPage";}else {ShopCart shopCart=shopCartService.queryShopCartByUserID(user.getId());List<ReceiveAddress> receiveAddresses=receiveAddressService.queryAddressByUserID(user.getId());model.addAttribute("address",receiveAddresses);List<ShopCartProduct> list=shopCartProductService.queryCartProductAll(shopCart.getId());model.addAttribute("list",list);}return "front/shop_cart/shop_cart";}catch (Exception e){e.printStackTrace();model.addAttribute("errMessage","服务器繁忙"+e.getMessage());return "500";}}@RequestMapping("addProductToCart")@ResponseBodypublic String addProductToCart(HttpSession session, String product_id,Integer product_num) throws JsonProcessingException {Map map =new HashMap();try{User user =(User) session.getAttribute("user");if (user ==null){map.put("message","请登录后再操作");map.put("url","/front/login/loginPage");}else {ShopCart shopCart=shopCartService.queryShopCartByUserID(user.getId());ShopCartProduct shopCartProduct=new ShopCartProduct();Product product=new Product();product.setId(product_id);shopCartProduct.setProduct(product);shopCartProduct.setShopCart(shopCart);shopCartProduct.setProductNum(product_num);shopCartProductService.addShop(shopCartProduct);map.put("result",true);}}catch (Exception e){e.printStackTrace();map.put("message","添加失败"+e.getMessage());}ObjectMapper objectMapper = new ObjectMapper();String val = objectMapper.writeValueAsString(map);return val;}@RequestMapping("/deleteProduct")@ResponseBodypublic String delete(String id) throws JsonProcessingException {Map map =new HashMap();try {int i = shopCartProductService.deleteById(id);if (i==0){map.put("message","删除失败");}else {map.put("message","删除成功");map.put("result",true);}}catch (Exception e){e.printStackTrace();;map.put("message","删除失败:"+e.getMessage());}ObjectMapper objectMapper = new ObjectMapper();String val = objectMapper.writeValueAsString(map);System.out.println(val);return val;}@RequestMapping("/batchDel")@ResponseBodypublic String batchDel(String[] ids) throws JsonProcessingException {Map map =new HashMap();try {shopCartProductService.deleteAll(ids);map.put("message","删除成功");map.put("result",true);}catch (Exception e){e.printStackTrace();;map.put("message","删除失败:"+e.getMessage());}ObjectMapper objectMapper = new ObjectMapper();String val = objectMapper.writeValueAsString(map);System.out.println(val);return val;}@RequestMapping("compute")@ResponseBodypublic String compute(String products,String address_id,HttpSession session) throws JsonProcessingException {Map map =new HashMap();User user =(User) session.getAttribute("user");try {if (user ==null){map.put("message","请登录后再操作");map.put("url","/front/login/loginPage");}else {List<ProIdAndNum> proIdAndNums= JSON.parseArray(products,ProIdAndNum.class);Order order=new Order();String OrderProId=UUIDUtils.getId();order.setId(OrderProId);order.setCreateTime(new Date());order.setUserId(user.getId());ReceiveAddress receiveAddress = new ReceiveAddress();receiveAddress.setId(address_id);order.setReceiveAddress(receiveAddress);orderService.addOrderOne(order);ShopCart shopCart=shopCartService.queryShopCartByUserID(user.getId());for (ProIdAndNum proIdAndNum : proIdAndNums) {OrderProduct orderProduct=new OrderProduct();orderProduct.setId(UUIDUtils.getId());orderProduct.setOrder(order);Product product=new Product();product.setId(proIdAndNum.getId());orderProduct.setProduct(product);orderProduct.setProductNum(proIdAndNum.getNum());orderProductService.addOrdProOne(orderProduct);shopCartProductService.deleteShopCartBy(shopCart.getId(),proIdAndNum.getId());}map.put("message","结算成功");map.put("result",true);}}catch (Exception e){map.put("message","服务器繁忙:"+e.getMessage());}ObjectMapper objectMapper = new ObjectMapper();String val = objectMapper.writeValueAsString(map);System.out.println(val);return val;}}

五,项目总结

在目前电商为王的中国社会上,种类繁多的电子商务网站如雨后春笋般纷纷建立,百花齐鸣的发展态势可以在很大程度上,十分有效的解决原来时代的信息资源闭塞和地域上的限制[1]。网上交易代替了很多传统的线下消费,这种势头发展的越来越火热,而这一却都是伴随着用户的购买能力的提高,和IT信息化产业的发展以及新型互联网技术的应用[2]。

互联网以及移动互联网的普及应用,也使得消费者的消费路径更加快捷短暂,足不出户可一缆天下,一机在手可买遍全球。所以消费者基本上已经被新的消费模式所吸引,也具备了网络消费的应用水平。而对于广大的电商平台来讲,大而全的电商有之,小而美的电商也有自己的存活空间[3]。而最近这些年比较流行的垂直电商平台的崛起和应用,也让我们的用户可以直接找到自己所喜欢酒水的平台,进行点对点的消费,这就是我们进行酒水电商研究的一个基础背景[6]。

酒水商城|基于Springboot实现酒水商城系统相关推荐

  1. 鲜花商城|基于Springboot实现鲜花商城系统

    作者主页:编程千纸鹤 作者简介:Java.前端.Pythone开发多年,做过高程,项目经理,架构师 主要内容:Java项目开发.毕业设计开发.面试技术整理.最新技术分享 收藏点赞不迷路  关注作者有好 ...

  2. 零食商城|基于springboot的零食商城

    作者主页:编程千纸鹤 作者简介:Java.前端.Pythone开发多年,做过高程,项目经理,架构师 主要内容:Java项目开发.毕业设计开发.面试技术整理.最新技术分享 收藏点赞不迷路  关注作者有好 ...

  3. 毕业设计之基于springboot的开源商城系统

    一.介绍 本项目是一个基于springboot的开源商城系统 ,前后端分离. 二.功能模块 平台端 管理端 用户手机端 首页 会员 订单 商品 促销 店铺 运营 统计 设计 三.技术架构 前端 vue ...

  4. java基于springboot的网上商城购物系统

    项目介绍 随着社会的快速发展,计算机的影响是全面且深入的.人们生活水平的不断提高,日常生活中人们对网上商城购物系统方面的要求也在不断提高,购物的人数更是不断增加,使得网上商城购物系统的开发成为必需而且 ...

  5. (原创)基于springboot,vue宠物商城定制版v3.0

    (全新)基于springboot,vue宠物商城定制版v3.0 本人原创作品,用户前台.系统管理员后台项目完整,无任何bug. 每行代码都是本人自己写,我在代码上面都写有详细注释 开发工具:IDEA ...

  6. 基于Springboot 网上花店商城(源代码+数据库+报告) 010

    代码地址 https://gitee.com/ynwynwyn/SpringbootSchoolShop-public 基于Springboot 网上花店商城(源代码+数据库+报告) 一.系统介绍 包 ...

  7. 基于springboot+vue的食疗系统

    基于springboot+vue的食疗系统 ✌全网粉丝20W+,csdn特邀作者.博客专家.CSDN新星计划导师.java领域优质创作者,博客之星.掘金/华为云/阿里云/InfoQ等平台优质作者.专注 ...

  8. 基于springboot在线考试报名系统毕业设计源码031706

    在线考试报名系统 摘 要 随着计算机技术的迅猛发展,学校教学和管理的信息化发展也有长足的进步,考试也是一样.与传统的考试方式相比,网络考试报名系统极大地提高了考试的灵活性,并在许多领域已经有了广泛的应 ...

  9. 基于SpringBoot的企业OA系统的设计与实现,Java毕业设计项目,高质量毕业论文范例,源码,数据库脚本,项目导入运行视频教程,论文撰写教程

    目录 课题背景 项目技术栈 适合对象 适合课题 项目功能概述 高质量论文范例(附原图,可再次编辑和修改) 毕业设计撰写视频教程 部分运行截图 课题背景 82.7%的受访白领表示认为数字化技术极大地提高 ...

最新文章

  1. HTML5拖放(drag and drop)与plupload的懒人上传
  2. Linux keepalived
  3. 利用java实现的一个发送手机短信的小例子
  4. android 片段,android – 将片段添加到片段中(嵌套片段)
  5. matlab 角度转四元数_基于Matlab的机械臂路径规划
  6. 物联网摄像机通讯_网络调试助手
  7. linux 脚本调用企业微信_shell脚本实现企业微信报警
  8. 错误记录:自己创建activity时不能进行真机usb安装调试
  9. php命令行(cli)下相对路径的问题
  10. 用VC实现GIS系统基本功能
  11. 辗转相除求最大公约数,最大公倍数
  12. Download Android source code
  13. usb通讯——读《圈圈教你玩usb》
  14. 经典的股票/期货量化交易策略,拿来即用的Python策略源码
  15. Slick.AI | 人工智能在智慧环保应用案例
  16. 2020腾讯广告算法大赛——算法小白的复盘
  17. IDEA鼠标悬停显示注释
  18. Linux 音频驱动(五) ALSA音频驱动之PCM逻辑设备
  19. Java中tif转png,tif格式图片转换为gif、png、jpg格式(Java实战)
  20. 卡莱特led显示屏调试教程_卡莱特5A接收卡调屏步骤.doc

热门文章

  1. 网络工程师【软考】02
  2. MFC框架 afx_msg CComboBox OnDropdown
  3. android 4.4 蓝牙开发总结(电视盒子)
  4. 05月12日三支有望飙涨股与操盘策略分析
  5. python(六)动态网页爬虫
  6. 【论文阅读】SyncPerf: Categorizing, Detecting, and Diagnosing Synchronization Performance Bugs
  7. Datax-web版安装(含安装包)
  8. BZOJ 3894 文理分科
  9. HTML基础教程 插图
  10. 博达交换机S2528PB常用配置命令