基于B2C的西安回民街小吃在线订购系统

时间:2022-04-27
本文章向大家介绍基于B2C的西安回民街小吃在线订购系统,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

一、B2C简介   

B2C是Business-to-Customer的缩写,而其中文简称为“商对客”。“商对客”是电子商务的一种模式,也就是通常说的直接面向消费者销售产品和服务商业零售模式。这种形式的电子商务一般以网络零售业为主,主要借助于互联网开展在线销售活动。B2C即企业通过互联网为消费者提供一个新型的购物环境——网上商店,消费者通过网络在网上购物、网上支付等消费行为。

二、系统设计

本系统基于B/S模式,运用LAMP开发环境和B2C商务模式,设计回民街小吃在线销售系统的功能结构和数据库。具有登录注册、浏览、搜索、信息管理、订单管理、购物车管理、评论留言管理、权限管理等模块。

    1.1系统结构设计

(1)、注册登录

登录身份分为游客,会员和商家,每种身份具有不同的权限。

(2)、小吃浏览

可查看所有小吃的详细信息以便购买,在此模块采用异步加载的方式。

(3)、小吃搜索

根据关键字查询小吃信息

(4)、客户信息管理

客户可以在此界面编辑个人信息

(5)、订单管理

商家进行订单管理

1.2数据库设计

本系统数据库包含客户信息表、小吃分类表、小吃信息表、商家信息表、订单表等,详细结构如下。

客户信息表

create table client(
id int primary key AUTO_INCREMENT,
name varchar(128) not null,
password varchar(128) not null,
sex varchar(2) check(sex in('男','女')),
address varchar(128) not null,
reAdd varchar(128) not null,
phone varchar(15) not null
)engine=innoDB default charset=utf8;

收货地址表

create table receive_address(
id int primary key AUTO_INCREMENT,
clientID int not null,
address varchar(128) not null,
foreign key(clientID) references client(id) on delete cascade on update cascade)
engine=innoDB default charset=utf8;

商家信息表

create table store(
id int primary key AUTO_INCREMENT,
name varchar(128) not null,
address varchar(128) not null,
phone1 varchar(15) not null,
phone2 varchar(15),
tasComment float,
envComment float,
serComment float)engine=innoDB default charset=utf8;

食品分类表

create table food_type(
id int primary key AUTO_INCREMENT,
name varchar(128) not null)engine=innoDB default charset=utf8;

食品表

create table food(
id int primary key AUTO_INCREMENT,
name varchar(128) not null,
storeID int not null,
typeID int not null,
amount int not null,
code varchar(25) not null,
picture varchar(128) not null,
price float not null,
sales int not null,
foreign key(storeID) references store(id) on delete cascade on update cascade,
foreign key(typeID) references food_type(id) on delete cascade on update cascade)
engine=innoDB default charset=utf8;

订单表

create table orderT(
id int primary key AUTO_INCREMENT,
price float not null,
clientID int not null,
foreign key(clientID) references client(id) on delete cascade on update cascade)
engine=innoDB default charset=utf8;

订单项表

create table order_item(
id int primary key AUTO_INCREMENT,
price float not null,
orderID int,
foodID int,
foreign key(orderID) references orderT(id) on delete cascade on update cascade,
foreign key(foodID) references food(id) on delete cascade on update cascade)
engine=innoDB default charset=utf8;

客户评价表

create table comment(
id int primary key AUTO_INCREMENT,
content varchar(512) not null,
date datetime not null,
clientID int not null,
foodID int not null,
foreign key(clientID) references client(id) on delete cascade on update cascade,foreign key(foodID) references food(id) on delete 

cascade on update cascade)engine=innoDB default charset=utf8;

B2C在线销售系统是一种典型的Web电子商务系统,移动终端时代,信息高度简便迅捷,线下产业和线上结合已成为一种潮流,在地方性产业和日常生活的集聚点普及小型电子商务系统也是未来时代发展的一种常势。