项目编号:BS-SC-033

前言:

随着互联网技术逐渐的深入到生活,网站形式的展示窗口,已经成为大众迫切的需要。论文中的SSM网上商城购物网站专门是基于B/S模式建立起来的,为用户专门研发的一个易操作界面舒适的网上商城交易网站。

SSM网上商城交易网站使用JSP技术制作网站动态页面,使用IDEA为系统开发工具,使用SSM框架作为系统的后台开发框架,使用BootStrap作为系统的前端开发框加,系统数据库则使用My SQL数据库进行数据存储,开发一个网上商城交易网站,主要研究的功能是分为前台与后台两大部分,前台要实现的是用户注册之后登陆可以浏览商品的功能,还有实现在线商品信息查询功能、购物车加入功能、订单查询功能、用户进入个人中心发布商品功能、在线留言功能和已经出售的订单的查询和管理等功能。后台主要是实现管理员对网站的用户信息管理、商品类别类别管理、网站新闻管理等信息管理的功能,实现一个基于买卖双方的网上商城交易网站。

SSM网上商城交易网站借助于Internet互联网应用技术,实现资源共享,借助网络平台形式的展示窗口,让客户更易接受此网上商城交易网站,并且打破以往购买商品的局限性,缩短用户找商品的时间,具有较好的交互性,从而实现信息化、规范化和系统化。

一,项目简介

该系统主要分为汽车配件商城,以汽车配件为主题的在线商城系统,系统分为前后端,前台功能主要包括用户的登录注册、查询商品、购物车管理、用户信息管理、收藏商品、评价、收货地址管理以及订单管理。后台主要包括商品分类管理、客户信息管理、商品管理、订单管理、评论管理、销售统计以及系统设置。 本系统所采用的技术是SSM框架,整体功能需实现完整,功能界面较为精美。完成了一个较为完整的商城销售系统。

二,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

后台开发技术:SSM

前台开发技术:layui+jquery+echarts

三,系统展示

前端系统用户操作功能

商品详情

购物车下单

个人中心

己购买商品

我的收藏

我的评价

收货地址管理

后台管理操作功能

配件分类

客户管理

商品管理

订单管理

评论管理

统计报表

四,核心代码展示

