├── .DS_Store ├── README.md ├── WebRoot ├── META-INF │ └── MANIFEST.MF ├── WEB-INF │ ├── lib │ │ ├── antlr-2.7.7.jar │ │ ├── aopalliance-1.0.jar │ │ ├── asm-3.3.jar │ │ ├── asm-commons-3.3.jar │ │ ├── asm-tree-3.3.jar │ │ ├── c3p0-0.9.2.jar │ │ ├── commons-fileupload-1.3.1.jar │ │ ├── commons-io-2.2.jar │ │ ├── commons-lang3-3.2.jar │ │ ├── commons-logging-1.2.jar │ │ ├── dom4j-1.6.1.jar │ │ ├── freemarker-2.3.22.jar │ │ ├── hibernate-commons-annotations-4.0.5.Final.jar │ │ ├── hibernate-core-4.3.8.Final.jar │ │ ├── hibernate-jpa-2.1-api-1.0.0.Final.jar │ │ ├── jandex-1.1.0.Final.jar │ │ ├── javassist-3.11.0.GA.jar │ │ ├── javassist-3.18.1-GA.jar │ │ ├── javax.servlet-api-3.1.0.jar │ │ ├── jboss-logging-3.1.3.GA.jar │ │ ├── jboss-logging-annotations-1.2.0.Beta1.jar │ │ ├── jboss-transaction-api_1.2_spec-1.0.0.Final.jar │ │ ├── log4j-1.2.17.jar │ │ ├── mchange-commons-java-0.2.3.3.jar │ │ ├── mysql-connector-java-5.1.37.jar │ │ ├── ognl-3.0.6.jar │ │ ├── spring-aop-4.2.4.RELEASE.jar │ │ ├── spring-beans-4.2.4.RELEASE.jar │ │ ├── spring-context-4.2.4.RELEASE.jar │ │ ├── spring-core-4.2.4.RELEASE.jar │ │ ├── spring-expression-4.2.4.RELEASE.jar │ │ ├── spring-jdbc-4.2.4.RELEASE.jar │ │ ├── spring-orm-4.2.4.RELEASE.jar │ │ ├── spring-tx-4.2.4.RELEASE.jar │ │ ├── spring-web-4.2.4.RELEASE.jar │ │ ├── struts2-convention-plugin-2.3.24.jar │ │ ├── struts2-core-2.3.24.jar │ │ ├── struts2-spring-plugin-2.3.24.jar │ │ ├── xml-apis-1.0.b2.jar │ │ └── xwork-core-2.3.24.jar │ └── web.xml ├── admin.html ├── admin │ ├── center.jsp │ ├── down.jsp │ ├── images │ │ ├── 001.gif │ │ ├── 002.gif │ │ ├── 005.gif │ │ ├── 010.gif │ │ ├── 037.gif │ │ ├── 083.gif │ │ ├── 114.gif │ │ ├── 311.gif │ │ ├── a.gif │ │ ├── a1.gif │ │ ├── back.gif │ │ ├── dl.gif │ │ ├── first.gif │ │ ├── g_page.gif │ │ ├── go.gif │ │ ├── home.gif │ │ ├── last.gif │ │ ├── login_03.gif │ │ ├── login_04.gif │ │ ├── login_06.gif │ │ ├── login_07.gif │ │ ├── login_08.gif │ │ ├── login_09.gif │ │ ├── main_05.gif │ │ ├── main_07.gif │ │ ├── main_08.gif │ │ ├── main_09.gif │ │ ├── main_11.gif │ │ ├── main_12.gif │ │ ├── main_16.gif │ │ ├── main_18.gif │ │ ├── main_18_1.gif │ │ ├── main_20.gif │ │ ├── main_24.gif │ │ ├── main_25.gif │ │ ├── main_27.gif │ │ ├── menu_1.gif │ │ ├── menu_2.gif │ │ ├── next.gif │ │ ├── quit.gif │ │ ├── tab_03.gif │ │ ├── tab_05.gif │ │ ├── tab_07.gif │ │ ├── tab_12.gif │ │ ├── tab_14.gif │ │ ├── tab_16.gif │ │ ├── tab_20.gif │ │ ├── tab_21.gif │ │ ├── tab_22.gif │ │ └── uesr.gif │ ├── js │ │ └── jqueryui │ │ │ ├── css │ │ │ ├── images │ │ │ │ ├── animated-overlay.gif │ │ │ │ ├── calendar.gif │ │ │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ │ │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ │ │ │ ├── ui-bg_flat_10_000000_40x100.png │ │ │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ │ │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ │ │ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png │ │ │ │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ ├── ui-icons_228ef1_256x240.png │ │ │ │ ├── ui-icons_ef8c08_256x240.png │ │ │ │ ├── ui-icons_ffd27a_256x240.png │ │ │ │ └── ui-icons_ffffff_256x240.png │ │ │ ├── jquery-ui-1.10.2.css │ │ │ └── jquery-ui-1.10.2.min.css │ │ │ └── js │ │ │ ├── datepicker-zh-CN.js │ │ │ ├── jquery-1.9.1.js │ │ │ ├── jquery-ui-1.10.2.js │ │ │ └── jquery-ui-1.10.2.min.js │ ├── left.jsp │ ├── login.jsp │ ├── main.jsp │ ├── pages │ │ ├── admin-add.jsp │ │ ├── admin-list.jsp │ │ ├── admin-reset.jsp │ │ ├── book-add.jsp │ │ ├── book-list.jsp │ │ ├── book-update.jsp │ │ ├── category-add.jsp │ │ ├── category-list.jsp │ │ ├── category-update.jsp │ │ ├── indent-list.jsp │ │ ├── item-list.jsp │ │ ├── user-add.jsp │ │ ├── user-list.jsp │ │ ├── user-reset.jsp │ │ └── user-update.jsp │ ├── right.jsp │ └── top.jsp ├── index.html ├── index │ ├── about.jsp │ ├── cart.jsp │ ├── category.jsp │ ├── css │ │ └── style.css │ ├── detail.jsp │ ├── footer.jsp │ ├── header.jsp │ ├── images │ │ ├── about.gif │ │ ├── banner.gif │ │ ├── blank.gif │ │ ├── border.gif │ │ ├── box_bottom.gif │ │ ├── box_center.gif │ │ ├── box_top.gif │ │ ├── bullet1.gif │ │ ├── bullet2.gif │ │ ├── bullet3.gif │ │ ├── bullet4.gif │ │ ├── bullet5.gif │ │ ├── bullet6.gif │ │ ├── button.png │ │ ├── cart.gif │ │ ├── center_bg.gif │ │ ├── color1.gif │ │ ├── color2.gif │ │ ├── color3.gif │ │ ├── contact_bt.gif │ │ ├── footer_bg.gif │ │ ├── footer_logo.gif │ │ ├── fr.gif │ │ ├── gb.gif │ │ ├── header.jpg │ │ ├── left_menu_bullet.gif │ │ ├── loading.gif │ │ ├── logo.gif │ │ ├── new_icon.gif │ │ ├── new_prod_box.gif │ │ ├── next.gif │ │ ├── prev.gif │ │ ├── prevlabel.gif │ │ ├── promo_icon.gif │ │ ├── register_bt.gif │ │ └── special_icon.gif │ ├── index.jsp │ ├── js │ │ ├── book.js │ │ ├── cart.js │ │ └── jquery.js │ ├── login.jsp │ ├── new.jsp │ ├── order.jsp │ ├── register.jsp │ ├── right.jsp │ ├── sale.jsp │ ├── search.jsp │ └── special.jsp └── picture │ ├── p1.jpg │ └── p2.jpg └── src ├── com └── itbaizhan │ ├── action │ ├── AdminAction.java │ ├── BaseAction.java │ ├── IndexAction.java │ └── UserAction.java │ ├── dao │ ├── AdminDao.java │ ├── BaseDao.java │ ├── BookDao.java │ ├── CategoryDao.java │ ├── IndentDao.java │ └── UserDao.java │ ├── entity │ ├── Admin.java │ ├── Book.java │ ├── Category.java │ ├── Indent.java │ ├── Items.java │ └── Users.java │ ├── service │ ├── AdminService.java │ ├── BookService.java │ ├── CategoryService.java │ ├── IndentService.java │ └── UserService.java │ └── util │ ├── PageUtil.java │ ├── SafeUtil.java │ └── UploadUtil.java ├── jdbc.properties ├── log4j.properties ├── spring.xml └── struts.xml /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/.DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 全目录 2 | 3 | [更多系统、论文,供君选择 ~~>](https://www.yuque.com/wisebit/blog) 4 | 5 | # 122.BookMallManagementSystem 6 | 7 |

群: 983063232(大佬群 2TB学习资料,讲解)(入群获取sql文件)

8 | 9 |

122.图书商城管理系统

10 | 11 | 12 |

13 | 14 | 15 | 16 | 17 |

18 | 19 | # 简介 20 | 21 | 22 | > 本代码来源于网络,仅供学习参考使用,请入群(983063232)后联系群主索要sql文件! 23 | > 24 | > 提供1.远程部署/2.修改代码/3.设计文档指导/4.框架代码讲解等服务 25 | 26 | # 环境 27 | 28 | - IntelliJ IDEA 2009.3 29 | 30 | - Mysql 5.7.26 31 | 32 | - Tomcat 7.0.73 33 | 34 | - JDK 1.8 35 | 36 | 37 | 38 | 39 | ## 缩略图 40 | 41 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/fbc4036f-5581-48ae-a2a0-2eed5cac6583.png) 42 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/4c545588-ee37-4136-96b8-7bf5c9a1858a.png) 43 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/600e3352-e47a-4b5f-8008-4601b37fea92.png) 44 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/ffb5f976-7477-4628-8797-d6937b36128e.png) 45 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/a9e7eb36-0802-4ef7-a0a5-63dcb3e7ec06.png) 46 | 47 | 48 | -------------------------------------------------------------------------------- /WebRoot/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/antlr-2.7.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/antlr-2.7.7.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/aopalliance-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/aopalliance-1.0.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/asm-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/asm-3.3.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/asm-commons-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/asm-commons-3.3.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/asm-tree-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/asm-tree-3.3.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/c3p0-0.9.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/c3p0-0.9.2.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-fileupload-1.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/commons-fileupload-1.3.1.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-io-2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/commons-io-2.2.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-lang3-3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/commons-lang3-3.2.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-logging-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/commons-logging-1.2.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/dom4j-1.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/freemarker-2.3.22.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/freemarker-2.3.22.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/hibernate-commons-annotations-4.0.5.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/hibernate-commons-annotations-4.0.5.Final.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/hibernate-core-4.3.8.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/hibernate-core-4.3.8.Final.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/jandex-1.1.0.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/jandex-1.1.0.Final.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/javassist-3.11.0.GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/javassist-3.11.0.GA.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/javassist-3.18.1-GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/javassist-3.18.1-GA.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/javax.servlet-api-3.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/javax.servlet-api-3.1.0.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/jboss-logging-3.1.3.GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/jboss-logging-3.1.3.GA.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/log4j-1.2.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/log4j-1.2.17.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/mchange-commons-java-0.2.3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/mchange-commons-java-0.2.3.3.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/mysql-connector-java-5.1.37.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.37.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/ognl-3.0.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/ognl-3.0.6.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/spring-aop-4.2.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/spring-aop-4.2.4.RELEASE.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/spring-beans-4.2.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/spring-beans-4.2.4.RELEASE.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/spring-context-4.2.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/spring-context-4.2.4.RELEASE.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/spring-core-4.2.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/spring-core-4.2.4.RELEASE.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/spring-expression-4.2.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/spring-expression-4.2.4.RELEASE.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/spring-jdbc-4.2.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/spring-jdbc-4.2.4.RELEASE.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/spring-orm-4.2.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/spring-orm-4.2.4.RELEASE.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/spring-tx-4.2.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/spring-tx-4.2.4.RELEASE.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/spring-web-4.2.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/spring-web-4.2.4.RELEASE.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/struts2-convention-plugin-2.3.24.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/struts2-convention-plugin-2.3.24.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/struts2-core-2.3.24.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/struts2-core-2.3.24.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/struts2-spring-plugin-2.3.24.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/struts2-spring-plugin-2.3.24.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/xml-apis-1.0.b2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/xml-apis-1.0.b2.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/xwork-core-2.3.24.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/WEB-INF/lib/xwork-core-2.3.24.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | contextConfigLocation 8 | /WEB-INF/classes/spring.xml 9 | 10 | 11 | org.springframework.web.context.ContextLoaderListener 12 | 13 | 14 | struts2 15 | org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 16 | 17 | 18 | struts2 19 | /* 20 | 21 | 22 | characterEncodingFilter 23 | org.springframework.web.filter.CharacterEncodingFilter 24 | 25 | encoding 26 | UTF-8 27 | 28 | 29 | forceEncoding 30 | true 31 | 32 | 33 | 34 | characterEncodingFilter 35 | /* 36 | 37 | 38 | index.html 39 | 40 | -------------------------------------------------------------------------------- /WebRoot/admin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WebRoot/admin/center.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 18 | 26 | 40 | 41 | 42 | 43 | 44 | 46 | 47 | 51 | 54 | 58 | 60 | 61 |
48 | 50 | 52 | 53 | 55 | 57 | 59 |
62 | 63 | -------------------------------------------------------------------------------- /WebRoot/admin/down.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="java.util.Date"%> 2 | <%@ taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 21 | 22 | 23 | 24 | 25 | 32 | 33 |
26 | 27 | 28 | 29 | 30 | 31 |
 
<%=new Date()%>
34 | 35 | -------------------------------------------------------------------------------- /WebRoot/admin/images/001.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/001.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/002.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/002.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/005.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/005.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/010.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/010.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/037.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/037.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/083.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/083.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/114.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/114.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/311.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/311.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/a.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/a.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/a1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/a1.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/back.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/back.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/dl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/dl.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/first.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/first.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/g_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/g_page.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/go.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/go.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/home.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/home.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/last.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/last.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/login_03.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/login_03.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/login_04.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/login_04.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/login_06.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/login_06.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/login_07.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/login_07.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/login_08.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/login_08.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/login_09.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/login_09.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_05.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_05.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_07.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_07.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_08.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_08.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_09.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_09.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_11.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_12.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_16.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_18.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_18_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_18_1.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_20.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_24.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_25.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/main_27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/main_27.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/menu_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/menu_1.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/menu_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/menu_2.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/next.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/quit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/quit.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/tab_03.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/tab_03.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/tab_05.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/tab_05.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/tab_07.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/tab_07.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/tab_12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/tab_12.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/tab_14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/tab_14.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/tab_16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/tab_16.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/tab_20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/tab_20.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/tab_21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/tab_21.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/tab_22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/tab_22.gif -------------------------------------------------------------------------------- /WebRoot/admin/images/uesr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/images/uesr.gif -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/animated-overlay.gif -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/calendar.gif -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-bg_flat_10_000000_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-bg_flat_10_000000_40x100.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/css/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/admin/js/jqueryui/css/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /WebRoot/admin/js/jqueryui/js/datepicker-zh-CN.js: -------------------------------------------------------------------------------- 1 | /* Chinese initialisation for the jQuery UI date picker plugin. */ 2 | /* Written by Cloudream (cloudream@gmail.com). */ 3 | jQuery(function($){ 4 | $.datepicker.regional['zh-CN'] = { 5 | closeText: '关闭', 6 | prevText: '<上月', 7 | nextText: '下月>', 8 | currentText: '今天', 9 | monthNames: ['一月','二月','三月','四月','五月','六月', 10 | '七月','八月','九月','十月','十一月','十二月'], 11 | monthNamesShort: ['一','二','三','四','五','六', 12 | '七','八','九','十','十一','十二'], 13 | dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], 14 | dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], 15 | dayNamesMin: ['日','一','二','三','四','五','六'], 16 | weekHeader: '周', 17 | dateFormat: 'yy-mm-dd', 18 | firstDay: 1, 19 | isRTL: false, 20 | showMonthAfterYear: true, 21 | yearSuffix: '年'}; 22 | $.datepicker.setDefaults($.datepicker.regional['zh-CN']); 23 | }); -------------------------------------------------------------------------------- /WebRoot/admin/left.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 29 | 30 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 135 | 136 |
  64 | 65 | 66 | 67 | 68 | 69 | 132 | 133 |
 
