鲜花商城|基于Springboot实现鲜花商城系统
创始人
2024-03-06 21:23:43
0

作者主页:编程千纸鹤

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

主要内容:Java项目开发、毕业设计开发、面试技术整理、最新技术分享

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

文末获得源码

项目编号:BS-SC-017

前言:

本文设计并实现的商城系统,通过互联网来实现电子商城这一新兴产业,电子商城主要依靠于计算机互联网技术。如果缺少了这个技术,就没有办法实现电子商城,如果要想完美实现,互联网技术就要有重大发展。这样,电子商城就带动了科技的巨大进步。用户就可以随时随地完成搜索商品、挑选商品、购买商品的全部过程。对于商家而言,网上购买商品有如下优点:不受场地限制、购买成本低、降低了风险、有利于更好的刺激用户去消费购买。对于消费者来说,网上购买商品有如下优点:价格便宜方便性、足不出户就能买到满意的商品。对商家而言,网上出售商品有如下优点:可以为商家节省了商店的租金、人力成本减少,最重要的是商品的价格也会大大降低。

本系统不同于传统的购物方式,用户使用起来更加方便,获得一个良好的购物体验。基于人们对美好生活的热爱,本电商系统主要以售卖鲜花为主。希望能通过本次毕业设计给自己四年大学所学的技术有一个很的总结,也希望通过这次毕业设计来检验和提升自己的技术能力。

一,项目简介

“花香”鲜花网店主要研究内容是引导用户挑选最适合自己的鲜花。使用户根据自身情况做出最科学的选择,选择最适合自己的鲜花。网店包括两种角色:用户、管理员。具体实现以下功能模块:

用户模块:

  1. 游客页面:网店最开始的页面,陈列了所有商品信息,任何人皆可访问。

但是重要权限受限制。

  1. 用户登录:用于实现用户登录功能,登录需要账号密码,若无则需注册。
  2. 网站首页:用户登录成功后跳转的页面,陈列了所有商品信息,用户具有一些重要权限。
  3. 物品搜索:用于输入物品名称(以及禁忌,好处等关键词)搜索相应物品。
  4. 物品详情:用于查看物品详情及下单购买。
  5. 订单管理:用于管理自己下单的物品。
  6. 个人中心:用于修改个人资料、登录密码、收货地址等。

   管理员模块:

  1. 用户管理:用于管理员对用户进行增删改查操作。
  2. 物品类别管理:用于管理员对物品类别进行增删改查操作。
  3. 物品管理:用于管理员对发布的物品进行查、删操作。
  4. 品牌管理:主要管理鲜花品牌信息
  5. 订单管理:用于取消订单,修改订单信息。
  6. 统计页面:用于统计各类鲜花的销售情况。
  7. 个人中心:用于管理员对自身信息的修改。

二,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

后台开发:Springboot+Mybatis

前端开发技术:HTML+Bootstrap+Jquery

三,系统展示

首页

 

分类浏览

全文检索

 

品牌查询

详情浏览

 

 相似性推荐

 

前端用户登陆

 

购物车查看

 

我的订单

收货地址管理

 

 

 

后台管理员管理

用户管理

 

轮播图管理

 

商品分类管理

商品品牌管理

 

 商品管理

 

订单管理

 统计报表

 

四,核心代码展示

package com.yw.eshop.controller.admin;import com.yw.eshop.domain.Product;
import com.yw.eshop.domain.TongjiVo;
import com.yw.eshop.mapper.ProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;import java.util.ArrayList;
import java.util.List;@Controller
@RequestMapping("/echart")
public class AdminTongjiController {@Autowiredprivate ProductMapper productMapper;/*得到所有已被销售商品的销售情况*/@RequestMapping(value = "/adminEachartzhu")@ResponseBodypublic List getAllXiaoshou(){System.out.println("柱状图数据统计请求");return productMapper.tongjiBing();}/*管理员权限查询近日订单金额*/@RequestMapping(value = "/getAllOrdersComeInByDate")@ResponseBodypublic List getAllOrdersComeInByDate(){System.out.println("管理员权限查询近日订单金额");return productMapper.tongjiZhu();}/*跳转到销售柱状图页面*/@RequestMapping(value = "/toadminEachartzhu")public String toAdminEchart(){return "/admin/echart/xiaoshouZhu";}/*跳转到销售饼状图页面*/@RequestMapping(value = "/toadminEachartBin")public String  toadminEachartzhu2(){return "/admin/echart/xiaoshouBin";}}