package com.itlb.controller;import java.util.Date;
import java.util.HashMap;
import java.util.Map;import org.apache.commons.lang.StringUtils;
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.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;import com.itlb.service.AccountService;
import com.itlb.util.Page;
import com.itlb.entity.Account;/*** 客户管理控制器* @author Administrator**/
@RequestMapping("/admin/account")
@Controller
public class AccountController {@Autowiredprivate AccountService accountService;/*** 客户列表页* @param model* @return*/@RequestMapping(value="/list",method=RequestMethod.GET)public ModelAndView list(ModelAndView model){model.setViewName("admin/account");return model;}/*** 查询客户列表* @param name* @param page* @return*/@RequestMapping(value="/list",method=RequestMethod.POST)@ResponseBodypublic Map<String, Object> list(@RequestParam(value="name",defaultValue="")String name,@RequestParam(value="sex",defaultValue="")Integer sex,@RequestParam(value="status",defaultValue="")Integer status,Page page){Map<String, Object> ret = new HashMap<String, Object>();Map<String, Object> queryMap = new HashMap<String, Object>();queryMap.put("name", name);if(sex != null){queryMap.put("sex", sex);}if(status != null){queryMap.put("status", status);}queryMap.put("offset", page.getOffset());queryMap.put("pageSize", page.getRows());ret.put("rows", accountService.findList(queryMap));ret.put("total", accountService.getTotal(queryMap));return ret;}/*** 添加客户* @param account* @return*/@RequestMapping(value="/add",method=RequestMethod.POST)@ResponseBodypublic Map<String, Object> add(Account account){Map<String, Object> ret = new HashMap<String, Object>();if(account == null){ret.put("type", "error");ret.put("msg", "请填写正确的客户信息");return ret;}if(StringUtils.isEmpty(account.getName())){ret.put("type", "error");ret.put("msg", "请填写客户名称");return ret;}if(StringUtils.isEmpty(account.getPassword())){ret.put("type", "error");ret.put("msg", "请填写客户登录密码!");return ret;}if(isExist(account.getName(), 0l)){ret.put("type", "error");ret.put("msg", "该用户名已存在!");return ret;}account.setCreateTime(new Date());if(accountService.add(account) <= 0){ret.put("type", "error");ret.put("msg", "添加失败,请联系管理员!");return ret;}ret.put("type", "success");ret.put("msg", "添加成功!");return ret;}/*** 编辑客户* @param account* @return*/@RequestMapping(value="/edit",method=RequestMethod.POST)@ResponseBodypublic Map<String, Object> edit(Account account){Map<String, Object> ret = new HashMap<String, Object>();if(account == null){ret.put("type", "error");ret.put("msg", "请填写正确的客户信息");return ret;}if(StringUtils.isEmpty(account.getName())){ret.put("type", "error");ret.put("msg", "请填写客户名称");return ret;}if(StringUtils.isEmpty(account.getPassword())){ret.put("type", "error");ret.put("msg", "请填写客户登录密码!");return ret;}if(isExist(account.getName(), account.getId())){ret.put("type", "error");ret.put("msg", "该用户名已存在!");return ret;}if(accountService.edit(account) <= 0){ret.put("type", "error");ret.put("msg", "添加失败,请联系管理员!");return ret;}ret.put("type", "success");ret.put("msg", "编辑成功!");return ret;}/*** 删除客户* @param id* @return*/@RequestMapping(value="/delete",method=RequestMethod.POST)@ResponseBodypublic Map<String, Object> delete(Long id){Map<String, Object> ret = new HashMap<String, Object>();if(id == null){ret.put("type", "error");ret.put("msg", "请选择要删除的客户");return ret;}try {if(accountService.delete(id) <= 0){ret.put("type", "error");ret.put("msg", "删除失败,请联系管理员!");return ret;}} catch (Exception e) {// TODO: handle exceptionret.put("type", "error");ret.put("msg", "该客户下存在订单信息,不允许删除!");return ret;}ret.put("type", "success");ret.put("msg", "删除成功!");return ret;}/*** 检查用户名是否存在* @param name* @param id* @return*/private boolean isExist(String name,Long id){Account account = accountService.findByName(name);if(account == null)return false;if(account.getId().longValue() == id.longValue())return false;return true;}
}
package com.itlb.controller;import java.util.Date;
import java.util.HashMap;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.apache.commons.lang.StringUtils;
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.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;import com.itlb.service.AccountService;
import com.itlb.service.AddressService;
import com.itlb.util.MenuUtil;
import com.itlb.entity.Account;
import com.itlb.entity.Address;
import com.itlb.service.ProductCategoryService;
import com.itlb.service.ProductService;/*** 前台收货地址控制器* @author Administrator**/
@RequestMapping("/address")
@Controller
public class AddressController {@Autowiredprivate AccountService accountService;@Autowiredprivate ProductCategoryService productCategoryService;@Autowiredprivate ProductService productService;@Autowiredprivate AddressService addressService;/*** 收货地址列表页面* @param model* @return*/@RequestMapping(value = "/list",method = RequestMethod.GET)public ModelAndView index(ModelAndView model,HttpServletRequest request){model.addObject("productCategoryList", MenuUtil.getTreeCategory(productCategoryService.findList(new HashMap<String, Object>())));model.addObject("allCategoryId","shop_hd_menu_all_category");Account onlineAccount = (Account)request.getSession().getAttribute("account");Map<String, Object> queryMap = new HashMap<String, Object>();queryMap.put("userId", onlineAccount.getId());model.addObject("addressList", addressService.findList(queryMap));model.addObject("currentUser", "current_");model.setViewName("home/address/list");return model;}/*** 添加收货地址* @param account* @return*/@RequestMapping(value = "/add",method = RequestMethod.POST)@ResponseBodypublic Map<String, String> add(Address address,HttpServletRequest request){Map<String, String> ret = new HashMap<String, String>();Account onlineAccount = (Account)request.getSession().getAttribute("account");ret.put("type", "error");if(address == null){ret.put("msg", "请选择正确的收货信息");return ret;}if(StringUtils.isEmpty(address.getName())){ret.put("msg", "请填写收货人!");return ret;}if(StringUtils.isEmpty(address.getAddress())){ret.put("msg", "请填写收货地址!");return ret;}if(StringUtils.isEmpty(address.getPhone())){ret.put("msg", "请填写手机号!");return ret;}address.setUserId(onlineAccount.getId());address.setCreateTime(new Date());if(addressService.add(address) <= 0){ret.put("msg", "添加失败,请联系管理员!");return ret;}ret.put("type", "success");return ret;}@RequestMapping(value = "/edit",method = RequestMethod.POST)@ResponseBodypublic Map<String, String> edit(Address address,HttpServletRequest request){Map<String, String> ret = new HashMap<String, String>();Account onlineAccount = (Account)request.getSession().getAttribute("account");ret.put("type", "error");if(address == null){ret.put("msg", "请选择正确的收货信息");return ret;}Address existAddress = addressService.findById(address.getId());if(existAddress == null){ret.put("msg", "不存在该地址!");return ret;}if(StringUtils.isEmpty(address.getName())){ret.put("msg", "请填写收货人!");return ret;}if(StringUtils.isEmpty(address.getAddress())){ret.put("msg", "请填写收货地址!");return ret;}if(StringUtils.isEmpty(address.getPhone())){ret.put("msg", "请填写手机号!");return ret;}address.setUserId(onlineAccount.getId());if(addressService.edit(address) <= 0){ret.put("msg", "编辑失败,请联系管理员!");return ret;}ret.put("type", "success");return ret;}/*** 删除收货地址* @param favoriteId* @return*/@RequestMapping(value = "/delete",method = RequestMethod.POST)@ResponseBodypublic Map<String, String> delete(Long id){Map<String, String> ret = new HashMap<String, String>();ret.put("type", "error");if(id == null){ret.put("msg", "请选择要删除的地址");return ret;}if(addressService.delete(id) <= 0){ret.put("msg", "删除出错,请联系管理员!");return ret;}ret.put("type", "success");return ret;}}
package com.itlb.controller;import java.util.Date;
import java.util.HashMap;
import java.util.Map;import javax.servlet.http.HttpServletRequest;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.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;import com.itlb.service.AccountService;
import com.itlb.service.AddressService;
import com.itlb.util.MenuUtil;
import com.itlb.entity.Account;
import com.itlb.entity.Product;
import com.itlb.entity.Cart;
import com.itlb.service.ProductCategoryService;
import com.itlb.service.ProductService;
import com.itlb.service.CartService;/*** 前台购物车控制器* @author Administrator**/
@RequestMapping("/cart")
@Controller
public class CartController {@Autowiredprivate AccountService accountService;@Autowiredprivate ProductCategoryService productCategoryService;@Autowiredprivate ProductService productService;@Autowiredprivate CartService cartService;@Autowiredprivate AddressService addressService;/*** 购物车列表页面* @param model* @return*/@RequestMapping(value = "/list",method = RequestMethod.GET)public ModelAndView list(ModelAndView model,HttpServletRequest request){model.addObject("productCategoryList", MenuUtil.getTreeCategory(productCategoryService.findList(new HashMap<String, Object>())));model.addObject("allCategoryId","shop_hd_menu_all_category");Account onlineAccount = (Account)request.getSession().getAttribute("account");Map<String, Object> queryMap = new HashMap<String, Object>();queryMap.put("userId", onlineAccount.getId());model.addObject("cartList", cartService.findList(queryMap));model.addObject("currentCart", "current_");model.setViewName("home/cart/list");return model;}/*** 提交订单第二步* @param model* @param request* @return*/@RequestMapping(value = "/list_2",method = RequestMethod.GET)public ModelAndView list2(ModelAndView model,HttpServletRequest request){model.addObject("productCategoryList", MenuUtil.getTreeCategory(productCategoryService.findList(new HashMap<String, Object>())));model.addObject("allCategoryId","shop_hd_menu_all_category");Account onlineAccount = (Account)request.getSession().getAttribute("account");Map<String, Object> queryMap = new HashMap<String, Object>();queryMap.put("userId", onlineAccount.getId());model.addObject("cartList", cartService.findList(queryMap));model.addObject("currentCart", "current_");model.addObject("addressList", addressService.findList(queryMap));model.setViewName("home/cart/list_2");return model;}/*** 添加购物车* @param account* @return*/@RequestMapping(value = "/add",method = RequestMethod.POST)@ResponseBodypublic Map<String, String> add(Cart cart,HttpServletRequest request){Map<String, String> ret = new HashMap<String, String>();Account onlineAccount = (Account)request.getSession().getAttribute("account");ret.put("type", "error");if(cart == null){ret.put("msg", "请选择正确的商品信息");return ret;}if(cart.getProductId() == null){ret.put("msg", "请选择要添加的商品!");return ret;}if(cart.getNum() == 0){ret.put("msg", "请填写商品数量");return ret;}Product product = productService.findById(cart.getProductId());if(product == null){ret.put("msg", "商品不存在");return ret;}//根据商品和用户去查询该商品是否已被添加到购物车Map<String, Long> queryMap = new HashMap<String, Long>();queryMap.put("userId", onlineAccount.getId());queryMap.put("productId", product.getId());Cart existCart = cartService.findByIds(queryMap);if(existCart != null){//表示这个商品已经被添加到购物车,只需更新数量和金额即可existCart.setNum(existCart.getNum() + cart.getNum());existCart.setMoney(existCart.getNum() * existCart.getPrice());if(cartService.edit(existCart) <= 0){ret.put("msg", "商品已被添加到购物车,但更新数量出错!");return ret;}ret.put("type", "success");return ret;}cart.setImageUrl(product.getImageUrl());cart.setMoney(product.getPrice() * cart.getNum());cart.setName(product.getName());cart.setPrice(product.getPrice());cart.setUserId(onlineAccount.getId());cart.setCreateTime(new Date());if(cartService.add(cart) <= 0){ret.put("msg", "添加失败,请联系管理员!");return ret;}ret.put("type", "success");return ret;}/*** 更新购物车商品数量* @param cartId* @param num* @return*/@RequestMapping(value = "/update_num",method = RequestMethod.POST)@ResponseBodypublic Map<String, String> updateNum(Long cartId,Integer num){Map<String, String> ret = new HashMap<String, String>();ret.put("type", "error");Cart cart = cartService.findById(cartId);if(cart == null){ret.put("msg", "请选择正确的商品信息");return ret;}if(num == null){ret.put("msg", "请填写商品数量");return ret;}Product product = productService.findById(cart.getProductId());if(product == null){ret.put("msg", "购物车信息有误!");return ret;}if(cart.getNum() + num.intValue() > product.getStock()){ret.put("msg", "商品数量不能超过库存量!");return ret;}cart.setNum(cart.getNum() + num);cart.setMoney(cart.getNum() * cart.getPrice());if(cartService.edit(cart) <= 0){ret.put("msg", "商品已被添加到购物车,但更新数量出错!");return ret;}ret.put("type", "success");return ret;}/*** 删除购物车商品* @param cartId* @return*/@RequestMapping(value = "/delete",method = RequestMethod.POST)@ResponseBodypublic Map<String, String> delete(Long cartId){Map<String, String> ret = new HashMap<String, String>();ret.put("type", "error");if(cartId == null){ret.put("msg", "请选择要删除的商品");return ret;}if(cartService.delete(cartId) <= 0){ret.put("msg", "删除出错,请联系管理员!");return ret;}ret.put("type", "success");return ret;}}

五,项目总结

在当前社会上,许多的各种类型的电子商务类网站纷纷建立,可以很大程度上的解决人们信息资源的闭塞以及地域上的限制[1]。网上交易成为了当代人们业余生活的一大热门,伴随着用户的购买能力的提高和新型互联网技术的应用。

目前大部分的高校已经建立自己的校园网,而部分院校也完成了校园网络工程的建设,校园网的建成为学校的学生、老师、后勤部门等学校各方面人士提供了非常大的便利,例如学习、工作和生活上的交流便利[2]。随着计算机网络技术、通信技术和数据库技术的迅速发展,基于网络技术的电子商务也发展的非常迅速。而实现大学生之间的网上交易的主要平台是校园论坛还有微博,校园论坛虽然用户非常多,但是提供的功能有限,用户不能详细的了解商品的有关信息,更不能快速的查询所需商品,无法让学生实际交易的需求得到最大的满足。

选题:基于SSM框架实现汽车配件商城系统相关推荐

