介绍:
jsp+servlet+mysql+eclipse
功能:在前台模块中实现用户注册、用户登录、用户选购商品、用户修改购物车信息、生成订单、修改用户个人资料、查看商品购买记录等功能。在后台管理模块中实现管理员登录、会员管理、订单管理、商品管理、留言管理、公告管理、管理员管理以及管理员个人密码的修改。
截图:
数据库表:
CREATE TABLE tb_admin
(ID
int(4) NOT NULL AUTO_INCREMENT,AdminType
int(11) DEFAULT NULL,AdminName
varchar(50) DEFAULT NULL,LoginName
varchar(12) DEFAULT NULL,LoginPwd
varchar(12) DEFAULT NULL,
PRIMARY KEY (ID
),
KEY AdminType
(AdminType
),
CONSTRAINT tb_admin_ibfk_1
FOREIGN KEY (AdminType
) REFERENCES tb_admintype
(adminTypeId
)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
– Records of tb_admin
INSERT INTO tb_admin
VALUES (‘1’, ‘1’, ‘商品管理员’, ‘admin1’, ‘admin1’);
INSERT INTO tb_admin
VALUES (‘2’, ‘2’, ‘订单管理员’, ‘admin2’, ‘admin2’);
INSERT INTO tb_admin
VALUES (‘3’, ‘3’, ‘会员管理员’, ‘admin3’, ‘admin3’);
INSERT INTO tb_admin
VALUES (‘4’, ‘4’, ‘系统管理员’, ‘admin4’, ‘admin4’);
– Table structure for tb_admintype
DROP TABLE IF EXISTS tb_admintype
;
CREATE TABLE tb_admintype
(adminTypeId
int(11) NOT NULL AUTO_INCREMENT,adminTypeName
varchar(50) DEFAULT NULL,
PRIMARY KEY (adminTypeId
)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
– Records of tb_admintype
INSERT INTO tb_admintype
VALUES (‘1’, ‘商品管理员’);
INSERT INTO tb_admintype
VALUES (‘2’, ‘订单管理员’);
INSERT INTO tb_admintype
VALUES (‘3’, ‘会员管理员’);
INSERT INTO tb_admintype
VALUES (‘4’, ‘系统管理员’);
– Table structure for tb_goods
DROP TABLE IF EXISTS tb_goods
;
CREATE TABLE tb_goods
(bookId
int(11) NOT NULL AUTO_INCREMENT,superTypeId
int(11) DEFAULT NULL,subTypeId
int(11) DEFAULT NULL,goodsName
varchar(200) DEFAULT NULL,ISBN
varchar(20) DEFAULT NULL,introduce
text,price
float DEFAULT NULL,nowPrice
float DEFAULT NULL,picture
varchar(200) DEFAULT NULL,produceDate
varchar(20) DEFAULT NULL,publisher
varchar(40) DEFAULT NULL,author
varchar(20) DEFAULT NULL,inTime
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,newgoods
int(11) DEFAULT NULL,salegoods
int(11) DEFAULT NULL,hostgoods
int(11) DEFAULT NULL,specialgoods
int(11) DEFAULT NULL,goodsNum
int(11) DEFAULT NULL,
PRIMARY KEY (bookId
),
KEY subTypeId
(subTypeId
),
KEY superTypeId
(superTypeId
),
CONSTRAINT tb_goods_ibfk_1
FOREIGN KEY (subTypeId
) REFERENCES tb_subtype
(subTypeId
),
CONSTRAINT tb_goods_ibfk_2
FOREIGN KEY (superTypeId
) REFERENCES tb_supertype
(superTypeId
)
) ENGINE=InnoDB AUTO_INCREMENT=278 DEFAULT CHARSET=utf8;