package com.yw.eshop.controller.admin;import com.yw.eshop.domain.Brand;
import com.yw.eshop.domain.ProductType;
import com.yw.eshop.service.BrandService;
import com.yw.eshop.service.ProductTypeService;
import com.yw.eshop.utils.PageModel;
import com.yw.eshop.service.BrandService;
import com.yw.eshop.service.ProductTypeService;
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.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;import java.util.List;@Controller
@RequestMapping("/admin/brand")
public class BrandController {@Autowiredprivate BrandService brandService;@Autowiredprivate ProductTypeService productTypeService;@RequestMapping("/list")public String list( @RequestParam(defaultValue = "1") Integer pageNo,@RequestParam(defaultValue = "5")Integer pageSize,Model model){try {PageModel brandPages = brandService.queryBrandPages(pageNo, pageSize);model.addAttribute("brandPages", brandPages);} catch (Exception e) {e.printStackTrace();model.addAttribute("errMessage", "查询失败:"+e.getMessage());return  "500";}return "admin/brand/list";}@RequestMapping("addPage")public String addPage(Model model){List productTypes= productTypeService.queryProductTypeAll();model.addAttribute("productTypes",productTypes);return "admin/brand/add";}@RequestMapping("/add")private String addBrand(Brand brand,Model model){try {int i = brandService.addBrand(brand);if (i==0){model.addAttribute("errMessage","服务器繁忙操作失败");return "500";}}catch (Exception e){model.addAttribute("errMessage",e.getMessage());return "500";}model.addAttribute("url", "admin/brand/list");return "success";}@RequestMapping("updatePage")public String updatePage(String id,Model model){Brand brand= brandService.queryBrandById(id);List productTypes= productTypeService.queryProductTypeAll();model.addAttribute("productTypes",productTypes);model.addAttribute("brand",brand);return "admin/brand/update";}@RequestMapping("/update")private String update(Brand brand,Model model){try {int i = brandService.updateBrand(brand);if (i==0){model.addAttribute("errMessage","服务器繁忙操作失败");return "500";}}catch (Exception e){model.addAttribute("errMessage",e.getMessage());return "500";}model.addAttribute("url", "admin/brand/list");return "success";}@RequestMapping("deletePage")public String deletePage(String id,Model model){model.addAttribute("id",id);return "admin/carousel/delete";}@RequestMapping("/delete")public String delete(String id, Model model){try {int i = brandService.delete(id);if (i==0){model.addAttribute("errMessage","服务器繁忙操作失败");return "500";}}catch (Exception e){model.addAttribute("errMessage",e.getMessage());return "500";}model.addAttribute("url", "admin/brand/list");return "success";}@RequestMapping("batchDel")@ResponseBodypublic String batchDel(String[] ids) {System.out.println("进来了");brandService.batchProductTypeDel(ids);return "/admin/brand/list";}
}