  1. 基于SSM框架的服饰商城系统的设计与实现(文末附源码)

    摘要 现如今我们处于大数据时代,我们对网上商城的概念并不感到生疏,随着互联网科技的发展,网络在人们生活中的运用越来越广泛,网上购物已经成为了现代购物的主流趋势.网上购物具有多种选择.性价比高等优势,网 ...

  2. 计算机毕业设计ssm基于SSM框架的中医养生系统i9830系统+程序+源码+lw+远程部署

    计算机毕业设计ssm基于SSM框架的中医养生系统i9830系统+程序+源码+lw+远程部署 计算机毕业设计ssm基于SSM框架的中医养生系统i9830系统+程序+源码+lw+远程部署 本源码技术栈: ...

  3. 软件工程课程设计·SOA架构搭建SSM框架的网上商城系统

    软件工程课程设计·SOA架构搭建SSM框架的网上商城系统 项目简介 本系统利用SSM框架.Dubbo框架.Maven模块化开发等技术开发的一个网上商城项目,主要包括订单系统模块.购物车系统模块.搜索系 ...

  4. 基于SSM框架的外卖订餐系统

    基于SSM框架的外卖订餐系统(Bug已修复) 本系统是基于SSM框架的外卖订餐系统,前端使用JSP页面,BootStrap框架,JQuery框架,后端使用SSM框架进行设计,数据库使用MySQL数据库 ...

