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

简介: 鲜花商城|基于Springboot实现鲜花商城系统

项目编号:BS-SC-017

前言:

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


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

一,项目简介


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

用户模块:

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

但是重要权限受限制。

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

  管理员模块:

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

二,环境介绍


语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

后台开发:Springboot+Mybatis

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

三,系统展示


首页

33487099de294b3f9cfc65d963bb45c8.png

分类浏览

image.png

全文检索

image.png

品牌查询

image.png

详情浏览

image.png

相似性推荐

image.png

前端用户登陆

image.png

购物车查看

image.png

我的订单

image.png

收货地址管理

image.png

后台管理员管理

用户管理

image.png

轮播图管理

image.png

商品分类管理

image.png

商品品牌管理

image.png

商品管理

image.png

订单管理

image.png

统计报表

image.png

四,核心代码展示


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 {
    @Autowired
    private ProductMapper productMapper;
    /*得到所有已被销售商品的销售情况*/
    @RequestMapping(value = "/adminEachartzhu")
    @ResponseBody
    public List<TongjiVo> getAllXiaoshou(){
        System.out.println("柱状图数据统计请求");
        return productMapper.tongjiBing();
    }
    /*管理员权限查询近日订单金额*/
    @RequestMapping(value = "/getAllOrdersComeInByDate")
    @ResponseBody
    public List<TongjiVo> 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 {
    @Autowired
    private BrandService brandService;
    @Autowired
    private ProductTypeService productTypeService;
    @RequestMapping("/list")
    public String list( @RequestParam(defaultValue = "1") Integer pageNo,
                       @RequestParam(defaultValue = "5")Integer pageSize,
                       Model model){
        try {
            PageModel<Brand> 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<ProductType> 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<ProductType> 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")
    @ResponseBody
    public 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 {
    @Autowired
    private CarouselService service;
    @RequestMapping("/list")
    public String list(@RequestParam(defaultValue = "1") Integer pageNo,
                       @RequestParam(defaultValue = "5")Integer pageSize,
                       Model model){
        try {
            PageModel<Carousel> 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平台上进行编码。最后对各个部分进行多次测试完成网站检验。

相关文章
|
8月前
|
JavaScript Java 关系型数据库
基于springboot的项目管理系统
本文探讨项目管理系统在现代企业中的应用与实现,分析其研究背景、意义及现状,阐述基于SSM、Java、MySQL和Vue等技术构建系统的关键方法,展现其在提升管理效率、协同水平与风险管控方面的价值。
|
8月前
|
监控 安全 JavaScript
2025基于springboot的校车预定全流程管理系统
针对传统校车管理效率低、信息不透明等问题,本研究设计并实现了一套校车预定全流程管理系统。系统采用Spring Boot、Java、Vue和MySQL等技术,实现校车信息管理、在线预定、实时监控等功能,提升学校管理效率,保障学生出行安全,推动教育信息化发展。
|
8月前
|
JavaScript Java 关系型数据库
基于springboot的高校运动会系统
本系统基于Spring Boot、Vue与MySQL,实现高校运动会报名、赛程安排及成绩管理的全流程信息化,提升组织效率,杜绝信息错漏与冒名顶替,推动体育赛事智能化发展。
|
8月前
|
JavaScript 安全 Java
基于springboot的大学生兼职系统
本课题针对大学生兼职信息不对称、权益难保障等问题,研究基于Spring Boot、Vue、MySQL等技术的兼职系统,旨在构建安全、高效、功能完善的平台,提升大学生就业竞争力与兼职质量。
|
8月前
|
JavaScript Java 关系型数据库
基于springboot的美食城服务管理系统
本系统基于Spring Boot、Java、Vue和MySQL技术,构建集消费者服务、商家管理与后台监管于一体的美食城综合管理平台,提升运营效率与用户体验。
|
8月前
|
Java 关系型数据库 MySQL
基于springboot的网咖网吧管理系统
本文探讨了基于Java、MySQL和SpringBoot的网吧管理系统的设计与实现。随着信息化发展,传统管理方式难以满足需求,而该系统通过先进技术提升管理效率、保障数据安全、降低运营成本,具有重要意义。
|
8月前
|
JavaScript Java 关系型数据库
基于springboot的摄影师分享交流社区系统
本系统基于Spring Boot与Vue构建摄影师分享交流平台,旨在打造专业社区,支持作品展示、技术交流与合作互动。采用Java、MySQL等成熟技术,提升摄影爱好者创作水平,推动行业发展。
|
8月前
|
JavaScript 搜索推荐 Java
基于SpringBoot的社区老年食堂系统
针对老龄化社会饮食难题,智慧社区老年食堂系统应运而生。融合Spring Boot、Vue、Java与MySQL技术,实现餐饮服务智能化、个性化,提升老年人生活质量与幸福感,推动社区养老服务升级。
|
8月前
|
JavaScript 搜索推荐 Java
基于springboot的民宿预定管理系统
本研究针对民宿市场管理效率低、信息化程度不足等问题,设计并实现基于Spring Boot、Vue和MySQL的民宿预订管理系统。系统提升预订效率与用户体验,助力行业数字化转型。

热门文章

最新文章