├── .idea ├── .gitignore ├── artifacts │ └── BookStore_war_exploded.xml ├── dataSources.xml ├── libraries │ ├── commons_beanutils_1_8_0.xml │ ├── commons_dbutils_1_3.xml │ ├── jquery_3_1_1.xml │ └── servlet_api.xml ├── misc.xml ├── modules.xml └── vcs.xml ├── BookStore.iml ├── out ├── artifacts │ └── BookStore_war_exploded │ │ ├── WEB-INF │ │ ├── classes │ │ │ ├── com │ │ │ │ └── yj │ │ │ │ │ ├── bean │ │ │ │ │ ├── Book.class │ │ │ │ │ ├── Cart.class │ │ │ │ │ ├── CartItem.class │ │ │ │ │ ├── Order.class │ │ │ │ │ ├── OrderItem.class │ │ │ │ │ ├── Page.class │ │ │ │ │ └── User.class │ │ │ │ │ ├── dao │ │ │ │ │ ├── BookDao.class │ │ │ │ │ ├── OrderDao.class │ │ │ │ │ ├── OrderItemDao.class │ │ │ │ │ ├── UserDao.class │ │ │ │ │ └── impl │ │ │ │ │ │ ├── BaseDao.class │ │ │ │ │ │ ├── BookDaoImpl.class │ │ │ │ │ │ ├── OrderDaoImpl.class │ │ │ │ │ │ ├── OrderItemDaoImpl.class │ │ │ │ │ │ └── UserDaoImpl.class │ │ │ │ │ ├── filter │ │ │ │ │ ├── ManagerFilter.class │ │ │ │ │ └── TransactionFilter.class │ │ │ │ │ ├── service │ │ │ │ │ ├── BookService.class │ │ │ │ │ ├── OrderService.class │ │ │ │ │ ├── UserService.class │ │ │ │ │ └── impl │ │ │ │ │ │ ├── BookServiceImpl.class │ │ │ │ │ │ ├── OrderServiceImpl.class │ │ │ │ │ │ └── UserServiceImpl.class │ │ │ │ │ ├── test │ │ │ │ │ ├── BookDaoTest.class │ │ │ │ │ ├── BookServiceTest.class │ │ │ │ │ ├── CartTest.class │ │ │ │ │ ├── JDBCUtilsTest.class │ │ │ │ │ ├── OrderDaoTest.class │ │ │ │ │ ├── OrderItemDaoTest.class │ │ │ │ │ ├── OrderServiceTest.class │ │ │ │ │ ├── UserDaoTest.class │ │ │ │ │ ├── UserServiceImplTest.class │ │ │ │ │ └── UserServiceTest.class │ │ │ │ │ ├── utils │ │ │ │ │ ├── JDBCUtils.class │ │ │ │ │ ├── PaymentUtil.class │ │ │ │ │ └── WebUtils.class │ │ │ │ │ └── web │ │ │ │ │ ├── BaseServlet.class │ │ │ │ │ ├── BookServlet.class │ │ │ │ │ ├── CartServlet.class │ │ │ │ │ ├── ClientBookServlet.class │ │ │ │ │ ├── ClientOrderServlet.class │ │ │ │ │ ├── ManagerOrderServlet.class │ │ │ │ │ ├── ManagerUserServlet.class │ │ │ │ │ ├── PayServlet.class │ │ │ │ │ └── UserServlet.class │ │ │ └── jdbc.properties │ │ ├── lib │ │ │ ├── commons-beanutils-1.8.0.jar │ │ │ ├── commons-dbutils-1.3.jar │ │ │ ├── commons-logging-1.1.1.jar │ │ │ ├── druid-1.1.9.jar │ │ │ ├── gson-2.2.4.jar │ │ │ ├── hamcrest-core-1.3.jar │ │ │ ├── jquery-3.1.1.jar │ │ │ ├── junit-4.12.jar │ │ │ ├── kaptcha-2.3.2.jar │ │ │ ├── mysql-connector-java-5.1.7-bin.jar │ │ │ ├── servlet-api.jar │ │ │ ├── taglibs-standard-impl-1.2.1.jar │ │ │ └── taglibs-standard-spec-1.2.1.jar │ │ └── web.xml │ │ ├── index.jsp │ │ ├── pages │ │ ├── cart │ │ │ ├── cart.jsp │ │ │ ├── checkout.jsp │ │ │ └── pay.jsp │ │ ├── client │ │ │ ├── index.jsp │ │ │ └── top.jsp │ │ ├── common │ │ │ ├── footer.jsp │ │ │ ├── header.jsp │ │ │ ├── login_success_menu.jsp │ │ │ ├── manager_menu.jsp │ │ │ └── page_nav.jsp │ │ ├── error │ │ │ ├── error404.jsp │ │ │ ├── error500.jsp │ │ │ └── errorManager.jsp │ │ ├── manager │ │ │ ├── book_edit.jsp │ │ │ ├── book_manager.jsp │ │ │ ├── manager.jsp │ │ │ ├── order_manager.jsp │ │ │ ├── order_totall.jsp │ │ │ ├── user_edit.jsp │ │ │ └── user_manager.jsp │ │ ├── order │ │ │ ├── order.jsp │ │ │ └── orderItem.jsp │ │ └── user │ │ │ ├── login.jsp │ │ │ ├── login_success.jsp │ │ │ ├── regist.jsp │ │ │ ├── regist_success.jsp │ │ │ └── userinfo.jsp │ │ └── static │ │ ├── css │ │ └── style.css │ │ ├── img │ │ ├── code.bmp │ │ ├── default.jpg │ │ ├── logo.jpg │ │ ├── logo1.jpg │ │ └── pwd-icons-new.png │ │ └── script │ │ └── jquery-1.7.2.js └── production │ └── BookStore │ ├── com │ └── yj │ │ ├── bean │ │ ├── Book.class │ │ ├── Cart.class │ │ ├── CartItem.class │ │ ├── Order.class │ │ ├── OrderItem.class │ │ ├── Page.class │ │ └── User.class │ │ ├── dao │ │ ├── BookDao.class │ │ ├── OrderDao.class │ │ ├── OrderItemDao.class │ │ ├── UserDao.class │ │ └── impl │ │ │ ├── BaseDao.class │ │ │ ├── BookDaoImpl.class │ │ │ ├── OrderDaoImpl.class │ │ │ ├── OrderItemDaoImpl.class │ │ │ └── UserDaoImpl.class │ │ ├── filter │ │ ├── ManagerFilter.class │ │ └── TransactionFilter.class │ │ ├── service │ │ ├── BookService.class │ │ ├── OrderService.class │ │ ├── UserService.class │ │ └── impl │ │ │ ├── BookServiceImpl.class │ │ │ ├── OrderServiceImpl.class │ │ │ └── UserServiceImpl.class │ │ ├── test │ │ ├── BookDaoTest.class │ │ ├── BookServiceTest.class │ │ ├── CartTest.class │ │ ├── JDBCUtilsTest.class │ │ ├── OrderDaoTest.class │ │ ├── OrderItemDaoTest.class │ │ ├── OrderServiceTest.class │ │ ├── UserDaoTest.class │ │ ├── UserServiceImplTest.class │ │ └── UserServiceTest.class │ │ ├── utils │ │ ├── JDBCUtils.class │ │ ├── PaymentUtil.class │ │ └── WebUtils.class │ │ └── web │ │ ├── BaseServlet.class │ │ ├── BookServlet.class │ │ ├── CartServlet.class │ │ ├── ClientBookServlet.class │ │ ├── ClientOrderServlet.class │ │ ├── ManagerOrderServlet.class │ │ ├── ManagerUserServlet.class │ │ ├── PayServlet.class │ │ └── UserServlet.class │ └── jdbc.properties ├── readme.md ├── report └── BookStore.docx ├── sql └── bookstore.sql ├── src ├── com │ └── yj │ │ ├── bean │ │ ├── Book.java │ │ ├── Cart.java │ │ ├── CartItem.java │ │ ├── Order.java │ │ ├── OrderItem.java │ │ ├── Page.java │ │ └── User.java │ │ ├── dao │ │ ├── BookDao.java │ │ ├── OrderDao.java │ │ ├── OrderItemDao.java │ │ ├── UserDao.java │ │ └── impl │ │ │ ├── BaseDao.java │ │ │ ├── BookDaoImpl.java │ │ │ ├── OrderDaoImpl.java │ │ │ ├── OrderItemDaoImpl.java │ │ │ └── UserDaoImpl.java │ │ ├── filter │ │ ├── ManagerFilter.java │ │ └── TransactionFilter.java │ │ ├── service │ │ ├── BookService.java │ │ ├── OrderService.java │ │ ├── UserService.java │ │ └── impl │ │ │ ├── BookServiceImpl.java │ │ │ ├── OrderServiceImpl.java │ │ │ └── UserServiceImpl.java │ │ ├── test │ │ ├── BookDaoTest.java │ │ ├── BookServiceTest.java │ │ ├── CartTest.java │ │ ├── JDBCUtilsTest.java │ │ ├── OrderDaoTest.java │ │ ├── OrderItemDaoTest.java │ │ ├── OrderServiceTest.java │ │ ├── UserDaoTest.java │ │ ├── UserServiceImplTest.java │ │ └── UserServiceTest.java │ │ ├── utils │ │ ├── JDBCUtils.java │ │ ├── PaymentUtil.java │ │ └── WebUtils.java │ │ └── web │ │ ├── BaseServlet.java │ │ ├── BookServlet.java │ │ ├── CartServlet.java │ │ ├── ClientBookServlet.java │ │ ├── ClientOrderServlet.java │ │ ├── ManagerOrderServlet.java │ │ ├── ManagerUserServlet.java │ │ ├── PayServlet.java │ │ └── UserServlet.java └── jdbc.properties └── web ├── WEB-INF ├── lib │ ├── commons-beanutils-1.8.0.jar │ ├── commons-dbutils-1.3.jar │ ├── commons-logging-1.1.1.jar │ ├── druid-1.1.9.jar │ ├── gson-2.2.4.jar │ ├── hamcrest-core-1.3.jar │ ├── jquery-3.1.1.jar │ ├── junit-4.12.jar │ ├── kaptcha-2.3.2.jar │ ├── mysql-connector-java-5.1.7-bin.jar │ ├── taglibs-standard-impl-1.2.1.jar │ └── taglibs-standard-spec-1.2.1.jar └── web.xml ├── index.jsp ├── pages ├── cart │ ├── cart.jsp │ ├── checkout.jsp │ └── pay.jsp ├── client │ ├── index.jsp │ └── top.jsp ├── common │ ├── footer.jsp │ ├── header.jsp │ ├── login_success_menu.jsp │ ├── manager_menu.jsp │ └── page_nav.jsp ├── error │ ├── error404.jsp │ ├── error500.jsp │ └── errorManager.jsp ├── manager │ ├── book_edit.jsp │ ├── book_manager.jsp │ ├── manager.jsp │ ├── order_manager.jsp │ ├── order_totall.jsp │ ├── user_edit.jsp │ └── user_manager.jsp ├── order │ ├── order.jsp │ └── orderItem.jsp └── user │ ├── login.jsp │ ├── login_success.jsp │ ├── regist.jsp │ ├── regist_success.jsp │ └── userinfo.jsp └── static ├── css └── style.css ├── img ├── code.bmp ├── default.jpg ├── logo.jpg ├── logo1.jpg └── pwd-icons-new.png └── script └── jquery-1.7.2.js /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /.idea/artifacts/BookStore_war_exploded.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/out/artifacts/BookStore_war_exploded 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/dataSources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | mysql.8 6 | true 7 | com.mysql.cj.jdbc.Driver 8 | jdbc:mysql://localhost:3306/book 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/commons_beanutils_1_8_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/libraries/commons_dbutils_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/jquery_3_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/servlet_api.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BookStore.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/Book.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/Book.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/Cart.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/Cart.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/CartItem.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/CartItem.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/Order.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/Order.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/OrderItem.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/OrderItem.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/Page.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/Page.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/bean/User.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/BookDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/BookDao.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/OrderDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/OrderDao.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/OrderItemDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/OrderItemDao.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/UserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/UserDao.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/impl/BaseDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/impl/BaseDao.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/impl/BookDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/impl/BookDaoImpl.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/impl/OrderDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/impl/OrderDaoImpl.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/impl/OrderItemDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/impl/OrderItemDaoImpl.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/impl/UserDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/dao/impl/UserDaoImpl.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/filter/ManagerFilter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/filter/ManagerFilter.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/filter/TransactionFilter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/filter/TransactionFilter.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/BookService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/BookService.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/OrderService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/OrderService.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/UserService.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/impl/BookServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/impl/BookServiceImpl.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/impl/OrderServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/impl/OrderServiceImpl.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/impl/UserServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/service/impl/UserServiceImpl.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/BookDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/BookDaoTest.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/BookServiceTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/BookServiceTest.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/CartTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/CartTest.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/JDBCUtilsTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/JDBCUtilsTest.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/OrderDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/OrderDaoTest.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/OrderItemDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/OrderItemDaoTest.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/OrderServiceTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/OrderServiceTest.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/UserDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/UserDaoTest.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/UserServiceImplTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/UserServiceImplTest.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/UserServiceTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/test/UserServiceTest.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/utils/JDBCUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/utils/JDBCUtils.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/utils/PaymentUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/utils/PaymentUtil.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/utils/WebUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/utils/WebUtils.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/BaseServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/BaseServlet.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/BookServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/BookServlet.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/CartServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/CartServlet.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/ClientBookServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/ClientBookServlet.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/ClientOrderServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/ClientOrderServlet.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/ManagerOrderServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/ManagerOrderServlet.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/ManagerUserServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/ManagerUserServlet.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/PayServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/PayServlet.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/UserServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/classes/com/yj/web/UserServlet.class -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/classes/jdbc.properties: -------------------------------------------------------------------------------- 1 | username=root 2 | password=Y13320567524 3 | url=jdbc:mysql://localhost:3306/book?characterEncoding=utf8 4 | driverClassName=com.mysql.jdbc.Driver 5 | initialSize=5 6 | maxActive=10 -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/commons-beanutils-1.8.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/commons-beanutils-1.8.0.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/commons-dbutils-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/commons-dbutils-1.3.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/commons-logging-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/commons-logging-1.1.1.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/druid-1.1.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/druid-1.1.9.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/gson-2.2.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/gson-2.2.4.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/hamcrest-core-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/hamcrest-core-1.3.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/jquery-3.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/jquery-3.1.1.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/junit-4.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/junit-4.12.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/kaptcha-2.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/kaptcha-2.3.2.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/servlet-api.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/servlet-api.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/taglibs-standard-impl-1.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/taglibs-standard-impl-1.2.1.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/WEB-INF/lib/taglibs-standard-spec-1.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/WEB-INF/lib/taglibs-standard-spec-1.2.1.jar -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/cart/cart.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 | 6 | 7 | 购物车 8 | <%@include file="/pages/common/header.jsp"%> 9 | 31 | 32 | 33 | 34 | 39 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
商品名称数量单价金额操作
亲,当前购物车为空,快去和小伙伴浏览书籍吧!
${entry.value.name} 62 | 63 | ${entry.value.price}${entry.value.totalPrice}删除
72 | 73 | 74 |
75 | 购物车中共有${sessionScope.cart.totalCount}本书籍 76 | 总金额${sessionScope.cart.totalPrice} 77 | 清空购物车 78 | 去结账 79 |
80 | 81 |
82 | 83 |
84 | 85 | <%@include file="/pages/common/footer.jsp"%> 86 | 87 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/cart/checkout.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 结算页面 7 | <%@include file="/pages/common/header.jsp"%> 8 | 14 | 15 | 16 | 17 | 22 | 23 |
24 | 25 |

你的订单已结算,订单号为${sessionScope.orderId},店主很快就会发货啦!

