当前位置:   article > 正文

基于Springboot实现快消品商城管理系统_基于springboot的商城顾客管理平台

基于springboot的商城顾客管理平台

作者主页:编程千纸鹤

作者简介:Java、前端、Python开发多年,做过高程,项目经理,架构师

主要内容:Java项目开发、Python项目开发、大学数据和AI项目开发、单片机项目设计、面试技术整理、最新技术分享

收藏点赞不迷路  关注作者有好处

文末获得源码

 项目编号:BS-SC-048

一,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

开发技术:Springboot+HTML

二,项目简介

信息化技术在商业上的应用越来越突出,其中最典型的就是电商平台的大量使用,将传统的购物模式从线下搬到了线上,让商业和用户的距离更近,购买更方便,大大刺激了终端用户的消费。但与此同时也带来了商品信息爆炸给人们带来的选择困难及相关的干扰。如何能让用户在海量的商品数据中快速寻找到适合自己的商品,也一直是技术人员们力求解决的问题。随着大数据技术的发展以及各种推荐系统的应用,相关的推荐算法应用也越来越成熟,本课题就是主要研究如何通过电商平台实现为用户的商品推荐系统。

本系统主要以快消品的垂直电商平台为例进行研究,采用Java开发语言平台的相关技术,整体基于B/S的三层体系结构来进行开发,并同时使用MVC设计模式有效的前端代码和数据模型分离,有效的实现了系统的可重用性设计。具体系统的后台服务接口采用Springboot框架集成Mybatis框架来实现业务逻辑编程和服务接口开发,前端采用HTML和Ajax实现与后台的异步交互和数据展示。

这次设计基于Springboot实现的快消品商城网站,它的核心主要功能有前台功能模块,和后台功能模块。前台功能模块中,主要涉及和包含用户注册登陆 、个人订单管理模块、购物车管理模块等[24]。后台管理模块,主要涉及和包含有快消品分类管理模块(主要管理快消品分类信息),快消品信息管理模块(主要管理涉及到网站的快消品信息),用户管理模块(主要管理用户的基本信息),订单管理模块(主要管理前端用户生成的订单信息),品牌管理模块(主要管理快消品的品牌信息),销售统计模块(以图形报表的方式统计交易订单)等[18],

前端用户功能描述:

   1)注册登陆:商品推荐系统中的用户只有注册为会员,并在线登陆后才可以进行在线下单等相关的操作,它是一些需要授权模块操作的前提。

   2)分类浏览:用户在商品推荐系统中可以根据商品信息的分类来进行浏览,以便快速定位自己想要的商品。

   3)全文检索:主要提供以搜索关键词进行模糊查询匹配的商品搜索功能。

   4)购物车:用户可以将自己选中的商品临时添加到购物车中,它模拟了线下商场中的购物车功能,可以进行商品的增减。

   5)在线下单:完成商品的在线购物操作,下单时需要选择自己的收货地址。

   6)地址管理:主要管理会员自己的订单收货地址信息。

   7)个人订单:完成个人订单信息的基本管理操作,可以进行确认收货等操作。

   8)个人信息:主要是管理个人的基本信息和登陆密码等。

   后端管理用户功能描述:

  1. 用户管理:主要对前端注册的会员用户进行信息管理操作。
  2. 分类管理:主要对在线展示的商品信息更加方便的管理,物以类聚。
  3. 商品管理:对前端展示的售卖商品和推荐的商品进行管理操作。

   4)订单管理:对用户下单信息进行管理操作,可以根据订单处理的进度来修改订单状态。

   5)品牌管理:商品关联的有品牌信息,用户在前端也可以根据品牌进行查询。

   6)轮播图管理:管理前端展示的轮播广告图片。

   7)订单统计:主要以图形报表的形式来统计各类商品的销售情况,看看哪些是热销商品,目前实现饼状图和柱状图。

   8)个人密码修改:主要给管理提供一个修改密码的功能。

三,系统展示

首页

用户注册

用户登录

商品详情

购物车

订单

后台管理