70 |
71 | 72 |
73 |
74 | 订单管理 75 |
76 |
77 | 81 |
82 | 83 |
84 |
85 | 顾客管理 86 |
87 |
88 | 92 |
93 | 94 |
95 |
96 | 图书管理 97 |
98 |
99 | 106 |
107 | 108 |
109 |
110 | 类目管理 111 |
112 |
113 | 117 |
118 | 119 |
120 |
121 | 用户管理 122 |
123 |
124 | 128 |
129 | 130 |
131 |
134 |
137 | 138 | 139 | -------------------------------------------------------------------------------- /WebRoot/admin/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 登录后台管理 8 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 75 | 76 | 77 |
 
35 | 36 | 37 | 66 | 67 | 74 |
 
38 | 39 | 40 | 41 | 63 | 64 | 65 |
  42 | 43 | 44 |
45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
用户
密码
 
59 |
60 | 61 | 62 |
 
68 | 69 | 70 | 71 | 72 | 73 |
   
 
78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /WebRoot/admin/main.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 书店后台管理 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | <body> 16 | </body> 17 | 18 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/admin-add.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 用户:
13 | 密码: 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/admin-list.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 64 | 112 | 113 | 114 | 125 | 126 |
53 | 54 | 55 | 56 | 58 | 59 | 60 |
57 | 用户列表
61 |
65 | 66 | 67 | 68 | 108 | 109 | 110 |
  69 | 70 | 71 | 73 | 75 | 77 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 87 | 89 | 91 | 102 | 103 | 104 | 105 | 106 |
72 |
编号
74 |
用户
76 |
密码
78 |
操作
86 |
88 |
90 |
92 | 93 | 系统保护用户 94 | 95 | 96 | 100 | 101 |
107 |
 
111 |
115 | 116 | 117 | 118 | 121 | 122 | 123 |
119 | 添加用户${pageTool} 120 |
124 |
127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/admin-reset.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 用户: ${admin.username}
16 | 密码: 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/book-add.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 30 | 31 | 32 | 33 |
34 | 35 | 封面:
36 | 书名:
37 | 价格:
38 | 介绍:
39 | 作者:
40 | 出版社:
41 | 出版日期:
42 | 图书分类:
47 | 48 | 49 |
50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/book-list.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 64 | 134 | 135 | 136 | 145 | 146 |
53 | 54 | 55 | 56 | 58 | 59 | 60 |
57 | 图书列表
61 |
65 | 66 | 67 | 68 | 130 | 131 | 132 |
  69 | 70 | 71 | 73 | 75 | 77 | 79 | 81 | 83 | 85 | 87 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 97 | 99 | 101 | 103 | 105 | 107 | 109 | 111 | 124 | 125 | 126 | 127 | 128 |
72 |
编号
74 |
封面
76 |
书名
78 |
价格
80 |
介绍
82 |
作者
84 |
出版社
86 |
出版日期
88 |
操作
96 |
98 | 100 | 102 |
104 |
106 |
108 |
110 |
112 | 123 |
129 |
 
133 |
137 | 138 | 139 | 140 | 141 | 142 | 143 |
${pageTool}
144 |
147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/book-update.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 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 | 出版社:
29 | 出版日期:
30 | 图书分类: 35 | 36 | 37 |
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/category-add.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 添加图书类别信息 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
名称:
27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/category-list.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 64 | 103 | 104 | 105 | 116 | 117 |
53 | 54 | 55 | 56 | 58 | 59 | 60 |
57 | 类目列表
61 |
65 | 66 | 67 | 68 | 99 | 100 | 101 |
  69 | 70 | 71 | 73 | 75 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 85 | 87 | 93 | 94 | 95 | 96 | 97 |
72 |
编号
74 |
名称
76 |
操作
84 |
86 |
88 | 92 |
98 |
 
102 |
106 | 107 | 108 | 109 | 112 | 113 | 114 |
110 | 添加类目${pageTool} 111 |
115 |
118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/category-update.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 名称: 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/indent-list.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 64 | 140 | 141 | 142 | 151 | 152 |
53 | 54 | 55 | 56 | 58 | 59 | 60 |
57 | 订单列表
61 |
65 | 66 | 67 | 68 | 136 | 137 | 138 |
  69 | 70 | 71 | 73 | 75 | 77 | 79 | 81 | 83 | 85 | 87 | 89 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 99 | 101 | 103 | 105 | 107 | 114 | 116 | 118 | 120 | 121 | 130 | 131 | 132 | 133 | 134 |
72 |
订单编号
74 |
下单时间
76 |
下单用户
78 |
商品数量
80 |
订单总价
82 |
订单状态
84 |
收货人姓名
86 |
收货人电话
88 |
收货地址
90 |
操作
98 |
100 |
102 |
104 |
106 |
108 |
109 | 未处理 110 | 已处理 111 | 已删除 112 |
113 |
115 |
117 |
119 |
122 | 129 |
135 |
 
139 |
143 | 144 | 145 | 146 | 147 | 148 | 149 |
${pageTool}
150 |
153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/item-list.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 64 | 107 | 108 | 109 | 118 | 119 |
53 | 54 | 55 | 56 | 58 | 59 | 60 |
57 | 订单项列表
61 |
65 | 66 | 67 | 68 | 103 | 104 | 105 |
  69 | 70 | 71 | 73 | 75 | 77 | 79 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 89 | 91 | 93 | 95 | 97 | 98 | 99 | 100 | 101 |
72 |
编号
74 |
图书
76 |
单价
78 |
数量
80 |
操作
88 |
90 |
92 |
94 |
96 |
102 |
 
106 |
110 | 111 | 112 | 113 | 114 | 115 | 116 |
${pageTool}
117 |
120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/user-add.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 用户:
13 | 密码:
14 | 电话: 15 |
16 | 17 | 18 |
19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/user-list.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 64 | 112 | 113 | 114 | 125 | 126 |
53 | 54 | 55 | 56 | 58 | 59 | 60 |
57 | 顾客列表
61 |
65 | 66 | 67 | 68 | 108 | 109 | 110 |
  69 | 70 | 71 | 73 | 75 | 77 | 79 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 89 | 91 | 93 | 95 | 102 | 103 | 104 | 105 | 106 |
72 |
编号
74 |
用户
76 |
密码
78 |
电话
80 |
操作
88 |
90 |
92 |
94 |
96 | 101 |
107 |
 
111 |
115 | 116 | 117 | 118 | 121 | 122 | 123 |
119 | 添加顾客${pageTool} 120 |
124 |
127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/user-reset.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 用户: ${user.username}
15 | 密码: 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /WebRoot/admin/pages/user-update.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 用户:${user.username}
19 | 电话: 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /WebRoot/admin/right.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 欢迎登录书店后台管理 10 | 11 | -------------------------------------------------------------------------------- /WebRoot/admin/top.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 29 | 30 | 31 | 32 | 33 | 69 | 70 |
34 | 35 | 36 | 37 | 书店后台管理 38 | 39 | 52 | 53 | 67 | 68 |
40 | 41 | 50 | 51 |
42 | 43 | 44 | 45 | 46 | 网站首页 47 | 48 | 49 |
  54 | 55 | 65 | 66 |
56 | 57 | 当前登录用户: 58 | 59 | 60 | 61 | 62 | 注销 63 | 64 |
71 | 72 | 73 | -------------------------------------------------------------------------------- /WebRoot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WebRoot/index/about.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 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 | 书店从1998年发展连锁经营至今,现已拥有直营连锁店十六家,总营业面积达四万多平方米, 29 | 仅改造扩建后的旗舰店经营面积就达到一万八千多平方米。经营图书、音像制品近五十余万种,文化用品近万种。 30 | 通过统一进货、统一物流、统一标准、统一品牌、统一促销活动,扩大市场份额、降低管理成本、增加调整品种结构, 31 | 从而提高了书城的连锁经营效率,且于2003年建立了商业发展前沿的B-TO-C电子商务模式,一直稳步发展前进至今。  32 |

33 | 书店于2001年11月14日率先在业内通过了ISO9001-2000的质量管理体系认证, 34 | 规范了公司的质量管理和质量保证机制,从而达到了为顾客提供满意优质的人性化服务。 35 | 通过ISO认证的书店用人性化理念带给读者全新的购书享受――音像专区、文化用品专区、 36 | 少儿图书区等几大特色区以其各自独有魅力成为人性化图书卖场的重要组成部分。 37 | 除此之外,以“文化、休闲、娱乐、消遣”为主题的经营倡导为广大读者提供了各种服务功能 38 | ――网上书店、VIP会员俱乐部、咖啡吧、亲子娱乐天地、自助试盘区、多功能活动大厅等, 39 | 通过与读者的互动,为其提供优雅、明快的购书环境和人性化的高水准服务,让读者在购书时尽情地享受生活, 40 | 全方位彰显了书店“行业先导,国际一流”的独特品质。 41 |

42 | 书店连续三年获得了新闻出版署举办“讲信誉、重服务”单位的光荣称号。 43 | 2000年12月被辽宁省文化市场办授予首家“全国音像制品正版销售单位”。 44 | 书店不仅是出版发行部门开拓图书市场,开通货源渠道的驿站, 45 | 更是广大读者朋友读书、选书、购书的最佳场所,傲然矗立在图书领域, 46 | 成为东北乃至更广大地域走向知识经济新时代的桥梁和纽带。 47 |

48 |
49 | 50 |
51 | 52 |
53 | 54 | 55 | 56 |
57 | 58 |
59 | 60 | 61 | 62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /WebRoot/index/cart.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 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 | 29 | 30 | 31 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
32 | 33 | 34 | 35 | ${book.name}${book.price}x ${amount}${total} 41 | [添加] 42 | [减少] 43 | [删除] 44 |
总价:

53 | 54 |
55 | 56 | 57 | 58 | 59 | 60 | 61 |
62 | 63 | 提交订单 64 | 65 |
66 | 67 | 68 |
69 | 70 | 71 | 72 |
73 | 74 | 75 |
76 | 77 |
78 | 79 | 80 | 81 |
82 | 83 |
84 | 85 | 86 | 87 |
88 | 89 | 90 | -------------------------------------------------------------------------------- /WebRoot/index/category.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 图书分类 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 |
16 | 17 |
18 | 19 |
图书分类
20 | 21 |
22 | 23 | 24 | 25 |
${name} 26 |
27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 |
35 | 36 | 37 | 38 | ${pageTool} 39 | 40 |
41 | 42 |
43 | 44 |
45 | 46 | 47 | 48 |
49 | 50 |
51 | 52 | 53 | 54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /WebRoot/index/css/style.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background-color:#6F605A; 4 | font-family:Arial, Helvetica, sans-serif; 5 | padding:0; 6 | font-size:13px; 7 | margin:0px auto auto auto; 8 | color:#000000; 9 | } 10 | a{ 11 | color:#f8981d; 12 | } 13 | .clear{ 14 | clear:both; 15 | } 16 | p{ 17 | padding:5px 0 5px 0; 18 | margin:0px; 19 | text-align:justify; 20 | line-height:19px; 21 | } 22 | p.details{ 23 | padding:5px 15px 5px 15px; 24 | font-size:13px; 25 | } 26 | p.details_cart{ 27 | clear:both; 28 | padding:25px 30px 5px 0px; 29 | font-size:13px; 30 | font-style:italic; 31 | } 32 | p.more_details{ 33 | padding:25px 20px 0px 20px; 34 | font-size:13px; 35 | 36 | } 37 | #wrap{ 38 | width:900px; 39 | height: auto; 40 | margin:auto; 41 | background-color:#FFFFFF; 42 | } 43 | .header{ 44 | width:900px; 45 | height:181px; 46 | background:url(../images/header.jpg) no-repeat center; 47 | } 48 | .logo{ 49 | padding:50px 0 0 130px; 50 | } 51 | /*-----------------------------menu-------------------*/ 52 | #menu{ 53 | width:900px; 54 | height:30px; 55 | padding:55px 0 0 10px; 56 | } 57 | #menu ul{ 58 | display:block; 59 | list-style:none; 60 | padding:9px 0 0 0px; 61 | margin:0px; 62 | } 63 | #menu ul li{ 64 | display:inline; 65 | padding:0px; 66 | margin:0px; 67 | height:20px; 68 | } 69 | #menu ul li a{ 70 | height:27px; 71 | display:block; 72 | padding:0px 10px 0 10px; 73 | margin:0 4px 0 4px; 74 | _margin:0 2px 0 2px; 75 | float:left; 76 | text-decoration:none; 77 | text-align:center; 78 | color:#fff; 79 | font-size:13px; 80 | /* line-height:25px; */ 81 | } 82 | #menu ul li.selected a{ 83 | height:27px; 84 | display:block; 85 | padding:0px 10px 0 10px; 86 | margin:0 5px 0 5px; 87 | float:left; 88 | text-decoration:none; 89 | text-align:center; 90 | color:#f7a849; 91 | font-size:13px; 92 | /* line-height:25px; */ 93 | } 94 | #menu ul li a:hover{ 95 | color:#f7a849; 96 | } 97 | /*----------------crumb_nav------------------*/ 98 | .crumb_nav{ 99 | padding:5px 0 10px 0px; 100 | } 101 | .crumb_nav a{ 102 | color:#990000; 103 | } 104 | span.red{ 105 | color:#990000; 106 | } 107 | .price{ 108 | font-size:14px; 109 | padding:0 0 0 15px; 110 | margin:2px 0 5px 0; 111 | } 112 | span.colors{ 113 | padding:2px 2px 0 2px; 114 | } 115 | 116 | 117 | /*------------------------------------center content--------------------*/ 118 | .center_content{ 119 | width:900px; 120 | padding:0px 0 0 0; 121 | background:url(../images/center_bg.gif) repeat-y center; 122 | } 123 | .left_content{ 124 | width:490px; 125 | float:left; 126 | padding:20px 0 20px 20px; 127 | } 128 | .right_content{ 129 | width:370px; 130 | float:left; 131 | padding:20px 0 20px 20px; 132 | } 133 | .title{ 134 | color:#734633; 135 | padding:0px; 136 | float:left; 137 | font-size:19px; 138 | margin:10px 0 10px 0; 139 | } 140 | span.title_icon{ 141 | float:left; 142 | padding:0 5px 0 0; 143 | } 144 | .prod_title{ 145 | color:#f8981d; 146 | padding:5px 0 0 15px; 147 | font-size:13px; 148 | } 149 | a.more{ 150 | font-style:italic; 151 | color:#f8981d; 152 | float:right; 153 | text-decoration:none; 154 | font-size:13px; 155 | padding:0px 15px 0 0 ; 156 | } 157 | .about{ 158 | width:337px; 159 | clear:both; 160 | background:url(../images/border.gif) no-repeat bottom center; 161 | padding:0 0 35px 0; 162 | } 163 | img.right{ 164 | float:right; 165 | padding:0 0 0 10px; 166 | } 167 | .right_box{ 168 | width:170px; 169 | float:left; 170 | padding:10px 0 0 0; 171 | } 172 | 173 | /*--------feat_prod_box-----------*/ 174 | .feat_prod_box{ 175 | padding:10px 0 10px 10px; 176 | margin:0 20px 20px 0; 177 | border-bottom:1px #b2b2b2 dashed; 178 | clear:both; 179 | } 180 | .feat_prod_box_details{ 181 | padding:10px 0 10px 0; 182 | margin:0 20px 10px 0; 183 | clear:both; 184 | } 185 | .prod_img{ 186 | float:left; 187 | padding:0 5px 0 0; 188 | text-align:center; 189 | } 190 | .prod_det_box{ 191 | width:295px; 192 | float:left; 193 | padding:0 0 0 25px; 194 | position:relative; 195 | } 196 | .box_top{ 197 | width:295px; 198 | height:9px; 199 | background:url(../images/box_top.gif) no-repeat center bottom; 200 | } 201 | .box_center{ 202 | width:295px; 203 | height:auto; 204 | background:url(../images/box_center.gif) repeat-y center; 205 | } 206 | .box_bottom{ 207 | width:295px; 208 | height:9px; 209 | background:url(../images/box_bottom.gif) no-repeat center top; 210 | } 211 | 212 | .new_prod_box{ 213 | float:left; 214 | text-align:center; 215 | padding:10px; 216 | } 217 | .new_prod_box a{ 218 | padding:5px 0 5px 0; 219 | color:#b5b5b6; 220 | text-decoration:none; 221 | display:block; 222 | } 223 | .new_prod_bg{ 224 | width:132px; 225 | height:119px; 226 | text-align:center; 227 | background:url(../images/new_prod_box.gif) no-repeat center; 228 | position:relative; 229 | } 230 | .new_icon{ 231 | position:absolute; 232 | top:0px; 233 | right:0px; 234 | z-index:200; 235 | } 236 | .special_icon{ 237 | position:absolute; 238 | top:0px; 239 | _top:6px; 240 | right:2px; 241 | z-index:250; 242 | } 243 | img.thumb{ 244 | padding:10px 0 0 0; 245 | width:86px; 246 | height:90px; 247 | } 248 | img.thumb_big{ 249 | border:none; 250 | width:112px; 251 | height:150px; 252 | } 253 | .new_products{ 254 | clear:both; 255 | padding:0px; 256 | } 257 | 258 | ul.list{ 259 | clear:both; 260 | padding:10px 0 0 20px; 261 | margin:0px; 262 | } 263 | ul.list li{ 264 | font-size: 13px; 265 | list-style:none; 266 | padding:5px 0; 267 | } 268 | ul.list li a{ 269 | list-style:none; 270 | text-decoration:none; 271 | color:#000000; 272 | background:url(../images/left_menu_bullet.gif) no-repeat left; 273 | padding:0 0 0 17px; 274 | } 275 | ul.list li a:hover{ 276 | text-decoration:underline; 277 | } 278 | 279 | /* demo */ 280 | 281 | div.demolayout { 282 | width:460px; 283 | margin: 0 0 20px 0; 284 | } 285 | 286 | ul.demolayout { 287 | list-style-type: none; 288 | float: left; 289 | margin:0px; 290 | padding:0px; 291 | } 292 | 293 | ul.demolayout li { 294 | margin: 0 10px 0 0; 295 | float: left; 296 | } 297 | .tab{ 298 | border:1px #DFDFDF solid; 299 | padding:0 0 25px 0; 300 | } 301 | ul.demolayout a { 302 | float: left; 303 | display: block; 304 | padding: 5px 25px; 305 | border: 1px solid #DFDFDF; 306 | border-bottom: 0; 307 | color: #666; 308 | background: #eee; 309 | text-decoration: none; 310 | font-weight: bold; 311 | } 312 | 313 | ul.demolayout a:hover { 314 | background: #fff; 315 | } 316 | 317 | ul.demolayout a.active { 318 | background: #fff; 319 | padding-bottom: 5px; 320 | cursor: default; 321 | color:#795636; 322 | } 323 | 324 | .tabs-container { 325 | clear: left; 326 | padding:0px; 327 | } 328 | /*-----------------------languages_box---------*/ 329 | .languages_box{ 330 | padding:0 0 5px 0; 331 | float:left; 332 | } 333 | .languages_box a{ 334 | padding:0 2px 0 2px; 335 | } 336 | .languages_box a.selected{ 337 | padding:2px 2px 0 2px; 338 | border:1px #CCCCCC solid; 339 | } 340 | .currency{ 341 | float:left; 342 | padding:0 0 0 20px; 343 | } 344 | .currency a{ 345 | text-decoration:none; 346 | color:#333333; 347 | padding:3px; 348 | border:1px #eeedee solid; 349 | } 350 | .currency a.selected{ 351 | text-decoration:none; 352 | color:#fff; 353 | padding:3px; 354 | border:1px #eeedee solid; 355 | background-color:#FF9900; 356 | font-weight:bold; 357 | } 358 | .currency a:hover{ 359 | border:1px #990000 solid; 360 | } 361 | /*------------------------cart---------------------*/ 362 | .cart{ 363 | width:337px; 364 | float:left; 365 | height:40px; 366 | margin:10px 0 10px 0; 367 | background:url(../images/border.gif) no-repeat bottom center; 368 | padding:0 0 30px 0; 369 | } 370 | .home_cart_content{ 371 | float:left; 372 | padding:3px; 373 | border:1px #eeedee solid; 374 | margin:10px 0 0 15px; 375 | } 376 | a.view_cart{ 377 | display:block; 378 | float:left; 379 | margin:10px 0 0 10px; 380 | padding-top: 4px; 381 | color:#990000; 382 | } 383 | /*---------------contact_form------------------*/ 384 | .contact_form{ 385 | width:355px; 386 | float:left; 387 | padding:25px; 388 | margin:20px 0 0 15px; 389 | _margin:20px 0 0 5px; 390 | border:1px #DFD1D2 dashed; 391 | position:relative; 392 | } 393 | .form_row{ 394 | width:335px; 395 | _width:355px; 396 | clear:both; 397 | padding:10px 0 10px 0; 398 | _padding:5px 0 5px 0; 399 | color:#a53d17; 400 | } 401 | label.contact{ 402 | width:60px; 403 | float:left; 404 | font-size:12px; 405 | text-align:right; 406 | padding:4px 5px 0 0; 407 | color: #333333; 408 | } 409 | input.contact_input{ 410 | width:253px; 411 | height:18px; 412 | background-color:#fff; 413 | color:#999999; 414 | border:1px #DFDFDF solid; 415 | float:left; 416 | } 417 | textarea.contact_textarea{ 418 | width:253px; 419 | height:120px; 420 | font-family:Arial, Helvetica, sans-serif; 421 | font-size:12px; 422 | color: #999999; 423 | background-color:#fff; 424 | border:1px #DFDFDF solid; 425 | float:left; 426 | } 427 | input.register{ 428 | width:71px; 429 | height:25px; 430 | border:none; 431 | cursor:pointer; 432 | text-align:center; 433 | float:right; 434 | color:#FFFFFF; 435 | background:url(../images/register_bt.gif) no-repeat center; 436 | } 437 | a.contact{ 438 | width:53px; 439 | height:24px; 440 | display:block; 441 | float:right; 442 | margin:0 0 0 10px; 443 | background:url(../images/contact_bt.gif) no-repeat center; 444 | text-decoration:none; 445 | text-align:center; 446 | line-height:24px; 447 | color:#fff; 448 | } 449 | a.checkout{ 450 | width:71px; 451 | height:25px; 452 | display:block; 453 | float:right; 454 | margin:10px 30px 0 10px; 455 | background:url(../images/register_bt.gif) no-repeat center; 456 | text-decoration:none; 457 | text-align:center; 458 | line-height:25px; 459 | color:#fff; 460 | } 461 | a.continue{ 462 | width:71px; 463 | height:25px; 464 | display:block; 465 | float:left; 466 | margin:10px 0 0 0px; 467 | background:url(../images/register_bt.gif) no-repeat center; 468 | text-decoration:none; 469 | text-align:center; 470 | line-height:25px; 471 | color:#fff; 472 | } 473 | .terms{ 474 | padding:0 0 0 80px; 475 | } 476 | .form_subtitle{ 477 | position:absolute; 478 | top:-11px; 479 | left:7px; 480 | width:auto; 481 | height:20px; 482 | background-color:#795636; 483 | text-align:center; 484 | padding:0 7px 0 7px; 485 | color:#FFFFFF; 486 | font-size:12px; 487 | line-height:20px; 488 | } 489 | /*--------------cart_table-------------*/ 490 | .cart_table{ 491 | width:440px; 492 | border:1px #CCCCCC solid; 493 | text-align:center; 494 | } 495 | tr.cart_title{ 496 | background-color:#efefef; 497 | } 498 | td{ 499 | padding:3px; 500 | } 501 | td.cart_total{ 502 | text-align:right; 503 | padding:5px 5px 5px 0; 504 | } 505 | img.cart_thumb{ 506 | border:1px #b2b2b2 solid; 507 | padding:2px; 508 | } 509 | /*--------------*/ 510 | div.pagination { 511 | width:420px; 512 | padding:5px; 513 | margin:5px; 514 | text-align:center; 515 | float:left; 516 | clear:both; 517 | font-size:10px; 518 | } 519 | 520 | div.pagination a { 521 | padding: 2px 5px 2px 5px; 522 | margin-right: 2px; 523 | border: 1px solid #795636; 524 | text-decoration: none; 525 | color: #795636; 526 | } 527 | div.pagination a:hover, div.pagination a:active { 528 | border:1px solid #795636; 529 | color: #fff; 530 | background-color: #795636; 531 | } 532 | div.pagination span.current { 533 | padding: 2px 5px 2px 5px; 534 | margin-right: 2px; 535 | border: 1px solid #795636; 536 | font-weight: bold; 537 | background-color: #795636; 538 | color: #FFF; 539 | } 540 | div.pagination span.disabled { 541 | padding: 2px 5px 2px 5px; 542 | margin-right: 2px; 543 | border: 1px solid #f3f3f3; 544 | color: #ccc; 545 | } 546 | /*---------------footer------------------------*/ 547 | .footer{ 548 | height:80px; 549 | border-top:1px #b2b2b2 dashed; 550 | background:url(../images/footer_bg.gif) no-repeat bottom; 551 | } 552 | .left_footer{ 553 | float:left; 554 | padding:10px 0 0 10px; 555 | } 556 | .right_footer{ 557 | float:right; 558 | padding:10px 10px 0 0; 559 | } 560 | .footer a{ 561 | text-decoration:none; 562 | padding:0 5px 0 5px; 563 | color:#afaeaf; 564 | } 565 | 566 | 567 | -------------------------------------------------------------------------------- /WebRoot/index/detail.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 图书详情 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 |
${book.name}
22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 |
${book.name}
30 |