26 | 27 | 28 |
29 | 30 | <%@include file="/pages/common/footer.jsp"%> 31 | 32 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/cart/pay.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 14:50 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 结算页面 12 | <%@include file="/pages/common/header.jsp"%> 13 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 26 | 27 | 29 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | 40 | 41 | 42 | 44 | 45 | 46 | 47 | 49 | 50 | 51 | 52 | 53 | 54 | 56 | 58 | 59 | 60 | 61 | 63 | 64 | 65 | 67 | 68 |
28 | 支付金额:

32 |
请您选择在线支付银行
招商银行 39 | 工商银行农业银行建设银行 43 |
中国民生银行总行光大银行 48 | 交通银行深圳发展银行
北京银行兴业银行 55 | 上海浦东发展银行 57 | 中信银行

62 |
66 |
69 |
70 | 71 | 72 |
73 | 74 | <%@include file="/pages/common/footer.jsp"%> 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/client/top.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/19 5 | Time: 22:56 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 9 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 10 | 11 | 12 | 13 | 14 | 图书热销榜单 15 | <%@include file="/pages/common/header.jsp"%> 16 | 17 | 18 | 19 | 20 | 28 | 29 |
30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | <%!int i=1;%> 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
排名书名价格作者销量
<%=i++%>${book.name}${book.price}${book.author}${book.sales}
60 |
61 | 62 | <%@include file="/pages/common/footer.jsp"%> 63 | 64 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/common/footer.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/3 5 | Time: 11:07 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 |
10 | 11 | RentBookstore ©2020 12 | 13 |
-------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 11:06 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <% 10 | String basePath = request.getScheme() 11 | +"://" 12 | +request.getServerName() 13 | +":" 14 | +request.getServerPort() 15 | +request.getContextPath() 16 | +"/"; 17 | pageContext.setAttribute("bastPath",basePath); 18 | 19 | %> 20 | 21 | > 22 | 23 | 24 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/common/login_success_menu.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 11:07 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 |
10 | 欢迎${sessionScope.user.username}光临书店 11 | 我的订单 12 | 个人信息 13 | 热榜 14 | 注销   15 | 返回 16 |
-------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/common/manager_menu.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 11:08 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 |
10 | 图书管理 11 | 订单管理 12 | 用户管理 13 | 总账单 14 | 返回书店 15 |
-------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/common/page_nav.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 16:15 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/error/error404.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 22:17 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 404 12 | <%@include file="/pages/common/header.jsp"%> 13 | 14 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 |
亲,您访问的页面不存在或已被删除!
26 | 返回首页 27 |
30 |
31 | 32 | 33 | 34 | <%@ include file="/pages/common/footer.jsp" %> 35 | 36 | 37 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/error/error500.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 22:17 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 500 12 | <%@include file="/pages/common/header.jsp"%> 13 | 14 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 |
HTTP状态 500 - 内部服务器错误
26 | 返回首页 27 |
30 |
31 | 32 | 33 | 34 | <%@ include file="/pages/common/footer.jsp" %> 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/error/errorManager.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 10:45 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 404 12 | <%@include file="/pages/common/header.jsp"%> 13 | 14 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 29 | 30 |
亲,你没有管理员权限哦!
26 | 管理员登录 27 | 返回首页 28 |
31 |
32 | 33 | 34 | 35 | <%@ include file="/pages/common/footer.jsp" %> 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/manager/book_edit.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 编辑图书 7 | <%@include file="/pages/common/header.jsp"%> 8 | 22 | 23 | 24 | 29 | 30 |
31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
名称价格作者销量库存操作
53 |
54 | 55 | 56 |
57 | 58 | <%@include file="/pages/common/footer.jsp"%> 59 | 60 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/manager/book_manager.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 | 6 | 7 | 图书管理 8 | <%@include file="/pages/common/header.jsp"%> 9 | 21 | 22 | 23 | 24 | 29 | 30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
名称价格作者销量库存操作
${book.name}${book.price}${book.author}${book.sales}${book.stock}修改删除
添加图书
62 | <%@include file="/pages/common/page_nav.jsp"%> 63 |
64 | 65 | <%@include file="/pages/common/footer.jsp"%> 66 | 67 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/manager/manager.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 后台管理 7 | <%@include file="/pages/common/header.jsp"%> 8 | 14 | 15 | 16 | 17 | 22 | 23 |
24 |

欢迎管理员进入后台管理系统

25 |
26 | 27 | <%@include file="/pages/common/footer.jsp"%> 28 | 29 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/manager/order_manager.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 3 | 4 | 5 | 6 | 7 | 订单管理 8 | <%@include file="/pages/common/header.jsp"%> 9 | 10 | 11 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 48 | 49 | 50 | 51 |
订单号日期金额详情发货
${order.orderId}${order.createTime}${order.price} 36 | 37 | 38 | 确认发货 39 | 40 | 41 | 等待用户签收 42 | 43 | 44 | 已签收 45 | 46 | 47 | 查看详情
52 |
53 | 54 | 55 | <%@ include file="/pages/common/footer.jsp" %> 56 | 57 | 58 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/manager/order_totall.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="java.util.Date" %><%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/19 5 | Time: 22:58 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 14 | 总账单 15 | <%@include file="/pages/common/header.jsp"%> 16 | 17 | 18 | 26 | <% 27 | String usernumber=request.getParameter("usernumber"); 28 | String ordernumber = request.getParameter("ordernumber"); 29 | String booknumbers = request.getParameter("booknumbers"); 30 | String bigDecimal = request.getParameter("bigDecimal"); 31 | %> 32 |
33 | 34 | 尊敬的管理员: 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
截止<%=new Date()%>账单详情:
用户总数:${usernumber}人
总订单数:${ordernumber}单
销售本数:${booknumbers}本
总收入:${bigDecimal}元
55 |
56 | 57 | 58 | <%@ include file="/pages/common/footer.jsp" %> 59 | 60 | 61 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/manager/user_edit.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/20 5 | Time: 15:30 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 12 | 13 | 编辑用户信息 14 | <%@include file="/pages/common/header.jsp"%> 15 | 29 | 30 | 31 | 36 | 37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
序号用户名密码电子邮箱收货地址操作
60 |
61 | 62 | 63 |
64 | 65 | <%@include file="/pages/common/footer.jsp"%> 66 | 67 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/manager/user_manager.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/20 5 | Time: 20:27 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 9 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 10 | 11 | 12 | 13 | 14 | 用户管理 15 | <%@include file="/pages/common/header.jsp"%> 16 | 28 | 29 | 30 | 31 | 36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
序号用户名密码电子邮箱收货地址操作
${user.id}${user.username}${user.password}${user.email}${user.address}修改信息删除信息
添加用户
71 | <%@include file="/pages/common/page_nav.jsp"%> 72 |
73 | 74 | <%@include file="/pages/common/footer.jsp"%> 75 | 76 | k -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/order/order.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 16:30 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 我的订单 13 | <%@include file="/pages/common/header.jsp"%> 14 | 15 | 16 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 50 | 51 | 52 | 53 |
日期金额状态详情
${ order.createTime }${ order.price } 38 | 39 | 40 | 未发货 41 | 42 | 43 | 确认收货 44 | 45 | 46 | 已收货 47 | 48 | 49 | 查看详情
54 |
55 | 56 | 57 | 58 | <%@ include file="/pages/common/footer.jsp" %> 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/order/orderItem.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 0:17 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 我的订单 13 | <%@include file="/pages/common/header.jsp"%> 14 | 15 | 16 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
编号书名数量单价总金额订单编号
${ order.id}${ order.name }${ order.count }${ order.price }${ order.totalPrice }${ order.orderId }
46 |
47 | 48 | 49 | 50 | <%@ include file="/pages/common/footer.jsp" %> 51 | 52 | 53 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/user/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 登录页面 7 | <%@include file="/pages/common/header.jsp"%> 8 | 44 | 45 | 46 | 47 |
48 | 49 |
50 | 51 |
52 | 53 |
54 | 55 |
56 | 57 |
58 | 93 |
94 |
95 | <%@include file="/pages/common/footer.jsp"%> 96 | 97 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/user/login_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 登录成功页面 7 | <%@include file="/pages/common/header.jsp"%> 8 | 18 | 19 | 20 | 24 | 25 |
26 | 27 |

欢迎回来 转到主页

28 | 29 |
30 | 31 | <%@include file="/pages/common/footer.jsp"%> 32 | 33 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/user/regist_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 注册成功页面 7 | <%@include file="/pages/common/header.jsp"%> 8 | 18 | 19 | 20 | 25 | 26 |
27 | 28 |

注册成功! 转到主页