package com.yw.eshop.controller.admin;import com.yw.eshop.domain.Carousel;
import com.yw.eshop.service.CarouselService;
import com.yw.eshop.utils.PageModel;
import com.yw.eshop.service.CarouselService;
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.RequestParam;@Controller
@RequestMapping("/admin/carousel")
public class CarouselController {@Autowiredprivate CarouselService service;@RequestMapping("/list")public String list(@RequestParam(defaultValue = "1") Integer pageNo,@RequestParam(defaultValue = "5")Integer pageSize,Model model){try {PageModel CarouselPages = service.queryCarouselPages(pageNo, pageSize);model.addAttribute("CarouselPages", CarouselPages);} catch (Exception e) {e.printStackTrace();model.addAttribute("errMessage", "查询失败:"+e.getMessage());return  "500";}return "admin/carousel/list";}@RequestMapping("addPage")public String addPage(){return "admin/carousel/add";}@RequestMapping("/add")public String add(Carousel carousel, Model model){try {int i = service.addCarousel(carousel);if (i==0){model.addAttribute("errMessage","服务器繁忙操作失败");return "500";}}catch (Exception e){model.addAttribute("errMessage",e.getMessage());return "500";}model.addAttribute("url", "admin/carousel/list");return "success";}@RequestMapping("updatePage")public String updatePage(String id,Model model){Carousel carousel=service.queryCarouselById(id);model.addAttribute("carousel",carousel);return "admin/carousel/update";}@RequestMapping("/update")public String update(Carousel carousel, Model model){try {int i = service.updateCarousel(carousel);if (i==0){model.addAttribute("errMessage","服务器繁忙操作失败");return "500";}}catch (Exception e){model.addAttribute("errMessage",e.getMessage());return "500";}model.addAttribute("url", "admin/carousel/list");return "success";}@RequestMapping("deletePage")public String deletePage(String id,Model model){model.addAttribute("id",id);return "admin/carousel/delete";}@RequestMapping("/delete")public String delete(String id, Model model){try {int i = service.delete(id);if (i==0){model.addAttribute("errMessage","服务器繁忙操作失败");return "500";}}catch (Exception e){model.addAttribute("errMessage",e.getMessage());return "500";}model.addAttribute("url", "admin/carousel/list");return "success";}}

五,项目总结

 本网站的实现将经历软件的定义及规划、需求分析、软件设计、程序编码、软件测试这五个主要阶段。在软件的定义及规划和需求分析阶段对网站的需求进行分析并给出详细定义。通过软件设计阶段形成交互框架与视觉框架。之后进行详细设计,对概要设计进行细化。接着使用html,js,css进行前端设计,使用Spring Boot,Spring Security,Mybatis,Spring Mvc处理后端,最后结合MySql数据库,在idea平台上进行编码。最后对各个部分进行多次测试完成网站检验。

相关内容

热门资讯

AWSECS:访问外部网络时出... 如果您在AWS ECS中部署了应用程序,并且该应用程序需要访问外部网络,但是无法正常访问,可能是因为...
AWSElasticBeans... 在Dockerfile中手动配置nginx反向代理。例如,在Dockerfile中添加以下代码:FR...
银河麒麟V10SP1高级服务器... 银河麒麟高级服务器操作系统简介: 银河麒麟高级服务器操作系统V10是针对企业级关键业务...
北信源内网安全管理卸载 北信源内网安全管理是一款网络安全管理软件,主要用于保护内网安全。在日常使用过程中,卸载该软件是一种常...
AWR报告解读 WORKLOAD REPOSITORY PDB report (PDB snapshots) AW...
AWS管理控制台菜单和权限 要在AWS管理控制台中创建菜单和权限,您可以使用AWS Identity and Access Ma...
​ToDesk 远程工具安装及... 目录 前言 ToDesk 优势 ToDesk 下载安装 ToDesk 功能展示 文件传输 设备链接 ...
群晖外网访问终极解决方法:IP... 写在前面的话 受够了群晖的quickconnet的小水管了,急需一个新的解决方法&#x...
不能访问光猫的的管理页面 光猫是现代家庭宽带网络的重要组成部分,它可以提供高速稳定的网络连接。但是,有时候我们会遇到不能访问光...
Azure构建流程(Power... 这可能是由于配置错误导致的问题。请检查构建流程任务中的“发布构建制品”步骤,确保正确配置了“Arti...