jQuery EasyUI_03 快速入门 购物车项目搭建(实现流程)

目录

一、我们应该做哪些准备工作呢?

二、MVC模式代码

三、JSP部分(组件导入的部分)      


   前言:本文内容有关于的是有网页基础(HTML+Css+Js)jQuery、Oracle、javaweb(servlet)、Map集合、List集合以及网页无刷新技术Ajax、EasyUI等基础知识。

        综合性知识较强,属于开发思维。

一、我们应该做哪些准备工作呢?

        实现效果:

jQuery EasyUI效果展示

        需要安装的:

                 安装JDK和Eclipse         安装Oracle        安装和配置Tomcat       

        1.首先编写sql语句(本文我们用的Oracle数据库)

/*权限表(菜单表)*/


--作用:显示菜单(本文中包含:一级菜单、二级菜单)
--创建表
create table tb_promission
(
	--唯一的编号
    id number primary key,--权限id
    text varchar2(100) not null,--权限名称
    --一级菜单
    pid number not null,--权限父级id
    --图标文件的路径
    icon varchar2(100),--菜单显示的icon
    --jsp界面
    url varchar2(100),--权限资源路径
    state number,--状态;该记录是否有效1:有效、0:无效
    --用于排序
    sort number--排序码
)

--提交	作用:由于我们项目在通过Oracle数据库显示数据时,
--由于Oracle数据是在创好项目后面的增加数据或者修改删除数据的时候,可能会导致没有更新数据的情况,这种情况下需要运行commit
commit;

--为表格中插入数据
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(1,'店铺管理',-1,'','',1,1);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(2,'图书分类管理',-1,'','',1,2);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(3,'图书管理',-1,'','',1,3);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(4,'订单管理',-1,'','',1,4);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(5,'系统设置',-1,'','',1,5);

insert into tb_promission(id,text,pid,icon,url,state,sort) values
(6,'店铺添加',1,'','/addshop.jsp',1,6);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(7,'店铺列表',1,'','/shopList.jsp',1,7);

insert into tb_promission(id,text,pid,icon,url,state,sort) values
(8,'图书分类添加',2,'','/addBookType.jsp',1,8);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(9,'图书分类列表',2,'','/addBookTypeList.jsp',1,9);


insert into tb_promission(id,text,pid,icon,url,state,sort) values
(10,'图书添加',3,'','/addBook.jsp',1,10);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(11,'图书列表',3,'','',1,11);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(12,'所有图书',11,'','/BookList.jsp',1,12);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(13,'未上架',11,'','/notAvailableBook.jsp',1,13);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(14,'已上架',11,'','/listedBook.jsp',1,14);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(15,'已下架',11,'','/removedBook.jsp',1,15);


insert into tb_promission(id,text,pid,icon,url,state,sort) values
(16,'所有订单',4,'','/orderList.jsp',1,16);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(17,'未付款订单',4,'','/UnpaidOrder.jsp',1,17);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(18,'已付款订单',4,'','/PaidOrder.jsp',1,18);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(19,'未收货订单',4,'','/UnconscionedOrder.jsp',1,19);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(20,'已完成订单',4,'','/DoneOrder.jsp',1,20);

insert into tb_promission(id,text,pid,icon,url,state,sort) values
(21,'系统设置',5,'','/SystemSettings.jsp',1,21);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(22,'菜单管理',5,'','/MenuManagement.jsp',1,22);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(23,'权限管理',5,'','/PermissionManagement.jsp',1,23);
insert into tb_promission(id,text,pid,icon,url,state,sort) values
(24,'用户管理',5,'','/UserManagement.jsp',1,24);
commit;




commit

--查询权限表所有的内容
select * from tb_promission;


-----------------------------------------------接下来创建书籍表(插入数据)
--创建书籍表
create table tb_book
(
       bid number primary key,--书籍id
       bname varchar2(100),--书籍名称
       bprice number(5,2),--书籍价格
       btype varchar2(100)--书籍类型
       
)
commit;