四,核心代码展示

  1. package com.yw.eshop.controller.admin;
  2. import com.yw.eshop.domain.Brand;
  3. import com.yw.eshop.domain.ProductType;
  4. import com.yw.eshop.service.BrandService;
  5. import com.yw.eshop.service.ProductTypeService;
  6. import com.yw.eshop.utils.PageModel;
  7. import com.yw.eshop.service.BrandService;
  8. import com.yw.eshop.service.ProductTypeService;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.stereotype.Controller;
  11. import org.springframework.ui.Model;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RequestParam;
  14. import org.springframework.web.bind.annotation.ResponseBody;
  15. import java.util.List;
  16. @Controller
  17. @RequestMapping("/admin/brand")
  18. public class BrandController {
  19. @Autowired
  20. private BrandService brandService;
  21. @Autowired
  22. private ProductTypeService productTypeService;
  23. @RequestMapping("/list")
  24. public String list( @RequestParam(defaultValue = "1") Integer pageNo,
  25. @RequestParam(defaultValue = "5")Integer pageSize,
  26. Model model){
  27. try {
  28. PageModel<Brand> brandPages = brandService.queryBrandPages(pageNo, pageSize);
  29. model.addAttribute("brandPages", brandPages);
  30. } catch (Exception e) {
  31. e.printStackTrace();
  32. model.addAttribute("errMessage", "查询失败:"+e.getMessage());
  33. return "500";
  34. }
  35. return "admin/brand/list";
  36. }
  37. @RequestMapping("addPage")
  38. public String addPage(Model model){
  39. List<ProductType> productTypes= productTypeService.queryProductTypeAll();
  40. model.addAttribute("productTypes",productTypes);
  41. return "admin/brand/add";
  42. }
  43. @RequestMapping("/add")
  44. private String addBrand(Brand brand,Model model){
  45. try {
  46. int i = brandService.addBrand(brand);
  47. if (i==0){
  48. model.addAttribute("errMessage","服务器繁忙操作失败");
  49. return "500";
  50. }
  51. }catch (Exception e){
  52. model.addAttribute("errMessage",e.getMessage());
  53. return "500";
  54. }
  55. model.addAttribute("url", "admin/brand/list");
  56. return "success";
  57. }
  58. @RequestMapping("updatePage")
  59. public String updatePage(String id,Model model){
  60. Brand brand= brandService.queryBrandById(id);
  61. List<ProductType> productTypes= productTypeService.queryProductTypeAll();
  62. model.addAttribute("productTypes",productTypes);
  63. model.addAttribute("brand",brand);
  64. return "admin/brand/update";
  65. }
  66. @RequestMapping("/update")
  67. private String update(Brand brand,Model model){
  68. try {
  69. int i = brandService.updateBrand(brand);
  70. if (i==0){
  71. model.addAttribute("errMessage","服务器繁忙操作失败");
  72. return "500";
  73. }
  74. }catch (Exception e){
  75. model.addAttribute("errMessage",e.getMessage());
  76. return "500";
  77. }
  78. model.addAttribute("url", "admin/brand/list");
  79. return "success";
  80. }
  81. @RequestMapping("deletePage")
  82. public String deletePage(String id,Model model){
  83. model.addAttribute("id",id);
  84. return "admin/carousel/delete";
  85. }
  86. @RequestMapping("/delete")
  87. public String delete(String id, Model model){
  88. try {
  89. int i = brandService.delete(id);
  90. if (i==0){
  91. model.addAttribute("errMessage","服务器繁忙操作失败");
  92. return "500";
  93. }
  94. }catch (Exception e){
  95. model.addAttribute("errMessage",e.getMessage());
  96. return "500";
  97. }
  98. model.addAttribute("url", "admin/brand/list");
  99. return "success";
  100. }
  101. @RequestMapping("batchDel")
  102. @ResponseBody
  103. public String batchDel(String[] ids) {
  104. System.out.println("进来了");
  105. brandService.batchProductTypeDel(ids);
  106. return "/admin/brand/list";
  107. }
  108. }
  1. package com.yw.eshop.controller.admin;
  2. import com.yw.eshop.domain.Carousel;
  3. import com.yw.eshop.service.CarouselService;
  4. import com.yw.eshop.utils.PageModel;
  5. import com.yw.eshop.service.CarouselService;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.stereotype.Controller;
  8. import org.springframework.ui.Model;
  9. import org.springframework.web.bind.annotation.RequestMapping;
  10. import org.springframework.web.bind.annotation.RequestParam;
  11. @Controller
  12. @RequestMapping("/admin/carousel")
  13. public class CarouselController {
  14. @Autowired
  15. private CarouselService service;
  16. @RequestMapping("/list")
  17. public String list(@RequestParam(defaultValue = "1") Integer pageNo,
  18. @RequestParam(defaultValue = "5")Integer pageSize,
  19. Model model){
  20. try {
  21. PageModel<Carousel> CarouselPages = service.queryCarouselPages(pageNo, pageSize);
  22. model.addAttribute("CarouselPages", CarouselPages);
  23. } catch (Exception e) {
  24. e.printStackTrace();
  25. model.addAttribute("errMessage", "查询失败:"+e.getMessage());
  26. return "500";
  27. }
  28. return "admin/carousel/list";
  29. }
  30. @RequestMapping("addPage")
  31. public String addPage(){
  32. return "admin/carousel/add";
  33. }
  34. @RequestMapping("/add")
  35. public String add(Carousel carousel, Model model){
  36. try {
  37. int i = service.addCarousel(carousel);
  38. if (i==0){
  39. model.addAttribute("errMessage","服务器繁忙操作失败");
  40. return "500";
  41. }
  42. }catch (Exception e){
  43. model.addAttribute("errMessage",e.getMessage());
  44. return "500";
  45. }
  46. model.addAttribute("url", "admin/carousel/list");
  47. return "success";
  48. }
  49. @RequestMapping("updatePage")
  50. public String updatePage(String id,Model model){
  51. Carousel carousel=service.queryCarouselById(id);
  52. model.addAttribute("carousel",carousel);
  53. return "admin/carousel/update";
  54. }
  55. @RequestMapping("/update")
  56. public String update(Carousel carousel, Model model){
  57. try {
  58. int i = service.updateCarousel(carousel);
  59. if (i==0){
  60. model.addAttribute("errMessage","服务器繁忙操作失败");
  61. return "500";
  62. }
  63. }catch (Exception e){
  64. model.addAttribute("errMessage",e.getMessage());
  65. return "500";
  66. }
  67. model.addAttribute("url", "admin/carousel/list");
  68. return "success";
  69. }
  70. @RequestMapping("deletePage")
  71. public String deletePage(String id,Model model){
  72. model.addAttribute("id",id);
  73. return "admin/carousel/delete";
  74. }
  75. @RequestMapping("/delete")
  76. public String delete(String id, Model model){
  77. try {
  78. int i = service.delete(id);
  79. if (i==0){
  80. model.addAttribute("errMessage","服务器繁忙操作失败");
  81. return "500";
  82. }
  83. }catch (Exception e){
  84. model.addAttribute("errMessage",e.getMessage());
  85. return "500";
  86. }
  87. model.addAttribute("url", "admin/carousel/list");
  88. return "success";
  89. }
  90. }
  1. package com.yw.eshop.controller.admin;
  2. import com.yw.eshop.domain.*;
  3. import com.yw.eshop.service.*;
  4. import com.yw.eshop.domain.Order;
  5. import com.yw.eshop.domain.OrderProduct;
  6. import com.yw.eshop.domain.ReceiveAddress;
  7. import com.yw.eshop.domain.User;
  8. import com.yw.eshop.utils.PageModel;
  9. import com.yw.eshop.service.*;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.stereotype.Controller;
  12. import org.springframework.ui.Model;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RequestParam;
  15. import org.springframework.web.bind.annotation.ResponseBody;
  16. import java.util.List;
  17. /**
  18. * 后台订单处理控制器
  19. */
  20. @Controller
  21. @RequestMapping("admin/order")
  22. public class OrderController {
  23. @Autowired
  24. private ProductService productService;
  25. @Autowired
  26. private ProductTypeService productTypeService;
  27. @Autowired
  28. private OrderService orderService;
  29. @Autowired
  30. private OrderProductService orderProductService;
  31. @Autowired
  32. private UserService userService;
  33. @Autowired
  34. private ReceiveAddressService receiveAddressService;
  35. /**
  36. * 订单查询列表
  37. * @param pageNo
  38. * @param pageSize
  39. * @param id
  40. * @param model
  41. * @return
  42. */
  43. @RequestMapping("/list")
  44. public String list( @RequestParam(defaultValue = "1") Integer pageNo,
  45. @RequestParam(defaultValue = "5")Integer pageSize,
  46. String id,
  47. Model model){
  48. try {
  49. if(id==null || id.length()<=0){
  50. id=null;
  51. }
  52. PageModel<Order> orderPage = orderService.queryOrderPage(pageNo, pageSize, id);
  53. List<Order> orderList = orderPage.getList();
  54. for (Order order : orderList) {
  55. List<OrderProduct> orderProducts = orderProductService.queryOrderProByOrderId(order.getId());
  56. order.setList(orderProducts);
  57. User user = userService.queryUserById(order.getUserId());
  58. order.setUser(user);
  59. ReceiveAddress receiveAddress = receiveAddressService.queryAddressByID(order.getReceivingAddress());
  60. order.setReceiveAddress(receiveAddress);
  61. }
  62. orderPage.setList(orderList);
  63. model.addAttribute("id",id);
  64. model.addAttribute("orderPage",orderPage);
  65. } catch (Exception e) {
  66. e.printStackTrace();
  67. model.addAttribute("errMessage", "查询失败:"+e.getMessage());
  68. return "500";
  69. }
  70. return "admin/order/list";
  71. }
  72. /**
  73. * 更新订单状态
  74. * @param id
  75. * @param status
  76. * @param model
  77. * @return
  78. */
  79. @RequestMapping("update")
  80. private String update(String id,Integer status,Model model){
  81. try {
  82. int i = orderService.updateStatus(id,status);
  83. if (i==0){
  84. model.addAttribute("errMessage","服务器繁忙操作失败");
  85. return "500";
  86. }
  87. }catch (Exception e){
  88. model.addAttribute("errMessage",e.getMessage());
  89. return "500";
  90. }
  91. model.addAttribute("url", "admin/order/list");
  92. return "success";
  93. }
  94. /**
  95. *
  96. * @param id
  97. * @param model
  98. * @return
  99. */
  100. @RequestMapping("/delete")
  101. public String delete(String id, Model model){
  102. model.addAttribute("id", id);
  103. try {
  104. int i = orderService.delete(id);
  105. if (i==0){
  106. model.addAttribute("errMessage","服务器繁忙操作失败");
  107. return "500";
  108. }
  109. }catch (Exception e){
  110. model.addAttribute("errMessage",e.getMessage());
  111. return "500";
  112. }
  113. model.addAttribute("url", "admin/order/list");
  114. return "success";
  115. }
  116. /**
  117. * 批量删除订单
  118. * @param ids
  119. * @return
  120. */
  121. @RequestMapping("batchDel")
  122. @ResponseBody
  123. public String batchDel(String[] ids) {
  124. orderService.batchOrderDel(ids);
  125. return "/admin/order/list";
  126. }
  127. }

五,相关作品展示

基于Java开发、Python开发、PHP开发、C#开发等相关语言开发的实战项目

基于Nodejs、Vue等前端技术开发的前端实战项目

基于微信小程序和安卓APP应用开发的相关作品

基于51单片机等嵌入式物联网开发应用

基于各类算法实现的AI智能应用

基于大数据实现的各类数据管理和推荐系统

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/729821
推荐阅读
相关标签
  

闽ICP备14008679号