  5. 基于SSM框架的OA办公系统

    在线OA办公系统,毕设项目 基于SSM框架的OA办公系统,毕设项目 软件功能说明 环境搭建 开发环境 组件描述 源代码.资源及数据清单 源代码与数据导入 安装包及数据清单 用户操作说明 项目演示视频 ...

  6. 基于SSM框架的健身房会员系统

    基于SSM框架的健身房会员系统 本系统是基于SSM框架的健身房会员系统,前端使用HTML页面,BootStrap框架,JQuery框架, 后端使用SSM框架,数据库使用MySQL数据库,用户实现课程查 ...

  7. 基于SSM框架搭建的论坛系统

    基于SSM框架搭建的论坛系统 页面展示: 主页 帖子页面 论坛数据库设计 SSM框架搭建 RootConfig.java WebConfig.java WebInit.java 配置po模型 User ...

  8. java基于SSM框架的洗车店预约系统的设计与实现

    基于SSM框架的洗车店预约系统的设计与实现 #### 开发工具(eclipse/idea): eclipse4.5/4.8或者idea2018,jdk1.8 * * * 洗车店预约系统设计了注册会员和 ...

  9. 帮忙写基于SSM框架的购物商城管理系统

    SSM(Spring+SpringMVC+MyBatis)框架集由Spring.MyBatis两个开源框架整合而成(SpringMVC是Spring中的部分内容).常作为数据源较简单的web项目的框架 ...

最新文章