29 | 30 |
31 | 32 | <%@include file="/pages/common/footer.jsp"%> 33 | 34 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/pages/user/userinfo.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/9 5 | Time: 19:51 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 12 | 13 | 我的个人信息 14 | <%@include file="/pages/common/header.jsp"%> 15 | 29 | 30 | 31 | 36 | 37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |
序号用户名密码电子邮箱收货地址修改
58 |
59 | 60 | 61 |
62 | 63 | <%@include file="/pages/common/footer.jsp"%> 64 | 65 | 66 | -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/static/img/code.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/static/img/code.bmp -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/static/img/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/static/img/default.jpg -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/static/img/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/static/img/logo.jpg -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/static/img/logo1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/static/img/logo1.jpg -------------------------------------------------------------------------------- /out/artifacts/BookStore_war_exploded/static/img/pwd-icons-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/artifacts/BookStore_war_exploded/static/img/pwd-icons-new.png -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/bean/Book.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/bean/Book.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/bean/Cart.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/bean/Cart.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/bean/CartItem.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/bean/CartItem.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/bean/Order.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/bean/Order.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/bean/OrderItem.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/bean/OrderItem.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/bean/Page.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/bean/Page.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/bean/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/bean/User.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/dao/BookDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/dao/BookDao.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/dao/OrderDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/dao/OrderDao.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/dao/OrderItemDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/dao/OrderItemDao.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/dao/UserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/dao/UserDao.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/dao/impl/BaseDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/dao/impl/BaseDao.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/dao/impl/BookDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/dao/impl/BookDaoImpl.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/dao/impl/OrderDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/dao/impl/OrderDaoImpl.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/dao/impl/OrderItemDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/dao/impl/OrderItemDaoImpl.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/dao/impl/UserDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/dao/impl/UserDaoImpl.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/filter/ManagerFilter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/filter/ManagerFilter.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/filter/TransactionFilter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/filter/TransactionFilter.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/service/BookService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/service/BookService.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/service/OrderService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/service/OrderService.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/service/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/service/UserService.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/service/impl/BookServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/service/impl/BookServiceImpl.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/service/impl/OrderServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/service/impl/OrderServiceImpl.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/service/impl/UserServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/service/impl/UserServiceImpl.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/test/BookDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/test/BookDaoTest.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/test/BookServiceTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/test/BookServiceTest.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/test/CartTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/test/CartTest.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/test/JDBCUtilsTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/test/JDBCUtilsTest.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/test/OrderDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/test/OrderDaoTest.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/test/OrderItemDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/test/OrderItemDaoTest.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/test/OrderServiceTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/test/OrderServiceTest.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/test/UserDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/test/UserDaoTest.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/test/UserServiceImplTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/test/UserServiceImplTest.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/test/UserServiceTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/test/UserServiceTest.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/utils/JDBCUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/utils/JDBCUtils.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/utils/PaymentUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/utils/PaymentUtil.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/utils/WebUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/utils/WebUtils.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/web/BaseServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/web/BaseServlet.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/web/BookServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/web/BookServlet.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/web/CartServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/web/CartServlet.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/web/ClientBookServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/web/ClientBookServlet.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/web/ClientOrderServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/web/ClientOrderServlet.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/web/ManagerOrderServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/web/ManagerOrderServlet.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/web/ManagerUserServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/web/ManagerUserServlet.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/web/PayServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/web/PayServlet.class -------------------------------------------------------------------------------- /out/production/BookStore/com/yj/web/UserServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/out/production/BookStore/com/yj/web/UserServlet.class -------------------------------------------------------------------------------- /out/production/BookStore/jdbc.properties: -------------------------------------------------------------------------------- 1 | username=root 2 | password=Y13320567524 3 | url=jdbc:mysql://localhost:3306/book?characterEncoding=utf8 4 | driverClassName=com.mysql.jdbc.Driver 5 | initialSize=5 6 | maxActive=10 -------------------------------------------------------------------------------- /report/BookStore.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/report/BookStore.docx -------------------------------------------------------------------------------- /src/com/yj/bean/Book.java: -------------------------------------------------------------------------------- 1 | package com.yj.bean; 2 | 3 | import java.math.BigDecimal; 4 | 5 | /** 6 | * @author yj 7 | * @create 2020-10-02 19:51 8 | */ 9 | public class Book { 10 | private Integer id;//id 11 | private String name;//姓名 12 | private String author;//作者 13 | private BigDecimal price; 14 | private Integer sales; 15 | private Integer stock; 16 | private String classification; 17 | private String imgPath="static/img/default.jpg"; 18 | 19 | public String getClassification() { 20 | return classification; 21 | } 22 | 23 | public void setClassification(String classification) { 24 | this.classification = classification; 25 | } 26 | 27 | 28 | 29 | public Integer getId() { 30 | return id; 31 | } 32 | 33 | public void setId(Integer id) { 34 | this.id = id; 35 | } 36 | 37 | public String getName() { 38 | return name; 39 | } 40 | 41 | public void setName(String name) { 42 | this.name = name; 43 | } 44 | 45 | public String getAuthor() { 46 | return author; 47 | } 48 | 49 | public void setAuthor(String author) { 50 | this.author = author; 51 | } 52 | 53 | public BigDecimal getPrice() { 54 | return price; 55 | } 56 | 57 | public void setPrice(BigDecimal price) { 58 | this.price = price; 59 | } 60 | 61 | public Integer getSales() { 62 | return sales; 63 | } 64 | 65 | public void setSales(Integer sales) { 66 | this.sales = sales; 67 | } 68 | 69 | public Integer getStock() { 70 | if(stock<0) stock=0;return stock; 71 | } 72 | 73 | public void setStock(Integer stock) { 74 | if(stock<0) stock=0; 75 | this.stock = stock; 76 | } 77 | 78 | public String getImgPath() { 79 | return imgPath; 80 | } 81 | 82 | public void setImgPath(String imgPath) { 83 | if(imgPath==null||"".equals(imgPath)) { 84 | this.imgPath = "static/img/default.jpg"; 85 | } else { 86 | this.imgPath = imgPath; 87 | } 88 | } 89 | 90 | @Override 91 | public String toString() { 92 | return "Book{" + 93 | "id=" + id + 94 | ", name='" + name + '\'' + 95 | ", author='" + author + '\'' + 96 | ", price=" + price + 97 | ", sales=" + sales + 98 | ", stock=" + stock + 99 | ", classification='" + classification + '\'' + 100 | ", imgPath='" + imgPath + '\'' + 101 | '}'; 102 | } 103 | 104 | public Book() { 105 | } 106 | 107 | public Book(Integer id, String name, String author, BigDecimal price, Integer sales, Integer stock, String classification, String imgPath) { 108 | this.id = id; 109 | this.name = name; 110 | this.author = author; 111 | this.price = price; 112 | this.sales = sales; 113 | this.stock = stock; 114 | this.classification = classification; 115 | this.imgPath = imgPath; 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /src/com/yj/bean/Cart.java: -------------------------------------------------------------------------------- 1 | package com.yj.bean; 2 | 3 | /** 4 | * @author yj 5 | * @create 2020-10-02 20:12 6 | */ 7 | 8 | import java.math.BigDecimal; 9 | import java.util.LinkedHashMap; 10 | import java.util.Map; 11 | 12 | /** 13 | * 购物车对象 14 | */ 15 | public class Cart { 16 | //private Integer totalCount; 17 | //private BigDecimal totalPrice; 18 | 19 | public Integer getTotalCount() { 20 | Integer totalCount = 0; 21 | for (Map.Entryentry : items.entrySet()) { 22 | totalCount += entry.getValue().getCount(); 23 | } 24 | return totalCount; 25 | } 26 | 27 | 28 | public BigDecimal getTotalPrice() { 29 | BigDecimal totalPrice = new BigDecimal(0); 30 | for (Map.Entryentry : items.entrySet()) { 31 | totalPrice = totalPrice.add(entry.getValue().getTotalPrice()); 32 | } 33 | return totalPrice; 34 | } 35 | 36 | 37 | public Map getItems() { 38 | return items; 39 | } 40 | 41 | public void setItems(Map items) { 42 | this.items = items; 43 | } 44 | 45 | /** 46 | * key是商品编号,value是商品信息 47 | */ 48 | private Map items = new LinkedHashMap(); 49 | 50 | @Override 51 | public String toString() { 52 | return "Cart{" + 53 | "totalCount=" + getTotalCount() + 54 | ", totalPrice=" + getTotalPrice() + 55 | ", items=" + items + 56 | '}'; 57 | } 58 | 59 | /** 60 | * 添加商品项 61 | * @param cartItem 62 | */ 63 | public void addItem(CartItem cartItem) { 64 | //先查看购物车中是否包含次商品,如果有的话,数量更新,总金额更新;如果没有,直接放到集合中即可 65 | CartItem item = items.get(cartItem.getId()); 66 | 67 | if(item == null) { 68 | //之前没有添加过此商品 69 | items.put(cartItem.getId(),cartItem); 70 | } else { 71 | item.setCount(item.getCount() + 1);//数量累计 72 | item.setTotalPrice(item.getPrice().multiply(new BigDecimal(item.getCount())));//更新总金额 73 | } 74 | } 75 | 76 | /** 77 | * 删除商品项 78 | * @param id 79 | */ 80 | public void deleteItem(Integer id) { 81 | items.remove(id); 82 | } 83 | 84 | /** 85 | * 清空购物车 86 | */ 87 | public void clear() { 88 | items.clear(); 89 | } 90 | 91 | /** 92 | * 修改商品数量 93 | * @param id 94 | * @param count 95 | */ 96 | public void updateCount(Integer id,Integer count) { 97 | //先查看购物车中是否包含次商品,如果有的话,数量更新,总金额更新; 98 | CartItem cartItem = items.get(id); 99 | 100 | if(cartItem != null) { 101 | cartItem.setCount(count); 102 | cartItem.setTotalPrice(cartItem.getPrice().multiply(new BigDecimal(cartItem.getCount()))); 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/com/yj/bean/CartItem.java: -------------------------------------------------------------------------------- 1 | package com.yj.bean; 2 | 3 | import java.math.BigDecimal; 4 | 5 | /** 6 | * @author yj 7 | * @create 2020-08-26 20:08 8 | */ 9 | 10 | /** 11 | * 购物车商品项 12 | */ 13 | public class CartItem { 14 | private Integer id; 15 | private String name; 16 | private Integer count; 17 | private BigDecimal price; 18 | private BigDecimal totalPrice; 19 | 20 | public Integer getId() { 21 | return id; 22 | } 23 | 24 | public void setId(Integer id) { 25 | this.id = id; 26 | } 27 | 28 | public String getName() { 29 | return name; 30 | } 31 | 32 | public void setName(String name) { 33 | this.name = name; 34 | } 35 | 36 | public Integer getCount() { 37 | return count; 38 | } 39 | 40 | public void setCount(Integer count) { 41 | this.count = count; 42 | } 43 | 44 | public BigDecimal getPrice() { 45 | return price; 46 | } 47 | 48 | public void setPrice(BigDecimal price) { 49 | this.price = price; 50 | } 51 | 52 | public BigDecimal getTotalPrice() { 53 | return totalPrice; 54 | } 55 | 56 | public void setTotalPrice(BigDecimal totalPrice) { 57 | this.totalPrice = totalPrice; 58 | } 59 | 60 | public CartItem(Integer id, String name, Integer count, BigDecimal price, BigDecimal totalPrice) { 61 | this.id = id; 62 | this.name = name; 63 | this.count = count; 64 | this.price = price; 65 | this.totalPrice = totalPrice; 66 | } 67 | 68 | public CartItem() { 69 | } 70 | 71 | @Override 72 | public String toString() { 73 | return "Cart{" + 74 | "id=" + id + 75 | ", name='" + name + '\'' + 76 | ", count=" + count + 77 | ", price=" + price + 78 | ", totalPrice=" + totalPrice + 79 | '}'; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/com/yj/bean/Order.java: -------------------------------------------------------------------------------- 1 | package com.yj.bean; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.Date; 5 | 6 | /** 7 | * @author yj 8 | * @create 2020-08-28 10:49 9 | */ 10 | public class Order { 11 | private String orderId; 12 | private Date createTime; 13 | private BigDecimal price; 14 | //默认为0 15 | private Integer status = 0; 16 | private Integer userId; 17 | 18 | public String getOrderId() { 19 | return orderId; 20 | } 21 | 22 | public void setOrderId(String orderId) { 23 | this.orderId = orderId; 24 | } 25 | 26 | public Date getCreateTime() { 27 | return createTime; 28 | } 29 | 30 | public void setCreateTime(Date createTime) { 31 | this.createTime = createTime; 32 | } 33 | 34 | public BigDecimal getPrice() { 35 | return price; 36 | } 37 | 38 | public void setPrice(BigDecimal price) { 39 | this.price = price; 40 | } 41 | 42 | public Integer getStatus() { 43 | return status; 44 | } 45 | 46 | public void setStatus(Integer status) { 47 | this.status = status; 48 | } 49 | 50 | public Integer getUserId() { 51 | return userId; 52 | } 53 | 54 | public void setUserId(Integer userId) { 55 | this.userId = userId; 56 | } 57 | 58 | public Order(String orderId, Date createTime, BigDecimal price, Integer status, Integer userId) { 59 | this.orderId = orderId; 60 | this.createTime = createTime; 61 | this.price = price; 62 | this.status = status; 63 | this.userId = userId; 64 | } 65 | 66 | public Order() { 67 | } 68 | 69 | @Override 70 | public String toString() { 71 | return "Order{" + 72 | "orderId='" + orderId + '\'' + 73 | ", createTime=" + createTime + 74 | ", price=" + price + 75 | ", status=" + status + 76 | ", userId=" + userId + 77 | '}'; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/com/yj/bean/OrderItem.java: -------------------------------------------------------------------------------- 1 | package com.yj.bean; 2 | 3 | import java.math.BigDecimal; 4 | 5 | /** 6 | * @author yj 7 | * @create 2020-08-28 10:54 8 | */ 9 | public class OrderItem { 10 | private Integer id; 11 | private String name; 12 | private Integer count; 13 | private BigDecimal price; 14 | private BigDecimal totalPrice; 15 | private String orderId; 16 | 17 | public OrderItem(Integer id, String name, Integer count, BigDecimal price, BigDecimal totalPrice, String orderId) { 18 | this.id = id; 19 | this.name = name; 20 | this.count = count; 21 | this.price = price; 22 | this.totalPrice = totalPrice; 23 | this.orderId = orderId; 24 | } 25 | 26 | public OrderItem() { 27 | } 28 | 29 | @Override 30 | public String toString() { 31 | return "OrderItem{" + 32 | "id=" + id + 33 | ", name='" + name + '\'' + 34 | ", count=" + count + 35 | ", price=" + price + 36 | ", totalPrice=" + totalPrice + 37 | ", orderId='" + orderId + '\'' + 38 | '}'; 39 | } 40 | 41 | public Integer getId() { 42 | return id; 43 | } 44 | 45 | public void setId(Integer id) { 46 | this.id = id; 47 | } 48 | 49 | public String getName() { 50 | return name; 51 | } 52 | 53 | public void setName(String name) { 54 | this.name = name; 55 | } 56 | 57 | public Integer getCount() { 58 | return count; 59 | } 60 | 61 | public void setCount(Integer count) { 62 | this.count = count; 63 | } 64 | 65 | public BigDecimal getPrice() { 66 | return price; 67 | } 68 | 69 | public void setPrice(BigDecimal price) { 70 | this.price = price; 71 | } 72 | 73 | public BigDecimal getTotalPrice() { 74 | return totalPrice; 75 | } 76 | 77 | public void setTotalPrice(BigDecimal totalPrice) { 78 | this.totalPrice = totalPrice; 79 | } 80 | 81 | public String getOrderId() { 82 | return orderId; 83 | } 84 | 85 | public void setOrderId(String orderId) { 86 | this.orderId = orderId; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/com/yj/bean/Page.java: -------------------------------------------------------------------------------- 1 | package com.yj.bean; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author yj 7 | * @create 2020-08-25 9:27 8 | */ 9 | public class Page { 10 | 11 | public static final Integer PAGE_SIZE = 4; 12 | //当前页 13 | private Integer pageNo; 14 | 15 | //总页码 16 | private Integer pageTotal; 17 | 18 | //当前页显示数量 19 | private Integer pageSize = PAGE_SIZE; 20 | 21 | //总的记录数 22 | private Integer pageTotalCount; 23 | 24 | //当前页数据 25 | private List items; 26 | 27 | //分页条的请求地址 28 | private String url; 29 | 30 | public String getUrl() { 31 | return url; 32 | } 33 | 34 | public void setUrl(String url) { 35 | this.url = url; 36 | } 37 | 38 | public Integer getPageNo() { 39 | return pageNo; 40 | } 41 | 42 | 43 | public Integer getPageTotal() { 44 | return pageTotal; 45 | } 46 | 47 | public void setPageTotal(Integer pageTotal) { 48 | this.pageTotal = pageTotal; 49 | } 50 | 51 | public Integer getPageSize() { 52 | return pageSize; 53 | } 54 | 55 | public void setPageSize(Integer pageSize) { 56 | this.pageSize = pageSize; 57 | } 58 | 59 | public Integer getPageTotalCount() { 60 | return pageTotalCount; 61 | } 62 | 63 | public void setPageTotalCount(Integer pageTotalCount) { 64 | this.pageTotalCount = pageTotalCount; 65 | } 66 | 67 | public List getItems() { 68 | return items; 69 | } 70 | 71 | public void setItems(List items) { 72 | this.items = items; 73 | } 74 | 75 | public void setPageNo(Integer pageNo) { 76 | this.pageNo = pageNo; 77 | } 78 | 79 | @Override 80 | public String toString() { 81 | return "Page{" + 82 | "pageNo=" + pageNo + 83 | ", pageTotal=" + pageTotal + 84 | ", pageSize=" + pageSize + 85 | ", pageTotalCount=" + pageTotalCount + 86 | ", items=" + items + 87 | ", url='" + url + '\'' + 88 | '}'; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/com/yj/bean/User.java: -------------------------------------------------------------------------------- 1 | package com.yj.bean; 2 | 3 | /** 4 | * @author yj 5 | * @create 2020-08-21 10:41 6 | */ 7 | public class User { 8 | private Integer id; 9 | private String username; 10 | private String password; 11 | private String email; 12 | private String address; 13 | 14 | public String getAddress() { 15 | return address; 16 | } 17 | 18 | public void setAddress(String address) { 19 | this.address = address; 20 | } 21 | 22 | 23 | public Integer getId() { 24 | return id; 25 | } 26 | 27 | public void setId(Integer id) { 28 | this.id = id; 29 | } 30 | 31 | public String getUsername() { 32 | return username; 33 | } 34 | 35 | public void setUsername(String username) { 36 | this.username = username; 37 | } 38 | 39 | public String getPassword() { 40 | return password; 41 | } 42 | 43 | public void setPassword(String password) { 44 | this.password = password; 45 | } 46 | 47 | public String getEmail() { 48 | return email; 49 | } 50 | 51 | public void setEmail(String email) { 52 | this.email = email; 53 | } 54 | 55 | @Override 56 | public String toString() { 57 | return "User{" + 58 | "id=" + id + 59 | ", username='" + username + '\'' + 60 | ", password='" + password + '\'' + 61 | ", email='" + email + '\'' + 62 | ", address='" + address + '\'' + 63 | '}'; 64 | } 65 | 66 | public User() { 67 | } 68 | 69 | public User(Integer id, String username, String password, String email, String address) { 70 | this.id = id; 71 | this.username = username; 72 | this.password = password; 73 | this.email = email; 74 | this.address = address; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/com/yj/dao/BookDao.java: -------------------------------------------------------------------------------- 1 | package com.yj.dao; 2 | 3 | import com.yj.bean.Book; 4 | 5 | import java.math.BigDecimal; 6 | import java.util.List; 7 | 8 | /** 9 | * @author yj 10 | * @create 2020-08-23 21:08 11 | */ 12 | public interface BookDao { 13 | 14 | public int addBook(Book book); 15 | 16 | public int deleteBookById(Integer id); 17 | 18 | public int updateBook(Book book); 19 | 20 | public Book queryBookById(Integer id); 21 | 22 | public List queryBooks(); 23 | 24 | Integer queryForPageTotalCount(); 25 | 26 | List queryForPageItems(int begin, int pageSize); 27 | 28 | Integer queryForPageTotalCountByPrice(int min, int max); 29 | 30 | List queryForPageItemsByPrice(int begin, int pageSize, int min, int max); 31 | 32 | Integer queryForPageTotalCountByNameOrAuthor(String nameorauthor); 33 | 34 | List queryForPageItemsByNameOrAuthor(int begin, int pageSize, String nameorauthor); 35 | 36 | List queryForPageItemsOrder(); 37 | 38 | BigDecimal queryTotalMoney(); 39 | 40 | public Integer queryBooknums(); 41 | } 42 | -------------------------------------------------------------------------------- /src/com/yj/dao/OrderDao.java: -------------------------------------------------------------------------------- 1 | package com.yj.dao; 2 | 3 | import com.yj.bean.Order; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author yj 9 | * @create 2020-08-28 10:57 10 | */ 11 | public interface OrderDao { 12 | 13 | public int saveOrder(Order order); 14 | 15 | public List queryAllOrders(); 16 | 17 | public void updateOrderStatus(int i, String orderId); 18 | 19 | public List queryMyOrders(int userId); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/com/yj/dao/OrderItemDao.java: -------------------------------------------------------------------------------- 1 | package com.yj.dao; 2 | 3 | import com.yj.bean.OrderItem; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author yj 9 | * @create 2020-08-28 11:03 10 | */ 11 | public interface OrderItemDao { 12 | public int saveOrderItem(OrderItem orderItem); 13 | 14 | public List showOrderItem(String orderId); 15 | } 16 | -------------------------------------------------------------------------------- /src/com/yj/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.yj.dao; 2 | 3 | import com.yj.bean.User; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author yj 9 | * @create 2020-08-21 11:57 10 | */ 11 | public interface UserDao { 12 | 13 | /** 14 | * 根据用户名查询用户信息 15 | * @param username 用户名 16 | * @return 如果返回null则没有这个用户,反之亦然 17 | */ 18 | public User querybyUsername(String username); 19 | 20 | /** 21 | * 根据用户名和密码查询用户信息 22 | * @param username 23 | * @param password 24 | * @return 如果返回null则说明用户名或密码错误 25 | */ 26 | public User querybyUsernameAndPassword(String username,String password); 27 | 28 | /** 29 | * 保存用户信息 30 | * @param user 31 | * @return 32 | */ 33 | public int saveUser(User user); 34 | 35 | public int addUser(User user); 36 | 37 | public int deleteUserById(int i); 38 | 39 | public int updateUser(User user); 40 | 41 | public User queryUserById(Integer id); 42 | 43 | public List queryUsers(); 44 | 45 | public Integer queryForPageTotalCount(); 46 | 47 | public List queryForPageItems(int begin, int pageSize); 48 | } 49 | -------------------------------------------------------------------------------- /src/com/yj/dao/impl/BaseDao.java: -------------------------------------------------------------------------------- 1 | package com.yj.dao.impl; 2 | 3 | import com.yj.utils.JDBCUtils; 4 | import org.apache.commons.dbutils.QueryRunner; 5 | import org.apache.commons.dbutils.handlers.BeanHandler; 6 | import org.apache.commons.dbutils.handlers.BeanListHandler; 7 | import org.apache.commons.dbutils.handlers.ScalarHandler; 8 | 9 | import java.sql.Connection; 10 | import java.sql.SQLException; 11 | import java.util.List; 12 | 13 | /** 14 | * @author yj 15 | * @create 2020-08-21 11:32 16 | */ 17 | public abstract class BaseDao { 18 | //使用DbUtils操作数据库 19 | private QueryRunner queryRunner = new QueryRunner(); 20 | /* 21 | *update()方法用来执行Insert\Update\Delete语句 22 | * @return 如果返回-1则失败,成功返回影响的行数 23 | */ 24 | public int update(String sql,Object ... args) { 25 | Connection connection = JDBCUtils.getConnection(); 26 | try { 27 | return queryRunner.update(connection,sql,args); 28 | } catch (SQLException e) { 29 | e.printStackTrace(); 30 | throw new RuntimeException(e); 31 | } 32 | } 33 | 34 | /** 35 | *查询返回一个Javabean的SQL语句 36 | * @param type 返回的对象类型 37 | * @param sql 执行的sql语句 38 | * @param args sql对应的参数值 39 | * @param 返回的类型的泛型 40 | * @return 41 | */ 42 | public T queryForOne(Class type,String sql,Object ... args) { 43 | Connection connection = JDBCUtils.getConnection(); 44 | try { 45 | return queryRunner.query(connection,sql,new BeanHandler(type),args); 46 | } catch (SQLException e) { 47 | e.printStackTrace(); 48 | throw new RuntimeException(e); 49 | } 50 | } 51 | 52 | /** 53 | *查询返回多个Javabean的SQL语句 54 | * @param type 返回的对象类型 55 | * @param sql 执行的sql语句 56 | * @param args sql对应的参数值 57 | * @param 返回的类型的泛型 58 | * @return 59 | */ 60 | public List queryForList(Class type, String sql, Object ... args) { 61 | Connection connection = JDBCUtils.getConnection(); 62 | try { 63 | return queryRunner.query(connection,sql,new BeanListHandler(type),args); 64 | } catch (SQLException e) { 65 | e.printStackTrace(); 66 | throw new RuntimeException(e); 67 | } 68 | } 69 | 70 | /** 71 | * 执行返回一行一列的sql语句 72 | * @param sql 执行的sql语句 73 | * @param args sql对应的参数值 74 | * @return 75 | */ 76 | public Object queryForSingleValue(String sql,Object ... args) { 77 | Connection connection = JDBCUtils.getConnection(); 78 | try { 79 | return queryRunner.query(connection,sql,new ScalarHandler(),args); 80 | }catch (SQLException e) { 81 | e.printStackTrace(); 82 | throw new RuntimeException(e); 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/com/yj/dao/impl/BookDaoImpl.java: -------------------------------------------------------------------------------- 1 | package com.yj.dao.impl; 2 | 3 | import com.yj.bean.Book; 4 | import com.yj.dao.BookDao; 5 | 6 | import java.math.BigDecimal; 7 | import java.util.List; 8 | 9 | /** 10 | * @author yj 11 | * @create 2020-08-23 21:38 12 | */ 13 | public class BookDaoImpl extends BaseDao implements BookDao { 14 | 15 | @Override 16 | public int addBook(Book book) { 17 | String sql = "insert into t_book(`name`,`author`,`classification`,`price`,`sales`,`stock`,`imgpath`) values(?,?,?,?,?,?,?)"; 18 | return update(sql,book.getName(),book.getAuthor(),book.getClassification(),book.getPrice(),book.getSales(),book.getStock(),book.getImgPath()); 19 | } 20 | 21 | @Override 22 | public int deleteBookById(Integer id) { 23 | String sql = "delete from t_book where id=?"; 24 | return update(sql,id); 25 | } 26 | 27 | @Override 28 | public int updateBook(Book book) { 29 | String sql = "update t_book set `name`=?,`author`=?,`classification`=?,`price`=?,`sales`=?,`stock`=?,`imgpath`=? where id=?"; 30 | return update(sql,book.getName(),book.getAuthor(),book.getClassification(),book.getPrice(),book.getSales(),book.getStock(),book.getImgPath(),book.getId()); 31 | } 32 | 33 | @Override 34 | public Book queryBookById(Integer id) { 35 | String sql = "select * from t_book where id = ?"; 36 | return queryForOne(Book.class,sql,id); 37 | } 38 | 39 | @Override 40 | public List queryBooks() { 41 | String sql = "select * from t_book"; 42 | return queryForList(Book.class,sql); 43 | } 44 | 45 | @Override 46 | public Integer queryForPageTotalCount() { 47 | String sql = "select count(*) from t_book"; 48 | Number count = (Number) queryForSingleValue(sql); 49 | return count.intValue(); 50 | } 51 | 52 | @Override 53 | public List queryForPageItems(int begin, int pageSize) { 54 | String sql = "select * from t_book limit ?,?"; 55 | return queryForList(Book.class,sql,begin,pageSize); 56 | } 57 | 58 | @Override 59 | public Integer queryForPageTotalCountByPrice(int min, int max) { 60 | String sql = "select count(*) from t_book where price between ? and ?"; 61 | Number count = (Number) queryForSingleValue(sql,min,max); 62 | return count.intValue(); 63 | } 64 | 65 | @Override 66 | public List queryForPageItemsByPrice(int begin, int pageSize, int min, int max) { 67 | String sql = "select * from t_book where price between ? and ? limit ?,?"; 68 | return queryForList(Book.class,sql,min,max,begin,pageSize); 69 | } 70 | 71 | @Override 72 | public Integer queryForPageTotalCountByNameOrAuthor(String nameorauthor) { 73 | nameorauthor = "%" + nameorauthor + "%"; 74 | String sql = "select count(*) from t_book where name like ? or author like ?"; 75 | Number count = (Number) queryForSingleValue(sql,nameorauthor,nameorauthor); 76 | return count.intValue(); 77 | } 78 | 79 | @Override 80 | public List queryForPageItemsByNameOrAuthor(int begin, int pageSize, String nameorauthor) { 81 | nameorauthor = "%" + nameorauthor + "%"; 82 | String sql = "select * from t_book where name like ? or author like ? limit ?,?"; 83 | return queryForList(Book.class,sql,nameorauthor,nameorauthor,begin,pageSize); 84 | } 85 | 86 | @Override 87 | public List queryForPageItemsOrder() { 88 | String sql = "SELECT * FROM t_book ORDER BY `sales` DESC LIMIT 1,50"; 89 | return queryForList(Book.class,sql); 90 | } 91 | 92 | @Override 93 | public BigDecimal queryTotalMoney() { 94 | String sql = "SELECT SUM(price*sales) from t_book"; 95 | return (BigDecimal) queryForSingleValue(sql); 96 | } 97 | 98 | @Override 99 | public Integer queryBooknums() { 100 | String sql = "SELECT SUM(sales) FROM t_book"; 101 | Number count = (Number) queryForSingleValue(sql); 102 | return count.intValue(); 103 | } 104 | 105 | 106 | } 107 | -------------------------------------------------------------------------------- /src/com/yj/dao/impl/OrderDaoImpl.java: -------------------------------------------------------------------------------- 1 | package com.yj.dao.impl; 2 | 3 | import com.yj.bean.Order; 4 | import com.yj.dao.OrderDao; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author yj 10 | * @create 2020-08-28 11:06 11 | */ 12 | public class OrderDaoImpl extends BaseDao implements OrderDao { 13 | @Override 14 | public int saveOrder(Order order) { 15 | 16 | String sql = "insert into t_order(`order_id`,`create_time`,`price`,`status`,`user_id`) values(?,?,?,?,?)"; 17 | return update(sql,order.getOrderId(),order.getCreateTime(),order.getPrice(),order.getStatus(),order.getUserId()); 18 | 19 | } 20 | 21 | @Override 22 | public List queryAllOrders() { 23 | // 查询所有的订单 24 | String sql = "select `order_id` AS `orderId`,`create_time`AS `createTime`,`price` AS `price`,`status` AS `status`,`user_id` AS `userId` FROM t_order"; 25 | // 执行sql语句 26 | List orders = queryForList(Order.class,sql); 27 | return orders; 28 | 29 | } 30 | 31 | @Override 32 | public void updateOrderStatus(int status, String orderId) { 33 | // sql语句 34 | String sql = "update t_order set status = ? where order_id = ?"; 35 | // 执行sql语句 36 | update(sql, status, orderId); 37 | } 38 | 39 | @Override 40 | public List queryMyOrders(int userId) { 41 | // 查询我的订单 42 | String sql = "select `order_id` AS `orderId`,`create_time`AS `createTime`,`price` AS `price`,`status` AS `status`,`user_id` AS `userId` FROM t_order where user_id=?"; 43 | // 执行sql语句 44 | List orders = queryForList(Order.class,sql,userId); 45 | return orders; 46 | } 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/com/yj/dao/impl/OrderItemDaoImpl.java: -------------------------------------------------------------------------------- 1 | package com.yj.dao.impl; 2 | 3 | import com.yj.bean.OrderItem; 4 | import com.yj.dao.OrderItemDao; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author yj 10 | * @create 2020-08-28 13:10 11 | */ 12 | public class OrderItemDaoImpl extends BaseDao implements OrderItemDao { 13 | @Override 14 | public int saveOrderItem(OrderItem orderItem) { 15 | String sql = "insert into t_order_item(`name`,`count`,`price`,`total_price`,`order_id`) values(?,?,?,?,?)"; 16 | return update(sql,orderItem.getName(),orderItem.getCount(), orderItem.getPrice(),orderItem.getTotalPrice(), orderItem.getOrderId()); 17 | } 18 | 19 | @Override 20 | public List showOrderItem(String orderId) { 21 | String sql = "select `id`,`name`,`count`,`price`,`total_price`AS `totalPrice`,`order_id`AS `orderId` from t_order_item where order_id=?"; 22 | return queryForList(OrderItem.class,sql,orderId); 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/com/yj/dao/impl/UserDaoImpl.java: -------------------------------------------------------------------------------- 1 | package com.yj.dao.impl; 2 | 3 | import com.yj.bean.User; 4 | import com.yj.dao.UserDao; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author yj 10 | * @create 2020-08-21 15:04 11 | */ 12 | public class UserDaoImpl extends BaseDao implements UserDao { 13 | @Override 14 | public User querybyUsername(String username) { 15 | String sql = "select `id`,`username`,`password`,`email`,`address` from t_user where username = ?"; 16 | return queryForOne(User.class,sql,username); 17 | } 18 | 19 | @Override 20 | public User querybyUsernameAndPassword(String username, String password) { 21 | String sql = "select * from t_user where username = ? and password = ?"; 22 | return queryForOne(User.class,sql,username,password); 23 | } 24 | 25 | @Override 26 | public int saveUser(User user) { 27 | String sql = "insert into t_user(`username`,`password`,`email`,`address`) values(?,?,?,?)"; 28 | return update(sql,user.getUsername(),user.getPassword(),user.getEmail(),user.getAddress()); 29 | } 30 | 31 | @Override 32 | public int addUser(User user) { 33 | String sql = "insert into t_user(`username`,`password`,`email`,`address`) values(?,?,?,?)"; 34 | return update(sql,user.getUsername(),user.getPassword(),user.getEmail(),user.getAddress()); 35 | } 36 | 37 | @Override 38 | public int deleteUserById(int i) { 39 | String sql = "delete from t_user where id = ?"; 40 | return update(sql,i); 41 | } 42 | 43 | @Override 44 | public int updateUser(User user) { 45 | String sql = "update t_user set `username`=?,`password`=?,`email`=?,`address`=? where id=?"; 46 | return update(sql,user.getUsername(),user.getPassword(),user.getEmail(),user.getAddress(),user.getId()); 47 | } 48 | 49 | @Override 50 | public User queryUserById(Integer id) { 51 | String sql = "select * from t_user where id=?"; 52 | return queryForOne(User.class,sql,id); 53 | } 54 | 55 | @Override 56 | public List queryUsers() { 57 | String sql = "select * from t_user"; 58 | return queryForList(User.class,sql); 59 | } 60 | 61 | @Override 62 | public Integer queryForPageTotalCount() { 63 | String sql = "select count(*) from t_user"; 64 | Number count = (Number) queryForSingleValue(sql); 65 | return count.intValue(); 66 | } 67 | 68 | @Override 69 | public List queryForPageItems(int begin, int pageSize) { 70 | String sql = "select * from t_user limit ?,?"; 71 | return queryForList(User.class,sql,begin,pageSize); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/com/yj/filter/ManagerFilter.java: -------------------------------------------------------------------------------- 1 | package com.yj.filter; 2 | 3 | 4 | import com.yj.bean.User; 5 | 6 | import javax.servlet.*; 7 | import javax.servlet.http.HttpServletRequest; 8 | import java.io.IOException; 9 | 10 | /** 11 | * @author yj 12 | * @create 2020-08-28 15:16 13 | */ 14 | public class ManagerFilter implements Filter { 15 | 16 | @Override 17 | public void init(FilterConfig filterConfig) throws ServletException { 18 | 19 | } 20 | 21 | @Override 22 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { 23 | HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest; 24 | User user = (User) httpServletRequest.getSession().getAttribute("user"); 25 | if(user==null) { 26 | httpServletRequest.getRequestDispatcher("/pages/user/login.jsp").forward(servletRequest,servletResponse); 27 | } else if(!"admin".equals(user.getUsername())){ 28 | httpServletRequest.getRequestDispatcher("/pages/error/errorManager.jsp").forward(servletRequest,servletResponse); 29 | }else{ 30 | filterChain.doFilter(servletRequest,servletResponse); 31 | } 32 | } 33 | 34 | @Override 35 | public void destroy() { 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/com/yj/filter/TransactionFilter.java: -------------------------------------------------------------------------------- 1 | package com.yj.filter; 2 | 3 | import com.yj.utils.JDBCUtils; 4 | 5 | import javax.servlet.*; 6 | import java.io.IOException; 7 | 8 | /** 9 | * @author yj 10 | * @create 2020-08-28 21:54 11 | */ 12 | public class TransactionFilter implements Filter { 13 | 14 | @Override 15 | public void init(FilterConfig filterConfig) throws ServletException { 16 | 17 | } 18 | 19 | @Override 20 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { 21 | try { 22 | filterChain.doFilter(servletRequest,servletResponse); 23 | JDBCUtils.commitAndClose();//提交事务 24 | } catch (Exception e) { 25 | JDBCUtils.rollbackAndClose();//回滚事务 26 | e.printStackTrace(); 27 | throw new RuntimeException(e);//把异常抛给tomcat服务器统一展示友好提示页面 28 | } 29 | } 30 | 31 | @Override 32 | public void destroy() { 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/com/yj/service/BookService.java: -------------------------------------------------------------------------------- 1 | package com.yj.service; 2 | 3 | import com.yj.bean.Book; 4 | import com.yj.bean.Page; 5 | 6 | import java.math.BigDecimal; 7 | import java.util.List; 8 | 9 | /** 10 | * @author yj 11 | * @create 2020-08-24 14:40 12 | */ 13 | public interface BookService { 14 | 15 | public void addBook(Book book); 16 | 17 | public void updateBook(Book book); 18 | 19 | public void deleteBookById(Integer id); 20 | 21 | public Book queryBookById(Integer id); 22 | 23 | public List queryBooks(); 24 | 25 | Page page(int pageNo, int pageSize); 26 | 27 | Page pageByPrice(int pageNo, int pageSize, int min, int max); 28 | 29 | Page pageByNameOrAuthor(int pageNo, int pageSize, String nameOrAuthor); 30 | 31 | Page pageOrder(); 32 | 33 | public Integer queryTotalBooks(); 34 | 35 | BigDecimal queryTotalMoney(); 36 | } 37 | -------------------------------------------------------------------------------- /src/com/yj/service/OrderService.java: -------------------------------------------------------------------------------- 1 | package com.yj.service; 2 | 3 | import com.yj.bean.*; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author yj 9 | * @create 2020-08-28 13:59 10 | */ 11 | public interface OrderService { 12 | /** 13 | * 创建订单 14 | * @param cart 15 | * @param userId 16 | * @return 17 | */ 18 | public String createOrder(Cart cart, Integer userId); 19 | 20 | /** 21 | * 查询所有订单 22 | * @return 23 | */ 24 | public List queryAllOrders(); 25 | 26 | public void sendOrder(String orderId); 27 | 28 | public List queryMyOrders(Integer id); 29 | 30 | public void receivedOrder(String orderId); 31 | 32 | 33 | List showOrderItem(String orderId); 34 | } 35 | -------------------------------------------------------------------------------- /src/com/yj/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.yj.service; 2 | 3 | import com.yj.bean.Book; 4 | import com.yj.bean.Page; 5 | import com.yj.bean.User; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author yj 11 | * @create 2020-08-21 15:29 12 | */ 13 | public interface UserService { 14 | /** 15 | * 注册用户 16 | * @param user 17 | */ 18 | public void registUser(User user); 19 | 20 | /** 21 | * 登录 22 | * @param user 23 | * @return 24 | */ 25 | public User login(User user); 26 | 27 | /** 28 | * 检查用户名是否可用 29 | * @param username 30 | * @return 返回true表示用户名已存在,返回false表示用户名可用 31 | */ 32 | public boolean existsUsername(String username); 33 | 34 | public void addUser(User user); 35 | 36 | public void deleteUserById(int i); 37 | 38 | public void updateUser(User user); 39 | 40 | public User queryUserById(Integer id); 41 | 42 | public List queryUsers(); 43 | 44 | public Page page(int pageNo, int pageSize); 45 | } 46 | -------------------------------------------------------------------------------- /src/com/yj/service/impl/OrderServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.yj.service.impl; 2 | 3 | import com.yj.bean.*; 4 | import com.yj.dao.BookDao; 5 | import com.yj.dao.OrderDao; 6 | import com.yj.dao.OrderItemDao; 7 | import com.yj.dao.impl.BookDaoImpl; 8 | import com.yj.dao.impl.OrderDaoImpl; 9 | import com.yj.dao.impl.OrderItemDaoImpl; 10 | import com.yj.service.OrderService; 11 | 12 | import java.util.Date; 13 | import java.util.List; 14 | import java.util.Map; 15 | 16 | /** 17 | * @author yj 18 | * @create 2020-08-28 14:01 19 | */ 20 | public class OrderServiceImpl implements OrderService { 21 | private OrderDao orderDao = new OrderDaoImpl(); 22 | private OrderItemDao orderItemDao = new OrderItemDaoImpl(); 23 | private BookDao bookDao = new BookDaoImpl(); 24 | @Override 25 | public String createOrder(Cart cart, Integer userId) { 26 | //订单号唯一 27 | String orderId = System.currentTimeMillis() + "" + userId; 28 | //创建一个订单对象 29 | Order order = new Order(orderId,new Date(),cart.getTotalPrice(),0,userId); 30 | orderDao.saveOrder(order); 31 | for(Map.Entryentry : cart.getItems().entrySet()) { 32 | //获取每个购物车中的商品项转换为每一个订单项 33 | CartItem cartItem = entry.getValue(); 34 | OrderItem orderItem = new OrderItem(null,cartItem.getName(),cartItem.getCount(),cartItem.getPrice(),cartItem.getTotalPrice(),orderId); 35 | //保存订单到数据库 36 | orderItemDao.saveOrderItem(orderItem); 37 | Book book = bookDao.queryBookById(cartItem.getId()); 38 | book.setSales(book.getSales() + cartItem.getCount()); 39 | book.setStock(book.getStock() - cartItem.getCount()); 40 | bookDao.updateBook(book); 41 | 42 | } 43 | cart.clear(); 44 | return orderId; 45 | } 46 | 47 | @Override 48 | public List queryAllOrders() { 49 | // 查询所有订单 50 | return orderDao.queryAllOrders(); 51 | } 52 | 53 | @Override 54 | public void sendOrder(String orderId) { 55 | // 修改订单状态为已发货 56 | orderDao.updateOrderStatus(1, orderId); 57 | } 58 | 59 | @Override 60 | public List queryMyOrders(Integer id) { 61 | return orderDao.queryMyOrders(id); 62 | } 63 | 64 | 65 | @Override 66 | public void receivedOrder(String orderId) { 67 | // 修改订单状态为已收货 68 | orderDao.updateOrderStatus(2, orderId); 69 | } 70 | 71 | @Override 72 | public List showOrderItem(String orderId) { 73 | List orderItems = orderItemDao.showOrderItem(orderId); 74 | return orderItems; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/com/yj/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.yj.service.impl; 2 | 3 | import com.yj.bean.Book; 4 | import com.yj.bean.Page; 5 | import com.yj.bean.User; 6 | import com.yj.dao.UserDao; 7 | import com.yj.dao.impl.UserDaoImpl; 8 | import com.yj.service.UserService; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author yj 14 | * @create 2020-08-21 15:34 15 | */ 16 | public class UserServiceImpl implements UserService { 17 | 18 | private UserDao userDao = new UserDaoImpl(); 19 | 20 | @Override 21 | public void registUser(User user) { 22 | userDao.saveUser(user); 23 | } 24 | 25 | @Override 26 | public User login(User user) { 27 | return userDao.querybyUsernameAndPassword(user.getUsername(),user.getPassword()); 28 | } 29 | 30 | @Override 31 | public boolean existsUsername(String username) { 32 | if (userDao.querybyUsername(username) == null) { 33 | return false; 34 | } else { 35 | return true; 36 | } 37 | } 38 | 39 | @Override 40 | public void addUser(User user) { 41 | userDao.addUser(user); 42 | } 43 | 44 | @Override 45 | public void deleteUserById(int i) { 46 | userDao.deleteUserById(i); 47 | } 48 | 49 | @Override 50 | public void updateUser(User user) { 51 | userDao.updateUser(user); 52 | } 53 | 54 | @Override 55 | public User queryUserById(Integer id) { 56 | return userDao.queryUserById(id); 57 | } 58 | 59 | @Override 60 | public List queryUsers() { 61 | return userDao.queryUsers(); 62 | } 63 | 64 | @Override 65 | public Page page(int pageNo, int pageSize) { 66 | Page page = new Page(); 67 | 68 | //设置每页记录数 69 | page.setPageSize(pageSize); 70 | 71 | //设置总记录数 72 | Integer pageTotalCount = userDao.queryForPageTotalCount(); 73 | page.setPageTotalCount(pageTotalCount); 74 | 75 | //求总页码 76 | Integer pageTotal = pageTotalCount / pageSize; 77 | if(pageTotalCount % pageSize >0) { 78 | pageTotal+=1; 79 | } 80 | //设置当前页 81 | if(pageNo>pageTotal) { 82 | pageNo = pageTotal; 83 | } 84 | if(pageNo<1) { 85 | pageNo = 1; 86 | } 87 | page.setPageNo(pageNo); 88 | //设置总页码 89 | page.setPageTotal(pageTotal); 90 | 91 | 92 | int begin = (page.getPageNo() -1)*pageSize; 93 | List items = userDao.queryForPageItems(begin,pageSize); 94 | page.setItems(items); 95 | 96 | return page; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/com/yj/test/BookDaoTest.java: -------------------------------------------------------------------------------- 1 | package com.yj.test; 2 | 3 | import com.yj.bean.Book; 4 | import com.yj.dao.BookDao; 5 | import com.yj.dao.impl.BookDaoImpl; 6 | import org.junit.Test; 7 | 8 | import java.math.BigDecimal; 9 | 10 | /** 11 | * @author yj 12 | * @create 2020-08-24 11:01 13 | */ 14 | public class BookDaoTest { 15 | BookDao bookDao = new BookDaoImpl(); 16 | 17 | @Test 18 | public void addBook() { 19 | //`name`,`author`,`classification`,`price`,`sales`,`stock`,`img_path` 20 | //Integer id, String name, String author, BigDecimal price, Integer sales, Integer stock, String classification, String imgPath) 21 | bookDao.addBook(new Book(null,"舌的中国","yjjj",new BigDecimal("5"),100,23,"","")); 22 | } 23 | 24 | @Test 25 | public void deleteBook() { 26 | bookDao.deleteBookById(3); 27 | } 28 | 29 | @Test 30 | public void queryById() { 31 | System.out.println(bookDao.queryBookById(64)); 32 | } 33 | 34 | @Test 35 | public void update() { 36 | bookDao.updateBook(new Book(35,"舌尖的中国","yj",new BigDecimal("5"),100,23,"文学","")); 37 | } 38 | 39 | @Test 40 | public void queryList() { 41 | System.out.println(bookDao.queryBooks()); 42 | } 43 | 44 | @Test 45 | public void queryForPageTotalCount() { 46 | System.out.println(bookDao.queryForPageTotalCount()); 47 | } 48 | 49 | @Test 50 | public void queryForPageItems() { 51 | System.out.println(bookDao.queryForPageItems(1,4)); 52 | } 53 | 54 | @Test 55 | public void queryForPageTotalCountByPrice() { 56 | System.out.println(bookDao.queryForPageTotalCountByPrice(10,50)); 57 | } 58 | 59 | @Test 60 | public void queryForPageItemsByPrice() { 61 | System.out.println(bookDao.queryForPageItemsByPrice(1,4,10,50)); 62 | } 63 | 64 | @Test 65 | public void queryBooknums() { 66 | System.out.println(bookDao.queryBooknums()); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/com/yj/test/BookServiceTest.java: -------------------------------------------------------------------------------- 1 | package com.yj.test; 2 | 3 | import com.yj.bean.Book; 4 | import com.yj.dao.BookDao; 5 | import com.yj.dao.impl.BookDaoImpl; 6 | import com.yj.service.BookService; 7 | import com.yj.service.impl.BookServiceImpl; 8 | import org.junit.Test; 9 | 10 | import java.math.BigDecimal; 11 | 12 | /** 13 | * @author yj 14 | * @create 2020-08-24 14:57 15 | */ 16 | public class BookServiceTest { 17 | 18 | private BookDao bookDao = new BookDaoImpl(); 19 | private BookService bookService = new BookServiceImpl(); 20 | @Test 21 | public void addBook() { 22 | bookDao.addBook(new Book(null,"舌尖上的中国","yj",new BigDecimal("5"),100,23,"文学","")); 23 | } 24 | 25 | @Test 26 | public void updateBook() { 27 | bookDao.updateBook(new Book(null,"舌尖上的中国","yj",new BigDecimal("5"),100,23,"文学","")); 28 | } 29 | 30 | @Test 31 | public void deleteBookById() { 32 | System.out.println(bookDao.deleteBookById(25)); 33 | } 34 | 35 | @Test 36 | public void queryBookById() { 37 | System.out.println(bookDao.queryBookById(23)); 38 | } 39 | 40 | @Test 41 | public void queryBooks() { 42 | System.out.println(bookDao.queryBooks()); 43 | } 44 | 45 | @Test 46 | public void page() { 47 | System.out.println(bookDao.queryForPageTotalCount()); 48 | } 49 | 50 | @Test 51 | public void queryTotalMoney() { 52 | System.out.println(bookDao.queryTotalMoney()); 53 | } 54 | } -------------------------------------------------------------------------------- /src/com/yj/test/CartTest.java: -------------------------------------------------------------------------------- 1 | package com.yj.test; 2 | 3 | import com.yj.bean.Cart; 4 | import com.yj.bean.CartItem; 5 | import org.junit.Test; 6 | 7 | import java.math.BigDecimal; 8 | 9 | /** 10 | * @author yj 11 | * @create 2020-08-26 20:30 12 | */ 13 | public class CartTest { 14 | 15 | @Test 16 | public void addItem() { 17 | Cart cart = new Cart(); 18 | cart.addItem(new CartItem(1,"lkjs",1,new BigDecimal(5),new BigDecimal(66))); 19 | cart.addItem(new CartItem(1,"lkjs",1,new BigDecimal(5),new BigDecimal(66))); 20 | cart.addItem(new CartItem(2,"你妹的",1,new BigDecimal(5),new BigDecimal(66))); 21 | System.out.println(cart); 22 | } 23 | 24 | @Test 25 | public void deleteItem() { 26 | Cart cart = new Cart(); 27 | cart.addItem(new CartItem(1,"lkjs",1,new BigDecimal(5),new BigDecimal(66))); 28 | cart.addItem(new CartItem(1,"lkjs",1,new BigDecimal(5),new BigDecimal(66))); 29 | cart.addItem(new CartItem(2,"你妹的",1,new BigDecimal(5),new BigDecimal(66))); 30 | cart.deleteItem(1); 31 | System.out.println(cart); 32 | } 33 | 34 | @Test 35 | public void clear() { 36 | Cart cart = new Cart(); 37 | cart.addItem(new CartItem(1,"lkjs",1,new BigDecimal(5),new BigDecimal(66))); 38 | cart.addItem(new CartItem(1,"lkjs",1,new BigDecimal(5),new BigDecimal(66))); 39 | cart.addItem(new CartItem(2,"你妹的",1,new BigDecimal(5),new BigDecimal(66))); 40 | cart.clear(); 41 | System.out.println(cart); 42 | } 43 | 44 | @Test 45 | public void updateCount() { 46 | Cart cart = new Cart(); 47 | cart.addItem(new CartItem(1,"lkjs",1,new BigDecimal(5),new BigDecimal(66))); 48 | cart.addItem(new CartItem(1,"lkjs",1,new BigDecimal(5),new BigDecimal(66))); 49 | cart.addItem(new CartItem(2,"你妹的",1,new BigDecimal(5),new BigDecimal(66))); 50 | cart.updateCount(1,5); 51 | System.out.println(cart); 52 | } 53 | } -------------------------------------------------------------------------------- /src/com/yj/test/JDBCUtilsTest.java: -------------------------------------------------------------------------------- 1 | package com.yj.test; 2 | 3 | import com.yj.utils.JDBCUtils; 4 | import org.junit.Test; 5 | 6 | import java.sql.Connection; 7 | import java.sql.ResultSet; 8 | import java.sql.Statement; 9 | 10 | /** 11 | * @author yj 12 | * @create 2020-08-21 11:25 13 | */ 14 | public class JDBCUtilsTest { 15 | @Test 16 | public void testJdbcUtils() { 17 | Connection connection = JDBCUtils.getConnection(); 18 | String sql = "select * from t_book"; 19 | try (Statement st = connection.createStatement()) { 20 | ResultSet rs = st.executeQuery(sql); 21 | while(rs.next()){ 22 | System.out.println(rs.getString("author")+" " 23 | +rs.getString("name")); 24 | } 25 | }catch (Exception e) { 26 | e.printStackTrace(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/com/yj/test/OrderDaoTest.java: -------------------------------------------------------------------------------- 1 | package com.yj.test; 2 | 3 | import com.yj.dao.OrderDao; 4 | import com.yj.dao.impl.OrderDaoImpl; 5 | import org.junit.Test; 6 | 7 | /** 8 | * @author yj 9 | * @create 2020-08-29 21:39 10 | */ 11 | public class OrderDaoTest { 12 | 13 | private OrderDao orderDao = new OrderDaoImpl(); 14 | @Test 15 | public void saveOrder() { 16 | } 17 | 18 | @Test 19 | public void queryAllOrders() { 20 | System.out.println(orderDao.queryAllOrders()); 21 | } 22 | 23 | @Test 24 | public void updateOrderStatus() { 25 | orderDao.updateOrderStatus(1,"15987004865195"); 26 | } 27 | 28 | @Test 29 | public void queryMyOrders() { 30 | System.out.println(orderDao.queryMyOrders(1)); 31 | } 32 | 33 | 34 | } -------------------------------------------------------------------------------- /src/com/yj/test/OrderItemDaoTest.java: -------------------------------------------------------------------------------- 1 | package com.yj.test; 2 | 3 | import com.yj.bean.OrderItem; 4 | import com.yj.dao.OrderItemDao; 5 | import com.yj.dao.impl.OrderItemDaoImpl; 6 | import org.junit.Test; 7 | 8 | import java.math.BigDecimal; 9 | 10 | /** 11 | * @author yj 12 | * @create 2020-08-28 13:23 13 | */ 14 | public class OrderItemDaoTest { 15 | private OrderItemDao orderItemDao = new OrderItemDaoImpl(); 16 | @Test 17 | public void saveOrderItem() { 18 | 19 | orderItemDao.saveOrderItem(new OrderItem(1,"salfj",5,new BigDecimal(5),new BigDecimal(50),"123")); 20 | } 21 | 22 | @Test 23 | public void showOrderItem() { 24 | System.out.println(orderItemDao.showOrderItem("15987004865195")); 25 | 26 | } 27 | } -------------------------------------------------------------------------------- /src/com/yj/test/OrderServiceTest.java: -------------------------------------------------------------------------------- 1 | package com.yj.test; 2 | 3 | import com.yj.bean.Cart; 4 | import com.yj.bean.CartItem; 5 | import com.yj.service.OrderService; 6 | import com.yj.service.impl.OrderServiceImpl; 7 | import org.junit.Test; 8 | 9 | import java.math.BigDecimal; 10 | 11 | /** 12 | * @author yj 13 | * @create 2020-08-28 14:14 14 | */ 15 | public class OrderServiceTest { 16 | private OrderService orderService = new OrderServiceImpl(); 17 | @Test 18 | public void createOrder() { 19 | Cart cart = new Cart(); 20 | cart.addItem(new CartItem(1,"lkjs",1,new BigDecimal(5),new BigDecimal(66))); 21 | cart.addItem(new CartItem(1,"lkjs",1,new BigDecimal(5),new BigDecimal(66))); 22 | cart.addItem(new CartItem(2,"你妹的",1,new BigDecimal(5),new BigDecimal(66))); 23 | 24 | System.out.println(orderService.createOrder(cart,1)); 25 | } 26 | 27 | @Test 28 | public void queryAllOrders() { 29 | System.out.println(orderService.queryAllOrders()); 30 | } 31 | 32 | @Test 33 | public void queryMyOrders() { 34 | System.out.println(orderService.queryMyOrders(5)); 35 | } 36 | 37 | @Test 38 | public void receivedOrder() { 39 | } 40 | } -------------------------------------------------------------------------------- /src/com/yj/test/UserDaoTest.java: -------------------------------------------------------------------------------- 1 | package com.yj.test; 2 | 3 | import com.yj.bean.User; 4 | import com.yj.dao.UserDao; 5 | import com.yj.dao.impl.UserDaoImpl; 6 | import com.yj.service.impl.UserServiceImpl; 7 | import org.junit.Test; 8 | 9 | import java.sql.SQLOutput; 10 | import java.util.List; 11 | 12 | /** 13 | * @author yj 14 | * @create 2020-08-21 15:14 15 | */ 16 | public class UserDaoTest { 17 | 18 | UserDao userDao = new UserDaoImpl(); 19 | @Test 20 | public void querybyUsername() { 21 | if(userDao.querybyUsername("yan1gjie")==null) { 22 | System.out.println("用户名可用"); 23 | } else { 24 | System.out.println("用户名已存在!"); 25 | } 26 | //System.out.println(userDao.querybyUsername("yangjie")); 27 | } 28 | 29 | @Test 30 | public void querybyUsernameAndPassword() { 31 | if(userDao.querybyUsernameAndPassword("yagjie","yanjie")==null) { 32 | System.out.println("密码错误或用户名错误"); 33 | }else { 34 | System.out.println("登陆成功"); 35 | } 36 | } 37 | 38 | @Test 39 | public void saveUser() { 40 | System.out.println(userDao.saveUser(new User(null,"yangjie2","yangjie","wzg168@qq.com","大河湾"))); 41 | } 42 | 43 | @Test 44 | public void addUser() { 45 | System.out.println(userDao.addUser(new User(null,"舒胡2贤","123456","123456@qq.com","贵州"))); 46 | } 47 | 48 | @Test 49 | public void deleteUserById() { 50 | System.out.println(userDao.deleteUserById(3)); 51 | } 52 | 53 | @Test 54 | public void updateUser() { 55 | System.out.println(userDao.updateUser(new User(3,"舒胡贤","123456","123456@qq.com","贵州"))); 56 | } 57 | 58 | @Test 59 | public void queryUserById() { 60 | User user = userDao.queryUserById(1); 61 | System.out.println(user); 62 | } 63 | 64 | @Test 65 | public void queryUsers() { 66 | List users = userDao.queryUsers(); 67 | System.out.println(users); 68 | } 69 | 70 | @Test 71 | public void queryForPageTotalCount() { 72 | System.out.println(userDao.queryForPageTotalCount()); 73 | } 74 | 75 | @Test 76 | public void queryForPageItems() { 77 | System.out.println(userDao.queryForPageItems(1,2)); 78 | } 79 | } -------------------------------------------------------------------------------- /src/com/yj/test/UserServiceImplTest.java: -------------------------------------------------------------------------------- 1 | package com.yj.test; 2 | 3 | import com.yj.bean.User; 4 | import com.yj.service.UserService; 5 | import com.yj.service.impl.UserServiceImpl; 6 | import org.junit.Test; 7 | 8 | /** 9 | * @author yj 10 | * @create 2020-08-21 15:38 11 | */ 12 | public class UserServiceImplTest { 13 | 14 | UserService userService = new UserServiceImpl(); 15 | @Test 16 | public void registUser() { 17 | userService.registUser(new User(null,"admin","admin","225@qq.com","大河湾" 18 | )); 19 | } 20 | 21 | @Test 22 | public void login() { 23 | if(userService.login(new User(null,"admin123","admin",null,"大河湾"))==null) { 24 | System.out.println("登录失败"); 25 | } else { 26 | 27 | System.out.println("登陆成功"); 28 | } 29 | } 30 | 31 | @Test 32 | public void existsUsername() { 33 | if(userService.existsUsername("admin35135")==false) { 34 | System.out.println("用户名可用"); 35 | } else { 36 | System.out.println("用户名已存在"); 37 | 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/com/yj/test/UserServiceTest.java: -------------------------------------------------------------------------------- 1 | package com.yj.test; 2 | 3 | import com.yj.bean.User; 4 | import com.yj.service.UserService; 5 | import com.yj.service.impl.UserServiceImpl; 6 | import org.junit.Test; 7 | 8 | import static org.junit.Assert.*; 9 | 10 | /** 11 | * @author yj 12 | * @create 2020-10-21 18:50 13 | */ 14 | public class UserServiceTest { 15 | UserService userService = new UserServiceImpl(); 16 | @Test 17 | public void addUser() { 18 | userService.addUser(new User(null,"舒胡贤2","kj","1234@qq.com","kjk")); 19 | } 20 | 21 | @Test 22 | public void deleteUserById() { 23 | userService.deleteUserById(3); 24 | } 25 | 26 | @Test 27 | public void updateUser() { 28 | } 29 | 30 | @Test 31 | public void queryUserById() { 32 | } 33 | 34 | @Test 35 | public void queryUsers() { 36 | } 37 | 38 | @Test 39 | public void page() { 40 | } 41 | } -------------------------------------------------------------------------------- /src/com/yj/utils/JDBCUtils.java: -------------------------------------------------------------------------------- 1 | package com.yj.utils; 2 | 3 | import com.alibaba.druid.pool.DruidDataSource; 4 | import com.alibaba.druid.pool.DruidDataSourceFactory; 5 | import com.alibaba.druid.util.JdbcUtils; 6 | 7 | import java.io.InputStream; 8 | import java.sql.Connection; 9 | import java.sql.SQLException; 10 | import java.util.Properties; 11 | 12 | /** 13 | * @author yj 14 | * @create 2020-08-21 10:48 15 | */ 16 | public class JDBCUtils { 17 | private static DruidDataSource dataSource; 18 | private static ThreadLocal conns = new ThreadLocal(); 19 | 20 | static { 21 | try { 22 | Properties properties = new Properties(); 23 | //读取jdbc.properties属性配置文件 24 | InputStream inputStream = JdbcUtils.class.getClassLoader().getResourceAsStream("jdbc.properties" ); 25 | //从流中加载数据 26 | properties.load(inputStream); 27 | //创建数据库连接池 28 | dataSource = (DruidDataSource) DruidDataSourceFactory.createDataSource(properties); 29 | 30 | } catch (Exception e) { 31 | e.printStackTrace(); 32 | } 33 | 34 | } 35 | 36 | 37 | 38 | 39 | 40 | /* 41 | 获取数据库连接池的连接 42 | @retrun 如果返回null则连接失败 43 | */ 44 | public static Connection getConnection() { 45 | Connection conn = conns.get(); 46 | if(conn == null) { 47 | try { 48 | conn = dataSource.getConnection();//从数据库池中获取连接 49 | conns.set(conn);//保存到ThreadLocal对象中,供后面的JDBC操作使用 50 | conn.setAutoCommit(false);//设置为手动管理事务 51 | } catch (SQLException throwables) { 52 | throwables.printStackTrace(); 53 | } 54 | } 55 | return conn; 56 | } 57 | 58 | /** 59 | * 提交事务并关闭释放连接 60 | */ 61 | public static void commitAndClose() { 62 | Connection connection = conns.get(); 63 | if(connection!=null) { 64 | try { 65 | connection.commit();//提交事务 66 | } catch (SQLException throwables) { 67 | throwables.printStackTrace(); 68 | }finally { 69 | try { 70 | connection.close();//关闭连接释放资源 71 | } catch (SQLException throwables) { 72 | throwables.printStackTrace(); 73 | } 74 | } 75 | } 76 | //一定要执行remove操作,否则就会出错,因为tomcat底层使用了线程池技术 77 | conns.remove(); 78 | } 79 | 80 | /** 81 | * 回滚事务并关闭释放连接 82 | */ 83 | public static void rollbackAndClose() { 84 | Connection connection = conns.get(); 85 | if(connection!=null) { 86 | try { 87 | connection.rollback();//回滚事务 88 | } catch (SQLException throwables) { 89 | throwables.printStackTrace(); 90 | }finally { 91 | try { 92 | connection.close();//关闭连接释放资源 93 | } catch (SQLException throwables) { 94 | throwables.printStackTrace(); 95 | } 96 | } 97 | } 98 | //一定要执行remove操作,否则就会出错,因为tomcat底层使用了线程池技术 99 | conns.remove(); 100 | } 101 | 102 | /* 103 | 关闭连接,放回数据库连接池 104 | 105 | public static void close(Connection conn) { 106 | if(conn != null) { 107 | try { 108 | conn.close(); 109 | } catch (SQLException throwables) { 110 | throwables.printStackTrace(); 111 | } 112 | } 113 | }*/ 114 | 115 | } 116 | -------------------------------------------------------------------------------- /src/com/yj/utils/WebUtils.java: -------------------------------------------------------------------------------- 1 | package com.yj.utils; 2 | 3 | import org.apache.commons.beanutils.BeanUtils; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * @author yj 9 | * @create 2020-08-23 17:01 10 | */ 11 | public class WebUtils { 12 | /** 13 | * 快速注入 14 | * @param value 15 | * @param bean 16 | * @return 17 | */ 18 | public static Object copyParamToBean(Map value, Object bean) { 19 | try { 20 | BeanUtils.populate(bean,value); 21 | } catch (Exception e) { 22 | e.printStackTrace(); 23 | } 24 | return bean; 25 | } 26 | 27 | public static int parseInt(String strInt,int defaultValue) { 28 | int n = 0; 29 | try { 30 | n = Integer.parseInt(strInt); 31 | } catch (Exception e) { 32 | return defaultValue; 33 | } 34 | return n; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/com/yj/web/BaseServlet.java: -------------------------------------------------------------------------------- 1 | package com.yj.web; 2 | 3 | import javax.servlet.ServletException; 4 | import javax.servlet.http.HttpServlet; 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import java.io.IOException; 8 | import java.lang.reflect.Method; 9 | 10 | /** 11 | * @author yj 12 | * @create 2020-08-23 16:51 13 | */ 14 | public abstract class BaseServlet extends HttpServlet { 15 | 16 | @Override 17 | protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 18 | doPost(req,resp); 19 | } 20 | 21 | protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 22 | //解决post请求中文乱码 23 | req.setCharacterEncoding("utf-8"); 24 | //解决相应的中文乱码 25 | resp.setContentType("text/html;charset=UTF-8"); 26 | String action = req.getParameter("action"); 27 | try { 28 | Method method = this.getClass().getDeclaredMethod(action, HttpServletRequest.class,HttpServletResponse.class); 29 | method.invoke(this,req,resp); 30 | } catch (Exception e) { 31 | e.printStackTrace(); 32 | throw new RuntimeException(e); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/com/yj/web/BookServlet.java: -------------------------------------------------------------------------------- 1 | package com.yj.web; 2 | 3 | import com.yj.bean.Book; 4 | import com.yj.bean.Page; 5 | import com.yj.service.BookService; 6 | import com.yj.service.impl.BookServiceImpl; 7 | import com.yj.utils.WebUtils; 8 | 9 | import javax.servlet.ServletException; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | import java.io.IOException; 13 | import java.util.List; 14 | 15 | /** 16 | * @author yj 17 | * @create 2020-08-24 15:25 18 | */ 19 | public class BookServlet extends BaseServlet { 20 | 21 | private BookService bookService = new BookServiceImpl(); 22 | 23 | protected void add(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 24 | int pageNo = WebUtils.parseInt(req.getParameter("pageNo"),0); 25 | pageNo+=1; 26 | Book book = (Book) WebUtils.copyParamToBean(req.getParameterMap(),new Book()); 27 | bookService.addBook(book); 28 | //req.getRequestDispatcher("/manager/bookServlet?action=list").forward(req,resp); 29 | resp.sendRedirect(req.getContextPath() + "/manager/bookServlet?action=page&pageNo="+pageNo); 30 | } 31 | 32 | 33 | protected void delete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 34 | String id = req.getParameter("id"); 35 | int i = Integer.parseInt(id); 36 | bookService.deleteBookById(i); 37 | resp.sendRedirect(req.getContextPath() + "/manager/bookServlet?action=page&pageNo="+req.getParameter("pageNo")); 38 | } 39 | 40 | 41 | protected void update(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 42 | Book book = (Book) WebUtils.copyParamToBean(req.getParameterMap(),new Book()); 43 | bookService.updateBook(book); 44 | resp.sendRedirect(req.getContextPath() + "/manager/bookServlet?action=page&pageNo="+req.getParameter("pageNo")); 45 | } 46 | 47 | /** 48 | * 49 | * @param req 50 | * @param resp 51 | * @throws ServletException 52 | * @throws IOException 53 | */ 54 | protected void getBook(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 55 | String id = req.getParameter("id"); 56 | int i = Integer.parseInt(id); 57 | Book book = bookService.queryBookById(i); 58 | req.setAttribute("book",book); 59 | req.getRequestDispatcher("/pages/manager/book_edit.jsp").forward(req,resp); 60 | } 61 | 62 | 63 | protected void list(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 64 | //1、通过BookService查询数据 65 | Listbooks = bookService.queryBooks(); 66 | //2、将数据保存在request域中 67 | req.setAttribute("books",books); 68 | //3、请求转发到pages/manager/book_manager.jsp 69 | req.getRequestDispatcher("/pages/manager/book_manager.jsp").forward(req,resp); 70 | } 71 | 72 | protected void page(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 73 | //1、获取请求的参数pageNo和pageSize 74 | int pageNo = WebUtils.parseInt(req.getParameter("pageNo"),1); 75 | int pageSize = WebUtils.parseInt(req.getParameter("pageSize"), Page.PAGE_SIZE); 76 | 77 | //2、调用BookService.page(pageNo,pageSize)方法:返回page对象 78 | Page page = bookService.page(pageNo,pageSize); 79 | page.setUrl("manager/bookServlet?action=page"); 80 | 81 | //3、保存Page对象到request域中 82 | req.setAttribute("page",page); 83 | //4、请求转发到page/manager/book_manager.jsp页面 84 | req.getRequestDispatcher("/pages/manager/book_manager.jsp").forward(req,resp); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/com/yj/web/CartServlet.java: -------------------------------------------------------------------------------- 1 | package com.yj.web; 2 | 3 | import com.google.gson.Gson; 4 | import com.yj.bean.Book; 5 | import com.yj.bean.Cart; 6 | import com.yj.bean.CartItem; 7 | import com.yj.service.BookService; 8 | import com.yj.service.impl.BookServiceImpl; 9 | import com.yj.utils.WebUtils; 10 | 11 | import javax.servlet.ServletException; 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | import java.io.IOException; 15 | import java.util.HashMap; 16 | import java.util.Map; 17 | 18 | /** 19 | * @author yj 20 | * @create 2020-08-27 9:47 21 | */ 22 | public class CartServlet extends BaseServlet { 23 | 24 | private BookService bookService = new BookServiceImpl(); 25 | 26 | protected void ajaxAddItem(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 27 | int id = WebUtils.parseInt(req.getParameter("id"),0); 28 | Book book = bookService.queryBookById(id); 29 | CartItem cartItem = new CartItem(book.getId(),book.getName(),1,book.getPrice(),book.getPrice()); 30 | Cart cart = (Cart) req.getSession().getAttribute("cart"); 31 | if(cart==null) { 32 | cart = new Cart(); 33 | req.getSession().setAttribute("cart",cart); 34 | } 35 | cart.addItem(cartItem); 36 | req.getSession().setAttribute("lastName",cartItem.getName()); 37 | 38 | //返回购物车总数量和最后一个商品的名称 39 | Map resultMap = new HashMap(); 40 | resultMap.put("totalCount",cart.getTotalCount()); 41 | resultMap.put("lastName",cartItem.getName()); 42 | Gson gson = new Gson(); 43 | String resultMapJsonString = gson.toJson(resultMap); 44 | resp.getWriter().write(resultMapJsonString); 45 | 46 | } 47 | /** 48 | * 加入购物车 49 | * @param req 50 | * @param resp 51 | * @throws ServletException 52 | * @throws IOException 53 | */ 54 | protected void addItem(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 55 | int id = WebUtils.parseInt(req.getParameter("id"),0); 56 | Book book = bookService.queryBookById(id); 57 | CartItem cartItem = new CartItem(book.getId(),book.getName(),1,book.getPrice(),book.getPrice()); 58 | Cart cart = (Cart) req.getSession().getAttribute("cart"); 59 | if(cart==null) { 60 | cart = new Cart(); 61 | req.getSession().setAttribute("cart",cart); 62 | } 63 | cart.addItem(cartItem); 64 | req.getSession().setAttribute("lastName",cartItem.getName()); 65 | resp.sendRedirect(req.getHeader("Referer")); 66 | } 67 | 68 | /** 69 | * 删除商品项 70 | * @param req 71 | * @param resp 72 | * @throws ServletException 73 | * @throws IOException 74 | */ 75 | protected void deleteItem(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 76 | int id = WebUtils.parseInt(req.getParameter("id"),0); 77 | Cart cart = (Cart) req.getSession().getAttribute("cart"); 78 | if(cart!=null) { 79 | cart.deleteItem(id); 80 | resp.sendRedirect(req.getHeader("Referer")); 81 | } 82 | } 83 | 84 | /** 85 | * 清空商品项 86 | * @param req 87 | * @param resp 88 | * @throws ServletException 89 | * @throws IOException 90 | */ 91 | protected void clearItem(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 92 | req.getSession().removeAttribute("cart"); 93 | resp.sendRedirect(req.getHeader("Referer")); 94 | } 95 | 96 | /** 97 | * 修改商品数量 98 | * @param req 99 | * @param resp 100 | * @throws ServletException 101 | * @throws IOException 102 | */ 103 | protected void updateCount(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 104 | int id = WebUtils.parseInt(req.getParameter("id"),0); 105 | int count = WebUtils.parseInt(req.getParameter("count"),1); 106 | Cart cart = (Cart) req.getSession().getAttribute("cart"); 107 | if(cart!=null) { 108 | cart.updateCount(id,count); 109 | resp.sendRedirect(req.getHeader("Referer")); 110 | } 111 | 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /src/com/yj/web/ClientBookServlet.java: -------------------------------------------------------------------------------- 1 | package com.yj.web; 2 | 3 | import com.yj.bean.Book; 4 | import com.yj.bean.Page; 5 | import com.yj.service.BookService; 6 | import com.yj.service.impl.BookServiceImpl; 7 | import com.yj.utils.WebUtils; 8 | 9 | import javax.servlet.ServletException; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | import java.io.IOException; 13 | 14 | /** 15 | * @author yj 16 | * @create 2020-08-26 15:38 17 | */ 18 | public class ClientBookServlet extends BaseServlet { 19 | 20 | private BookService bookService = new BookServiceImpl(); 21 | 22 | 23 | protected void page(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 24 | //1、获取请求的参数pageNo和pageSize 25 | int pageNo = WebUtils.parseInt(req.getParameter("pageNo"),1); 26 | int pageSize = WebUtils.parseInt(req.getParameter("pageSize"), Page.PAGE_SIZE); 27 | 28 | //2、调用BookService.page(pageNo,pageSize)方法:返回page对象 29 | Page page = bookService.page(pageNo,pageSize); 30 | page.setUrl("client/bookServlet?action=page"); 31 | //3、保存Page对象到request域中 32 | req.setAttribute("page",page); 33 | //4、请求转发到page/manager/book_manager.jsp页面 34 | req.getRequestDispatcher("/pages/client/index.jsp").forward(req,resp); 35 | } 36 | 37 | protected void pageByNameOrAuthor(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 38 | //1、获取请求的参数pageNo和pageSize、nameorauthor 39 | int pageNo = WebUtils.parseInt(req.getParameter("pageNo"),1); 40 | int pageSize = WebUtils.parseInt(req.getParameter("pageSize"), Page.PAGE_SIZE); 41 | String nameOrAuthor = req.getParameter("nameorauthor"); 42 | 43 | //2、调用BookService.page(pageNo,pageSize)方法:返回page对象 44 | Page page = bookService.pageByNameOrAuthor(pageNo,pageSize,nameOrAuthor); 45 | 46 | StringBuilder sb = new StringBuilder("client/bookServlet?action=pageByNameOrAuthor"); 47 | if(req.getParameter("nameorauthor")!=null) { 48 | sb.append("&nameorauthor=").append(req.getParameter("nameorauthor")); 49 | } 50 | page.setUrl(sb.toString()); 51 | //3、保存Page对象到request域中 52 | req.setAttribute("page",page); 53 | //4、请求转发到page/manager/book_manager.jsp页面 54 | req.getRequestDispatcher("/pages/client/index.jsp").forward(req,resp); 55 | } 56 | 57 | protected void pageByPrice(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 58 | //1、获取请求的参数pageNo和pageSize、min、max 59 | int pageNo = WebUtils.parseInt(req.getParameter("pageNo"),1); 60 | int pageSize = WebUtils.parseInt(req.getParameter("pageSize"), Page.PAGE_SIZE); 61 | int min = WebUtils.parseInt(req.getParameter("min"),0); 62 | int max = WebUtils.parseInt(req.getParameter("max"),Integer.MAX_VALUE); 63 | 64 | //2、调用BookService.page(pageNo,pageSize)方法:返回page对象 65 | Page page = bookService.pageByPrice(pageNo,pageSize,min,max); 66 | 67 | StringBuilder sb = new StringBuilder("client/bookServlet?action=pageByPrice"); 68 | if(req.getParameter("min")!=null) { 69 | sb.append("&min=").append(req.getParameter("min")); 70 | } 71 | if(req.getParameter("max")!=null) { 72 | sb.append("&max=").append(req.getParameter("max")); 73 | } 74 | page.setUrl(sb.toString()); 75 | //3、保存Page对象到request域中 76 | req.setAttribute("page",page); 77 | //4、请求转发到page/manager/book_manager.jsp页面 78 | req.getRequestDispatcher("/pages/client/index.jsp").forward(req,resp); 79 | } 80 | 81 | protected void pageOrder(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 82 | //1、获取请求的参数 83 | //这里直接写死为50 84 | //2、调用BookService.page(pageNo,pageSize)方法:返回page对象 85 | Page page = bookService.pageOrder(); 86 | page.setUrl("client/bookServlet?action=pageOrder"); 87 | //3、保存Page对象到request域中 88 | req.setAttribute("page",page); 89 | //4、请求转发到page/manager/book_manager.jsp页面 90 | req.getRequestDispatcher("/pages/client/top.jsp").forward(req,resp); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/com/yj/web/ClientOrderServlet.java: -------------------------------------------------------------------------------- 1 | package com.yj.web; 2 | 3 | import com.yj.bean.*; 4 | import com.yj.service.OrderService; 5 | import com.yj.service.impl.OrderServiceImpl; 6 | 7 | import javax.servlet.ServletException; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | import java.io.IOException; 11 | import java.util.List; 12 | 13 | /** 14 | * @author yj 15 | * @create 2020-08-28 14:19 16 | */ 17 | public class ClientOrderServlet extends BaseServlet { 18 | 19 | private OrderService orderService = new OrderServiceImpl(); 20 | /** 21 | * 生成订单 22 | * @param req 23 | * @param resp 24 | * @throws ServletException 25 | * @throws IOException 26 | */ 27 | protected void createOrder(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 28 | Cart cart = (Cart) req.getSession().getAttribute("cart"); 29 | User loginUser = (User) req.getSession().getAttribute("user"); 30 | if(loginUser==null) { 31 | req.getRequestDispatcher("/pages/user/login.jsp").forward(req,resp); 32 | return; 33 | } 34 | Integer userId = loginUser.getId(); 35 | String orderId = orderService.createOrder(cart,userId); 36 | 37 | //req.setAttribute("orderId",orderId); 38 | req.getSession().setAttribute("orderId",orderId); 39 | //req.getRequestDispatcher("/pages/cart/checkout.jsp").forward(req,resp); 40 | resp.sendRedirect(req.getContextPath()+"/pages/cart/checkout.jsp"); 41 | } 42 | 43 | protected void isLogin(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 44 | Cart cart = (Cart) req.getSession().getAttribute("cart"); 45 | User loginUser = (User) req.getSession().getAttribute("user"); 46 | if(loginUser==null) { 47 | req.getRequestDispatcher("/pages/user/login.jsp").forward(req,resp); 48 | return; 49 | } 50 | resp.sendRedirect(req.getContextPath()+"/pages/cart/pay.jsp"); 51 | } 52 | 53 | protected void myOrders(HttpServletRequest request, HttpServletResponse response) 54 | throws ServletException, IOException { 55 | User user = (User) request.getSession().getAttribute("user"); 56 | // 用户未登录,需要先登录 57 | if (user == null) { 58 | // 如果用户没有登录,重定向到登录页面 59 | response.sendRedirect(request.getContextPath() + "/pages/user/login.jsp"); 60 | } else { 61 | // 查询用户的订单信息 62 | List orders = orderService.queryMyOrders(user.getId()); 63 | // 设置订单到域对象中 64 | request.setAttribute("myOrders", orders); 65 | // 转发到订单页面 66 | request.getRequestDispatcher("/pages/order/order.jsp").forward(request, response); 67 | } 68 | } 69 | 70 | /** 71 | * 确认收货 72 | */ 73 | protected void receivedOrder(HttpServletRequest request, HttpServletResponse response) 74 | throws ServletException, IOException { 75 | // 获取发货的订单号 76 | String orderId = request.getParameter("orderId"); 77 | // 发货 78 | orderService.receivedOrder(orderId); 79 | 80 | // 重定向到订单页面 81 | response.sendRedirect(request.getHeader("referer")); 82 | } 83 | 84 | protected void showOrderItem(HttpServletRequest request, HttpServletResponse response) 85 | throws ServletException, IOException { 86 | String orderId = request.getParameter("orderId"); 87 | //获取前台传输的订单编号和域中的登录对象 88 | User user = (User) request.getSession().getAttribute("user"); 89 | // 用户未登录,需要先登录 90 | if (user == null) { 91 | // 如果用户没有登录,重定向到登录页面 92 | response.sendRedirect(request.getContextPath() + "/pages/user/login.jsp"); 93 | } else { 94 | // 查询用户的订单信息 95 | List orderItems = orderService.showOrderItem(orderId); 96 | // 设置订单到域对象中 97 | request.setAttribute("orderItems", orderItems); 98 | // 转发到订单页面 99 | request.getRequestDispatcher("/pages/order/orderItem.jsp").forward(request, response); 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/com/yj/web/ManagerUserServlet.java: -------------------------------------------------------------------------------- 1 | package com.yj.web; 2 | 3 | import com.yj.bean.Page; 4 | import com.yj.bean.User; 5 | import com.yj.service.UserService; 6 | import com.yj.service.impl.UserServiceImpl; 7 | import com.yj.utils.WebUtils; 8 | import javax.servlet.ServletException; 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | import java.io.IOException; 12 | import java.util.List; 13 | 14 | /** 15 | * @author yj 16 | * @create 2020-10-20 20:34 17 | */ 18 | public class ManagerUserServlet extends BaseServlet { 19 | 20 | private UserService userService = new UserServiceImpl(); 21 | 22 | protected void add(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 23 | int pageNo = WebUtils.parseInt(req.getParameter("pageNo"),0); 24 | pageNo+=1; 25 | User user = (User) WebUtils.copyParamToBean(req.getParameterMap(),new User()); 26 | userService.addUser(user); 27 | //req.getRequestDispatcher("/manager/bookServlet?action=list").forward(req,resp); 28 | resp.sendRedirect(req.getContextPath() + "/manager/UserServlet?action=page&pageNo="+pageNo); 29 | } 30 | 31 | 32 | protected void delete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 33 | String id = req.getParameter("id"); 34 | int i = Integer.parseInt(id); 35 | userService.deleteUserById(i); 36 | resp.sendRedirect(req.getContextPath() + "/manager/UserServlet?action=page&pageNo="+req.getParameter("pageNo")); 37 | } 38 | 39 | 40 | protected void update(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 41 | User user = (User) WebUtils.copyParamToBean(req.getParameterMap(),new User()); 42 | userService.updateUser(user); 43 | resp.sendRedirect(req.getContextPath() + "/manager/UserServlet?action=page&pageNo="+req.getParameter("pageNo")); 44 | } 45 | 46 | /** 47 | * 48 | * @param req 49 | * @param resp 50 | * @throws ServletException 51 | * @throws IOException 52 | */ 53 | protected void getUser(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 54 | String id = req.getParameter("id"); 55 | int i = Integer.parseInt(id); 56 | User user = userService.queryUserById(i); 57 | req.setAttribute("user",user); 58 | req.getRequestDispatcher("/pages/manager/user_edit.jsp").forward(req,resp); 59 | } 60 | 61 | 62 | protected void list(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 63 | //1、通过BookService查询数据 64 | List user = userService.queryUsers(); 65 | //2、将数据保存在request域中 66 | req.setAttribute("user",user); 67 | //3、请求转发到pages/manager/book_manager.jsp 68 | req.getRequestDispatcher("/pages/manager/user_manager.jsp").forward(req,resp); 69 | } 70 | 71 | protected void page(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 72 | //1、获取请求的参数pageNo和pageSize 73 | int pageNo = WebUtils.parseInt(req.getParameter("pageNo"),1); 74 | int pageSize = WebUtils.parseInt(req.getParameter("pageSize"), Page.PAGE_SIZE); 75 | 76 | //2、调用BookService.page(pageNo,pageSize)方法:返回page对象 77 | Page page = userService.page(pageNo,pageSize); 78 | page.setUrl("manager/UserServlet?action=page"); 79 | 80 | //3、保存Page对象到request域中 81 | req.setAttribute("page",page); 82 | //4、请求转发到page/manager/book_manager.jsp页面 83 | req.getRequestDispatcher("/pages/manager/user_manager.jsp").forward(req,resp); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/com/yj/web/PayServlet.java: -------------------------------------------------------------------------------- 1 | package com.yj.web; 2 | 3 | import com.yj.utils.PaymentUtil; 4 | 5 | import javax.servlet.ServletException; 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import java.io.IOException; 9 | 10 | /** 11 | * @author yj 12 | * @create 2020-08-30 8:58 13 | */ 14 | public class PayServlet extends BaseServlet{ 15 | protected void pay(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 16 | 17 | String ordernum=request.getParameter("ordernum"); 18 | String money=request.getParameter("money"); 19 | String pd_FrpId=request.getParameter("pd_FrpId"); 20 | String p0_Cmd = "Buy"; 21 | String p1_MerId = "10001126856"; 22 | String p2_Order = ordernum; 23 | String p3_Amt = money; 24 | String p4_Cur = "CNY"; 25 | String p5_Pid = "books"; //商品名称 26 | String p6_Pcat = "unknown"; 27 | String p7_Pdesc = "descrition"; 28 | String p8_Url = "http://localhost:8080/pages/cart/checkout.jsp"; 29 | String p9_SAF = "1"; 30 | String pa_MP = "unknown"; 31 | String pr_NeedResponse="1"; 32 | String hmac = PaymentUtil.buildHmac(p0_Cmd, p1_MerId, p2_Order, p3_Amt, p4_Cur, p5_Pid, p6_Pcat, p7_Pdesc, p8_Url, p9_SAF, pa_MP, pd_FrpId, pr_NeedResponse, "69cl522AV6q613Ii4W6u8K6XuW8vM1N6bFgyv769220IuYe9u37N4y7rI4Pl"); 33 | 34 | request.setAttribute("p0_Cmd",p0_Cmd ); 35 | request.setAttribute("p1_MerId",p1_MerId ); 36 | request.setAttribute("p2_Order", p2_Order); 37 | request.setAttribute("p3_Amt", p3_Amt); 38 | request.setAttribute("p4_Cur",p4_Cur ); 39 | request.setAttribute("p5_Pid",p5_Pid ); 40 | request.setAttribute("p6_Pcat",p6_Pcat ); 41 | request.setAttribute("p7_Pdesc",p7_Pdesc ); 42 | request.setAttribute("p8_Url",p8_Url ); 43 | request.setAttribute("pa_MP",pa_MP ); 44 | request.setAttribute("pr_NeedResponse",pr_NeedResponse ); 45 | request.setAttribute("hmac",hmac ); 46 | request.setAttribute("p9_SAF",p9_SAF ); 47 | request.setAttribute("pd_FrpId", pd_FrpId); 48 | 49 | request.getRequestDispatcher("/sure.jsp").forward(request, response); 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/jdbc.properties: -------------------------------------------------------------------------------- 1 | username=root 2 | password=Y13320567524 3 | url=jdbc:mysql://localhost:3306/book?characterEncoding=utf8 4 | driverClassName=com.mysql.jdbc.Driver 5 | initialSize=5 6 | maxActive=10 -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-beanutils-1.8.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/commons-beanutils-1.8.0.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-dbutils-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/commons-dbutils-1.3.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-logging-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/commons-logging-1.1.1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/druid-1.1.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/druid-1.1.9.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/gson-2.2.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/gson-2.2.4.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/hamcrest-core-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/hamcrest-core-1.3.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jquery-3.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/jquery-3.1.1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/junit-4.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/junit-4.12.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/kaptcha-2.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/kaptcha-2.3.2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/taglibs-standard-impl-1.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/taglibs-standard-impl-1.2.1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/taglibs-standard-spec-1.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/WEB-INF/lib/taglibs-standard-spec-1.2.1.jar -------------------------------------------------------------------------------- /web/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | -------------------------------------------------------------------------------- /web/pages/cart/cart.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 | 6 | 7 | 购物车 8 | <%@include file="/pages/common/header.jsp"%> 9 | 31 | 32 | 33 | 34 | 39 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
商品名称数量单价金额操作
亲,当前购物车为空,快去和小伙伴浏览书籍吧!
${entry.value.name} 62 | 63 | ${entry.value.price}${entry.value.totalPrice}删除
72 | 73 | 74 |
75 | 购物车中共有${sessionScope.cart.totalCount}本书籍 76 | 总金额${sessionScope.cart.totalPrice} 77 | 清空购物车 78 | 去结账 79 |
80 | 81 |
82 | 83 |
84 | 85 | <%@include file="/pages/common/footer.jsp"%> 86 | 87 | 88 | -------------------------------------------------------------------------------- /web/pages/cart/checkout.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 结算页面 7 | <%@include file="/pages/common/header.jsp"%> 8 | 14 | 15 | 16 | 17 | 22 | 23 |
24 | 25 |

