当前位置:网站首页>基于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
边栏推荐
- canvas鼠标控制重力js特效
- 2022上半年盘点:20+主流数据库重大更新及技术要点汇总
- 应届生毕业之后先就业还是先择业?
- Interview shock 60: what will cause MySQL index invalidation?
- K-line diagram interpretation and practical application skills (see position entry)
- Apache 解析漏洞(CVE-2017-15715)_漏洞复现
- 流批一体在京东的探索与实践
- 墨天轮沙龙 | 清华乔嘉林:Apache IoTDB,源于清华,建设开源生态之路
- Exch:exchange server 2013 is about to end support
- 小程序容器与物联网结合的方式
猜你喜欢

vue3 响应式数据库—— reactive

Design and principle of tubes responsive data system

5g has been in business for three years. Where will innovation go in the future?

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

水平视觉错误效果js特效代码

Rexroth hydraulic control check valve z2s10-1-3x/

同济、阿里的CVPR 2022最佳学生论文奖研究了什么?这是一作的解读

Servlet operation principle_ API details_ Advanced path of request response construction (servlet_2)

Post penetration file system + uploading and downloading files

Spin lock exploration
随机推荐
Cloud practice of key business migration of Internet of things by well-known Internet housing rental service companies
Exch:完整性检查 Database Integrity Checking
【义修换届大礼包】
【剑指Offer】52. 两个链表的第一个公共节点
[BJDCTF2020]The mystery of ip|[CISCN2019 华东南赛区]Web11|SSTI注入
canvas鼠标控制重力js特效
Send the injured baby for emergency medical treatment. Didi's driver ran five red lights in a row
编译生成busybox文件系统
Implementation of graduation project management system based on SSM
Animesr: learnable degradation operator and new real world animation VSR dataset
MIT science and Technology Review released the list of innovators under the age of 35 in 2022, including alphafold authors, etc
New research of HKUST & MsrA: about image to image conversion, finishing is all you need
广电5G正式启航,黄金频段将如何应用引关注
Spin lock exploration
Daily question brushing record (IX)
Key to understanding the trend of spot Silver
Ten thousand volumes - list sorting [01]
.NET ORM框架HiSql实战-第一章-集成HiSql
5g business is officially commercial. What are the opportunities for radio and television?
【二叉树】前序遍历构造二叉搜索树