├── .gitignore
├── README.md
├── WebContent
├── META-INF
│ └── MANIFEST.MF
├── WEB-INF
│ ├── lib
│ │ ├── commons-beanutils-1.8.3.jar
│ │ ├── commons-fileupload-1.2.2.jar
│ │ ├── commons-io-2.2.jar
│ │ ├── commons-logging-1.1.1.jar
│ │ ├── javax.servlet.jar
│ │ ├── jstl-1.2.jar
│ │ └── mysql-connector-java-8.0.16.jar
│ └── web.xml
├── admin
│ ├── addAdmin.jsp
│ ├── addBook.jsp
│ ├── addCategory.jsp
│ ├── booksList.jsp
│ ├── categorysList.jsp
│ ├── editBook.jsp
│ ├── editCategory.jsp
│ ├── manager.jsp
│ ├── managerHeader.jsp
│ ├── managerIndex.jsp
│ ├── managerInformation.jsp
│ ├── managerLogin.jsp
│ ├── managerOrder.jsp
│ ├── managerPassword.jsp
│ ├── managerUsers.jsp
│ ├── message.jsp
│ ├── navigation.jsp
│ └── sales.jsp
├── buyNow.jsp
├── css
│ ├── bootstrap.min.css
│ ├── fonts
│ │ ├── fontawesome-webfont.eot
│ │ ├── fontawesome-webfont.ttf
│ │ ├── fontawesome-webfont.woff
│ │ └── fontawesome-webfont.woff2
│ ├── header.css
│ └── normalize.css
├── favorite.jsp
├── fonts
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.svg
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
├── footer.jsp
├── fraheader.jsp
├── header.jsp
├── header1.jsp
├── img
│ ├── books
│ │ ├── c6cf2402-c04a-426d-a339-8ea029bd5689.jpg
│ │ ├── f6ed178e-b3bf-49c0-a30e-1692330ffa75.jpg
│ │ └── src=http___www.5jjc.net_tu5jJDEwLmFsaWNkbi5jb20vdGZzY29tL2kxLzI1OTk0NDA2NTAvVEIxRVNrcGRqZ3lfdUpqU1pMZVhYYVBsRlhhXyEhJDM.jpg&refer=http___www.5jjc.jpg
│ ├── duigou.png
│ ├── gerenzx.png
│ ├── gwc.gif
│ ├── icon-1.png
│ ├── icon-10.png
│ ├── icon-11.png
│ ├── icon-12.png
│ ├── icon-13.png
│ ├── icon-14.png
│ ├── icon-15.png
│ ├── icon-16.png
│ ├── icon-2.png
│ ├── icon-3.png
│ ├── icon-4.png
│ ├── icon-5.png
│ ├── icon-6.png
│ ├── icon-7.png
│ ├── icon-8.png
│ ├── icon-9.png
│ ├── lb_01.jpg
│ ├── lb_02.jpg
│ ├── lb_03.jpg
│ ├── lb_04.jpg
│ ├── lb_05.jpg
│ ├── logo.png
│ ├── personIndex.jpg
│ ├── seckilling.png
│ ├── shoucang.png
│ └── zfb.png
├── index.jsp
├── js
│ ├── bootstrap.min.js
│ ├── jquery-2.0.3.min.js
│ └── util.js
├── message.jsp
├── order.jsp
├── particulars.jsp
├── person
│ ├── navigation.jsp
│ ├── personIndex.jsp
│ ├── personInformation.jsp
│ ├── personOrder.jsp
│ └── personPassword.jsp
├── personalCenter.jsp
├── redirect.jsp
├── showBook.jsp
├── showCart.jsp
└── test.jsp
├── config
└── jdbcConfig.properties
└── src
└── cn
└── xh
├── dao
├── ClientDao.java
├── ManagerDao.java
├── OrdetrDao.java
└── impl
│ ├── ClientDaoImpl.java
│ ├── ManagerDaoImpl.java
│ └── OrderDaoImpl.java
├── domain
├── Administrator.java
├── Book.java
├── Category.java
├── Favorite.java
├── Order.java
├── Orderitem.java
└── User.java
├── service
├── ClientService.java
├── ManagerService.java
├── OrderService.java
└── impl
│ ├── ClientServiceImpl.java
│ ├── ManagerServiceImpl.java
│ └── OrderServiceImpl.java
├── util
└── JDBCUtil.java
└── web
├── controller
├── ClientServlet.java
├── ManagerServlet.java
└── OrderServlet.java
└── formbean
├── Cart.java
└── CartItem.java
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | /classes
3 | /.idea
4 | build/
5 | picture/
6 | webLibrary.iml
7 | doc/
8 | .settings
9 | .classpath
10 | .project
11 | xinhua-Library.iml
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # JavaWeb图书销售管理系统/网上书店
2 |
3 | Javaweb_bookstore,一个基于servlet+jsp+bootstrap 的MVC图书销售管理系统。
4 |
5 | - 可以直接运行
6 | - 可以用做大作业、毕业设计
7 | - 有完整的代码注释
8 |
9 | ## 1、开发环境:
10 | Tomcat版本:v8.5
11 | MySQL版本:v8.0
12 | JDK:1.8.0_171
13 |
14 | (后端没有用到任何框架,都是servlet,比较简单,前端是JSP+bootstrap)
15 |
16 | ## 2、功能模块
17 |
18 | 
19 |
20 | ## 3、本地开发
21 |
22 | ### 1、导入sql
23 |
24 | 找到sql文件,导入到数据库,并且在下一步导入代码后,修改数据库的用户名和密码。
25 |
26 | ### 2、使用IDEA导入代码
27 |
28 | 第一步先导入项目,使用eclipse的方式导入,如果不是,那么接下来会复杂,还需要设置src和resources目录。
29 |
30 | #### 2.1、清除原来的eclipse信息
31 |
32 | 
33 |
34 | #### 2.2、导入包
35 |
36 | 如果你不是通过eclipse导入的方式导入项目,这里需要把这些jar手动右击 添加到 library 即可:
37 |
38 | 
39 |
40 | #### 2.3、设置Modules的web.xml文件
41 |
42 | 
43 |
44 | 这里主注意两个地方:
45 |
46 | - 上方,设置Path的目录,`web.xml`文件要正确
47 | - 下方,设置Web Resource Dictory 是正确的WebRoot 路径,也就是WebContent。
48 |
49 | `web.xml` 可以配置首页地址,具体请看文件,修改你需要的首页,第一个是没有自动加载数据的,第二个是加载数据的。
50 |
51 | #### 2.4、生成Artifact包
52 |
53 | 
54 |
55 | #### 2.5、配置Tomcat
56 |
57 | 我这里Tomcat8.0版本有乱码,可以设置一下为`-Dfile.encoding=UTF-8`
58 |
59 | 
60 |
61 | Deployment 不要设置Application context!
62 |
63 |
64 |
65 | ### 3、eclipse
66 |
67 | 项目带有eclipse 标识,基本上按照以上配置即可。
68 |
69 | 但是不要使用默认的 context 路径
70 |
71 | ## 4、功能页面
72 |
73 | ### 用户端:
74 |
75 | 首页:
76 |
77 | 
78 |
79 | 商品详情:
80 |
81 | 
82 |
83 | 购物车:
84 |
85 | 
86 |
87 | ### 管理员端:
88 |
89 | 功能见左侧导航栏:
90 |
91 | 
92 |
93 | 
94 |
95 |
96 |
97 |
98 |
99 | 用户账号密码:HaC / 123
100 |
101 |
102 |
103 | 管理员账号密码:admin / 123
104 |
105 | ## 5、A&Q
106 |
107 | 1、项目是从其他地方copy过来的二开的,刚拿到这个项目的时候,一堆bug,经过了一系列的重构,功能也比之前多了。
108 |
109 | 但是`立即购买`的这个模块就没有做了(先通过加入购物车再立即购买就可以了)。。。。,大家可以自己完善一下功能,比如说:
110 |
111 | - 用户查看订单
112 | - 立即购买跳转
113 | - 区分是否收藏过
114 |
115 |
116 |
117 | 2、关于图片的路径
118 |
119 | 说实话我现在也搞不懂,大家可以参考`addBook()`的代码实现,什么相对路径、绝对路径,我暂时还不明白,大家可以去看看如何自定义设置自己的图片路径。
120 |
121 |
122 |
123 | ## 6、声明|费用
124 |
125 | 本项目存在文件缺少,且不再提供免费使用,有偿出售39块钱,酌情购买,需要请联系wx: HaC200
126 |
127 | 更多毕设参考:
128 |
129 | [毕设项目 | HelloCoder (baimuxym.cn)](https://learnjava.baimuxym.cn/pages/JavaWeb图书销售管理系统-网上书店/)
--------------------------------------------------------------------------------
/WebContent/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/commons-beanutils-1.8.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelloCoder-HaC/Javaweb_bookstore/c4747f4f254a8c608d07dc6f048a465f52a88746/WebContent/WEB-INF/lib/commons-beanutils-1.8.3.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/commons-fileupload-1.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelloCoder-HaC/Javaweb_bookstore/c4747f4f254a8c608d07dc6f048a465f52a88746/WebContent/WEB-INF/lib/commons-fileupload-1.2.2.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/commons-io-2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelloCoder-HaC/Javaweb_bookstore/c4747f4f254a8c608d07dc6f048a465f52a88746/WebContent/WEB-INF/lib/commons-io-2.2.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelloCoder-HaC/Javaweb_bookstore/c4747f4f254a8c608d07dc6f048a465f52a88746/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/javax.servlet.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelloCoder-HaC/Javaweb_bookstore/c4747f4f254a8c608d07dc6f048a465f52a88746/WebContent/WEB-INF/lib/javax.servlet.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/jstl-1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelloCoder-HaC/Javaweb_bookstore/c4747f4f254a8c608d07dc6f048a465f52a88746/WebContent/WEB-INF/lib/jstl-1.2.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/mysql-connector-java-8.0.16.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelloCoder-HaC/Javaweb_bookstore/c4747f4f254a8c608d07dc6f048a465f52a88746/WebContent/WEB-INF/lib/mysql-connector-java-8.0.16.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
添加工作人员
22 |添加书籍信息
22 |添加书籍分类
22 |书籍编号 | 58 |书籍图片 | 59 |书籍名称 | 60 |书籍类型 | 61 |书籍作者 | 62 |书籍出版社 | 63 |书籍价格 | 64 |销量 | 65 |操作 | 66 |
---|---|---|---|---|---|---|---|---|
${vs.index+1} | 70 |《${s.book_name}》 | 74 |${s.category.category_name} | 75 |${s.book_author} | 76 |${s.book_press} | 77 |¥${s.book_price} | 78 |${s.book_xiaonumber} | 79 |编辑 81 | 删除 84 | |
序号 | 22 |分类名称 | 23 |分类描述 | 24 |操作 | 25 |
---|---|---|---|
${vs.index+1} | 29 |${s.category_name} | 30 |${s.category_desc} | 31 |编辑 33 | 删除 36 | |
编辑书籍信息
21 |编辑书籍分类信息
21 |修改个人信息
22 |订单管理
28 |序号 | 35 |订单编号 | 36 |创建时间 | 37 |客户账号 | 38 |商品数量 | 39 |支付金额 | 40 |订单状态 | 41 |操作 | 42 |||
---|---|---|---|---|---|---|---|---|---|
${vs.index+1} | 46 |${os.ordernum} | 47 |${os.time} | 48 |${os.user.username} | 49 |${os.quantity} | 50 |${os.money} | 51 |未发货 | 53 |发货 | 54 |已发货 | 57 |删除 | 58 |
修改登录密码
22 |用户管理
21 |序号 | 28 |用户ID | 29 |用户名 | 30 |密码 | 31 |姓名 | 32 |性别 | 33 |电话号码 | 34 |地址 | 35 |操作 | 36 |
---|---|---|---|---|---|---|---|---|
${vs.index+1} | 40 |${u.id} | 41 |${u.username} | 42 |${u.password} | 43 |${u.name} | 44 |${u.sex} | 45 |${u.tel} | 46 |${u.address} | 47 |编辑 | 48 |
23 |
24 | 修改个人信息
25 |
30 |
31 | 修改登录密码
32 |
37 |
38 | 书籍信息维护
39 |
44 |
45 | 书籍分类维护
46 |
51 |
52 | 添加书籍分类
53 |
59 |
60 | 添加图书信息
61 |
67 |
68 | 销售订单管理
69 |
75 |
76 | 用户信息管理
77 |
82 |
83 | 添加工作人员
84 |
90 |
91 | 书籍销售情况
92 |
书籍销售情况
22 |书籍编号 | 30 |书籍图片 | 31 |书籍名称 | 32 |书籍类型 | 33 |书籍作者 | 34 |书籍出版社 | 35 |销量 | 36 |
---|---|---|---|---|---|---|
${vs.index+1} | 40 |《${s.book_name}》 | 44 |${s.category.category_name} | 45 |${s.book_author} | 46 |${s.book_press} | 47 |${s.book_xiaonumber} | 48 |
序号 | 29 |书籍图片 | 30 |书籍名称 | 31 |书籍类型 | 32 |书籍作者 | 33 |书籍出版社 | 34 |书籍单价 | 35 |购买数量 | 36 |小计 | 37 |操作 | 38 |
---|---|---|---|---|---|---|---|---|---|
${vs.index+1} | 42 |${c.value.book.book_name} | 46 |${c.value.book.category.category_name} | 47 |${c.value.book.book_author} | 48 |${c.value.book.book_press} | 49 |¥${c.value.book.book_price} | 50 | 51 |55 | 56 | | ¥${c.value.money} | 57 |删除 | 58 ||
总数量:${sessionScope.cart.totalQuantity} 合计: 64 | ¥${sessionScope.cart.totalMoney} 66 | | 71 | 72 ||||||||||
序号 | 44 |书籍图片 | 45 |书籍名称 | 46 |书籍类型 | 47 |书籍作者 | 48 |书籍出版社 | 49 |书籍单价 | 50 |操作 | 51 |
---|---|---|---|---|---|---|---|
${vs.index+1} | 55 |《${f.book.book_name}》 | 59 |${f.book.category.category_name} | 60 |${f.book.book_author} | 61 |${f.book.book_press} | 62 |¥${f.book.book_price} | 63 |删除 | 64 |
订单编号:${order.ordernum} | 32 |创建时间:${order.time} | 33 |
个人资料修改
22 |我的订单
21 |序号 | 28 |订单编号 | 29 |创建时间 | 30 |商品数量 | 31 |支付金额 | 32 |订单状态 | 33 |操作 | 34 ||
---|---|---|---|---|---|---|---|
${vs.index+1} | 38 |${os.ordernum} | 39 |${os.time} | 40 |${os.quantity} | 41 |${os.money} | 42 |等待发货 | 44 |已发货 | 47 |删除 | 49 |
修改密码
22 |书籍编号 | 64 |书籍图片 | 65 |书籍名称 | 66 |书籍类型 | 67 |书籍作者 | 68 |书籍出版社 | 69 |书籍价格 | 70 |销量 | 71 |操作 | 72 |
---|---|---|---|---|---|---|---|---|
${vs.index+1} | 76 |《${s.book_name}》 | 80 |${s.category.category_name} | 81 |${s.book_author} | 82 |${s.book_press} | 83 |¥${s.book_price} | 84 |${s.book_xiaonumber} | 85 |详情 | 87 |
序号 | 33 |书籍图片 | 34 |书籍名称 | 35 |书籍类型 | 36 |书籍作者 | 37 |书籍出版社 | 38 |书籍单价 | 39 |购买数量 | 40 |小计 | 41 |操作 | 42 |
---|---|---|---|---|---|---|---|---|---|
${vs.index+1} | 46 |《${c.value.book.book_name}》 | 50 |${c.value.book.category.category_name} | 51 |${c.value.book.book_author} | 52 |${c.value.book.book_press} | 53 |¥${c.value.book.book_price} | 54 | 55 |59 | 60 | | ¥${c.value.money} | 61 |删除 | 62 ||
总数量:${sessionScope.cart.totalQuantity} 合计: 67 | ¥${sessionScope.cart.totalMoney} 69 | | 74 | 75 |