--插入数据
insert into tb_book(bid,bname,bprice,btype) values (1,'我爱Java',99,'都市');
insert into tb_book(bid,bname,bprice,btype) values (2,'圣墟',55,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (3,'斗罗大陆',29,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (4,'韩湘子传奇',54,'悬疑');
insert into tb_book(bid,bname,bprice,btype) values (5,'带着老婆去打妖',65,'悬疑');
insert into tb_book(bid,bname,bprice,btype) values (6,'豪门联姻之夫来收妖',123,'言情');
insert into tb_book(bid,bname,bprice,btype) values (7,'深宫有朵黑莲花',54,'言情');
insert into tb_book(bid,bname,bprice,btype) values (8,'武动乾坤',229,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (9,'金瓶梅',33,'历史');
insert into tb_book(bid,bname,bprice,btype) values (10,'我在亮剑当战狼',33,'军事');
insert into tb_book(bid,bname,bprice,btype) values (11,'菁华记之千山暮雪',33,'武侠');
insert into tb_book(bid,bname,bprice,btype) values (12,'江湖传奇传',44,'武侠');
insert into tb_book(bid,bname,bprice,btype) values (13,'大秦:不装了,你爹我是秦始皇',33,'历史');
insert into tb_book(bid,bname,bprice,btype) values (14,'西游记',33,'历史');
insert into tb_book(bid,bname,bprice,btype) values (15,'神墓',259,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (16,'我的26岁女房客',99,'都市');
insert into tb_book(bid,bname,bprice,btype) values (17,'我的校花贴身高手',12,'都市');
insert into tb_book(bid,bname,bprice,btype) values (18,'坏蛋是怎样炼成的',29,'都市');
insert into tb_book(bid,bname,bprice,btype) values (19,'很纯很暧昧',2,'都市');
insert into tb_book(bid,bname,bprice,btype) values (20,'领家有女初长成',23,'都市');
insert into tb_book(bid,bname,bprice,btype) values (21,'最强弃少',88,'都市');
insert into tb_book(bid,bname,bprice,btype) values (22,'邪气凌然',219,'都市');
insert into tb_book(bid,bname,bprice,btype) values (23,'黄金瞳',265,'都市');
insert into tb_book(bid,bname,bprice,btype) values (24,'天才相师',65,'都市');
insert into tb_book(bid,bname,bprice,btype) values (25,'陈二狗的妖孽人生',63,'都市');
insert into tb_book(bid,bname,bprice,btype) values (26,'都市奇妖谈',93,'都市');
insert into tb_book(bid,bname,bprice,btype) values (27,'白狐天下',54,'都市');
insert into tb_book(bid,bname,bprice,btype) values (28,'都市圣医',18,'都市');
insert into tb_book(bid,bname,bprice,btype) values (29,'家里养个狐狸精',438,'都市');
insert into tb_book(bid,bname,bprice,btype) values (30,'神龙至尊',22,'都市');
insert into tb_book(bid,bname,bprice,btype) values (31,'我的28岁女房东',432,'都市');
insert into tb_book(bid,bname,bprice,btype) values (32,'最强狂兵',11,'都市');
insert into tb_book(bid,bname,bprice,btype) values (33,'道诡异仙',22.99,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (34,'万古神帝',19,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (35,'万相之王',16,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (36,'最初进化',22,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (37,'核动力剑仙',33,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (38,'斗破苍穹',55,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (39,'烛龙以左',90,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (40,'遮天',1,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (41,'人族镇守使',33,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (42,'一世之尊',55,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (43,'长夜余火',229,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (44,'完美世界',5,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (45,'十方武圣',7,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (46,'神印王座',89,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (47,'牧神记',88,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (48,'奥术神座',123,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (49,'儒道至圣',45,'玄幻');
insert into tb_book(bid,bname,bprice,btype) values (50,'极品老公太难缠',54,'言情');
insert into tb_book(bid,bname,bprice,btype) values (51,'这个道士不好惹',54,'悬疑');
insert into tb_book(bid,bname,bprice,btype) values (52,'食梦貘手记',22,'悬疑');
insert into tb_book(bid,bname,bprice,btype) values (53,'修仙玩家',65,'武侠');
insert into tb_book(bid,bname,bprice,btype) values (54,'春秋煮酒',22,'武侠');
insert into tb_book(bid,bname,bprice,btype) values (55,'绝世仙缘',55,'武侠');
insert into tb_book(bid,bname,bprice,btype) values (56,'我的谍战岁月',55,'军事');
insert into tb_book(bid,bname,bprice,btype) values (57,'三国演义',33,'历史');
insert into tb_book(bid,bname,bprice,btype) values (58,'水浒传',33,'历史');
insert into tb_book(bid,bname,bprice,btype) values (59,'红楼梦',33,'历史');
insert into tb_book(bid,bname,bprice,btype) values (60,'凡人修仙传',33,'玄幻');

insert into tb_book(bid,bname,bprice,btype) values (61,'女总裁的贴身兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (62,'逍遥兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (63,'近身兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (64,'最强兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (65,'至尊兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (66,'美女总裁的特种兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (67,'御用兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (68,'超强兵王在都市',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (69,'医武兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (70,'绝世兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (71,'特种兵王在都市',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (72,'超级兵王在都市',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (73,'超级兵王的美女军团',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (74,'抗战之最强兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (75,'桃运兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (76,'山村透视兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (77,'特种兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (78,'龙牙兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (79,'特种兵王在山村',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (80,'功夫兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (81,'超级兵王俏总裁',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (82,'校花的贴身兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (83,'女神的布衣兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) values (84,'校花的透视兵王',33,'都市');
insert into tb_book(bid,bname,bprice,btype) va
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值