  1. java中怎样判断余数为3,Java的基础语法(三): 运算符
  2. [19/04/04-星期四] IO技术_CommonsIO(通用IO,别人造的轮子,FileUtils类 操作文件 IOUtilsl类 操作里边的内容 )...
  3. mysql 2003报错_为什么不建议在 MySQL 中使用 UTF-8?
  4. Java并发编程的基础-线程的终止原理
  5. 智能实验室-全能优化(Guardio) 4.0.0.670 beta 8
  6. 通用的N-Tier模型合理么?
  7. 磁盘阵列——RAID0制作方法
  8. C语言排序方法------堆排序
  9. 康奈尔大学研究员发现“代码投毒”攻击,可触发供应链攻击
  10. 类与对象- 课后作业1
  11. ECMAScript5新增Array方法forEach的实现
  12. 数据结构——>稀疏数组
  13. Atitit 数据表 资料整理 常见希腊罗马北欧神话神仙与中国对照表 目录1. 神仙体系 12. 神仙分类 13. 印度大神top10 23.1. 神仙列表约70个大神 21.神仙体
  14. Java电子签章验章知识储备
  15. Dreammaker水疗流行的Eclipse从他们的加州系列,审议
  16. ZOJ Yukari's Birthday
  17. 基于C51单片机的万年历设计(LCD1602显示)
  18. 窗口切换_Sinno_Song_新浪博客
  19. C++设计模式 温故知新李建忠(BooLan、GeekBand)
  20. python用outlook自动发邮件_python调用outlook发送exchange邮件(含附件)

热门文章

  1. 笔记本光驱位换SSD固态硬盘之Ghost克隆原来的系统到SSD固态硬盘分区
  2. 微信小程序 - 生成二维码
  3. 判定表测试用例方法——实例
  4. Quartus器件库下载地址
  5. python模拟春节集五福_新年福利来一波之Python轻松集齐五福(demo)
  6. 苹果最近删除的照片删除怎么恢复?专业人士都这样恢复照片!
  7. 归并排序与快速排序背后的秘密
  8. 【真·一篇就够了】网络优秀博文汇总
  9. linux開啟虛擬機命令,Linux系统入门之虚拟机与常用指令学习
  10. ue4小白人骨骼定义_UE4同一结构的骨架之间动画共享。