鲜花商城|基于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平台上进行编码。最后对各个部分进行多次测试完成网站检验。

相关内容

热门资讯

前端-session、jwt 目录:   (1)session (2&#x...
linux入门---制作进度条 了解缓冲区 我们首先来看看下面的操作: 我们首先创建了一个文件并在这个文件里面添加了...
关于测试,我发现了哪些新大陆 关于测试 平常也只是听说过一些关于测试的术语,但并没有使用过测试工具。偶然看到编程老师...
前缀和与对数器与二分法 1. 前缀和 假设有一个数组,我们想大量频繁的去访问L到R这个区间的和,...
nodejs:本地安装nvm实... 一、背景-使用不同版本node的原因 vue3+ts、nuxt3版本,node...
JAVA集合知识整理 Java集合知识整理 HashMap相关 HashMap的底层数据结构:jdk1.8之...
无刷直流电机介绍及单片机控制实... 无刷直流电机介绍及单片机控制实例前言基本概念优势与劣势使用寿命基本结构使用单片机控制实例电子调速器&...
fwdiary(2) dp2 1.传纸条  AcWing 275. 传纸条 - AcWing 走两条路,走一条最大的...
常用的DOS命令 常用的DOS命令 DOS(Disk Operating System,磁...
<C++> 类和对象(下) 1.const成员函数将const修饰的“成员函数”称之为const成员函数,cons...