介绍:
jsp,servlet,mysql,Navicat,eclipse
效果截图:
数据库表:
CREATE TABLE tab_category
(
cid
int(11) NOT NULL AUTO_INCREMENT,
cname
varchar(100) NOT NULL,
PRIMARY KEY (cid
),
UNIQUE KEY AK_nq_categoryname
(cname
)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
– Records of tab_category
INSERT INTO tab_category
VALUES (‘8’, ‘全球自由行’);
INSERT INTO tab_category
VALUES (‘5’, ‘国内游’);
INSERT INTO tab_category
VALUES (‘4’, ‘处境游’);
INSERT INTO tab_category
VALUES (‘7’, ‘抱团定制’);
INSERT INTO tab_category
VALUES (‘6’, ‘港澳游’);
INSERT INTO tab_category
VALUES (‘2’, ‘酒店’);
INSERT INTO tab_category
VALUES (‘1’, ‘门票’);
INSERT INTO tab_category
VALUES (‘3’, ‘香港车票’);
– Table structure for tab_favorite
DROP TABLE IF EXISTS tab_favorite
;
CREATE TABLE tab_favorite
(
rid
int(11) NOT NULL,
date
date NOT NULL,
uid
int(11) NOT NULL,
PRIMARY KEY (rid
,uid
),
KEY FK_user_favorite
(uid
),
CONSTRAINT FK_route_favorite
FOREIGN KEY (rid
) REFERENCES tab_route
(rid
),
CONSTRAINT FK_user_favorite
FOREIGN KEY (uid
) REFERENCES tab_user
(uid
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
– Records of tab_favorite
INSERT INTO tab_favorite
VALUES (‘1’, ‘2019-04-16’, ‘1’);
INSERT INTO tab_favorite
VALUES (‘1’, ‘2019-06-27’, ‘7’);
INSERT INTO tab_favorite
VALUES (‘2’, ‘2019-04-16’, ‘1’);
INSERT INTO tab_favorite
VALUES (‘2’, ‘2019-06-27’, ‘7’);
INSERT INTO tab_favorite
VALUES (‘26’, ‘2019-06-27’, ‘7’);
– Table structure for tab_route
DROP TABLE IF EXISTS tab_route
;
CREATE TABLE tab_route
(
rid
int(11) NOT NULL AUTO_INCREMENT,
rname
varchar(500) NOT NULL,
price
double NOT NULL,
routeIntroduce
varchar(1000) DEFAULT NULL,
rflag
char(1) NOT NULL,
rdate
varchar(19) DEFAULT NULL,
isThemeTour
char(1) NOT NULL,
count
int(11) DEFAULT ‘0’,
cid
int(11) NOT NULL,
rimage
varchar(200) DEFAULT NULL,
sid
int(11) DEFAULT NULL,
sourceId
varchar(50) DEFAULT NULL,
PRIMARY KEY (rid
),
UNIQUE KEY AK_nq_sourceId
(sourceId
),
KEY FK_category_route
(cid
),
KEY FK_seller_route
(sid
),
CONSTRAINT FK_category_route
FOREIGN KEY (cid
) REFERENCES tab_category
(cid
),
CONSTRAINT FK_seller_route
FOREIGN KEY (sid
) REFERENCES tab_seller
(sid
)
) ENGINE=InnoDB AUTO_INCREMENT=514 DEFAULT CHARSET=utf8;
源码下载:http://www.bycxy123.com/
视频演示:https://www.bilibili.com/video/BV1r7411h7bG/