当前位置:网站首页>基于SSH的网上商城设计
基于SSH的网上商城设计
2022-06-30 16:38:00 【biyezuopinvip】
资源下载地址:https://download.csdn.net/download/sheziqiong/85836171
资源下载地址:https://download.csdn.net/download/sheziqiong/85836171
目 录
摘 要 1
ABSTRACT 2
第一章 绪论 5
1.1 课题背景 5
1.2 目的和意义 5
1.3 系统设计思想 6
第二章 系统开发工具及技术背景 7
2.1 系统运行平台设置 7
2.1.1硬件环境 7
2.1.2软件环境 7
2.2 开发工具及技术简介 7
2.2.1开发工具简介 7
2.2.2技术简介 8
第三章 系统分析 9
3.1 可行性分析 9
3.1.1经济可行性 9
3.1.2技术可行性 9
3.1.3运行可能性 9
3.2 需求分析 9
3.2.1服务需求 9
3.2.2购物主流程 9
3.3 功能分析 10
3.3.1系统前台功能需求 10
3.3.2系统后台功能需求 11
第四章 数据库设计 12
4.1 数据分析 12
4.2 数据库的详细设计 12
4.2.1数据库E-R图 12
4.2.2数据库表 13
第五章 详细设计与实现 16
5.1 系统前台基本功能设计与实现 16
5.1.1注册 16
5.1.2登录和验证 18
5.1.3用户注销 19
5.1.4商品展示模块设计与实现 19
5.1.5购物车模块的设计与实现 20
5.1.7查看订单模块的设计与实现 22
5.2 系统后台管理功能设计与实现 23
5.2.1基本信息管理设计与实现 23
5.2.2订单信息管理设计与实现 23
5.2.3商品信息管理设计与实现 24
第六章 系统测试与性能分析 25
6.1 前台首页的测试 25
6.2 购物车模块的测试 25
6.3 用户注册模块的测试 26
6.4 商品管理模块的测试 26
6.4.1添加功能的测试 26
6.4.2删除功能的测试 27
第七章 结论 28
参考文献 29
致 谢 30
第四章 数据库设计
对于一个电子商务网站而言,为了支持较大的访问量带来的数据访问需求,使用桌面型的数据库管理系统是不能满足需要的,而且安全性也没有充分保障。因此,需要使用大型商业化企业级服务用途的数据库管理系统,如Mysql,Oracle等。本系统采用Mysql 数据库管理系统。
4.1 数据分析
对于本系统的数据库的需求而言,由于其主要是用于信息的提供、保存、更新和查询等。因此,需要分析该系统功能所隐含的对数据应用的需求,从而确定数据库的结构。
1)用户注册、登录、验证等功能需要对用户信息建立数据表,其中的数据项可能包括用户E_mail、昵称、密码、住址等;
2)查看商品分类信息和商品详细信息等功能既需要对商品大小类别进行管理,也需要针对每一个商品进行管理,因此至少需要两张数据表;
3)用户购物后产生的订单需要进行管理,这里也包括订单的基本信息和详细信息等;
4)订单生成后,在订单处理的过程中,需要出货等,因此可能需要记录订单的发送情况;
5)需要系统管理员对该系统进行管理,因而需要建立管理员信息数据表,其中的数据项包括管理员ID、密码等。
这样,至少要创建如下的数据结构和数据项
1)用户信息,包括用户ID,用户名等数据项;
2)管理员信息,包括管理员ID,密码等数据项;
3)商品信息,包括商品ID,产品名称、单价、特价等数据项;
4)商品一级类别信息,包括电子ID,类别名称等数据项;
5)商品二级类别信息,包括电子ID,类别名称等数据项;
6)订单信息,包括订单ID,用户编号,订货地址等数据项;
7)订单明细信息,包括订单ID,商品ID,订货时间等数据项;
4.2 数据库的详细设计
4.2.1 数据库E-R图
图4.1 数据库E-R图
部分代码:
package cn.itcast.shop.index.action;
import java.util.List;
import cn.itcast.shop.category.service.CategoryService;
import cn.itcast.shop.category.vo.Category;
import cn.itcast.shop.product.service.ProductService;
import cn.itcast.shop.product.vo.Product;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
/** * 首页访问的Action * * @author Kang * */
public class IndexAction extends ActionSupport {
/** * 注入一级分类的service */
private static final long serialVersionUID = 1L;
private CategoryService categoryService;
//注入ProductService
private ProductService productService;
public void setCategoryService(CategoryService categoryService) {
this.categoryService = categoryService;
}
public void setProductService(ProductService productService) {
this.productService = productService;
}
/** * 执行的访问首页的方法: */
public String execute() {
// 查询所有一级分类的方法
List<Category> cList = categoryService.findAll();
// 将一级分类的数据存入到session的范围
ActionContext.getContext().getSession().put("cList", cList);
//查询热门商品
List<Product> hList=productService.findHot();
//保存到值栈中去
ActionContext.getContext().getValueStack().set("hList", hList);
//查询最新商品
List<Product> nList=productService.findNew();
//保存到值栈中
ActionContext.getContext().getValueStack().set("nList", nList);
return "index";
}
}



















资源下载地址:https://download.csdn.net/download/sheziqiong/85836171
资源下载地址:https://download.csdn.net/download/sheziqiong/85836171
边栏推荐
- Apache 解析漏洞(CVE-2017-15715)_漏洞复现
- 5G商用三年,未来创新何去何从?
- TFTP下载kernel,nfs挂载文件系统
- 【网易云信】播放demo构建:无法将参数 1 从“AsyncModalRunner *”转换为“std::nullptr_t”**
- A tough battle for Tencent cloud
- 编写C语言的最简单小程序Hello world
- Inventory in the first half of 2022: summary of major updates and technical points of 20+ mainstream databases
- How can you choose to work in the county after graduation?
- 6 張圖帶你搞懂 TCP 為什麼是三次握手?
- Exch:完整性检查 Database Integrity Checking
猜你喜欢

基于SSH的通讯网络电子计费系统

Apache parsing vulnerability (cve-2017-15715)_ Vulnerability recurrence

TFTP下载kernel,nfs挂载文件系统

Exploration and practice of "flow batch integration" in JD

Zero foundation can also be an apple blockbuster! This free tool can help you render, make special effects and show silky slides

Course design for the end of the semester: product sales management system based on SSM

广电5G正式启航,黄金频段将如何应用引关注

基于SSM的新闻管理系统

Simulation of campus network design based on ENSP

4 years of working experience, and you can't tell the five communication modes between multithreads. Can you believe it?
随机推荐
Mo Tianlun salon | Tsinghua qiaojialin: Apache iotdb, originated from Tsinghua, is building an open source ecological road
流批一体在京东的探索与实践
Daily question brushing record (IX)
Send the injured baby for emergency medical treatment. Didi's driver ran five red lights in a row
Post penetration file system + uploading and downloading files
【机器学习】K-means聚类分析
4 years of working experience, and you can't tell the five communication modes between multithreads. Can you believe it?
5g has been in business for three years. Where will innovation go in the future?
MSF后渗透总结
Cloud practice of key business migration of Internet of things by well-known Internet housing rental service companies
Canvas cloud shape animation
【义修换届大礼包】
Servlet operation principle_ API details_ Advanced path of request response construction (servlet_2)
Implementation of graduation project management system based on SSM
Importing alicloud ECS locally to solve deployment problems
编写C语言的最简单小程序Hello world
Flutter custom component
6 張圖帶你搞懂 TCP 為什麼是三次握手?
Solution: STM32 failed to parse data using cjson
阿里云ECS导入本地,解决部署的问题