介绍:spring+springmvc+mybatis+mysql+eclipse。
系统实现
前台管理
1)超市信息自定义。关于超市的信息介绍。
2)登录功能。如果是超市会员,填写用户名、密码即可享受商城服务。
3)注册功能。顾客首先要注册为超市的会员。
4)订单管理。会员可查看自己的消费情况。
5)浏览产品(产品介绍,能分类、分页显示)
6)购买产品(
添加到购物车(改数量,算总价,删除等功能)->购物结算->下订单)
7).注销登录
后台管理
1)用户管理(会员,管理员:查询、添加、修改、删除)
2)商品管理(查询、添加、修改、删除)
3)订单管理(所有订单、已付款订单、未完成订单、已取消订单)(修改、查询、删除订单)
4)信息管理(用户、商品)
5)注销登录
注:积分的等级级别管理都是代码中自动算好的,不需要添加什么管理模块
前台权限管理员是无法看到的,只能看后台。
截图:
数据库表:
CREATE TABLE admin
(
id
int(11) NOT NULL AUTO_INCREMENT,
adminName
varchar(255) DEFAULT NULL,
passWord
varchar(255) DEFAULT NULL,
phone
varchar(255) DEFAULT NULL,
isDelete
int(11) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
– Records of admin
INSERT INTO admin
VALUES (‘1’, ‘admin’, ‘000’, ‘13888888888’, ‘0’);
INSERT INTO admin
VALUES (‘2’, ‘testAdmin’, ‘123’, ‘13916456974’, ‘0’);
INSERT INTO admin
VALUES (‘3’, ‘111’, ‘111’, ‘139164569741’, ‘1’);
INSERT INTO admin
VALUES (‘4’, ‘adminTest001’, ‘000’, ‘13916456974’, ‘0’);
– Table structure for category
DROP TABLE IF EXISTS category
;
CREATE TABLE category
(
id
int(11) NOT NULL AUTO_INCREMENT,
cname
varchar(255) DEFAULT NULL,
isDelete
int(11) NOT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
– Records of category
INSERT INTO category
VALUES (‘1’, ‘酒’, ‘0’);
INSERT INTO category
VALUES (‘2’, ‘饮料’, ‘0’);
INSERT INTO category
VALUES (‘3’, ‘零食’, ‘0’);
INSERT INTO category
VALUES (‘4’, ‘水果’, ‘0’);
INSERT INTO category
VALUES (‘5’, ‘香烟’, ‘0’);
INSERT INTO category
VALUES (‘6’, ‘蔬菜’, ‘0’);
– Table structure for category_sec
DROP TABLE IF EXISTS category_sec
;
CREATE TABLE category_sec
(
id
int(11) NOT NULL AUTO_INCREMENT,
scname
varchar(255) DEFAULT NULL,
category_id
int(11) DEFAULT NULL,
isDelete
int(11) NOT NULL,
PRIMARY KEY (id
),
KEY FK_8rqto2vlsd7olxp64lkr2pk2u
(category_id
),
CONSTRAINT category_sec_ibfk_1
FOREIGN KEY (category_id
) REFERENCES category
(id
)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
– Table structure for order
DROP TABLE IF EXISTS order
;
CREATE TABLE order
(
id
int(11) NOT NULL AUTO_INCREMENT,
orderTime
datetime DEFAULT NULL,
status
int(11) DEFAULT NULL,
total
double(255,0) DEFAULT NULL,
uid
varchar(255) DEFAULT NULL,
isDelete
int(11) DEFAULT NULL,
userId
int(11) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
– Table structure for orderitem
DROP TABLE IF EXISTS orderitem
;
CREATE TABLE orderitem
(
id
int(11) NOT NULL AUTO_INCREMENT,
count
int(11) DEFAULT NULL,
subtotal
double(255,0) DEFAULT NULL,
orderId
int(11) DEFAULT NULL,
productId
int(11) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
– Records of orderitem
INSERT INTO orderitem
VALUES (‘1’, ‘1’, ‘11’, ‘1’, ‘62’);
INSERT INTO orderitem
VALUES (‘2’, ‘1’, ‘8’, ‘2’, ‘59’);
INSERT INTO orderitem
VALUES (‘3’, ‘1’, ‘12’, ‘3’, ‘57’);
INSERT INTO orderitem
VALUES (‘4’, ‘1’, ‘15’, ‘4’, ‘61’);
INSERT INTO orderitem
VALUES (‘5’, ‘2’, ‘32’, ‘6’, ‘44’);
INSERT INTO orderitem
VALUES (‘7’, ‘4’, ‘84’, ‘8’, ‘43’);
INSERT INTO orderitem
VALUES (‘8’, ‘10’, ‘70’, ‘11’, ‘58’);
INSERT INTO orderitem
VALUES (‘9’, ‘80’, ‘640’, ‘12’, ‘5’);
INSERT INTO orderitem
VALUES (‘10’, ‘1’, ‘40’, ‘13’, ‘45’);
INSERT INTO orderitem
VALUES (‘11’, ‘1’, ‘21’, ‘13’, ‘43’);