你的订单已结算,订单号为${sessionScope.orderId},店主很快就会发货啦!

26 | 27 | 28 |
29 | 30 | <%@include file="/pages/common/footer.jsp"%> 31 | 32 | -------------------------------------------------------------------------------- /web/pages/cart/pay.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 14:50 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 结算页面 12 | <%@include file="/pages/common/header.jsp"%> 13 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 26 | 27 | 29 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | 40 | 41 | 42 | 44 | 45 | 46 | 47 | 49 | 50 | 51 | 52 | 53 | 54 | 56 | 58 | 59 | 60 | 61 | 63 | 64 | 65 | 67 | 68 |
28 | 支付金额:

32 |
请您选择在线支付银行
招商银行 39 | 工商银行农业银行建设银行 43 |
中国民生银行总行光大银行 48 | 交通银行深圳发展银行
北京银行兴业银行 55 | 上海浦东发展银行 57 | 中信银行

62 |
66 |
69 |
70 | 71 | 72 |
73 | 74 | <%@include file="/pages/common/footer.jsp"%> 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /web/pages/client/top.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/19 5 | Time: 22:56 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 9 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 10 | 11 | 12 | 13 | 14 | 图书热销榜单 15 | <%@include file="/pages/common/header.jsp"%> 16 | 17 | 18 | 19 | 20 | 28 | 29 |
30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | <%int i=1;%> 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
排名书名价格作者销量
<%=i++%>${book.name}${book.price}${book.author}${book.sales}
60 |
61 | 62 | <%@include file="/pages/common/footer.jsp"%> 63 | 64 | 65 | -------------------------------------------------------------------------------- /web/pages/common/footer.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/3 5 | Time: 11:07 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 |
10 | 11 | RentBookstore ©2020 12 | 13 |
-------------------------------------------------------------------------------- /web/pages/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 11:06 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <% 10 | String basePath = request.getScheme() 11 | +"://" 12 | +request.getServerName() 13 | +":" 14 | +request.getServerPort() 15 | +request.getContextPath() 16 | +"/"; 17 | pageContext.setAttribute("bastPath",basePath); 18 | 19 | %> 20 | 21 | > 22 | 23 | 24 | -------------------------------------------------------------------------------- /web/pages/common/login_success_menu.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 11:07 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 |
10 | 欢迎${sessionScope.user.username}光临书店 11 | 我的订单 12 | 个人信息 13 | 热榜 14 | 注销   15 | 返回 16 |
-------------------------------------------------------------------------------- /web/pages/common/manager_menu.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 11:08 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | -------------------------------------------------------------------------------- /web/pages/common/page_nav.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 16:15 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | -------------------------------------------------------------------------------- /web/pages/error/error404.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 22:17 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 404 12 | <%@include file="/pages/common/header.jsp"%> 13 | 14 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 |
亲,您访问的页面不存在或已被删除!
26 | 返回首页 27 |
30 |
31 | 32 | 33 | 34 | <%@ include file="/pages/common/footer.jsp" %> 35 | 36 | 37 | -------------------------------------------------------------------------------- /web/pages/error/error500.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 22:17 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 500 12 | <%@include file="/pages/common/header.jsp"%> 13 | 14 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 |
HTTP状态 500 - 内部服务器错误
26 | 返回首页 27 |
30 |
31 | 32 | 33 | 34 | <%@ include file="/pages/common/footer.jsp" %> 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /web/pages/error/errorManager.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 10:45 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 404 12 | <%@include file="/pages/common/header.jsp"%> 13 | 14 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 29 | 30 |
亲,你没有管理员权限哦!
26 | 管理员登录 27 | 返回首页 28 |
31 |
32 | 33 | 34 | 35 | <%@ include file="/pages/common/footer.jsp" %> 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /web/pages/manager/book_edit.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 编辑图书 7 | <%@include file="/pages/common/header.jsp"%> 8 | 22 | 23 | 24 | 29 | 30 |
31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
名称价格作者销量库存操作
53 |
54 | 55 | 56 |
57 | 58 | <%@include file="/pages/common/footer.jsp"%> 59 | 60 | -------------------------------------------------------------------------------- /web/pages/manager/book_manager.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 | 6 | 7 | 图书管理 8 | <%@include file="/pages/common/header.jsp"%> 9 | 21 | 22 | 23 | 24 | 29 | 30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
名称价格作者销量库存操作
${book.name}${book.price}${book.author}${book.sales}${book.stock}修改删除
添加图书
62 | <%@include file="/pages/common/page_nav.jsp"%> 63 |
64 | 65 | <%@include file="/pages/common/footer.jsp"%> 66 | 67 | -------------------------------------------------------------------------------- /web/pages/manager/manager.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 后台管理 7 | <%@include file="/pages/common/header.jsp"%> 8 | 14 | 15 | 16 | 17 | 22 | 23 |
24 |