31 |
价格: $${book.price}
32 |
33 | 34 | 35 | 36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | 44 |
45 | 46 | 50 |
51 | 60 | 76 |
77 | 78 |
79 | 80 |
81 | 82 |
83 | 84 | 85 | 86 |
87 | 88 |
89 | 90 | 91 | 92 |
93 | 94 | 95 | -------------------------------------------------------------------------------- /WebRoot/index/footer.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /WebRoot/index/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 17 | 18 | 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /WebRoot/index/images/about.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/about.gif -------------------------------------------------------------------------------- /WebRoot/index/images/banner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/banner.gif -------------------------------------------------------------------------------- /WebRoot/index/images/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/blank.gif -------------------------------------------------------------------------------- /WebRoot/index/images/border.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/border.gif -------------------------------------------------------------------------------- /WebRoot/index/images/box_bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/box_bottom.gif -------------------------------------------------------------------------------- /WebRoot/index/images/box_center.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/box_center.gif -------------------------------------------------------------------------------- /WebRoot/index/images/box_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/box_top.gif -------------------------------------------------------------------------------- /WebRoot/index/images/bullet1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/bullet1.gif -------------------------------------------------------------------------------- /WebRoot/index/images/bullet2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/bullet2.gif -------------------------------------------------------------------------------- /WebRoot/index/images/bullet3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/bullet3.gif -------------------------------------------------------------------------------- /WebRoot/index/images/bullet4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/bullet4.gif -------------------------------------------------------------------------------- /WebRoot/index/images/bullet5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/bullet5.gif -------------------------------------------------------------------------------- /WebRoot/index/images/bullet6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/bullet6.gif -------------------------------------------------------------------------------- /WebRoot/index/images/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/button.png -------------------------------------------------------------------------------- /WebRoot/index/images/cart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/cart.gif -------------------------------------------------------------------------------- /WebRoot/index/images/center_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/center_bg.gif -------------------------------------------------------------------------------- /WebRoot/index/images/color1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/color1.gif -------------------------------------------------------------------------------- /WebRoot/index/images/color2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/color2.gif -------------------------------------------------------------------------------- /WebRoot/index/images/color3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/color3.gif -------------------------------------------------------------------------------- /WebRoot/index/images/contact_bt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/contact_bt.gif -------------------------------------------------------------------------------- /WebRoot/index/images/footer_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/footer_bg.gif -------------------------------------------------------------------------------- /WebRoot/index/images/footer_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/footer_logo.gif -------------------------------------------------------------------------------- /WebRoot/index/images/fr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/fr.gif -------------------------------------------------------------------------------- /WebRoot/index/images/gb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/gb.gif -------------------------------------------------------------------------------- /WebRoot/index/images/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/header.jpg -------------------------------------------------------------------------------- /WebRoot/index/images/left_menu_bullet.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/left_menu_bullet.gif -------------------------------------------------------------------------------- /WebRoot/index/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/loading.gif -------------------------------------------------------------------------------- /WebRoot/index/images/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/logo.gif -------------------------------------------------------------------------------- /WebRoot/index/images/new_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/new_icon.gif -------------------------------------------------------------------------------- /WebRoot/index/images/new_prod_box.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/new_prod_box.gif -------------------------------------------------------------------------------- /WebRoot/index/images/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/next.gif -------------------------------------------------------------------------------- /WebRoot/index/images/prev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/prev.gif -------------------------------------------------------------------------------- /WebRoot/index/images/prevlabel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/prevlabel.gif -------------------------------------------------------------------------------- /WebRoot/index/images/promo_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/promo_icon.gif -------------------------------------------------------------------------------- /WebRoot/index/images/register_bt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/register_bt.gif -------------------------------------------------------------------------------- /WebRoot/index/images/special_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/index/images/special_icon.gif -------------------------------------------------------------------------------- /WebRoot/index/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 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 |
29 |
30 |
31 | 32 |
33 | ${name} 34 |
35 |

36 | - 图书详情 - 37 |
38 |
39 |
40 |
41 |
42 |
43 | 44 |
45 | 46 | 47 | 48 |
最新出版
49 | 50 |
51 | 52 | 53 |
54 | ${name} 55 |
56 | 57 | 58 |
59 |
60 |
61 | 62 |
63 | 64 |
65 | 66 |
67 | 68 | 69 | 70 |
71 | 72 |
73 | 74 | 75 | 76 |
77 | 78 | 79 | -------------------------------------------------------------------------------- /WebRoot/index/js/book.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 加入购物车 3 | */ 4 | function buy(bookid){ 5 | $.post("buy.action", {bookid:bookid}, function(data){ 6 | if(data=="ok"){ 7 | location.reload(); 8 | }else if(data=="login"){ 9 | location.href="login.action"; 10 | }else{ 11 | alert("请求失败!"); 12 | } 13 | }); 14 | } -------------------------------------------------------------------------------- /WebRoot/index/js/cart.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 加入购物车 3 | */ 4 | function buy(bookid){ 5 | $.post("buy.action", {bookid:bookid}, function(data){ 6 | if(data=="ok"){ 7 | location.reload(); 8 | }else if(data=="login"){ 9 | alert("请登录后购买!"); 10 | location.href="login.jsp"; 11 | }else{ 12 | alert("请求失败!"); 13 | } 14 | }); 15 | } 16 | /** 17 | * 购物车减去 18 | */ 19 | function lessen(bookid){ 20 | $.post("lessen.action", {bookid:bookid}, function(data){ 21 | if(data=="ok"){ 22 | location.reload(); 23 | }else if(data=="login"){ 24 | alert("请登录后操作!"); 25 | location.href="login.jsp"; 26 | }else{ 27 | alert("请求失败!"); 28 | } 29 | }); 30 | } 31 | /** 32 | * 购物车删除 33 | */ 34 | function deletes(bookid){ 35 | $.post("delete.action", {bookid:bookid}, function(data){ 36 | if(data=="ok"){ 37 | location.reload(); 38 | }else if(data=="login"){ 39 | alert("请登录后操作!"); 40 | location.href="login.jsp"; 41 | }else{ 42 | alert("请求失败!"); 43 | } 44 | }); 45 | } -------------------------------------------------------------------------------- /WebRoot/index/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 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 | 29 | 30 |
31 |
32 | 33 | 34 |
35 |
36 | 40 |
41 |
42 | 43 |
44 | 45 |
46 | 47 |
48 | 49 | 50 | 51 |
52 | 53 |
54 | 55 | 56 | 57 |
58 | 59 | 60 | -------------------------------------------------------------------------------- /WebRoot/index/new.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 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 |
29 |
30 |
31 |
32 | 33 |

34 | - 图书详情 - 35 |
36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 | 44 | 45 | ${pageTool} 46 | 47 |
48 | 49 |
50 | 51 | 52 | 53 |
54 | 55 |
56 | 57 | 58 | 59 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /WebRoot/index/order.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 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 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 46 | 47 | 48 | 52 | 53 | 54 | 55 |
下单时间: 总价:
40 | 41 | 42 | 43 | ${book.name}${book.price}${amount}${total} 49 | <%-- [删除22] --%> 50 | <%-- [删除] --%> 51 |

56 | 57 |
58 | 59 |
60 | 61 | 62 | 63 |
64 | 65 | 66 |
67 | 68 |
69 | 70 | 71 | 72 |
73 | 74 |
75 | 76 | 77 | 78 |
79 | 80 | 81 | -------------------------------------------------------------------------------- /WebRoot/index/register.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 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 | 29 | 30 |
31 |
32 | 33 | 34 |
35 |
36 | 37 | 38 |
39 | 43 |
44 |
45 | 46 |
47 | 48 |
49 | 50 |
51 | 52 | 53 | 54 |
55 | 56 |
57 | 58 | 59 | 60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /WebRoot/index/right.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 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 |
书店简介
29 |
30 |

31 | 32 | 书店连续三年获得了新闻出版署举办“讲信誉、重服务”单位的光荣称号。 33 | 2000年12月被辽宁省文化市场办授予首家“全国音像制品正版销售单位”。 34 | 书店不仅是出版发行部门开拓图书市场,开通货源渠道的驿站, 35 | 更是广大读者朋友读书、选书、购书的最佳场所,傲然矗立在图书领域, 36 | 成为东北乃至更广大地域走向知识经济新时代的桥梁和纽带。 37 |

38 |
39 | 40 | 41 |
42 | 43 |
优惠促销
44 | 45 | 46 |
${name} 47 |
48 | 49 | 50 |
51 |
52 |
53 | 54 |
55 | 56 | 57 |
58 | 59 |
图书分类
60 |
    61 | 62 |
  • ">
  • 63 |
    64 |
65 | 66 |
67 |
68 | 69 | 70 | -------------------------------------------------------------------------------- /WebRoot/index/sale.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 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 |
29 |
30 |
31 |
32 | 33 |

34 | - 图书详情 - 35 |
36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 | 44 | 45 | ${pageTool} 46 | 47 |
48 | 49 |
50 | 51 | 52 | 53 |
54 | 55 |
56 | 57 | 58 | 59 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /WebRoot/index/search.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 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 |
29 |
30 | 31 | 32 | 33 |
34 |
35 | 36 |

37 | - 图书详情 - 38 |
39 |
40 |
41 |
42 |
43 |
44 | 45 |
46 | 47 | 48 | ${pageTool} 49 | 50 |
51 | 52 |
53 | 54 | 55 | 56 |
57 | 58 |
59 | 60 | 61 | 62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /WebRoot/index/special.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="/struts-tags" prefix="s" %> 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 |
29 |
30 |
31 |
32 | 33 |