欢迎管理员进入后台管理系统

25 |
26 | 27 | <%@include file="/pages/common/footer.jsp"%> 28 | 29 | -------------------------------------------------------------------------------- /web/pages/manager/order_manager.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 3 | 4 | 5 | 6 | 7 | 订单管理 8 | <%@include file="/pages/common/header.jsp"%> 9 | 10 | 11 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 48 | 49 | 50 | 51 |
订单号日期金额详情发货
${order.orderId}${order.createTime}${order.price} 36 | 37 | 38 | 确认发货 39 | 40 | 41 | 等待用户签收 42 | 43 | 44 | 已签收 45 | 46 | 47 | 查看详情
52 |
53 | 54 | 55 | <%@ include file="/pages/common/footer.jsp" %> 56 | 57 | 58 | -------------------------------------------------------------------------------- /web/pages/manager/order_totall.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="java.util.Date" %><%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/19 5 | Time: 22:58 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 13 | 14 | 总账单 15 | <%@include file="/pages/common/header.jsp"%> 16 | 17 | 18 | 26 | <% 27 | String usernumber=request.getParameter("usernumber"); 28 | String ordernumber = request.getParameter("ordernumber"); 29 | String booknumbers = request.getParameter("booknumbers"); 30 | String bigDecimal = request.getParameter("bigDecimal"); 31 | %> 32 |
33 | 34 | 尊敬的管理员: 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
截止<%=new Date()%>账单详情:
用户总数:${usernumber}人
总订单数:${ordernumber}单
销售本数:${booknumbers}本
总收入:${bigDecimal}元
55 |
56 | 57 | 58 | <%@ include file="/pages/common/footer.jsp" %> 59 | 60 | 61 | -------------------------------------------------------------------------------- /web/pages/manager/user_edit.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/20 5 | Time: 15:30 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 12 | 13 | 编辑用户信息 14 | <%@include file="/pages/common/header.jsp"%> 15 | 29 | 30 | 31 | 36 | 37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
序号用户名密码电子邮箱收货地址操作
60 |
61 | 62 | 63 |
64 | 65 | <%@include file="/pages/common/footer.jsp"%> 66 | 67 | -------------------------------------------------------------------------------- /web/pages/manager/user_manager.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/20 5 | Time: 20:27 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 9 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 10 | 11 | 12 | 13 | 14 | 用户管理 15 | <%@include file="/pages/common/header.jsp"%> 16 | 28 | 29 | 30 | 31 | 36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
序号用户名密码电子邮箱收货地址操作
${user.id}${user.username}${user.password}${user.email}${user.address}修改信息删除信息
添加用户
71 | <%@include file="/pages/common/page_nav.jsp"%> 72 |
73 | 74 | <%@include file="/pages/common/footer.jsp"%> 75 | 76 | k -------------------------------------------------------------------------------- /web/pages/order/order.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 16:30 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 我的订单 13 | <%@include file="/pages/common/header.jsp"%> 14 | 15 | 16 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 50 | 51 | 52 | 53 |
日期金额状态详情
${ order.createTime }${ order.price } 38 | 39 | 40 | 未发货 41 | 42 | 43 | 确认收货 44 | 45 | 46 | 已收货 47 | 48 | 49 | 查看详情
54 |
55 | 56 | 57 | 58 | <%@ include file="/pages/common/footer.jsp" %> 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /web/pages/order/orderItem.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/5 5 | Time: 0:17 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | 11 | 12 | 我的订单 13 | <%@include file="/pages/common/header.jsp"%> 14 | 15 | 16 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
编号书名数量单价总金额订单编号
${ order.id}${ order.name }${ order.count }${ order.price }${ order.totalPrice }${ order.orderId }
46 |
47 | 48 | 49 | 50 | <%@ include file="/pages/common/footer.jsp" %> 51 | 52 | 53 | -------------------------------------------------------------------------------- /web/pages/user/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 登录页面 7 | <%@include file="/pages/common/header.jsp"%> 8 | 44 | 45 | 46 | 47 |
48 | 49 |
50 | 51 | 95 | <%@include file="/pages/common/footer.jsp"%> 96 | 97 | -------------------------------------------------------------------------------- /web/pages/user/login_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 登录成功页面 7 | <%@include file="/pages/common/header.jsp"%> 8 | 18 | 19 | 20 | 24 | 25 |
26 | 27 |