34 | - 图书详情 - 35 |
36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 | 44 | 45 | 46 | 47 | ${pageTool} 48 | 49 |
50 | 51 |
52 | 53 | 54 | 55 |
56 | 57 |
58 | 59 | 60 | 61 |
62 | 63 | 64 | -------------------------------------------------------------------------------- /WebRoot/picture/p1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/picture/p1.jpg -------------------------------------------------------------------------------- /WebRoot/picture/p2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/BookMallManagementSystem/61afe323b965f02652e551221bca11b9cefe399d/WebRoot/picture/p2.jpg -------------------------------------------------------------------------------- /src/com/itbaizhan/action/BaseAction.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.action; 2 | 3 | import java.io.PrintWriter; 4 | import java.util.Map; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | import org.apache.struts2.ServletActionContext; 10 | import org.apache.struts2.interceptor.ServletRequestAware; 11 | import org.apache.struts2.interceptor.SessionAware; 12 | 13 | import com.opensymphony.xwork2.ActionSupport; 14 | 15 | /** 16 | * action基类, 继承自ActionSupport类 17 | * 为子类提供struts2 map类型session对象 18 | * 提供分页工具变量等 19 | */ 20 | public class BaseAction extends ActionSupport implements SessionAware,ServletRequestAware { 21 | private static final long serialVersionUID = 1L; 22 | 23 | protected int page = 1; 24 | protected String pageTool; 25 | protected Map session; 26 | protected HttpServletRequest servletRequest; 27 | 28 | 29 | @Override//重写自父接口SessionAware的方法,有容器自行调用并给session对象赋值 30 | public void setSession(Map session) { 31 | this.session = session; 32 | } 33 | 34 | //用于在子类中获取session对象 35 | public Map getSession(){ 36 | return session; 37 | } 38 | 39 | public int getPage() { 40 | return page; 41 | } 42 | 43 | public void setPage(int page) { 44 | this.page = page; 45 | } 46 | 47 | public String getPageTool() { 48 | return pageTool; 49 | } 50 | 51 | public void setPageTool(String pageTool) { 52 | this.pageTool = pageTool; 53 | } 54 | 55 | @Override 56 | public void setServletRequest(HttpServletRequest servletRequest) { 57 | this.servletRequest = servletRequest; 58 | } 59 | 60 | /** 61 | * 返回响应数据 62 | * @param msg 63 | */ 64 | protected void sendResponseMsg(String msg) { 65 | HttpServletResponse response = ServletActionContext.getResponse(); 66 | response.setContentType("text/html"); 67 | response.setHeader("Pragma", "no-cache"); 68 | response.setHeader("Cache-Control", "no-store"); 69 | response.addHeader("Cache-Control", "must-revalidate"); 70 | response.addHeader("Cache-Control", "post-check=0, pre-check=0"); 71 | response.setDateHeader("Expires", 0); 72 | response.setCharacterEncoding("UTF-8"); 73 | PrintWriter out = null; 74 | try { 75 | out = response.getWriter(); 76 | out.print(msg); 77 | } catch (Throwable e) { 78 | e.printStackTrace(); 79 | } finally { 80 | out.close(); 81 | } 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/com/itbaizhan/action/IndexAction.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.action; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.apache.struts2.convention.annotation.Action; 8 | import org.apache.struts2.convention.annotation.Namespace; 9 | import org.apache.struts2.convention.annotation.Result; 10 | import org.apache.struts2.convention.annotation.Results; 11 | 12 | import com.itbaizhan.entity.Book; 13 | import com.itbaizhan.entity.Category; 14 | import com.itbaizhan.entity.Indent; 15 | import com.itbaizhan.entity.Users; 16 | import com.itbaizhan.service.BookService; 17 | import com.itbaizhan.service.CategoryService; 18 | import com.itbaizhan.service.IndentService; 19 | import com.itbaizhan.service.UserService; 20 | import com.itbaizhan.util.PageUtil; 21 | 22 | @Namespace("/index") 23 | @Results({ 24 | @Result(name="index",location="/index/index.jsp"), 25 | @Result(name="about",location="/index/about.jsp"), 26 | @Result(name="category",location="/index/category.jsp"), 27 | @Result(name="special",location="/index/special.jsp"), 28 | @Result(name="new",location="/index/new.jsp"), 29 | @Result(name="sale",location="/index/sale.jsp"), 30 | @Result(name="login",location="/index/login.jsp"), 31 | @Result(name="register",location="/index/register.jsp"), 32 | @Result(name="detail",location="/index/detail.jsp"), 33 | @Result(name="right",location="/index/right.jsp"), 34 | @Result(name="cart",location="/index/cart.jsp"), 35 | @Result(name="order",location="/index/order.jsp"), 36 | @Result(name="search",location="/index/search.jsp"), 37 | }) 38 | public class IndexAction extends BaseAction{ 39 | private static final long serialVersionUID = 1L; 40 | 41 | private static final String indentKey = "indent"; 42 | 43 | private int bookid; 44 | private int category; 45 | private int flag; 46 | private Book book; 47 | private Indent indent; 48 | private String searchName; 49 | 50 | private List bookList; 51 | private List specialList; 52 | private List newList; 53 | private List saleList; 54 | private List categoryList; 55 | private List indentList; 56 | 57 | @Resource 58 | private UserService userService; 59 | @Resource 60 | private BookService bookService; 61 | @Resource 62 | private IndentService indentService; 63 | @Resource 64 | private CategoryService categoryService; 65 | 66 | 67 | /** 68 | * 首页 69 | * @return 70 | */ 71 | @Action("index") 72 | public String index(){ 73 | specialList = bookService.getSpecialList(Book.type_special, 1, 2); 74 | newList = bookService.getSpecialList(Book.type_new, 1, 6); 75 | flag = 1; 76 | return "index"; 77 | } 78 | 79 | /** 80 | * 简介 81 | * @return 82 | */ 83 | @Action("about") 84 | public String about(){ 85 | flag = 2; 86 | return "about"; 87 | } 88 | 89 | /** 90 | * 精品推荐 91 | * @return 92 | */ 93 | @Action("special") 94 | public String special(){ 95 | specialList = bookService.getSpecialList(Book.type_special, page, 3); 96 | pageTool = PageUtil.getPageTool(servletRequest, bookService.getSpecialTotal(Book.type_special), page, 3); 97 | flag = 3; 98 | return "special"; 99 | } 100 | 101 | /** 102 | * 最新出版 103 | * @return 104 | */ 105 | @Action("new") 106 | public String news(){ 107 | newList = bookService.getSpecialList(Book.type_new, page,3); 108 | pageTool = PageUtil.getPageTool(servletRequest, bookService.getSpecialTotal(Book.type_new), page, 3); 109 | flag = 4; 110 | return "new"; 111 | } 112 | 113 | /** 114 | * 优惠促销 115 | * @return 116 | */ 117 | @Action("sale") 118 | public String sale(){ 119 | saleList = bookService.getSpecialList(Book.type_sale, page, 3); 120 | pageTool = PageUtil.getPageTool(servletRequest, bookService.getSpecialTotal(Book.type_sale), page, 3); 121 | flag = 5; 122 | return "sale"; 123 | } 124 | 125 | /** 126 | * 登录 127 | * @return 128 | */ 129 | @Action("login") 130 | public String login(){ 131 | flag = 6; 132 | return "login"; 133 | } 134 | 135 | /** 136 | * 注册 137 | * @return 138 | */ 139 | @Action("register") 140 | public String register(){ 141 | flag = 7; 142 | return "register"; 143 | } 144 | 145 | /** 146 | * 类目搜索 147 | * @return 148 | */ 149 | @Action("category") 150 | public String category(){ 151 | bookList = bookService.getCategoryList(category, page, 12); 152 | pageTool = PageUtil.getPageTool(servletRequest, bookService.getCategoryTotal(category), page, 12); 153 | return "category"; 154 | } 155 | 156 | /** 157 | * 名称搜索 158 | * @return 159 | */ 160 | @Action("search") 161 | public String search(){ 162 | if (searchName!=null && !searchName.trim().isEmpty()) { 163 | bookList = bookService.getList(searchName, page, 12); 164 | pageTool = PageUtil.getPageTool(servletRequest, bookService.getTotal(searchName), page, 12); 165 | } 166 | return "search"; 167 | } 168 | 169 | /** 170 | * 详情 171 | * @return 172 | */ 173 | @Action("detail") 174 | public String detail(){ 175 | book = bookService.get(bookid); 176 | return "detail"; 177 | } 178 | 179 | /** 180 | * 右侧信息 181 | * @return 182 | */ 183 | @Action("right") 184 | public String right(){ 185 | categoryList = categoryService.getList(); 186 | saleList = bookService.getSpecialList(Book.type_sale, 1, 2); 187 | return "right"; 188 | } 189 | 190 | /** 191 | * 查看购物车 192 | * @return 193 | */ 194 | @Action("cart") 195 | public String cart() { 196 | Object username = getSession().get("username"); 197 | if (username!=null && !username.toString().isEmpty()) { 198 | List indentList = indentService.getListByUserid(userService.get(username.toString()).getId()); 199 | if (indentList!=null && !indentList.isEmpty()) { 200 | indent = indentList.get(0); // 最后一次订单信息 201 | } 202 | } 203 | return "cart"; 204 | } 205 | 206 | /** 207 | * 购买 208 | * @return 209 | */ 210 | @Action("buy") 211 | public void buy(){ 212 | Indent indent = (Indent) getSession().get(indentKey); 213 | if (indent==null) { 214 | getSession().put(indentKey, indentService.createIndent(bookService.get(bookid))); 215 | }else { 216 | getSession().put(indentKey, indentService.addIndentItem(indent, bookService.get(bookid))); 217 | } 218 | sendResponseMsg("ok"); 219 | } 220 | 221 | /** 222 | * 减少 223 | */ 224 | @Action("lessen") 225 | public void lessen(){ 226 | Indent indent = (Indent) getSession().get(indentKey); 227 | if (indent != null) { 228 | getSession().put(indentKey, indentService.lessenIndentItem(indent, bookService.get(bookid))); 229 | } 230 | sendResponseMsg("ok"); 231 | } 232 | 233 | /** 234 | * 删除 235 | */ 236 | @Action("delete") 237 | public void delete(){ 238 | Indent indent = (Indent) getSession().get(indentKey); 239 | if (indent != null) { 240 | getSession().put(indentKey, indentService.deleteIndentItem(indent, bookService.get(bookid))); 241 | } 242 | sendResponseMsg("ok"); 243 | } 244 | 245 | /** 246 | * 提交订单 247 | * @return 248 | */ 249 | @Action("save") 250 | public String save(){ 251 | Object username = getSession().get("username"); 252 | if (username==null || username.toString().isEmpty()) { 253 | addActionMessage("请登录后提交订单!"); 254 | return "login"; 255 | } 256 | Indent indentSession = (Indent) getSession().get(indentKey); 257 | Users user = userService.get(username.toString()); 258 | indentSession.setUser(user); 259 | indentSession.setName(indent.getName()); 260 | indentSession.setPhone(indent.getPhone()); 261 | indentSession.setAddress(indent.getAddress()); 262 | indentService.saveIndent(indentSession); // 保存订单 263 | getSession().remove(indentKey); // 清除购物车 264 | addActionMessage("提交订单成功!"); 265 | return "cart"; 266 | } 267 | 268 | /** 269 | * 查看订单 270 | * @return 271 | */ 272 | @Action("order") 273 | public String order(){ 274 | Object username = getSession().get("username"); 275 | if (username==null || username.toString().isEmpty()) { 276 | addActionMessage("请登录后提交订单!"); 277 | return "login"; 278 | } 279 | indentList = indentService.getListByUserid(userService.get(username.toString()).getId()); 280 | if (indentList!=null && !indentList.isEmpty()) { 281 | for(Indent indent : indentList){ 282 | indent.setItemList(indentService.getItemList(indent.getId(), 1, 100)); // 暂不分页 283 | } 284 | } 285 | return "order"; 286 | } 287 | 288 | 289 | public List getBookList() { 290 | return bookList; 291 | } 292 | 293 | public void setBookList(List bookList) { 294 | this.bookList = bookList; 295 | } 296 | 297 | public List getSpecialList() { 298 | return specialList; 299 | } 300 | 301 | public void setSpecialList(List specialList) { 302 | this.specialList = specialList; 303 | } 304 | 305 | public List getNewList() { 306 | return newList; 307 | } 308 | 309 | public void setNewList(List newList) { 310 | this.newList = newList; 311 | } 312 | 313 | public List getSaleList() { 314 | return saleList; 315 | } 316 | 317 | public void setSaleList(List saleList) { 318 | this.saleList = saleList; 319 | } 320 | 321 | public List getCategoryList() { 322 | return categoryList; 323 | } 324 | 325 | public void setCategoryList(List categoryList) { 326 | this.categoryList = categoryList; 327 | } 328 | 329 | public Book getBook() { 330 | return book; 331 | } 332 | 333 | public void setBook(Book book) { 334 | this.book = book; 335 | } 336 | 337 | public int getBookid() { 338 | return bookid; 339 | } 340 | 341 | public void setBookid(int bookid) { 342 | this.bookid = bookid; 343 | } 344 | 345 | public int getCategory() { 346 | return category; 347 | } 348 | 349 | public void setCategory(int category) { 350 | this.category = category; 351 | } 352 | 353 | public int getFlag() { 354 | return flag; 355 | } 356 | 357 | public void setFlag(int flag) { 358 | this.flag = flag; 359 | } 360 | 361 | public List getIndentList() { 362 | return indentList; 363 | } 364 | 365 | public void setIndentList(List indentList) { 366 | this.indentList = indentList; 367 | } 368 | 369 | public Indent getIndent() { 370 | return indent; 371 | } 372 | 373 | public void setIndent(Indent indent) { 374 | this.indent = indent; 375 | } 376 | 377 | public String getSearchName() { 378 | return searchName; 379 | } 380 | 381 | public void setSearchName(String searchName) { 382 | this.searchName = searchName; 383 | } 384 | 385 | } 386 | -------------------------------------------------------------------------------- /src/com/itbaizhan/action/UserAction.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.action; 2 | 3 | import javax.annotation.Resource; 4 | 5 | import org.apache.struts2.convention.annotation.Action; 6 | import org.apache.struts2.convention.annotation.Namespace; 7 | import org.apache.struts2.convention.annotation.Result; 8 | import org.apache.struts2.convention.annotation.Results; 9 | 10 | import com.itbaizhan.entity.Users; 11 | import com.itbaizhan.service.UserService; 12 | 13 | @Action("user") 14 | @Namespace("/index") 15 | @Results({ 16 | @Result(name="login",location="/index/login.jsp"), 17 | @Result(name="register",location="/index/register.jsp"), 18 | @Result(name="index",location="index.action",type="redirect"), 19 | }) 20 | public class UserAction extends BaseAction{ 21 | private static final long serialVersionUID = 1L; 22 | 23 | private Users user; 24 | 25 | @Resource 26 | private UserService userService; 27 | 28 | 29 | /** 30 | * 注册用户 31 | * @return 32 | */ 33 | public String register(){ 34 | if (user.getUsername().isEmpty()) { 35 | addActionMessage("用户名不能为空!"); 36 | return "register"; 37 | }else if (userService.isExist(user.getUsername())) { 38 | addActionMessage("用户名已存在!"); 39 | return "register"; 40 | }else { 41 | userService.add(user); 42 | addActionMessage("注册成功, 请登录!"); 43 | return "login"; 44 | } 45 | } 46 | 47 | /** 48 | * 用户登录 49 | * @return 50 | * @throws Exception 51 | */ 52 | public String login() { 53 | if(userService.checkUser(user.getUsername(), user.getPassword())){ 54 | getSession().put("username", user.getUsername()); 55 | return "index"; 56 | } else { 57 | addActionMessage("用户名或密码错误!"); 58 | return "login"; 59 | } 60 | } 61 | 62 | /** 63 | * 注销登录 64 | * @return 65 | */ 66 | public String logout() { 67 | getSession().remove("username"); 68 | getSession().remove("indent"); 69 | return "login"; 70 | } 71 | 72 | 73 | 74 | public Users getUser() { 75 | return user; 76 | } 77 | 78 | public void setUser(Users user) { 79 | this.user = user; 80 | } 81 | 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/com/itbaizhan/dao/AdminDao.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.stereotype.Repository; 6 | 7 | import com.itbaizhan.entity.Admin; 8 | 9 | @Repository // 注册dao层bean等同于@Component 10 | @SuppressWarnings("unchecked") 11 | public class AdminDao extends BaseDao{ 12 | 13 | /** 14 | * 通过用户名查找 15 | * @param username 16 | * @return 17 | */ 18 | public Object getByUsername(String username) { 19 | return (Admin)getSession().createQuery("from Admin where username=:username") 20 | .setString("username", username).uniqueResult(); 21 | } 22 | 23 | /** 24 | * 通过用户名和密码查找 25 | * @param username 26 | * @param password 27 | * @return 无记录返回null 28 | */ 29 | public Admin getByUsernameAndPassword(String username, String password){ 30 | return (Admin)getSession().createQuery("from Admin where username=:username and password=:password") 31 | .setString("username", username).setString("password", password).uniqueResult(); 32 | } 33 | 34 | /** 35 | * 获取列表 36 | * @param page 37 | * @param rows 38 | * @return 无记录返回空集合 39 | */ 40 | public List getList(int page, int rows){ 41 | return getSession().createQuery("from Admin").setFirstResult(rows*(page-1)).setMaxResults(rows).list(); 42 | } 43 | 44 | /** 45 | * 总数 46 | * @return 47 | */ 48 | public long getTotal() { 49 | return (Long) getSession().createQuery("select count(*) from Admin").uniqueResult(); 50 | } 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/com/itbaizhan/dao/BaseDao.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.dao; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.hibernate.HibernateException; 8 | import org.hibernate.Session; 9 | import org.hibernate.SessionFactory; 10 | 11 | /** 12 | * dao层基类 13 | * 方便子类获取session对象, 及其他公用属性及方法 14 | * 如果遇到异常HibernateException("No Sessionfound for current thread"), 是因为调用请求没有在spring事务中 15 | * 此类中通过getCurrentSession得到的session对象被绑定在spring线程SpringSessionContext中而不是ThreadLocalSessionContext 16 | * 因此必须要在spring事务中才能使用session对象, 此session在事务开启时自动创建, 事务结束后自动销毁 17 | * 如果想使部分方法不开启事务, 除了使用openSession手动创建和销毁, 当前还没发现好的解决方案 18 | */ 19 | public class BaseDao { 20 | 21 | @Resource 22 | private SessionFactory sessionFactory; 23 | private Session session; 24 | 25 | 26 | public SessionFactory getSessionFactory() { 27 | return sessionFactory; 28 | } 29 | public void setSessionFactory(SessionFactory sessionFactory) { 30 | this.sessionFactory = sessionFactory; 31 | } 32 | public Session getSession() { 33 | this.session = sessionFactory.getCurrentSession(); 34 | return session; 35 | } 36 | public void setSession(Session session) { 37 | this.session = session; 38 | } 39 | 40 | 41 | /** 42 | * 主键查询 43 | * @param clazz 44 | * @param id 45 | * @return 无记录返回null 46 | */ 47 | @SuppressWarnings("unchecked") 48 | public T get(Class clazz, Serializable id){ 49 | return (T)getSession().get(clazz, id); 50 | } 51 | 52 | /** 53 | * 添加 54 | * @param object 55 | * @return 返回主键 56 | */ 57 | public Integer save(Object object){ 58 | return (Integer) getSession().save(object); 59 | } 60 | 61 | /** 62 | * 修改 实体无主键时抛StaleStateException 63 | * @param object 64 | * @return 65 | */ 66 | public boolean update(Object object){ 67 | try { 68 | getSession().update(object); 69 | } catch (HibernateException e) { 70 | return false; 71 | }return true; 72 | } 73 | 74 | /** 75 | * 删除 实体无主键时不执行, 直接返回true 76 | * @param object 77 | * @return 78 | */ 79 | public boolean delete(Object object){ 80 | try { 81 | getSession().delete(object); 82 | } catch (HibernateException e) { 83 | return false; 84 | }return true; 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/com/itbaizhan/dao/BookDao.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.stereotype.Repository; 6 | 7 | import com.itbaizhan.entity.Book; 8 | 9 | @Repository // 注册dao层bean等同于@Component 10 | @SuppressWarnings("unchecked") 11 | public class BookDao extends BaseDao{ 12 | 13 | 14 | /** 15 | * 通过名称搜索 16 | * @param category 17 | * @param page 18 | * @param size 19 | * @return 20 | */ 21 | public List getList(String name, int page, int size){ 22 | return getSession().createQuery("from Book where name like '%"+name+"%'") 23 | .setFirstResult((page-1)*size).setMaxResults(size).list(); 24 | } 25 | 26 | /** 27 | * 获取名称总数 28 | * @param type 1推荐/2新书/3特价 29 | * @return 30 | */ 31 | public long getTotal(String name){ 32 | return (Long) getSession().createQuery("select count(*) from Book where name like '%"+name+"%'") 33 | .uniqueResult(); 34 | } 35 | 36 | /** 37 | * 通过分类搜索 38 | * @param category 39 | * @param page 40 | * @param size 41 | * @return 42 | */ 43 | public List getCategoryList(int category, int page, int size){ 44 | return getSession().createQuery("from Book where category=:category").setInteger("category", category) 45 | .setFirstResult((page-1)*size).setMaxResults(size).list(); 46 | } 47 | 48 | /** 49 | * 获取分类总数 50 | * @param type 1推荐/2新书/3特价 51 | * @return 52 | */ 53 | public long getCategoryTotal(int category){ 54 | return (Long) getSession().createQuery("select count(*) from Book where category=:category") 55 | .setInteger("category", category).uniqueResult(); 56 | } 57 | 58 | /** 59 | * 获取特卖列表 60 | * @param type 1推荐/2新书/3特价 61 | * @param page 62 | * @param size 63 | * @return 64 | */ 65 | public List getSpecialList(int type, int page, int size){ 66 | return getSession().createQuery("from Book "+packWhereSql(type)) 67 | .setFirstResult((page-1)*size).setMaxResults(size).list(); 68 | } 69 | 70 | /** 71 | * 获取特卖总数 72 | * @param type 1推荐/2新书/3特价 73 | * @return 74 | */ 75 | public long getSpecialTotal(int type){ 76 | return (Long) getSession().createQuery("select count(*) from Book "+packWhereSql(type)).uniqueResult(); 77 | } 78 | 79 | /** 80 | * 封装sql 81 | * @param type 82 | * @return 83 | */ 84 | private String packWhereSql(int type) { 85 | String sql = ""; 86 | switch (type) { 87 | case Book.type_special: 88 | sql += "where special=1"; 89 | break; 90 | case Book.type_new: 91 | sql += "where news=1"; 92 | break; 93 | case Book.type_sale: 94 | sql += "where sale=1"; 95 | break; 96 | } 97 | return sql; 98 | } 99 | 100 | /** 101 | * 获取列表 102 | * @param page 103 | * @param rows 104 | * @return 无记录返回空集合 105 | */ 106 | public List getList(int status, int page, int rows){ 107 | return getSession().createQuery("from Book "+packSql(status)+" order by id desc").setFirstResult(rows*(page-1)).setMaxResults(rows).list(); 108 | } 109 | 110 | /** 111 | * 总数 112 | * @return 113 | */ 114 | public long getTotal(int status) { 115 | return (Long) getSession().createQuery("select count(*) from Book "+packSql(status)).uniqueResult(); 116 | } 117 | 118 | /** 119 | * 封装sql 120 | * @param status 121 | * @return 122 | */ 123 | private String packSql(int status) { 124 | String sql = ""; 125 | switch (status) { 126 | case 1: 127 | sql += " where special=1"; 128 | break; 129 | case 2: 130 | sql += " where news=1"; 131 | break; 132 | case 3: 133 | sql += " where sale=1"; 134 | break; 135 | } 136 | return sql; 137 | } 138 | 139 | } 140 | -------------------------------------------------------------------------------- /src/com/itbaizhan/dao/CategoryDao.java: -------------------------------------------------------------------------------- 1 | 2 | package com.itbaizhan.dao; 3 | 4 | import java.util.List; 5 | 6 | import org.springframework.stereotype.Repository; 7 | 8 | import com.itbaizhan.entity.Category; 9 | 10 | @Repository // 注册dao层bean等同于@Component 11 | @SuppressWarnings("unchecked") 12 | public class CategoryDao extends BaseDao{ 13 | 14 | 15 | /** 16 | * 获取列表 17 | * @return 18 | */ 19 | public List getList() { 20 | return getSession().createQuery("from Category").list(); 21 | } 22 | 23 | /** 24 | * 获取列表 25 | * @param rows 26 | * @param page 27 | * @return 无记录返回空集合 28 | */ 29 | public List getList(int page, int rows){ 30 | return getSession().createQuery("from Category order by id desc").setFirstResult((page-1)*rows).setMaxResults(rows).list(); 31 | } 32 | 33 | /** 34 | * 总数 35 | * @return 36 | */ 37 | public long getTotal() { 38 | return (Long) getSession().createQuery("select count(*) from Category").uniqueResult(); 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/com/itbaizhan/dao/IndentDao.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.stereotype.Repository; 6 | 7 | import com.itbaizhan.entity.Indent; 8 | import com.itbaizhan.entity.Items; 9 | 10 | @Repository // 注册dao层bean等同于@Component 11 | @SuppressWarnings("unchecked") 12 | public class IndentDao extends BaseDao{ 13 | 14 | /** 15 | * 获取订单列表 16 | * @param page 17 | * @param row 18 | */ 19 | public List getList(int status, int page, int rows) { 20 | return getSession().createQuery("from Indent where status="+status+" order by id desc").setFirstResult((page-1)*rows).setMaxResults(rows).list(); 21 | } 22 | 23 | /** 24 | * 获取总数 25 | * @return 26 | */ 27 | public long getTotal(int status) { 28 | return (Long) getSession().createQuery("select count(*) from Indent where status="+status).uniqueResult(); 29 | } 30 | 31 | /** 32 | * 订单项列表 33 | * @param indentid 34 | * @param page 35 | * @param rows 36 | * @return 37 | */ 38 | public List getItemList(int indentid, int page, int rows) { 39 | return getSession().createQuery("from Items where indent_id="+indentid).setFirstResult((page-1)*rows).setMaxResults(rows).list(); 40 | } 41 | 42 | /** 43 | * 订单项总数 44 | * @return 45 | */ 46 | public long getItemTotal(int indentid) { 47 | return (Long) getSession().createQuery("select count(*) from Items where indent_id="+indentid).uniqueResult(); 48 | } 49 | 50 | /** 51 | * 按用户名查找 52 | * @param userid 53 | * @return 54 | */ 55 | public List getListByUserid(int userid) { 56 | return getSession().createQuery("from Indent where user_id="+userid+" order by id desc").list(); 57 | } 58 | 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/com/itbaizhan/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.stereotype.Repository; 6 | 7 | import com.itbaizhan.entity.Users; 8 | 9 | @Repository // 注册dao层bean等同于@Component 10 | public class UserDao extends BaseDao{ 11 | 12 | 13 | /** 14 | * 通过用户名查找用户 15 | * @return 无记录返回null 16 | */ 17 | public Users getByUsername(String username){ 18 | return (Users) getSession().createQuery("from Users where username=:username") 19 | .setString("username", username).uniqueResult(); 20 | } 21 | 22 | /** 23 | * 通过用户名和密码查找 24 | * @param username 25 | * @param password 26 | * @return 无记录返回null 27 | */ 28 | public Users getByUsernameAndPassword(String username, String password){ 29 | return (Users) getSession().createQuery("from Users where username=:username and password=:password") 30 | .setString("username", username).setString("password", password).uniqueResult(); 31 | } 32 | 33 | /** 34 | * 获取列表 35 | * @param page 36 | * @param rows 37 | * @return 无记录返回空集合 38 | */ 39 | @SuppressWarnings("unchecked") 40 | public List getList(int page, int rows){ 41 | return getSession().createQuery("from Users").setFirstResult(rows*(page-1)).setMaxResults(rows).list(); 42 | } 43 | 44 | /** 45 | * 总数 46 | * @return 47 | */ 48 | public long getTotal() { 49 | return (Long) getSession().createQuery("select count(*) from Users").uniqueResult(); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/com/itbaizhan/entity/Admin.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.entity; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | 7 | @Entity // 注解为hibernate实体 对应数据库中同名表 8 | public class Admin { 9 | 10 | @Id // 注解主键 11 | @GeneratedValue //id生成策略 默认auto 相当于hibernate的native - 自增字段 12 | private int id; 13 | private String username; 14 | private String password; 15 | 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | public void setId(int id) { 21 | this.id = id; 22 | } 23 | public String getUsername() { 24 | return username; 25 | } 26 | public void setUsername(String username) { 27 | this.username = username; 28 | } 29 | public String getPassword() { 30 | return password; 31 | } 32 | public void setPassword(String password) { 33 | this.password = password; 34 | } 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/com/itbaizhan/entity/Book.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.entity; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | import javax.persistence.ManyToOne; 7 | 8 | import org.hibernate.annotations.NotFound; 9 | import org.hibernate.annotations.NotFoundAction; 10 | 11 | @Entity // 注解为hibernate实体 对应数据库中同名表 12 | public class Book { 13 | 14 | public static final int type_special = 1; 15 | public static final int type_new = 2; 16 | public static final int type_sale = 3; 17 | 18 | @Id // 注解主键 19 | @GeneratedValue //id生成策略 默认auto 相当于hibernate的native - 自增字段 20 | private int id; 21 | private String name; 22 | private String cover; 23 | private float price; 24 | private String intro; 25 | private String auther; 26 | private String press; 27 | private String pubdate; 28 | @ManyToOne 29 | @NotFound(action=NotFoundAction.IGNORE) 30 | private Category category; 31 | private boolean special; 32 | private boolean news; 33 | private boolean sale; 34 | 35 | 36 | 37 | public int getId() { 38 | return id; 39 | } 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | public String getName() { 44 | return name; 45 | } 46 | public void setName(String name) { 47 | this.name = name; 48 | } 49 | public String getCover() { 50 | return cover; 51 | } 52 | public void setCover(String cover) { 53 | this.cover = cover; 54 | } 55 | public float getPrice() { 56 | return price; 57 | } 58 | public void setPrice(float price) { 59 | this.price = price; 60 | } 61 | public String getIntro() { 62 | return intro; 63 | } 64 | public void setIntro(String intro) { 65 | this.intro = intro; 66 | } 67 | public String getAuther() { 68 | return auther; 69 | } 70 | public void setAuther(String auther) { 71 | this.auther = auther; 72 | } 73 | public String getPress() { 74 | return press; 75 | } 76 | public void setPress(String press) { 77 | this.press = press; 78 | } 79 | public String getPubdate() { 80 | return pubdate; 81 | } 82 | public void setPubdate(String pubdate) { 83 | this.pubdate = pubdate; 84 | } 85 | public Category getCategory() { 86 | return category; 87 | } 88 | public void setCategory(Category category) { 89 | this.category = category; 90 | } 91 | public boolean isSpecial() { 92 | return special; 93 | } 94 | public void setSpecial(boolean special) { 95 | this.special = special; 96 | } 97 | public boolean isNews() { 98 | return news; 99 | } 100 | public void setNews(boolean news) { 101 | this.news = news; 102 | } 103 | public boolean isSale() { 104 | return sale; 105 | } 106 | public void setSale(boolean sale) { 107 | this.sale = sale; 108 | } 109 | 110 | 111 | } 112 | -------------------------------------------------------------------------------- /src/com/itbaizhan/entity/Category.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.entity; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | 7 | @Entity // 注解为hibernate实体 对应数据库中同名表 8 | public class Category { 9 | 10 | @Id // 注解主键 11 | @GeneratedValue //id生成策略 默认auto 相当于hibernate的native - 自增字段 12 | private int id; 13 | private String name; 14 | 15 | 16 | public int getId() { 17 | return id; 18 | } 19 | public void setId(int id) { 20 | this.id = id; 21 | } 22 | public String getName() { 23 | return name; 24 | } 25 | public void setName(String name) { 26 | this.name = name; 27 | } 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/com/itbaizhan/entity/Indent.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.entity; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.Id; 9 | import javax.persistence.ManyToOne; 10 | import javax.persistence.OneToMany; 11 | import javax.persistence.Transient; 12 | 13 | import org.hibernate.annotations.NotFound; 14 | import org.hibernate.annotations.NotFoundAction; 15 | 16 | @Entity // 注解为hibernate实体 对应数据库中同名表 17 | public class Indent { 18 | 19 | @Id // 注解主键 20 | @GeneratedValue //id生成策略 默认auto 相当于hibernate的native - 自增字段 21 | private int id; 22 | private float total; 23 | private int amount; 24 | private int status; 25 | private String name; 26 | private String phone; 27 | private String address; 28 | private Date systime; 29 | @ManyToOne() 30 | @NotFound(action=NotFoundAction.IGNORE) 31 | private Users user; 32 | @OneToMany 33 | @Transient // 不持久化 34 | private List itemList; 35 | 36 | 37 | public int getId() { 38 | return id; 39 | } 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | public Users getUser() { 44 | return user; 45 | } 46 | public void setUser(Users user) { 47 | this.user = user; 48 | } 49 | public float getTotal() { 50 | return total; 51 | } 52 | public void setTotal(float total) { 53 | this.total = (float)Math.round(total*100)/100; 54 | } 55 | public Date getSystime() { 56 | return systime; 57 | } 58 | public void setSystime(Date systime) { 59 | this.systime = systime; 60 | } 61 | public List getItemList() { 62 | return itemList; 63 | } 64 | public void setItemList(List itemList) { 65 | this.itemList = itemList; 66 | } 67 | public int getAmount() { 68 | return amount; 69 | } 70 | public void setAmount(int amount) { 71 | this.amount = amount; 72 | } 73 | public int getStatus() { 74 | return status; 75 | } 76 | public void setStatus(int status) { 77 | this.status = status; 78 | } 79 | public String getName() { 80 | return name; 81 | } 82 | public void setName(String name) { 83 | this.name = name; 84 | } 85 | public String getPhone() { 86 | return phone; 87 | } 88 | public void setPhone(String phone) { 89 | this.phone = phone; 90 | } 91 | public String getAddress() { 92 | return address; 93 | } 94 | public void setAddress(String address) { 95 | this.address = address; 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /src/com/itbaizhan/entity/Items.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.entity; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | import javax.persistence.ManyToOne; 7 | import javax.persistence.Transient; 8 | 9 | import org.hibernate.annotations.NotFound; 10 | import org.hibernate.annotations.NotFoundAction; 11 | 12 | @Entity // 注解为hibernate实体 对应数据库中同名表 13 | public class Items { 14 | 15 | @Id // 注解主键 16 | @GeneratedValue //id生成策略 默认auto 相当于hibernate的native - 自增字段 17 | private int id; 18 | private float price; 19 | private int amount; 20 | @ManyToOne 21 | @NotFound(action=NotFoundAction.IGNORE) 22 | private Book book; 23 | @ManyToOne 24 | @NotFound(action=NotFoundAction.IGNORE) 25 | private Indent indent; 26 | @Transient 27 | private float total; 28 | 29 | 30 | public int getId() { 31 | return id; 32 | } 33 | public void setId(int id) { 34 | this.id = id; 35 | } 36 | public float getPrice() { 37 | return price; 38 | } 39 | public void setPrice(float price) { 40 | this.price = price; 41 | } 42 | public Book getBook() { 43 | return book; 44 | } 45 | public void setBook(Book book) { 46 | this.book = book; 47 | } 48 | public int getAmount() { 49 | return amount; 50 | } 51 | public void setAmount(int amount) { 52 | this.amount = amount; 53 | } 54 | public Indent getIndent() { 55 | return indent; 56 | } 57 | public void setIndent(Indent indent) { 58 | this.indent = indent; 59 | } 60 | public float getTotal() { 61 | return total; 62 | } 63 | public void setTotal(float total) { 64 | this.total = (float)Math.round(total*100)/100; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/com/itbaizhan/entity/Users.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.entity; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | 7 | @Entity // 注解为hibernate实体 对应数据库中同名表 8 | public class Users { 9 | 10 | @Id // 注解主键 11 | @GeneratedValue //id生成策略 默认auto 相当于hibernate的native - 自增字段 12 | private int id; 13 | private String username; 14 | private String password; 15 | private String phone; 16 | 17 | 18 | public int getId() { 19 | return id; 20 | } 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | public String getUsername() { 25 | return username; 26 | } 27 | public void setUsername(String username) { 28 | this.username = username; 29 | } 30 | public String getPassword() { 31 | return password; 32 | } 33 | public void setPassword(String password) { 34 | this.password = password; 35 | } 36 | public String getPhone() { 37 | return phone; 38 | } 39 | public void setPhone(String phone) { 40 | this.phone = phone; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/com/itbaizhan/service/AdminService.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.service; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import com.itbaizhan.dao.AdminDao; 11 | import com.itbaizhan.entity.Admin; 12 | import com.itbaizhan.util.SafeUtil; 13 | 14 | @Service // 注解为service层spring管理bean 15 | @Transactional // 注解此类所有方法加入spring事务, 具体设置默认 16 | public class AdminService { 17 | 18 | @Resource //spring注入类对象 19 | private AdminDao adminDao; 20 | 21 | /** 22 | * 验证用户密码 23 | * @param username 24 | * @param password 25 | * @return 26 | */ 27 | public boolean checkUser(String username, String password){ 28 | return adminDao.getByUsernameAndPassword(username, SafeUtil.encode(password)) != null; 29 | } 30 | 31 | /** 32 | * 是否存在 33 | * @param username 34 | * @return 35 | */ 36 | public boolean isExist(String username) { 37 | return adminDao.getByUsername(username) != null; 38 | } 39 | 40 | /** 41 | * 列表 42 | * @param page 43 | * @param rows 44 | * @return 45 | */ 46 | public List getList(int page, int rows) { 47 | return adminDao.getList(page, rows); 48 | } 49 | 50 | /** 51 | * 总数 52 | * @return 53 | */ 54 | public long getTotal() { 55 | return adminDao.getTotal(); 56 | } 57 | 58 | /** 59 | * 通过id查询 60 | * @param id 61 | * @return 62 | */ 63 | public Admin get(int id) { 64 | return adminDao.get(Admin.class, id); 65 | } 66 | 67 | /** 68 | * 添加 69 | * @param admin 70 | */ 71 | public Integer add(Admin admin) { 72 | admin.setPassword(SafeUtil.encode(admin.getPassword())); 73 | return adminDao.save(admin); 74 | } 75 | 76 | /** 77 | * 更新 78 | * @param user 79 | */ 80 | public boolean update(Admin admin) { 81 | return adminDao.update(admin); 82 | } 83 | 84 | /** 85 | * 删除 86 | * @param user 87 | */ 88 | public boolean delete(Admin admin) { 89 | return adminDao.delete(admin); 90 | } 91 | 92 | 93 | 94 | } 95 | -------------------------------------------------------------------------------- /src/com/itbaizhan/service/BookService.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.service; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import com.itbaizhan.dao.BookDao; 11 | import com.itbaizhan.entity.Book; 12 | 13 | @Service // 注解为service层spring管理bean 14 | @Transactional // 注解此类所有方法加入spring事务, 具体设置默认 15 | public class BookService { 16 | 17 | @Resource 18 | private BookDao bookDao; 19 | 20 | 21 | /** 22 | * 通过名称搜索 23 | * @param category 24 | * @param page 25 | * @param size 26 | * @return 27 | */ 28 | public List getList(String name, int page, int size) { 29 | return bookDao.getList(name, page, size); 30 | } 31 | 32 | /** 33 | * 分类数量 34 | * @return 无记录返回空集合 35 | */ 36 | public long getTotal(String name){ 37 | return bookDao.getTotal(name); 38 | } 39 | 40 | /** 41 | * 通过分类搜索 42 | * @param category 43 | * @param page 44 | * @param size 45 | * @return 46 | */ 47 | public List getCategoryList(int category, int page, int size) { 48 | return bookDao.getCategoryList(category, page, size); 49 | } 50 | 51 | /** 52 | * 分类数量 53 | * @return 无记录返回空集合 54 | */ 55 | public long getCategoryTotal(int category){ 56 | return bookDao.getCategoryTotal(category); 57 | } 58 | 59 | /** 60 | * 获取特卖列表 61 | * @return 无记录返回空集合 62 | */ 63 | public List getSpecialList(int type, int page, int size){ 64 | return bookDao.getSpecialList(type, page, size); 65 | } 66 | 67 | /** 68 | * 获取特卖列表 69 | * @return 无记录返回空集合 70 | */ 71 | public long getSpecialTotal(int type){ 72 | return bookDao.getSpecialTotal(type); 73 | } 74 | 75 | /** 76 | * 通过id获取 77 | * @param bookid 78 | * @return 79 | */ 80 | public Book get(int bookid) { 81 | return bookDao.get(Book.class, bookid); 82 | } 83 | 84 | /** 85 | * 图书列表 86 | * @param status 87 | * @return 88 | */ 89 | public List getList(int status, int page, int rows) { 90 | return bookDao.getList(status, page, rows); 91 | } 92 | 93 | /** 94 | * 总数 95 | * @return 96 | */ 97 | public long getTotal(int status) { 98 | return bookDao.getTotal(status); 99 | } 100 | 101 | /** 102 | * 添加 103 | * @param book 104 | */ 105 | public Integer add(Book book) { 106 | return bookDao.save(book); 107 | } 108 | 109 | /** 110 | * 修改 111 | * @param book 112 | * @return 113 | */ 114 | public boolean update(Book book) { 115 | return bookDao.update(book); 116 | } 117 | 118 | /** 119 | * 删除 120 | * @param book 121 | */ 122 | public boolean delete(Book book) { 123 | return bookDao.delete(book); 124 | } 125 | 126 | 127 | 128 | } 129 | -------------------------------------------------------------------------------- /src/com/itbaizhan/service/CategoryService.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.service; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import com.itbaizhan.dao.CategoryDao; 11 | import com.itbaizhan.entity.Category; 12 | 13 | @Service // 注解为service层spring管理bean 14 | @Transactional // 注解此类所有方法加入spring事务, 具体设置默认 15 | public class CategoryService { 16 | 17 | @Resource 18 | private CategoryDao categoryDao; 19 | 20 | /** 21 | * 获取列表 22 | * @return 23 | */ 24 | public List getList(){ 25 | return categoryDao.getList(); 26 | } 27 | 28 | /** 29 | * 列表 30 | * @param page 31 | * @param rows 32 | * @return 33 | */ 34 | public List getList(int page, int rows) { 35 | return categoryDao.getList(page, rows); 36 | } 37 | 38 | /** 39 | * 总数 40 | * @return 41 | */ 42 | public long getTotal() { 43 | return categoryDao.getTotal(); 44 | } 45 | 46 | /** 47 | * 通过id查询 48 | * @param id 49 | * @return 50 | */ 51 | public Category get(int id) { 52 | return categoryDao.get(Category.class, id); 53 | } 54 | 55 | /** 56 | * 添加 57 | * @param category 58 | * @return 59 | */ 60 | public Integer add(Category category) { 61 | return categoryDao.save(category); 62 | } 63 | 64 | /** 65 | * 更新 66 | * @param category 67 | */ 68 | public boolean update(Category category) { 69 | return categoryDao.update(category); 70 | } 71 | 72 | /** 73 | * 删除 74 | * @param category 75 | */ 76 | public boolean delete(Category category) { 77 | return categoryDao.delete(category); 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/com/itbaizhan/service/IndentService.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.service; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import javax.annotation.Resource; 8 | 9 | import org.springframework.stereotype.Service; 10 | import org.springframework.transaction.annotation.Transactional; 11 | 12 | import com.itbaizhan.dao.IndentDao; 13 | import com.itbaizhan.entity.Book; 14 | import com.itbaizhan.entity.Indent; 15 | import com.itbaizhan.entity.Items; 16 | 17 | @Service // 注解为service层spring管理bean 18 | @Transactional // 注解此类所有方法加入spring事务, 具体设置默认 19 | public class IndentService { 20 | 21 | @Resource 22 | private IndentDao indentDao; 23 | 24 | /** 25 | * 创建订单 26 | * @param bookid 27 | * @return 28 | */ 29 | public Indent createIndent(Book book) { 30 | List itemList = new ArrayList(); 31 | itemList.add(createItems(book)); 32 | Indent indent = new Indent(); 33 | indent.setItemList(itemList); 34 | indent.setTotal(book.getPrice()); 35 | indent.setAmount(1); 36 | return indent; 37 | } 38 | 39 | /** 40 | * 创建订单项 41 | * @param book 42 | * @return 43 | */ 44 | private Items createItems(Book book) { 45 | Items item = new Items(); 46 | item.setBook(book); 47 | item.setPrice(book.getPrice()); 48 | item.setAmount(1); 49 | item.setTotal(item.getPrice() * item.getAmount()); 50 | return item; 51 | } 52 | 53 | /** 54 | * 向订单添加项目 55 | * @param indentList 56 | * @param bookid 57 | * @return 58 | */ 59 | public Indent addIndentItem(Indent indent, Book book) { 60 | List itemList = indent.getItemList(); 61 | itemList = itemList==null ? new ArrayList() : itemList; 62 | // 如果购物车已有此书, 数量+1 63 | boolean noThisBook = true; 64 | for (Items item : itemList) { 65 | if (item.getBook().getId() == book.getId()) { 66 | item.setPrice(book.getPrice()); 67 | item.setAmount(item.getAmount() + 1); 68 | item.setTotal(item.getPrice() * item.getAmount()); 69 | noThisBook = false; 70 | } 71 | } 72 | // 如果当前购物车没有此书, 创建新条目 73 | if (noThisBook) { 74 | itemList.add(createItems(book)); 75 | } 76 | indent.setTotal(indent.getTotal() + book.getPrice()); 77 | indent.setAmount(indent.getAmount() + 1); 78 | return indent; 79 | } 80 | 81 | /** 82 | * 从订单中减少项目 83 | * @param indent 84 | * @param product 85 | * @return 86 | */ 87 | public Indent lessenIndentItem(Indent indent, Book book) { 88 | List itemList = indent.getItemList(); 89 | itemList = itemList==null ? new ArrayList() : itemList; 90 | // 如果购物车已有此项目, 数量-1 91 | boolean noneThis = true; 92 | for (Items item : itemList) { 93 | if (item.getBook().getId() == book.getId()) { 94 | if (item.getAmount() - 1 <= 0) { // 减少到0后删除 95 | return deleteIndentItem(indent, book); 96 | } 97 | item.setPrice(book.getPrice()); 98 | item.setAmount(item.getAmount() - 1); 99 | item.setTotal(item.getPrice() * item.getAmount()); 100 | noneThis = false; 101 | } 102 | } 103 | // 如果当前购物车没有项目, 直接返回 104 | if (noneThis) { 105 | return indent; 106 | } 107 | indent.setTotal(indent.getTotal() - book.getPrice()); 108 | indent.setAmount(indent.getAmount() - 1); 109 | return indent; 110 | } 111 | 112 | /** 113 | * 从订单中删除项目 114 | * @param indent 115 | * @param product 116 | * @return 117 | */ 118 | public Indent deleteIndentItem(Indent indent, Book book) { 119 | List itemList = indent.getItemList(); 120 | itemList = itemList==null ? new ArrayList() : itemList; 121 | // 如果购物车已有此项目, 数量清零 122 | boolean noneThis = true; 123 | int itemAmount = 0; 124 | List resultList = new ArrayList(); 125 | for (Items item : itemList) { 126 | if (item.getBook().getId() == book.getId()) { 127 | itemAmount = item.getAmount(); 128 | noneThis = false; 129 | continue; 130 | } 131 | resultList.add(item); 132 | } 133 | // 如果已经没有项目, 返回null 134 | if (resultList.isEmpty()) { 135 | return null; 136 | } 137 | indent.setItemList(resultList); 138 | // 如果当前购物车没有项目, 直接返回 139 | if (noneThis) { 140 | return indent; 141 | } 142 | indent.setTotal(indent.getTotal() - book.getPrice() * itemAmount); 143 | indent.setAmount(indent.getAmount() - itemAmount); 144 | return indent; 145 | } 146 | 147 | /** 148 | * 保存订单 149 | * @param indent 150 | */ 151 | public void saveIndent(Indent indent) { 152 | indent.setStatus(1); 153 | indent.setSystime(new Date()); 154 | int indentId = indentDao.save(indent); 155 | for(Items item : indent.getItemList()){ 156 | item.setIndent(indentDao.get(Indent.class, indentId)); 157 | indentDao.save(item); 158 | } 159 | } 160 | 161 | /** 162 | * 获取订单列表 163 | * @param page 164 | * @param row 165 | * @return 166 | */ 167 | public List getList(int status, int page, int row) { 168 | return indentDao.getList(status, page, row); 169 | } 170 | 171 | /** 172 | * 获取总数 173 | * @return 174 | */ 175 | public int getTotal(int status) { 176 | return (int)indentDao.getTotal(status); 177 | } 178 | 179 | /** 180 | * 处理订单 181 | * @param id 182 | * @return 183 | */ 184 | public boolean dispose(int id) { 185 | Indent indent = indentDao.get(Indent.class, id); 186 | indent.setStatus(2); 187 | return indentDao.update(indent); 188 | } 189 | 190 | /** 191 | * 删除订单 192 | * @param id 193 | */ 194 | public boolean delete(int id) { 195 | Indent indent = new Indent(); 196 | indent.setId(id); 197 | return indentDao.delete(indent); 198 | } 199 | 200 | /** 201 | * 订单项列表 202 | * @param indentid 203 | * @param page 204 | * @param rows 205 | * @return 206 | */ 207 | public List getItemList(int indentid, int page, int rows) { 208 | List itemList = indentDao.getItemList(indentid, page, rows); 209 | if (itemList!=null && !itemList.isEmpty()) { 210 | for (Items item : itemList) { 211 | item.setTotal(item.getPrice() * item.getAmount()); 212 | } 213 | } 214 | return itemList; 215 | } 216 | 217 | /** 218 | * 订单项总数 219 | * @return 220 | */ 221 | public int getItemTotal(int status) { 222 | return (int)indentDao.getItemTotal(status); 223 | } 224 | 225 | /** 226 | * 获取某人全部订单 227 | * @param userid 228 | * @return 229 | */ 230 | public List getListByUserid(int userid) { 231 | return indentDao.getListByUserid(userid); 232 | } 233 | 234 | } 235 | -------------------------------------------------------------------------------- /src/com/itbaizhan/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.service; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import com.itbaizhan.dao.UserDao; 11 | import com.itbaizhan.entity.Users; 12 | import com.itbaizhan.util.SafeUtil; 13 | 14 | @Service // 注解为service层spring管理bean 15 | @Transactional // 注解此类所有方法加入spring事务, 具体设置默认 16 | public class UserService { 17 | 18 | @Resource //spring注入类对象 19 | private UserDao userDao; 20 | 21 | /** 22 | * 验证用户密码 23 | * @param username 24 | * @param password 25 | * @return 26 | */ 27 | public boolean checkUser(String username, String password){ 28 | return userDao.getByUsernameAndPassword(username, SafeUtil.encode(password)) != null; 29 | } 30 | 31 | /** 32 | * 用户是否存在 33 | * @param username 34 | * @return 35 | */ 36 | public boolean isExist(String username) { 37 | return userDao.getByUsername(username) != null; 38 | } 39 | 40 | /** 41 | * 添加 42 | * @param user 43 | * @return 44 | */ 45 | public boolean add(Users user) { 46 | //加密 47 | user.setPassword(SafeUtil.encode(user.getPassword())); 48 | return userDao.save(user) > 0; 49 | } 50 | 51 | /** 52 | * 通过id获取 53 | * @param userid 54 | * @return 55 | */ 56 | public Users get(int userid){ 57 | return userDao.get(Users.class, userid); 58 | } 59 | 60 | /** 61 | * 通过username获取 62 | * @param username 63 | * @return 64 | */ 65 | public Users get(String username){ 66 | return userDao.getByUsername(username); 67 | } 68 | 69 | /** 70 | * 列表 71 | * @param page 72 | * @param rows 73 | * @return 74 | */ 75 | public List getList(int page, int rows) { 76 | return userDao.getList(page, rows); 77 | } 78 | 79 | /** 80 | * 总数 81 | * @return 82 | */ 83 | public long getTotal() { 84 | return userDao.getTotal(); 85 | } 86 | 87 | /** 88 | * 更新 89 | * @param user 90 | */ 91 | public boolean update(Users user) { 92 | return userDao.update(user); 93 | } 94 | 95 | /** 96 | * 删除 97 | * @param user 98 | */ 99 | public boolean delete(int id) { 100 | Users user = new Users(); 101 | user.setId(id); 102 | return userDao.delete(user); 103 | } 104 | 105 | } 106 | -------------------------------------------------------------------------------- /src/com/itbaizhan/util/PageUtil.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.util; 2 | 3 | import java.util.Enumeration; 4 | import javax.servlet.http.HttpServletRequest; 5 | 6 | 7 | /** 8 | * 分页工具类 9 | */ 10 | public class PageUtil { 11 | 12 | 13 | /** 14 | * 获取分页工具 15 | * @param total 总记录数 16 | * @param page 当前页面 17 | * @param size 每页数量 18 | * @return 19 | */ 20 | public static String getPageTool(HttpServletRequest request, long total, int page, int size){ 21 | if (total <= 0) { 22 | return null; 23 | } 24 | // 计算总页数 25 | int pages = (int) (total % size ==0 ? total/size : total /size + 1); 26 | pages = pages == 0 ? 1 : pages; 27 | // 请求地址 28 | String url = request.getRequestURL().toString(); 29 | // 请求参数 30 | StringBuilder paramBuilder = new StringBuilder(); 31 | Enumeration params = request.getParameterNames(); 32 | while (params.hasMoreElements()) { 33 | String param = params.nextElement(); 34 | if(param.indexOf("page") > -1) { 35 | continue; 36 | } 37 | paramBuilder.append("&").append(param).append("=").append(request.getParameter(param)); 38 | } 39 | 40 | // 分页字符串 41 | StringBuilder pageBuilder = new StringBuilder(); 42 | pageBuilder.append(""); 84 | return pageBuilder.toString(); 85 | } 86 | 87 | /** 88 | * 封装分页项 89 | * @param url 90 | * @param params 91 | * @param page 92 | * @param i 93 | * @return 94 | */ 95 | private static String packPageItem(String url, String params, int page, int i) { 96 | StringBuilder pageBuilder = new StringBuilder(); 97 | if (i == page) { 98 | pageBuilder.append("").append(i).append(""); 99 | }else{ 100 | pageBuilder.append("");pageBuilder.append(i).append(""); 102 | } 103 | return pageBuilder.toString(); 104 | } 105 | 106 | 107 | /** 108 | * 后台管理分页 109 | * @param request 110 | * @param total 111 | * @param page 112 | * @param size 113 | * @return 114 | */ 115 | public static String getPageToolAdmin(HttpServletRequest request, long total, int page, int size) { 116 | if (total <= 0) { 117 | return null; 118 | } 119 | // 计算总页数 120 | int pages = (int) (total % size ==0 ? total/size : total /size + 1); 121 | pages = pages == 0 ? 1 : pages; 122 | // 请求地址 123 | String url = request.getRequestURL().toString(); 124 | // 请求参数 125 | StringBuilder paramBuilder = new StringBuilder(); 126 | Enumeration params = request.getParameterNames(); 127 | while (params.hasMoreElements()) { 128 | String param = params.nextElement(); 129 | if(param.indexOf("page") > -1) { 130 | continue; 131 | } 132 | paramBuilder.append("&").append(param).append("=").append(request.getParameter(param)); 133 | } 134 | 135 | // 分页字符串 136 | StringBuilder pageBuilder = new StringBuilder(); 137 | pageBuilder.append("
"); 138 | // 上一页 139 | if (page <= 1) { // 如果已经是第一页, 上一页按钮disabled 140 | pageBuilder.append("上一页"); 141 | }else{ 142 | pageBuilder.append("").append("").append("上一页").append("").append(""); 144 | } 145 | // 中间数字页码 146 | pageBuilder.append("[").append(page).append("/").append(pages).append("]"); 147 | // 下一页 148 | if (page >= pages) { // 如果已经是最后一页, 上一页按钮disabled 149 | pageBuilder.append("下一页"); 150 | }else{ 151 | pageBuilder.append("").append("").append("下一页").append("").append(""); 153 | } 154 | pageBuilder.append("
"); 155 | return pageBuilder.toString(); 156 | } 157 | 158 | } 159 | -------------------------------------------------------------------------------- /src/com/itbaizhan/util/SafeUtil.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.util; 2 | import java.security.MessageDigest; 3 | import java.security.NoSuchAlgorithmException; 4 | import org.springframework.util.Base64Utils; 5 | /** 6 | * 安全工具类 7 | */ 8 | public class SafeUtil { 9 | 10 | /** 11 | * md5加密字符串 12 | * @param str 13 | * @return 14 | */ 15 | public final static String md5(String str){ 16 | MessageDigest messageDigest = null; 17 | try { 18 | messageDigest = MessageDigest.getInstance("MD5"); 19 | } catch (NoSuchAlgorithmException e) { 20 | e.printStackTrace(); 21 | } 22 | messageDigest.update(str.getBytes()); 23 | return Base64Utils.encodeToString(messageDigest.digest()); 24 | } 25 | 26 | /** 27 | * sha1加密字符串 28 | * @param str 29 | * @return 30 | */ 31 | public final static String sha1(String str){ 32 | MessageDigest messageDigest = null; 33 | try { 34 | messageDigest = MessageDigest.getInstance("SHA-1"); 35 | } catch (NoSuchAlgorithmException e) { 36 | e.printStackTrace(); 37 | } 38 | messageDigest.update(str.getBytes()); 39 | return Base64Utils.encodeToString(messageDigest.digest()); 40 | } 41 | 42 | /** 43 | * 使用特定加密范式加密 44 | * @param str 45 | * @return 46 | */ 47 | public final static String encode(String str){ 48 | return md5(sha1(md5(str))); 49 | } 50 | 51 | public static void main(String[] args) { 52 | System.out.println(encode("1")); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/com/itbaizhan/util/UploadUtil.java: -------------------------------------------------------------------------------- 1 | package com.itbaizhan.util; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.text.SimpleDateFormat; 6 | import java.util.Date; 7 | 8 | import org.apache.commons.io.FileUtils; 9 | import org.apache.struts2.ServletActionContext; 10 | 11 | /** 12 | * 上传工具类 13 | */ 14 | public class UploadUtil { 15 | 16 | 17 | /** 18 | * 图片上传 19 | * @return 返回相对路径 20 | * @param photo 图片文件 21 | * @param photoFileName 文件名 22 | * @param savePath 文件保存路径(相对于web根目录) 23 | * @return 24 | */ 25 | public static String fileUpload(File photo, String photoFileName, String savePath){ 26 | if (photo == null) { 27 | return null; 28 | } // 如果上传图片不为空则进行上传图片操作 29 | // 文件存储路径 30 | String path = ServletActionContext.getServletContext().getRealPath("/")+savePath; 31 | // 获取当前文件类型 32 | String type = photoFileName.substring(photoFileName.lastIndexOf(".")+1, photoFileName.length()); 33 | // 获取当前系统时间字符串 34 | String time = new SimpleDateFormat("yyMMddssSSS").format(new Date()); 35 | // 构建新文件名 36 | String newFileName = time+"."+type; 37 | // 按指定路径重命名构建文件 38 | File savefile = new File(path,newFileName); 39 | // 若保存文件的文件夹不存在则创建 40 | if(!savefile.getParentFile().exists()){ 41 | savefile.getParentFile().mkdirs(); 42 | } 43 | System.err.println("上传文件绝对路径: "+savefile.getPath()); 44 | try {// 将上传文件的内容复制到新建文件中 45 | FileUtils.copyFile(photo, savefile); 46 | } catch (IOException e) { 47 | e.printStackTrace(); 48 | } 49 | return savePath+"/"+newFileName; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/jdbc.properties: -------------------------------------------------------------------------------- 1 | ######################################## 2 | ######## database configuration ####### 3 | ####################################### 4 | ##driver 5 | jdbc.driver=com.mysql.jdbc.Driver 6 | ##url 7 | jdbc.url=jdbc:mysql://localhost:3306/graduation_book2 8 | ##username 9 | jdbc.username=root 10 | ##password 11 | jdbc.password=123456 12 | 13 | 14 | ######################################## 15 | ######## c3p0 configuration ####### 16 | ####################################### 17 | 18 | ## initialPoolSize Default: 3 19 | c3p0.initialPoolSize=3 20 | ##minPoolSize Default: 3 21 | c3p0.minPoolSize=2 22 | ##maxPoolSize Default: 15 23 | c3p0.maxPoolSize=10 24 | ##maxIdleTime(s), ( 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | com.itbaizhan.entity 46 | 47 | 48 | 49 | 50 | ${hibernate.dialect} 51 | ${hibernate.show_sql} 52 | ${hibernate.connection.useUnicode} 53 | ${hibernate.connection.characterEncoding} 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/struts.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | --------------------------------------------------------------------------------