欢迎回来 转到主页

28 | 29 |
30 | 31 | <%@include file="/pages/common/footer.jsp"%> 32 | 33 | -------------------------------------------------------------------------------- /web/pages/user/regist_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 注册成功页面 7 | <%@include file="/pages/common/header.jsp"%> 8 | 18 | 19 | 20 | 25 | 26 |
27 | 28 |

注册成功! 转到主页

29 | 30 |
31 | 32 | <%@include file="/pages/common/footer.jsp"%> 33 | 34 | -------------------------------------------------------------------------------- /web/pages/user/userinfo.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: jhu 4 | Date: 2020/10/9 5 | Time: 19:51 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 12 | 13 | 我的个人信息 14 | <%@include file="/pages/common/header.jsp"%> 15 | 29 | 30 | 31 | 36 | 37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |
序号用户名密码电子邮箱收货地址修改
58 |
59 | 60 | 61 |
62 | 63 | <%@include file="/pages/common/footer.jsp"%> 64 | 65 | 66 | -------------------------------------------------------------------------------- /web/static/img/code.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/static/img/code.bmp -------------------------------------------------------------------------------- /web/static/img/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/static/img/default.jpg -------------------------------------------------------------------------------- /web/static/img/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/static/img/logo.jpg -------------------------------------------------------------------------------- /web/static/img/logo1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/static/img/logo1.jpg -------------------------------------------------------------------------------- /web/static/img/pwd-icons-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threecat-up/BookStore/12cf9b7cc1a7ecf6e94569c00039c6da660bbfae/web/static/img/pwd-icons-new.png --------------------------------------------------------------------------------