├── PredestinedLoveLibrary ├── .settings │ ├── org.eclipse.wst.jsdt.ui.superType.name │ ├── org.eclipse.wst.validation.prefs │ ├── org.eclipse.wst.jsdt.ui.superType.container │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── .jsdtscope │ └── org.eclipse.wst.common.component ├── WebRoot │ ├── META-INF │ │ └── MANIFEST.MF │ ├── img │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ ├── fen.png │ │ ├── shu.png │ │ ├── tu.png │ │ ├── user.png │ │ ├── yuan.png │ │ ├── title.png │ │ └── zheng.png │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── js │ │ └── npm.js │ ├── css │ │ └── Login.css │ ├── index.jsp │ ├── error.jsp │ ├── frame │ │ ├── frameSet.jsp │ │ ├── mainFrame.jsp │ │ ├── topFrame.jsp │ │ └── leftFrame.jsp │ ├── SysUser │ │ ├── userInfo.jsp │ │ └── userPWDEdit.jsp │ ├── WEB-INF │ │ ├── readerJsp │ │ │ ├── readerPermission.jsp │ │ │ ├── readerStatus.jsp │ │ │ ├── permissionPage.jsp │ │ │ ├── readerLoad.jsp │ │ │ ├── readerType.jsp │ │ │ └── readerPage.jsp │ │ ├── bookJsp │ │ │ ├── bookBorrow.jsp │ │ │ ├── bookClass.jsp │ │ │ ├── bookBorrowEdit.jsp │ │ │ ├── bookClassInfo.jsp │ │ │ ├── bookBorrowInfo.jsp │ │ │ ├── book.jsp │ │ │ ├── bookInfo.jsp │ │ │ └── bookEdit.jsp │ │ ├── spring-servlet.xml │ │ └── web.xml │ └── login.jsp ├── sql │ └── 《数据库原理及应用课程设计》任务与指导手册2013(V2.0).doc ├── target │ ├── m2e-jee │ │ └── web-resources │ │ │ └── META-INF │ │ │ ├── MANIFEST.MF │ │ │ └── maven │ │ │ └── PredestinedLoveLibrary │ │ │ └── PredestinedLoveLibrary │ │ │ └── pom.properties │ └── classes │ │ ├── databaseConfig │ │ └── db.properties │ │ ├── com │ │ └── chen │ │ │ └── PLoveLibrary │ │ │ ├── domain │ │ │ ├── Book.class │ │ │ ├── SysRP.class │ │ │ ├── SysUR.class │ │ │ ├── Borrow.class │ │ │ ├── Reader.class │ │ │ ├── SysRole.class │ │ │ ├── SysUser.class │ │ │ ├── BookClass.class │ │ │ ├── ReaderType.class │ │ │ └── SysPermission.class │ │ │ ├── realm │ │ │ └── UserRealm.class │ │ │ ├── util │ │ │ ├── IdentityCode.class │ │ │ ├── DateExchangeUtil.class │ │ │ └── ExportExcelUtil.class │ │ │ ├── mybatis │ │ │ ├── BookMapper.class │ │ │ ├── BorrowMapper.class │ │ │ ├── ReaderMapper.class │ │ │ ├── SysurpMapper.class │ │ │ ├── BookClassMapper.class │ │ │ ├── ReaderTypeMapper.class │ │ │ ├── UserLoginMapper.class │ │ │ ├── SysurpMapper.xml │ │ │ ├── BookClassMapper.xml │ │ │ ├── ReaderTypeMapper.xml │ │ │ ├── BookMapper.xml │ │ │ ├── ReaderMapper.xml │ │ │ ├── UserLoginMapper.xml │ │ │ └── BorrowMapper.xml │ │ │ ├── parameter │ │ │ └── Parameter.class │ │ │ ├── service │ │ │ ├── BookService.class │ │ │ ├── BorrowService.class │ │ │ ├── ReaderService.class │ │ │ ├── BookClassService.class │ │ │ └── ReaderTypeService.class │ │ │ ├── controller │ │ │ ├── BookController.class │ │ │ ├── BorrowContorller.class │ │ │ ├── ReaderController.class │ │ │ ├── BookClassContorller.class │ │ │ ├── ReaderTypeController.class │ │ │ └── UserLoginController.class │ │ │ ├── exception │ │ │ └── HandleException.class │ │ │ └── shiroFilter │ │ │ └── loginFormAuthenticationFilter.class │ │ ├── log4j.properties │ │ ├── validateConfig │ │ └── validateMessage.properties │ │ ├── mybatisConfig │ │ └── spring-mybatis.xml │ │ ├── cacheConfig │ │ └── ehcache.xml │ │ ├── springConfig │ │ └── applicationContext.xml │ │ └── shiroConfig │ │ └── spring-shiro.xml ├── config │ ├── databaseConfig │ │ └── db.properties │ ├── log4j.properties │ ├── validateConfig │ │ └── validateMessage.properties │ ├── mybatisConfig │ │ └── spring-mybatis.xml │ ├── cacheConfig │ │ └── ehcache.xml │ ├── springConfig │ │ └── applicationContext.xml │ └── shiroConfig │ │ └── spring-shiro.xml ├── src │ └── com │ │ └── chen │ │ └── PLoveLibrary │ │ ├── mybatis │ │ ├── SysurpMapper.java │ │ ├── BookMapper.java │ │ ├── ReaderMapper.java │ │ ├── SysurpMapper.xml │ │ ├── BookClassMapper.java │ │ ├── BorrowMapper.java │ │ ├── BookClassMapper.xml │ │ ├── ReaderTypeMapper.xml │ │ ├── ReaderTypeMapper.java │ │ ├── BookMapper.xml │ │ ├── ReaderMapper.xml │ │ ├── UserLoginMapper.xml │ │ ├── UserLoginMapper.java │ │ └── BorrowMapper.xml │ │ ├── domain │ │ ├── SysRole.java │ │ ├── SysPermission.java │ │ ├── SysRP.java │ │ ├── SysUR.java │ │ ├── BookClass.java │ │ ├── SysUser.java │ │ ├── ReaderType.java │ │ ├── Reader.java │ │ ├── Borrow.java │ │ └── Book.java │ │ ├── shiroFilter │ │ └── loginFormAuthenticationFilter.java │ │ ├── exception │ │ └── HandleException.java │ │ ├── service │ │ ├── BookService.java │ │ ├── ReaderTypeService.java │ │ ├── BookClassService.java │ │ ├── ReaderService.java │ │ └── BorrowService.java │ │ ├── parameter │ │ └── Parameter.java │ │ ├── util │ │ ├── DateExchangeUtil.java │ │ ├── IdentityCode.java │ │ └── ExportExcelUtil.java │ │ ├── realm │ │ └── UserRealm.java │ │ └── controller │ │ └── BookClassContorller.java ├── .classpath └── .project ├── .gitattributes └── README.md /PredestinedLoveLibrary/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/img/1.jpg -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/img/2.jpg -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/img/fen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/img/fen.png -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/img/shu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/img/shu.png -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/img/tu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/img/tu.png -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/img/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/img/user.png -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/img/yuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/img/yuan.png -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/img/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/img/title.png -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/img/zheng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/img/zheng.png -------------------------------------------------------------------------------- /PredestinedLoveLibrary/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | encoding/src=UTF-8 4 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/sql/《数据库原理及应用课程设计》任务与指导手册2013(V2.0).doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/sql/《数据库原理及应用课程设计》任务与指导手册2013(V2.0).doc -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/m2e-jee/web-resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Built-By: hase 3 | Build-Jdk: 1.8.0_66 4 | Created-By: Maven Integration for Eclipse 5 | 6 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /PredestinedLoveLibrary/config/databaseConfig/db.properties: -------------------------------------------------------------------------------- 1 | jdbc.driverClassName=com.mysql.jdbc.Driver 2 | jdbc.url=jdbc:mysql://localhost:3306/library 3 | jdbc.username=root 4 | jdbc.password=1234 -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/WebRoot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/databaseConfig/db.properties: -------------------------------------------------------------------------------- 1 | jdbc.driverClassName=com.mysql.jdbc.Driver 2 | jdbc.url=jdbc:mysql://localhost:3306/library 3 | jdbc.username=root 4 | jdbc.password=1234 -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/Book.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/Book.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/SysRP.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/SysRP.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/SysUR.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/SysUR.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/Borrow.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/Borrow.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/Reader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/Reader.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/SysRole.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/SysRole.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/SysUser.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/SysUser.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/BookClass.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/BookClass.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/ReaderType.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/ReaderType.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/realm/UserRealm.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/realm/UserRealm.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/util/IdentityCode.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/util/IdentityCode.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/BookMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/BookMapper.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/parameter/Parameter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/parameter/Parameter.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/service/BookService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/service/BookService.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/SysPermission.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/domain/SysPermission.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/BorrowMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/BorrowMapper.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/ReaderMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/ReaderMapper.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/SysurpMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/SysurpMapper.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/service/BorrowService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/service/BorrowService.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/service/ReaderService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/service/ReaderService.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/util/DateExchangeUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/util/DateExchangeUtil.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/util/ExportExcelUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/util/ExportExcelUtil.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/BookClassMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/BookClassMapper.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/ReaderTypeMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/ReaderTypeMapper.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/UserLoginMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/UserLoginMapper.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/service/BookClassService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/service/BookClassService.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/BookController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/BookController.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/BorrowContorller.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/BorrowContorller.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/ReaderController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/ReaderController.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/exception/HandleException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/exception/HandleException.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/service/ReaderTypeService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/service/ReaderTypeService.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/BookClassContorller.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/BookClassContorller.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/ReaderTypeController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/ReaderTypeController.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/UserLoginController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/controller/UserLoginController.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/config/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.stdout.layout.ConversionPattern=%d [%-5p] %c - %m%n -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/shiroFilter/loginFormAuthenticationFilter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThreadNew/SSM_Project/HEAD/PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/shiroFilter/loginFormAuthenticationFilter.class -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.stdout.layout.ConversionPattern=%d [%-5p] %c - %m%n -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/m2e-jee/web-resources/META-INF/maven/PredestinedLoveLibrary/PredestinedLoveLibrary/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven Integration for Eclipse 2 | #Fri Apr 27 14:28:42 CST 2018 3 | version=0.0.1-SNAPSHOT 4 | groupId=PredestinedLoveLibrary 5 | m2e.projectName=PredestinedLoveLibrary 6 | m2e.projectLocation=F\:\\JavaExample\\PredestinedLoveLibrary 7 | artifactId=PredestinedLoveLibrary 8 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/SysurpMapper.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.mybatis; 2 | 3 | import java.util.List; 4 | 5 | import com.chen.PLoveLibrary.domain.SysPermission; 6 | import com.chen.PLoveLibrary.domain.SysRole; 7 | 8 | public interface SysurpMapper { 9 | public List getRole(String rdID); 10 | public ListgetPermission(String roleName); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.compliance=1.6 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 8 | org.eclipse.jdt.core.compiler.source=1.6 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SSM_Project 2 | ## 简介 3 | #### 项目主要用到的技术是SSM+shiro+maven+bootsrap+mysql框架,shir安全框架主要用于用户登陆的验证,权限控制。
4 | #### 项目的UI用到的是bootstrap框架,简单大气,搭起界面方便和快速。 5 | #### 项目中集成 登陆验证码,导出excel表,时间的处理等工具类 6 | ## 心得 7 | #### 该项目是我在校写的,自认为注释比较详细,很方便在校的学生浏览和学习,浏览该项目的需要对这些框架有一定的了解。 8 | #### 希望学有所得。另外这也可以当学校的毕业设计啊,哈哈哈。 9 | 10 | ### 界面展示 11 | [界面](http://blog.51cto.com/12666319/2113833) 12 | ### 提示 13 | 文档在sql文件夹中 14 | ### 温馨提示 15 | > 介于这个demo仓库有很多fork和starred,为了保证大家可以学到更多的内容,后面可能会重新写该项目。 16 | - 技术栈 17 | 18 | Vue和SpringBoot2 / Vue和Golang 19 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/domain/SysRole.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.domain; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * @类 名: sysRole 7 | * @功能描述: TODO 角色 8 | * @作者信息: 陈强 9 | * @创建时间: 2018年4月21日下午9:35:27 10 | * @修改备注: 11 | */ 12 | @SuppressWarnings("serial") 13 | public class SysRole implements Serializable{ 14 | private String roleName; 15 | 16 | public String getRoleName() { 17 | return roleName; 18 | } 19 | 20 | public void setRoleName(String roleName) { 21 | this.roleName = roleName; 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/css/Login.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-position: center 0; 3 | background-repeat: no-repeat; 4 | background-attachment: fixed; 5 | background-size: cover; 6 | -webkit-background-size: cover; 7 | background-image: url(../img/1.jpg); 8 | } 9 | 10 | form { 11 | margin-top: 15%; 12 | margin-left: 35%; 13 | } 14 | 15 | .bg { 16 | font-family: "楷体"; 17 | font-size: 13; 18 | color: #C12E2A; 19 | font-size: 15; 20 | } 21 | 22 | .tilte { 23 | font-family: "楷体"; 24 | color: 25 | } 26 | 27 | .bg1 { 28 | background: rgba(255, 255, 255, 0.5); 29 | height: 350px; 30 | } -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/domain/SysPermission.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.domain; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * @类 名: sysPermission 7 | * @功能描述: TODO 权限 8 | * @作者信息: 陈强 9 | * @创建时间: 2018年4月21日下午9:36:22 10 | * @修改备注: 11 | */ 12 | @SuppressWarnings("serial") 13 | public class SysPermission implements Serializable{ 14 | private String perName; 15 | 16 | public String getPerName() { 17 | return perName; 18 | } 19 | 20 | public void setPerName(String perName) { 21 | this.perName = perName; 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/BookMapper.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.mybatis; 2 | 3 | import java.util.List; 4 | 5 | import com.chen.PLoveLibrary.domain.Book; 6 | import com.chen.PLoveLibrary.parameter.Parameter; 7 | 8 | /** 9 | * @类 名: BookMapper 10 | * @功能描述: TODO 图书接口 11 | * @作者信息: 陈强 12 | * @创建时间: 2018年4月24日下午8:17:00 13 | * @修改备注: 14 | */ 15 | public interface BookMapper { 16 | public int insertBook(Book book); 17 | public ListselectBook(Parameter parameter); 18 | public int deleteBookByID(String bkID); 19 | public int updateBookByID(Book book); 20 | public int getCounts(Parameter parameter); 21 | } 22 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/ReaderMapper.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.mybatis; 2 | 3 | import java.util.List; 4 | 5 | 6 | import com.chen.PLoveLibrary.domain.Reader; 7 | import com.chen.PLoveLibrary.parameter.Parameter; 8 | 9 | public interface ReaderMapper { 10 | public int insertReader(Reader reader); 11 | public Reader findReaderByrdID(String rdID); 12 | public int deleteReaderByrdID(String rdID); 13 | public int updateReaderByrdID(Reader reader); 14 | public int getCounts(Parameter parameter); 15 | public ListgetReaderInfo(Parameter parameter); 16 | public String findStatusByrdID(String rdID); 17 | public int updateStatusByrdID(Reader reader); 18 | } 19 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/domain/SysRP.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.domain; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * @类 名: SysRP 7 | * @功能描述: TODO 角色和权限 8 | * @作者信息: 陈强 9 | * @创建时间: 2018年4月21日下午9:29:20 10 | * @修改备注: 11 | */ 12 | @SuppressWarnings("serial") 13 | public class SysRP implements Serializable{ 14 | private String roleName; 15 | private String perName; 16 | public String getRoleName() { 17 | return roleName; 18 | } 19 | public void setRoleName(String roleName) { 20 | this.roleName = roleName; 21 | } 22 | public String getPerName() { 23 | return perName; 24 | } 25 | public void setPerName(String perName) { 26 | this.perName = perName; 27 | } 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/SysurpMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 11 | 12 | 16 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/SysurpMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 11 | 12 | 16 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/BookClassMapper.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.mybatis; 2 | 3 | import java.util.List; 4 | 5 | import com.chen.PLoveLibrary.domain.BookClass; 6 | import com.chen.PLoveLibrary.parameter.Parameter; 7 | 8 | /** 9 | * @类 名: BookClassMapper 10 | * @功能描述: TODO 图书编目 11 | * @作者信息: 陈强 12 | * @创建时间: 2018年4月22日下午2:24:12 13 | * @修改备注: 14 | */ 15 | public interface BookClassMapper { 16 | public int insertBookClass(BookClass bookClass); 17 | public int deleteBookClassByID(BookClass bookClass); 18 | public int updateBookClass(BookClass bookClass); 19 | public List selectBookClassByID(Parameter parameter); 20 | public int getCount(Parameter parameter); 21 | public BookClass findBookClassByID(Parameter parameter); 22 | public ListselectAllBkCatalog(); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/domain/SysUR.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.domain; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * @类 名: SysUR 7 | * @功能描述: TODO 用户和角色 8 | * @作者信息: 陈强 9 | * @创建时间: 2018年4月21日下午9:20:29 10 | * @修改备注: 11 | */ 12 | @SuppressWarnings("serial") 13 | public class SysUR implements Serializable{ 14 | private int id; 15 | private String userName; 16 | private String roleName; 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 getRoleName() { 31 | return roleName; 32 | } 33 | public void setRoleName(String roleName) { 34 | this.roleName = roleName; 35 | } 36 | 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/config/validateConfig/validateMessage.properties: -------------------------------------------------------------------------------- 1 | rdID_Message=\u7528\u6237\u540D\u4E0D\u80FD\u4E3A\u7A7A 2 | rdName_Message=\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A 3 | rdEmail_Message=\u90AE\u7BB1\u683C\u5F0F\u4E0D\u6B63\u786E 4 | rdSex_Message=\u6027\u522B\u4E0D\u80FD\u4E3A\u7A7A 5 | rdPwd_Message=\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A 6 | rdType_Message=\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A 7 | rdType_Int=\u5FC5\u987B\u5C0F\u4E8E 20 \u7684\u6574\u6570 8 | rdTypeName_Message=\u7C7B\u578B\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A 9 | canLendQty_Message=\u53EF\u501F\u4E66\u7684\u6570\u91CF\u4E0D\u80FD\u4E3A\u7A7A\u6216\u8005\u501F\u4E66\u7684\u6570\u91CF\u5927\u4E8E 20 \u672C 10 | canLendDay_Message=\u501F\u4E66\u7684\u5929\u6570\u5E03\u6069\u90A3\u4E2A\u4E3A\u7A7A 11 | punishRate_Message=\u4E0D\u80FD\u4E3A\u7A7A 12 | dateValid_Message=\u4E0D\u80FD\u4E3A\u7A7A 13 | canContinueTimes_Message=\u4E0D\u80FD\u4E3A\u7A7A -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/validateConfig/validateMessage.properties: -------------------------------------------------------------------------------- 1 | rdID_Message=\u7528\u6237\u540D\u4E0D\u80FD\u4E3A\u7A7A 2 | rdName_Message=\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A 3 | rdEmail_Message=\u90AE\u7BB1\u683C\u5F0F\u4E0D\u6B63\u786E 4 | rdSex_Message=\u6027\u522B\u4E0D\u80FD\u4E3A\u7A7A 5 | rdPwd_Message=\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A 6 | rdType_Message=\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A 7 | rdType_Int=\u5FC5\u987B\u5C0F\u4E8E 20 \u7684\u6574\u6570 8 | rdTypeName_Message=\u7C7B\u578B\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A 9 | canLendQty_Message=\u53EF\u501F\u4E66\u7684\u6570\u91CF\u4E0D\u80FD\u4E3A\u7A7A\u6216\u8005\u501F\u4E66\u7684\u6570\u91CF\u5927\u4E8E 20 \u672C 10 | canLendDay_Message=\u501F\u4E66\u7684\u5929\u6570\u5E03\u6069\u90A3\u4E2A\u4E3A\u7A7A 11 | punishRate_Message=\u4E0D\u80FD\u4E3A\u7A7A 12 | dateValid_Message=\u4E0D\u80FD\u4E3A\u7A7A 13 | canContinueTimes_Message=\u4E0D\u80FD\u4E3A\u7A7A -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | My JSP 'index.jsp' starting page 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | 24 |

操作成功

25 | 26 | 27 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/domain/BookClass.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.domain; 2 | 3 | import java.io.Serializable; 4 | 5 | import org.hibernate.validator.constraints.NotBlank; 6 | 7 | /** 8 | * @类 名: BookClass 9 | * @功能描述: TODO 图书的编目工作 10 | * @作者信息: 陈强 11 | * @创建时间: 2018年4月22日下午12:40:16 12 | * @修改备注: 13 | */ 14 | @SuppressWarnings("serial") 15 | public class BookClass implements Serializable{ 16 | private String bkCatalog;//分类号 17 | private String bkClassName;//分类名 18 | @NotBlank(message="不能为空") 19 | public String getBkCatalog() { 20 | return bkCatalog; 21 | } 22 | public void setBkCatalog(String bkCatalog) { 23 | this.bkCatalog = bkCatalog; 24 | } 25 | @NotBlank(message="不能为空") 26 | public String getBkClassName() { 27 | return bkClassName; 28 | } 29 | public void setBkClassName(String bkClassName) { 30 | this.bkClassName = bkClassName; 31 | } 32 | 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="Utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | My JSP 'error.jsp' starting page 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 |

${message }


27 | 28 | 29 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/frame/frameSet.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 图书管理系统 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | <body> 24 | </body 25 | > 26 | 27 | 28 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/BorrowMapper.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.mybatis; 2 | 3 | import java.util.List; 4 | 5 | import com.chen.PLoveLibrary.domain.Borrow; 6 | import com.chen.PLoveLibrary.domain.ReaderType; 7 | import com.chen.PLoveLibrary.parameter.Parameter; 8 | 9 | /** 10 | * @类 名: BorrowMapper 11 | * @功能描述: TODO 借书接口 12 | * @作者信息: 陈强 13 | * @创建时间: 2018年4月26日上午10:07:51 14 | * @修改备注: 15 | */ 16 | public interface BorrowMapper { 17 | public int insertBorrow(Borrow borrow); 18 | public int updateBookByID(Parameter parameter); 19 | public Parameter getReaderInfoByID(Parameter parameter); 20 | public int updateReaderByID(Parameter parameter); 21 | public ReaderType findReaderTypeByrdID(String rdID); 22 | public List selectBorrowInfo(Parameter parameter); 23 | public int getCounts(Parameter parameter); 24 | public int deleteBorrowByID(int id); 25 | public int updateReader(Parameter parameter); 26 | public Borrow getBorrow(Borrow borrow); 27 | public int updateReturn(Borrow borrow); 28 | public int updateTB(Borrow borrow); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/shiroFilter/loginFormAuthenticationFilter.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.shiroFilter; 2 | 3 | 4 | 5 | import javax.servlet.ServletRequest; 6 | import javax.servlet.ServletResponse; 7 | import org.apache.shiro.authc.AuthenticationToken; 8 | import org.apache.shiro.subject.Subject; 9 | import org.apache.shiro.web.filter.authc.FormAuthenticationFilter; 10 | import org.apache.shiro.web.util.WebUtils; 11 | 12 | /** 13 | * @类 名: loginFormAuthenticationFilter 14 | * @功能描述: TODO 解决shiro 登陆成功不跳转到指定的成功页面 15 | * @作者信息: 陈强 16 | * @创建时间: 2018年4月27日下午3:37:27 17 | * @修改备注: 18 | */ 19 | public class loginFormAuthenticationFilter extends FormAuthenticationFilter { 20 | 21 | 22 | @Override 23 | protected boolean onLoginSuccess(AuthenticationToken token, Subject subject, ServletRequest request, 24 | ServletResponse response) throws Exception { 25 | // TODO Auto-generated method stub 26 | WebUtils.getAndClearSavedRequest(request); 27 | WebUtils.redirectToSavedRequest(request, response, "/frame/frameSet.jsp"); 28 | return false; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/domain/SysUser.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | /** 7 | * @类 名: SysUser 8 | * @功能描述: TODO 系统用户信息相当于shiro的subject 9 | * @作者信息: 陈强 10 | * @创建时间: 2018年4月14日下午9:04:39 11 | * @修改备注: 12 | */ 13 | @SuppressWarnings("serial") 14 | public class SysUser implements Serializable { 15 | private String username; 16 | private String password; 17 | private String identity; 18 | private Date date; 19 | 20 | public Date getDate() { 21 | return date; 22 | } 23 | public void setDate(Date date) { 24 | this.date = date; 25 | } 26 | public String getUsername() { 27 | return username; 28 | } 29 | public void setUsername(String username) { 30 | this.username = username; 31 | } 32 | public String getPassword() { 33 | return password; 34 | } 35 | public void setPassword(String password) { 36 | this.password = password; 37 | } 38 | public String getIdentity() { 39 | return identity; 40 | } 41 | public void setIdentity(String identity) { 42 | this.identity = identity; 43 | } 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/exception/HandleException.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.exception; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | 6 | import org.apache.shiro.authz.UnauthorizedException; 7 | import org.springframework.web.servlet.HandlerExceptionResolver; 8 | import org.springframework.web.servlet.ModelAndView; 9 | 10 | /** 11 | * @类 名: HandleException 12 | * @功能描述: TODO 全局异常处理 13 | * @作者信息: 陈强 14 | * @创建时间: 2018年4月14日下午10:35:48 15 | * @修改备注: 16 | */ 17 | public class HandleException implements HandlerExceptionResolver{ 18 | 19 | @Override 20 | public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse reponse, Object object, 21 | Exception ex) { 22 | // TODO Auto-generated method stub 23 | 24 | ModelAndView mv=new ModelAndView(); 25 | if(ex instanceof UnauthorizedException) 26 | { 27 | mv.addObject("message", "对不起你没有该权限,请勿操作"); 28 | } 29 | else 30 | { 31 | mv.addObject("message", ex.getMessage()); 32 | } 33 | mv.setViewName("error"); 34 | return mv; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/config/mybatisConfig/spring-mybatis.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/mybatisConfig/spring-mybatis.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | PredestinedLoveLibrary 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.validation.validationbuilder 20 | 21 | 22 | 23 | 24 | com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.m2e.core.maven2Nature 36 | org.eclipse.jem.workbench.JavaEMFNature 37 | org.eclipse.wst.common.modulecore.ModuleCoreNature 38 | org.eclipse.wst.common.project.facet.core.nature 39 | org.eclipse.jdt.core.javanature 40 | org.eclipse.wst.jsdt.core.jsNature 41 | 42 | 43 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/config/cacheConfig/ehcache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | 20 | 21 | 22 | 28 | 29 | 30 | 36 | 37 | 38 | 44 | 45 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/cacheConfig/ehcache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | 20 | 21 | 22 | 28 | 29 | 30 | 36 | 37 | 38 | 44 | 45 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/SysUser/userInfo.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 29 | 30 |
31 | 用户图像:
32 | 33 |
34 |
35 | 用户名:${SysReader.rdID} 36 |
37 | 姓名:${SysReader.rdName} 38 |
39 | 性别:${SysReader.rdSex} 40 |
41 | 类别:${SysReader.rdType} (0:代表老师,1:代表学生) 42 |
43 | 角色:${SysReader.rdAdminRoles} 44 |
45 | 46 |
47 | 48 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/service/BookService.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Propagation; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import com.chen.PLoveLibrary.domain.Book; 11 | import com.chen.PLoveLibrary.mybatis.BookMapper; 12 | import com.chen.PLoveLibrary.parameter.Parameter; 13 | 14 | /** 15 | * @类 名: BookService 16 | * @功能描述: TODO 图书管理服务层 17 | * @作者信息: 陈强 18 | * @创建时间: 2018年4月24日下午8:26:03 19 | * @修改备注: 20 | */ 21 | @Service 22 | public class BookService { 23 | @Autowired 24 | private BookMapper bookMapper; 25 | @Transactional(propagation=Propagation.REQUIRED) 26 | public int insertBook(Book book) 27 | { 28 | return this.bookMapper.insertBook(book); 29 | } 30 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 31 | public ListselectBook(Parameter parameter) 32 | { 33 | return this.bookMapper.selectBook(parameter); 34 | } 35 | @Transactional(propagation=Propagation.REQUIRED) 36 | public int deleteBookByID(String bkID) 37 | { 38 | return this.bookMapper.deleteBookByID(bkID); 39 | } 40 | @Transactional(propagation=Propagation.REQUIRED) 41 | public int updateBookByID(Book book) 42 | { 43 | return this.bookMapper.updateBookByID(book); 44 | } 45 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 46 | public int getCounts(Parameter parameter) 47 | { 48 | return this.bookMapper.getCounts(parameter); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/BookClassMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | insert into 8 | tb_BookClass 9 | values(#{bkCatalog},#{bkClassName}) 10 | 11 | 12 | 13 | delete from 14 | tb_BookClass where bkCatalog=#{bkCatalog} 15 | 16 | 17 | 18 | update 19 | tb_BookClass 20 | set bkClassName=#{bkClassName} 21 | where 22 | bkCatalog=#{bkCatalog} 23 | 24 | 25 | 35 | 36 | 42 | 43 | 46 | 47 | 50 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/BookClassMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | insert into 8 | tb_BookClass 9 | values(#{bkCatalog},#{bkClassName}) 10 | 11 | 12 | 13 | delete from 14 | tb_BookClass where bkCatalog=#{bkCatalog} 15 | 16 | 17 | 18 | update 19 | tb_BookClass 20 | set bkClassName=#{bkClassName} 21 | where 22 | bkCatalog=#{bkCatalog} 23 | 24 | 25 | 35 | 36 | 42 | 43 | 46 | 47 | 50 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/ReaderTypeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | insert into 8 | tb_readertype 9 | values(#{rdType},#{rdTypeName},#{canLendQty},#{canLendDay},#{canContinueTimes},#{punishRate},#{dateValid}) 10 | 11 | 12 | 15 | 16 | 17 | delete from 18 | tb_ReaderType where rdType=#{id} 19 | 20 | 21 | 22 | update tb_readertype 23 | set 24 | rdTypeName=#{rdTypeName},CanLendQty=#{canLendQty},CanLendDay=#{canLendDay},CanContinueTimes=#{canContinueTimes},PunishRate=#{punishRate},DateValid=#{dateValid} 25 | where rdType=#{rdType} 26 | 27 | 28 | 39 | 40 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/ReaderTypeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | insert into 8 | tb_readertype 9 | values(#{rdType},#{rdTypeName},#{canLendQty},#{canLendDay},#{canContinueTimes},#{punishRate},#{dateValid}) 10 | 11 | 12 | 15 | 16 | 17 | delete from 18 | tb_ReaderType where rdType=#{id} 19 | 20 | 21 | 22 | update tb_readertype 23 | set 24 | rdTypeName=#{rdTypeName},CanLendQty=#{canLendQty},CanLendDay=#{canLendDay},CanContinueTimes=#{canContinueTimes},PunishRate=#{punishRate},DateValid=#{dateValid} 25 | where rdType=#{rdType} 26 | 27 | 28 | 39 | 40 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/readerJsp/readerPermission.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 29 | 30 |
31 |
32 |
33 | 用户名 34 | 35 |
36 |
37 | 角色 38 | 44 |
45 |
46 | 47 |
48 | 49 |
50 |
51 | 52 | 53 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/ReaderTypeMapper.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.mybatis; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import com.chen.PLoveLibrary.domain.ReaderType; 7 | 8 | public interface ReaderTypeMapper { 9 | /** 10 | * @Title : insertReaderType 11 | * @功能描述: TODO 读者类别注册 12 | * @开发者:陈强 13 | * @参数: @param id 14 | * @参数: @return 15 | * @返回类型:int 16 | * @throws : 17 | */ 18 | public int insertReaderType(ReaderType readerType); 19 | /** 20 | * @Title : findReaderTypeByID 21 | * @功能描述: TODO 根据id查找信息 22 | * @开发者:陈强 23 | * @参数: @param id 24 | * @参数: @return 25 | * @返回类型:ReaderType 26 | * @throws : 27 | */ 28 | public ReaderType findReaderTypeByID(int id); 29 | /** 30 | * @Title : deleteReaderTypeByID 31 | * @功能描述: TODO 根据id删除信息 32 | * @开发者:陈强 33 | * @参数: @param id 34 | * @参数: @return 35 | * @返回类型:int 36 | * @throws : 37 | */ 38 | public int deleteReaderTypeByID(int id); 39 | /** 40 | * @Title : updateReaderType 41 | * @功能描述: TODO 更新数据 42 | * @开发者:陈强 43 | * @参数: @param readerType 44 | * @参数: @return 45 | * @返回类型:int 46 | * @throws : 47 | */ 48 | public int updateReaderType(ReaderType readerType); 49 | /** 50 | * @Title : searchReaderType 51 | * @功能描述: TODO 分页查找 52 | * @开发者:陈强 53 | * @参数: @param map 54 | * @参数: @return 55 | * @返回类型:List 56 | * @throws : 57 | */ 58 | @SuppressWarnings("rawtypes") 59 | public ListsearchReaderType(Map map); 60 | /** 61 | * @Title : findCountsReaderType 62 | * @功能描述: TODO 得到总记录的个数 63 | * @开发者:陈强 64 | * @参数: @return 65 | * @返回类型:int 66 | * @throws : 67 | */ 68 | public int findCountsReaderType(int rdType); 69 | } 70 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/frame/mainFrame.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 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 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/frame/topFrame.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 32 | 33 | 34 |
35 | 36 |
37 |
38 | 39 | Settings 40 | ${admin } 41 | Logout 42 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/service/ReaderTypeService.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Propagation; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | import com.chen.PLoveLibrary.domain.ReaderType; 12 | import com.chen.PLoveLibrary.mybatis.ReaderTypeMapper; 13 | 14 | /** 15 | * @类 名: ReaderTypeService 16 | * @功能描述: TODO 读者类别服务层 17 | * @作者信息: 陈强 18 | * @创建时间: 2018年4月18日上午11:17:03 19 | * @修改备注: 20 | */ 21 | @Service 22 | public class ReaderTypeService { 23 | @Autowired 24 | private ReaderTypeMapper readerTypeMapper; 25 | @Transactional(propagation=Propagation.REQUIRED) 26 | public int insertReaderType(ReaderType readerType) 27 | { 28 | return this.readerTypeMapper.insertReaderType(readerType); 29 | } 30 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true ) 31 | public ReaderType findReaderTypeByID(int id) 32 | { 33 | return this.readerTypeMapper.findReaderTypeByID(id); 34 | } 35 | @Transactional(propagation=Propagation.REQUIRED) 36 | public int deleteReaderTypeByID(int id) 37 | { 38 | return this.readerTypeMapper.deleteReaderTypeByID(id); 39 | } 40 | @Transactional(propagation=Propagation.REQUIRED) 41 | public int updateReaderType(ReaderType readerType) 42 | { 43 | return this.readerTypeMapper.updateReaderType(readerType); 44 | } 45 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 46 | @SuppressWarnings("rawtypes") 47 | public ListsearchReaderType(Map map) 48 | { 49 | return this.readerTypeMapper.searchReaderType(map); 50 | } 51 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 52 | public int findCountsReaderType(int rdType) 53 | { 54 | return this.readerTypeMapper.findCountsReaderType(rdType); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/BookMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | insert into tb_book 8 | values(#{bkID},#{bkCode},#{bkName},#{bkAuthor},#{bkPress},#{bkDatePress},#{bkISBN}, 9 | #{bkCatalog},#{bkLanguage},#{bkPages},#{bkPrice},#{bkDateIn},#{bkBrief},#{bkCover},#{bkStatus}) 10 | 11 | 12 | 27 | 28 | 29 | delete from tb_book 30 | where bkID=#{bkID} 31 | 32 | 33 | 34 | update tb_book set 35 | bkCode=#{bkCode},bkName=#{bkName},bkAuthor=#{bkAuthor},bkPress=#{bkPress},bkDatePress=#{bkDatePress},bkISBN=#{bkISBN}, 36 | bkCatalog=#{bkCatalog},bkLanguage=#{bkLanguage},bkPages=#{bkPages},bkPrice=#{bkPrice},bkDateIn=#{bkDateIn},bkBrief=#{bkBrief},bkCover=#{bkCover},bkStatus=#{bkStatus} 37 | where bkID=#{bkID} 38 | 39 | 40 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/BookMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | insert into tb_book 8 | values(#{bkID},#{bkCode},#{bkName},#{bkAuthor},#{bkPress},#{bkDatePress},#{bkISBN}, 9 | #{bkCatalog},#{bkLanguage},#{bkPages},#{bkPrice},#{bkDateIn},#{bkBrief},#{bkCover},#{bkStatus}) 10 | 11 | 12 | 27 | 28 | 29 | delete from tb_book 30 | where bkID=#{bkID} 31 | 32 | 33 | 34 | update tb_book set 35 | bkCode=#{bkCode},bkName=#{bkName},bkAuthor=#{bkAuthor},bkPress=#{bkPress},bkDatePress=#{bkDatePress},bkISBN=#{bkISBN}, 36 | bkCatalog=#{bkCatalog},bkLanguage=#{bkLanguage},bkPages=#{bkPages},bkPrice=#{bkPrice},bkDateIn=#{bkDateIn},bkBrief=#{bkBrief},bkCover=#{bkCover},bkStatus=#{bkStatus} 37 | where bkID=#{bkID} 38 | 39 | 40 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/SysUser/userPWDEdit.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | My JSP 'userPWDEdit.jsp' starting page 13 | 14 | 15 | 16 | 17 | 18 | 19 | 31 | 32 | 33 |
34 |
35 | UserName 36 | 37 |
38 |
39 | PassWord 40 | 41 |
42 |
43 | PassWord 44 | 45 |
46 |
47 | 48 | 49 |
50 |
51 | 52 | 53 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/bookJsp/bookBorrow.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 30 | 31 | 32 |
33 |

借书

34 |
35 |
36 |
37 |
38 |
39 | 读者序号 40 | 41 |
42 |
43 | 图书序号 44 | 45 |
46 |
47 | 借书日期 48 | 49 |
50 |
51 | 借书操作员 52 | 53 |
54 |
55 | 56 | 57 |
58 |
59 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/parameter/Parameter.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.parameter; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * @类 名: Parameter 7 | * @功能描述: TODO 该类为了服务数据信息的分页效果和临界条件服务的,在工程的发展中会陆续添加一些属性,是个可变的类 8 | * @作者信息: 陈强 9 | * @创建时间: 2018年4月19日上午10:16:52 10 | * @修改备注: 11 | */ 12 | public class Parameter { 13 | private String rdID; 14 | private int start; 15 | private int end; 16 | private String bkID; 17 | private String bkName; 18 | private String bkStatus; 19 | private int rdBorrowQty;//借书量 20 | private Date rdDateReg;//办证日期 21 | private String rdStatus;//读者状态 22 | private String isHasReturn; 23 | public String getIsHasReturn() { 24 | return isHasReturn; 25 | } 26 | public void setIsHasReturn(String isHasReturn) { 27 | this.isHasReturn = isHasReturn; 28 | } 29 | public String getRdStatus() { 30 | return rdStatus; 31 | } 32 | public void setRdStatus(String rdStatus) { 33 | this.rdStatus = rdStatus; 34 | } 35 | public int getRdBorrowQty() { 36 | return rdBorrowQty; 37 | } 38 | public void setRdBorrowQty(int rdBorrowQty) { 39 | this.rdBorrowQty = rdBorrowQty; 40 | } 41 | public Date getRdDateReg() { 42 | return rdDateReg; 43 | } 44 | public void setRdDateReg(Date rdDateReg) { 45 | this.rdDateReg = rdDateReg; 46 | } 47 | public String getBkStatus() { 48 | return bkStatus; 49 | } 50 | public void setBkStatus(String bkStatus) { 51 | this.bkStatus = bkStatus; 52 | } 53 | public String getBkName() { 54 | return bkName; 55 | } 56 | public void setBkName(String bkName) { 57 | this.bkName = bkName; 58 | } 59 | public String getBkID() { 60 | return bkID; 61 | } 62 | public void setBkID(String bkID) { 63 | this.bkID = bkID; 64 | } 65 | public String getRdID() { 66 | return rdID; 67 | } 68 | public void setRdID(String rdID) { 69 | this.rdID = rdID; 70 | } 71 | public int getStart() { 72 | return start; 73 | } 74 | public void setStart(int start) { 75 | this.start = start; 76 | } 77 | public int getEnd() { 78 | return end; 79 | } 80 | public void setEnd(int end) { 81 | this.end = end; 82 | } 83 | 84 | 85 | } 86 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/domain/ReaderType.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.domain; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.validation.constraints.DecimalMax; 6 | 7 | import org.hibernate.validator.constraints.NotBlank; 8 | 9 | /** 10 | * @类 名: ReaderType 11 | * @功能描述: TODO 读者的类别,这个只有系统管理员才有的操作;该类别里包括了不同读者在图书馆里借书的限制 12 | * @作者信息: 陈强 13 | * @创建时间: 2018年4月18日上午10:25:36 14 | * @修改备注: 15 | */ 16 | @SuppressWarnings("serial") 17 | public class ReaderType implements Serializable { 18 | private int rdType;//读者类别 19 | private String rdTypeName;//读者名称 20 | private int canLendQty;//可借书的数量 21 | private int canLendDay;//可借书的天数 22 | private int canContinueTimes;//可续借的次数 23 | private float punishRate;//罚款率 24 | private int dateValid;//证件的有效期 25 | 26 | @DecimalMax(value="20",message="{rdType_Int}") 27 | public int getRdType() { 28 | return rdType; 29 | } 30 | public void setRdType(int rdType) { 31 | this.rdType = rdType; 32 | } 33 | @NotBlank(message="{rdTypeName_Message}") 34 | public String getRdTypeName() { 35 | return rdTypeName; 36 | } 37 | public void setRdTypeName(String rdTypeName) { 38 | this.rdTypeName = rdTypeName; 39 | } 40 | 41 | @DecimalMax(value="20",message="{canLendQty_Message}") 42 | public int getCanLendQty() { 43 | return canLendQty; 44 | } 45 | public void setCanLendQty(int canLendQty) { 46 | this.canLendQty = canLendQty; 47 | } 48 | 49 | public int getCanLendDay() { 50 | return canLendDay; 51 | } 52 | public void setCanLendDay(int canLendDay) { 53 | this.canLendDay = canLendDay; 54 | } 55 | 56 | public int getCanContinueTimes() { 57 | return canContinueTimes; 58 | } 59 | public void setCanContinueTimes(int canContinueTimes) { 60 | this.canContinueTimes = canContinueTimes; 61 | } 62 | 63 | public float getPunishRate() { 64 | return punishRate; 65 | } 66 | public void setPunishRate(float punishRate) { 67 | this.punishRate = punishRate; 68 | } 69 | 70 | public int getDateValid() { 71 | return dateValid; 72 | } 73 | public void setDateValid(int dateValid) { 74 | this.dateValid = dateValid; 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/ReaderMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | insert into 8 | tb_reader(rdID,rdName,rdSex,rdType,rdDept,rdPhone,rdEmail,rdDateReg,rdPhoto,rdStatus,rdBorrowQty,rdPwd,rdAdminRoles) 9 | values(#{rdID},#{rdName},#{rdSex},#{rdType},#{rdDept},#{rdPhone},#{rdEmail},#{rdDateReg},#{rdPhoto},#{rdStatus},0,#{rdPwd},#{rdAdminRoles}) 10 | 11 | 12 | 16 | 17 | 18 | 19 | delete from 20 | tb_reader where rdID=#{rdID} 21 | 22 | 23 | 24 | update tb_reader 25 | set 26 | rdName=#{rdName},rdSex=#{rdSex},rdType=#{rdType},rdDept=#{rdDept},rdPhone=#{rdPhone},rdEmail=#{rdEmail},rdDateReg=#{rdDateReg},rdPhoto=#{rdPhoto},rdStatus=#{rdStatus},rdPwd=#{rdPwd},rdAdminRoles=#{rdAdminRoles} 27 | where rdID=#{rdID} 28 | 29 | 30 | 31 | 37 | 44 | 45 | 48 | 49 | 50 | update tb_reader set rdStatus=#{rdStatus} 51 | where rdID=#{rdID} 52 | 53 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/ReaderMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | insert into 8 | tb_reader(rdID,rdName,rdSex,rdType,rdDept,rdPhone,rdEmail,rdDateReg,rdPhoto,rdStatus,rdBorrowQty,rdPwd,rdAdminRoles) 9 | values(#{rdID},#{rdName},#{rdSex},#{rdType},#{rdDept},#{rdPhone},#{rdEmail},#{rdDateReg},#{rdPhoto},#{rdStatus},0,#{rdPwd},#{rdAdminRoles}) 10 | 11 | 12 | 16 | 17 | 18 | 19 | delete from 20 | tb_reader where rdID=#{rdID} 21 | 22 | 23 | 24 | update tb_reader 25 | set 26 | rdName=#{rdName},rdSex=#{rdSex},rdType=#{rdType},rdDept=#{rdDept},rdPhone=#{rdPhone},rdEmail=#{rdEmail},rdDateReg=#{rdDateReg},rdPhoto=#{rdPhoto},rdStatus=#{rdStatus},rdPwd=#{rdPwd},rdAdminRoles=#{rdAdminRoles} 27 | where rdID=#{rdID} 28 | 29 | 30 | 31 | 37 | 44 | 45 | 48 | 49 | 50 | update tb_reader set rdStatus=#{rdStatus} 51 | where rdID=#{rdID} 52 | 53 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/bookJsp/bookClass.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 38 | 39 |
40 |

图书编目

41 |
42 |
43 |
44 |
45 |
46 | 分类号 47 | 48 |
49 |
50 | 分类名 51 | 52 |
53 | 54 | 55 |
56 |
57 |
58 |
59 | 提交信息展览 60 |
61 |
62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
分类号分类名
${bkCatalog }${bkClassName }
72 |
73 | 74 | 75 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/service/BookClassService.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Propagation; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import com.chen.PLoveLibrary.domain.BookClass; 11 | import com.chen.PLoveLibrary.mybatis.BookClassMapper; 12 | import com.chen.PLoveLibrary.parameter.Parameter; 13 | 14 | /** 15 | * @类 名: BookClassService 16 | * @功能描述: TODO 图书编目服务层 17 | * @作者信息: 陈强 18 | * @创建时间: 2018年4月22日下午2:27:28 19 | * @修改备注: 20 | */ 21 | @Service 22 | public class BookClassService { 23 | @Autowired 24 | private BookClassMapper bookClassMapper; 25 | @Transactional(propagation=Propagation.REQUIRED) 26 | public int insertBookClass(BookClass bookClass) 27 | { 28 | return this.bookClassMapper.insertBookClass(bookClass); 29 | } 30 | @Transactional(propagation=Propagation.REQUIRED) 31 | public int deleteBookClassByID(BookClass bookClass) 32 | { 33 | return this.bookClassMapper.deleteBookClassByID(bookClass); 34 | } 35 | @Transactional(propagation=Propagation.REQUIRED) 36 | public int updateBookClass(BookClass bookClass) 37 | { 38 | return this.bookClassMapper.updateBookClass(bookClass); 39 | } 40 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 41 | public List selectBookClassByID(Parameter parameter) 42 | { 43 | return this.bookClassMapper.selectBookClassByID(parameter); 44 | } 45 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 46 | public int getCount(Parameter parameter) 47 | { 48 | return this.bookClassMapper.getCount(parameter); 49 | } 50 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 51 | public BookClass findBookClassByID(Parameter parameter) 52 | { 53 | return this.bookClassMapper.findBookClassByID(parameter); 54 | } 55 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 56 | public List selectAllBkCatalog() 57 | { 58 | return this.bookClassMapper.selectAllBkCatalog(); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/readerJsp/readerStatus.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 28 | 39 | 40 |
41 |
42 |
43 | 用户名 44 | 45 |
46 |
47 | 证件当前状态 48 | 49 |
50 |
51 | 证件状态: 52 | 57 | 58 |
59 | 60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/readerJsp/permissionPage.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 32 | 33 |
34 |
35 |

信息展示

36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 54 | 55 | 56 | 57 | 58 | 59 |
用户名角色操作
${p.userName}${p.roleName} 52 | 53 |
60 |
61 |
62 | 72 |
73 | 74 | 75 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/service/ReaderService.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Propagation; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | import com.chen.PLoveLibrary.domain.Reader; 12 | import com.chen.PLoveLibrary.mybatis.ReaderMapper; 13 | import com.chen.PLoveLibrary.parameter.Parameter; 14 | 15 | /** 16 | * @类 名: ReaderService 17 | * @功能描述: TODO 服务层 读者信息服务层 18 | * @作者信息: 陈强 19 | * @创建时间: 2018年4月17日上午9:48:48 20 | * @修改备注: 21 | */ 22 | @Service 23 | public class ReaderService { 24 | @Autowired 25 | private ReaderMapper readerMapper; 26 | @Transactional(propagation=Propagation.REQUIRED) 27 | public int insertReader(Reader reader) 28 | { 29 | return readerMapper.insertReader(reader); 30 | } 31 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 32 | public Reader findReaderByrdID(String rdID) 33 | { 34 | return readerMapper.findReaderByrdID(rdID); 35 | } 36 | @Transactional(propagation=Propagation.REQUIRED) 37 | public int deleteReaderByrdID(String rdID) 38 | { 39 | return readerMapper.deleteReaderByrdID(rdID); 40 | } 41 | @Transactional(propagation=Propagation.REQUIRED) 42 | public int updateReaderByrdID(Reader reader) 43 | { 44 | return readerMapper.updateReaderByrdID(reader); 45 | } 46 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 47 | public int getCounts(Parameter parameter) 48 | { 49 | return this.readerMapper.getCounts(parameter); 50 | } 51 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 52 | public ListgetReaderInfo(Parameter parameter) 53 | { 54 | return this.readerMapper.getReaderInfo(parameter); 55 | } 56 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 57 | public String findStatusByrdID(String rdID) 58 | { 59 | return this.readerMapper.findStatusByrdID(rdID); 60 | } 61 | @Transactional(propagation=Propagation.REQUIRED) 62 | public int updateStatusByrdID(Reader reader) 63 | { 64 | return this.readerMapper.updateStatusByrdID(reader); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/bookJsp/bookBorrowEdit.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 41 | 42 | 43 |
44 |

归还-续借

45 |
46 |
47 |
48 |
49 |
50 | 读者ID 51 | 52 |
53 |
54 | 图书ID 55 | 56 |
57 |
58 | 操作员 59 | 60 |
61 |
62 | 归还 63 | 续借 64 |
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/util/DateExchangeUtil.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.util; 2 | 3 | import java.text.ParseException; 4 | import java.text.SimpleDateFormat; 5 | import java.util.Calendar; 6 | import java.util.Date; 7 | 8 | /** 9 | * @类 名: DateExchangeUtil 10 | * @功能描述: TODO 日期转化工厂 把html5 date类型的如2018/03/04 转换成2018-03-04 11 | * @作者信息: 陈强 12 | * @创建时间: 2018年4月24日下午8:55:15 13 | * @修改备注: 14 | */ 15 | public class DateExchangeUtil { 16 | /** 17 | * @Title : StringToDate 18 | * @功能描述: TODO 字符串转化为日期 19 | * @开发者:陈强 20 | * @参数: @param str1 21 | * @参数: @return 22 | * @参数: @throws ParseException 23 | * @返回类型:Date 24 | * @throws : 25 | */ 26 | public static Date StringToDate(String str1) throws ParseException 27 | { 28 | String[] buffer=str1.split("/"); 29 | StringBuilder builder=new StringBuilder(); 30 | for(int i=0;i 2 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | update tb_reader set rdPwd=#{password} where rdID=#{username} 16 | 17 | 18 | 19 | update Sys_User set password=#{password} where name=#{username} 20 | 21 | 22 | 23 | 24 | insert into Sys_User(name,password,date,photo) 25 | values(#{rdID},#{rdPwd},#{rdDateReg},#{rdPhoto}) 26 | 27 | 28 | 29 | update Sys_User 30 | set 31 | password=#{rdPwd}, 32 | photo=#{rdPhoto} 33 | where name=#{rdID} 34 | 35 | 36 | 37 | 38 | delete from Sys_User where name=#{rdID} 39 | 40 | 41 | 44 | 45 | 46 | 47 | insert into sys_ur(userName,roleName) select #{userName},#{roleName} from DUAL where EXISTS( select name from sys_user where name=#{userName}) 48 | 49 | 50 | 56 | 57 | 60 | 61 | 62 | delete from sys_ur 63 | 64 | 65 | id=#{id} 66 | 67 | 68 | AND userName=#{userName} 69 | 70 | 71 | AND roleName=#{roleName} 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/UserLoginMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | update tb_reader set rdPwd=#{password} where rdID=#{username} 16 | 17 | 18 | 19 | update Sys_User set password=#{password} where name=#{username} 20 | 21 | 22 | 23 | 24 | insert into Sys_User(name,password,date,photo) 25 | values(#{rdID},#{rdPwd},#{rdDateReg},#{rdPhoto}) 26 | 27 | 28 | 29 | update Sys_User 30 | set 31 | password=#{rdPwd}, 32 | photo=#{rdPhoto} 33 | where name=#{rdID} 34 | 35 | 36 | 37 | 38 | delete from Sys_User where name=#{rdID} 39 | 40 | 41 | 44 | 45 | 46 | 47 | insert into sys_ur(userName,roleName) select #{userName},#{roleName} from DUAL where EXISTS( select name from sys_user where name=#{userName}) 48 | 49 | 50 | 56 | 57 | 60 | 61 | 62 | delete from sys_ur 63 | 64 | 65 | id=#{id} 66 | 67 | 68 | AND userName=#{userName} 69 | 70 | 71 | AND roleName=#{roleName} 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/config/springConfig/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 41 | 42 | 43 | 44 | 45 | 46 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() 6 | + path + "/"; 7 | %> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 图书管理系统 16 | 17 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 28 | 32 | 33 | 40 | 41 | 42 | 43 |
44 | 45 |
46 |
47 |

LOGIN

48 |
49 |
50 | 51 | 52 |
53 |
54 | 55 | 57 |
58 |
59 | 61 | 62 | 63 |
64 | 65 | 67 |
68 |
69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/springConfig/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 41 | 42 | 43 | 44 | 45 | 46 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/service/BorrowService.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Propagation; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import com.chen.PLoveLibrary.domain.Borrow; 11 | import com.chen.PLoveLibrary.domain.ReaderType; 12 | import com.chen.PLoveLibrary.mybatis.BorrowMapper; 13 | import com.chen.PLoveLibrary.parameter.Parameter; 14 | 15 | @Service 16 | public class BorrowService { 17 | @Autowired 18 | private BorrowMapper borrowMapper; 19 | @Transactional(propagation=Propagation.REQUIRED) 20 | public int insertBorrow(Borrow borrow) 21 | { 22 | return this.borrowMapper.insertBorrow(borrow); 23 | } 24 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 25 | public ReaderType findReaderTypeByrdID(String rdID) 26 | { 27 | return this.borrowMapper.findReaderTypeByrdID(rdID); 28 | } 29 | @Transactional(propagation=Propagation.REQUIRED) 30 | public int updateBookByID(Parameter parameter) 31 | { 32 | return this.borrowMapper.updateBookByID(parameter); 33 | } 34 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 35 | public Parameter getReaderInfoByID(Parameter parameter) 36 | { 37 | return this.borrowMapper.getReaderInfoByID(parameter); 38 | } 39 | @Transactional(propagation=Propagation.REQUIRED) 40 | public int updateReaderByID(Parameter parameter) 41 | { 42 | return this.borrowMapper.updateReaderByID(parameter); 43 | } 44 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 45 | public List selectBorrowInfo(Parameter parameter) 46 | { 47 | return this.borrowMapper.selectBorrowInfo(parameter); 48 | } 49 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 50 | public int getCounts(Parameter parameter) 51 | { 52 | return this.borrowMapper.getCounts(parameter); 53 | } 54 | @Transactional(propagation=Propagation.REQUIRED) 55 | public int deleteBorrowByID(int id) 56 | { 57 | return this.borrowMapper.deleteBorrowByID(id); 58 | } 59 | @Transactional(propagation=Propagation.REQUIRED) 60 | public int updateReader(Parameter parameter) 61 | { 62 | return this.borrowMapper.updateReader(parameter); 63 | } 64 | @Transactional(propagation=Propagation.REQUIRED,readOnly=true) 65 | public Borrow getBorrow(Borrow borrow) 66 | { 67 | return this.borrowMapper.getBorrow(borrow); 68 | } 69 | @Transactional(propagation=Propagation.REQUIRED) 70 | public int updateReturn(Borrow borrow) 71 | { 72 | return this.borrowMapper.updateReturn(borrow); 73 | } 74 | @Transactional(propagation=Propagation.REQUIRED) 75 | public int updateTB(Borrow borrow) 76 | { 77 | return this.borrowMapper.updateTB(borrow); 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/bookJsp/bookClassInfo.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() 6 | + path + "/"; 7 | %> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 23 | 24 | 27 | 41 | 42 | 43 |
44 |

信息浏览

45 |
46 |
47 | 编辑信息: 48 |
49 |
50 |
51 | 分类号 53 |
54 |
55 | 分类名 57 |
58 | 59 | 60 |
61 |
62 |
63 |
64 | 提交信息展览 65 |
66 |
67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 80 | 81 | 82 | 83 | 84 |
分类号分类名操作
${bookClass.bkCatalog }${bookClass.bkClassName} 79 |
85 |
86 | 92 |
93 |
94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/spring-servlet.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | 41 | 42 | 43 | 10485760 44 | 45 | 46 | 47 | UTF-8 48 | 49 | 50 | 51 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 61 | 62 | 63 | 64 | classpath:validateConfig/validateMessage 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/domain/Reader.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import org.hibernate.validator.constraints.Email; 7 | import org.hibernate.validator.constraints.NotBlank; 8 | 9 | 10 | 11 | /** 12 | * @类 名: Reader 13 | * @功能描述: TODO 借书证办理的读者信息 14 | * @作者信息: 陈强 15 | * @创建时间: 2018年4月16日下午2:58:01 16 | * @修改备注: 17 | */ 18 | @SuppressWarnings("serial") 19 | public class Reader implements Serializable{ 20 | private String rdID;//用户名 21 | private String rdName;//姓名 22 | private String rdSex;//性别 23 | private String rdPwd;//密码 24 | private String rdType;//读者类别 25 | private String rdDept;//单位名称 26 | private String rdPhone;//电话号码 27 | private String rdEmail;//邮箱 28 | private String rdPhoto;//照片 29 | private String rdStatus;//证件状态 30 | private Date rdDateReg;//办证日期 31 | private int rdBorrowQty;//已借书数量 32 | private String rdAdminRoles;//读者角色 33 | @NotBlank(message="{rdID_Message}") 34 | public String getRdID() { 35 | return rdID; 36 | } 37 | public void setRdID(String rdID) { 38 | this.rdID = rdID; 39 | } 40 | @NotBlank(message="{rdName_Message}") 41 | public String getRdName() { 42 | return rdName; 43 | } 44 | public void setRdName(String rdName) { 45 | this.rdName = rdName; 46 | } 47 | @NotBlank(message="{rdSex_Message}") 48 | public String getRdSex() { 49 | return rdSex; 50 | } 51 | public void setRdSex(String rdSex) { 52 | this.rdSex = rdSex; 53 | } 54 | @NotBlank(message="{rdPwd_Message}") 55 | public String getRdPwd() { 56 | return rdPwd; 57 | } 58 | public void setRdPwd(String rdPwd) { 59 | this.rdPwd = rdPwd; 60 | } 61 | public String getRdType() { 62 | return rdType; 63 | } 64 | public void setRdType(String rdType) { 65 | this.rdType = rdType; 66 | } 67 | public String getRdDept() { 68 | return rdDept; 69 | } 70 | public void setRdDept(String rdDept) { 71 | this.rdDept = rdDept; 72 | } 73 | public String getRdPhone() { 74 | return rdPhone; 75 | } 76 | public void setRdPhone(String rdPhone) { 77 | this.rdPhone = rdPhone; 78 | } 79 | @Email(message="{rdEmail_Message") 80 | public String getRdEmail() { 81 | return rdEmail; 82 | } 83 | public void setRdEmail(String rdEmail) { 84 | this.rdEmail = rdEmail; 85 | } 86 | public String getRdPhoto() { 87 | return rdPhoto; 88 | } 89 | public void setRdPhoto(String rdPhoto) { 90 | this.rdPhoto = rdPhoto; 91 | } 92 | public String getRdStatus() { 93 | return rdStatus; 94 | } 95 | public void setRdStatus(String rdStatus) { 96 | this.rdStatus = rdStatus; 97 | } 98 | public Date getRdDateReg() { 99 | return rdDateReg; 100 | } 101 | public void setRdDateReg(Date rdDateReg) { 102 | this.rdDateReg = rdDateReg; 103 | } 104 | public int getRdBorrowQty() { 105 | return rdBorrowQty; 106 | } 107 | public void setRdBorrowQty(int rdBorrowQty) { 108 | this.rdBorrowQty = rdBorrowQty; 109 | } 110 | public String getRdAdminRoles() { 111 | return rdAdminRoles; 112 | } 113 | public void setRdAdminRoles(String rdAdminRoles) { 114 | this.rdAdminRoles = rdAdminRoles; 115 | } 116 | 117 | 118 | 119 | 120 | } 121 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/domain/Borrow.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import org.hibernate.validator.constraints.NotBlank; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | /** 10 | * @类 名: Borrow 11 | * @功能描述: TODO 借阅图书的信息 12 | * @作者信息: 陈强 13 | * @创建时间: 2018年4月25日下午9:44:35 14 | * @修改备注: 15 | */ 16 | @SuppressWarnings("serial") 17 | public class Borrow implements Serializable{ 18 | private int borrowID; 19 | @NotBlank(message="不能为空") 20 | private String rdID;//读者序号 21 | @NotBlank(message="不能为空") 22 | private String bkID;//图书序号 23 | private int idContinueTimes;//续借的次数 24 | private Date idDateOut;//借书日期 25 | private Date idDateRetPlan;//应还日期 26 | private Date idDateRetAct;//实际还书日期 27 | private int idOverDay;//超期天数 28 | private float idOverMoney;//超期金额 29 | private float idPunishMoney;//罚款金额 30 | private String isHasReturn;//是否还书 31 | private String operatorLend;//借书操作员 32 | private String operatorRet;//还书操作员 33 | 34 | public int getBorrowID() { 35 | return borrowID; 36 | } 37 | public void setBorrowID(int borrowID) { 38 | this.borrowID = borrowID; 39 | } 40 | public String getRdID() { 41 | return rdID; 42 | } 43 | public void setRdID(String rdID) { 44 | this.rdID = rdID; 45 | } 46 | public String getBkID() { 47 | return bkID; 48 | } 49 | public void setBkID(String bkID) { 50 | this.bkID = bkID; 51 | } 52 | 53 | public int getIdContinueTimes() { 54 | return idContinueTimes; 55 | } 56 | public void setIdContinueTimes(int idContinueTimes) { 57 | this.idContinueTimes = idContinueTimes; 58 | } 59 | public Date getIdDateOut() { 60 | return idDateOut; 61 | } 62 | public void setIdDateOut(Date idDateOut) { 63 | this.idDateOut = idDateOut; 64 | } 65 | 66 | public Date getIdDateRetPlan() { 67 | return idDateRetPlan; 68 | } 69 | public void setIdDateRetPlan(Date idDateRetPlan) { 70 | this.idDateRetPlan = idDateRetPlan; 71 | } 72 | public Date getIdDateRetAct() { 73 | return idDateRetAct; 74 | } 75 | public void setIdDateRetAct(Date idDateRetAct) { 76 | this.idDateRetAct = idDateRetAct; 77 | } 78 | public int getIdOverDay() { 79 | return idOverDay; 80 | } 81 | public void setIdOverDay(int idOverDay) { 82 | this.idOverDay = idOverDay; 83 | } 84 | public float getIdOverMoney() { 85 | return idOverMoney; 86 | } 87 | public void setIdOverMoney(float idOverMoney) { 88 | this.idOverMoney = idOverMoney; 89 | } 90 | public float getIdPunishMoney() { 91 | return idPunishMoney; 92 | } 93 | public void setIdPunishMoney(float idPunishMoney) { 94 | this.idPunishMoney = idPunishMoney; 95 | } 96 | public String getIsHasReturn() { 97 | return isHasReturn; 98 | } 99 | public void setIsHasReturn(String isHasReturn) { 100 | this.isHasReturn = isHasReturn; 101 | } 102 | public String getOperatorLend() { 103 | return operatorLend; 104 | } 105 | public void setOperatorLend(String operatorLend) { 106 | this.operatorLend = operatorLend; 107 | } 108 | public String getOperatorRet() { 109 | return operatorRet; 110 | } 111 | public void setOperatorRet(String operatorRet) { 112 | this.operatorRet = operatorRet; 113 | } 114 | 115 | 116 | } 117 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/UserLoginMapper.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.mybatis; 2 | 3 | import java.util.List; 4 | 5 | import com.chen.PLoveLibrary.domain.Reader; 6 | import com.chen.PLoveLibrary.domain.SysUR; 7 | import com.chen.PLoveLibrary.domain.SysUser; 8 | import com.chen.PLoveLibrary.parameter.Parameter; 9 | 10 | /** 11 | * @类 名: UserLoginMapper 12 | * @功能描述: TODO 用户登陆的接口 13 | * @作者信息: 陈强 14 | * @创建时间: 2018年4月14日下午8:48:13 15 | * @修改备注: 16 | */ 17 | public interface UserLoginMapper { 18 | 19 | /** 20 | * @Title : findpwdByName 21 | * @功能描述: TODO 查找密码 22 | * @开发者:陈强 23 | * @参数: @param name 用户名 24 | * @参数: @return 25 | * @返回类型:String 26 | * @throws : 27 | */ 28 | public String findpwdByName(String name); 29 | 30 | /** 31 | * @Title : updatepwdByName 32 | * @功能描述: TODO 更新密码 33 | * @开发者:陈强 34 | * @参数: @param sysUser 35 | * @返回类型:void 36 | * @throws : 37 | */ 38 | public int updatepwdByName(SysUser sysUser); 39 | /** 40 | * @Title : insertSysUser 41 | * @功能描述: TODO 读者表插入一条信息,则在系统用户表中也要插入一条信息 42 | * @开发者:陈强 43 | * @参数: @param reader 44 | * @参数: @return 45 | * @返回类型:int 46 | * @throws : 47 | */ 48 | public int insertSysUser(Reader reader); 49 | /** 50 | * @Title : updateSysUser 51 | * @功能描述: TODO 读者表更新,系统表也要更新 52 | * @开发者:陈强 53 | * @参数: @param reader 54 | * @参数: @return 55 | * @返回类型:int 56 | * @throws : 57 | */ 58 | public int updateSysUser(Reader reader); 59 | /** 60 | * @Title : deleteSysUser 61 | * @功能描述: TODO 读者表删除,系统表也要删除 62 | * @开发者:陈强 63 | * @参数: @param id 64 | * @参数: @return 65 | * @返回类型:int 66 | * @throws : 67 | */ 68 | public int deleteSysUser(String id); 69 | /** 70 | * @Title : selectSysUser 71 | * @功能描述: TODO 查询自己的而用户信息 72 | * @开发者:陈强 73 | * @参数: @param reader 74 | * @参数: @return 75 | * @返回类型:Reader 76 | * @throws : 77 | */ 78 | public Reader selectSysUser(String id); 79 | /** 80 | * @Title : updatePwd 81 | * @功能描述: TODO 更新密码 82 | * @开发者:陈强 83 | * @参数: @param user 84 | * @参数: @return 85 | * @返回类型:int 86 | * @throws : 87 | */ 88 | public int updatePwd(SysUser user); 89 | /** 90 | * @Title : insertPermission 91 | * @功能描述: TODO 92 | * @开发者:陈强 93 | * @参数: @param sysUR 94 | * @参数: @return 95 | * @返回类型:int 96 | * @throws : 97 | */ 98 | public int insertPermission(SysUR sysUR); 99 | /** 100 | * @Title : selectPermission 101 | * @功能描述: TODO 102 | * @开发者:陈强 103 | * @参数: @param parameter 104 | * @参数: @return 105 | * @返回类型:List 106 | * @throws : 107 | */ 108 | public ListselectPermission(Parameter parameter); 109 | /** 110 | * @Title : deletePermission 111 | * @功能描述: TODO 112 | * @开发者:陈强 113 | * @参数: @param username 114 | * @参数: @return 115 | * @返回类型:int 116 | * @throws : 117 | */ 118 | public int deletePermission(SysUR sysUR); 119 | /** 120 | * @Title : getCountsPermission 121 | * @功能描述: TODO 122 | * @开发者:陈强 123 | * @参数: @return 124 | * @返回类型:int 125 | * @throws : 126 | */ 127 | public int getCountsPermission(); 128 | } 129 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/config/shiroConfig/spring-shiro.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | /login.jsp=anon 37 | /Userlogin/login=anon 38 | /img/**=anon 39 | /css/Login.css=anon 40 | /Userlogin/identity=anon 41 | /Userlogin/logout=logout 42 | /**=authc 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 69 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/shiroConfig/spring-shiro.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | /login.jsp=anon 37 | /Userlogin/login=anon 38 | /img/**=anon 39 | /css/Login.css=anon 40 | /Userlogin/identity=anon 41 | /Userlogin/logout=logout 42 | /**=authc 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 69 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/mybatis/BorrowMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | insert into 8 | tb_Borrow(rdID,bkID,idContinueTimes,idDateOut,idDateRetPlan,idDateRetAct,idOverDay,idOverMoney, 9 | idPunishMoney,isHasReturn,operatorLend,operatorRet) 10 | values(#{rdID},#{bkID},#{idContinueTimes},#{idDateOut},#{idDateRetPlan},#{idDateRetAct},#{idOverDay},#{idOverMoney}, 11 | #{idPunishMoney},#{isHasReturn},#{operatorLend},#{operatorRet}) 12 | 13 | 14 | 15 | update tb_book 16 | set bkStatus=#{bkStatus} 17 | where bkID=#{bkID} 18 | 19 | 20 | 21 | update tb_reader 22 | set 23 | rdBorrowQty=#{rdBorrowQty} 24 | where rdID=#{rdID} 25 | 26 | 27 | 28 | update tb_reader 29 | set 30 | 31 | rdStatus=#{rdStatus} 32 | 33 | 34 | ,rdBorrowQty=#{rdBorrowQty} 35 | 36 | where rdID=#{rdID} 37 | 38 | 39 | 42 | 43 | 46 | 47 | 56 | 57 | 63 | 64 | 65 | delete from tb_borrow where borrowID=#{id} 66 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | update tb_Borrow set 76 | idContinueTimes=#{idContinueTimes}, 77 | idDateOut=#{idDateOut}, 78 | idDateRetPlan=#{idDateRetPlan}, 79 | operatorLend=#{operatorLend} 80 | where 81 | rdID=#{rdID}and bkID=#{bkID} 82 | 83 | 84 | 85 | update tb_Borrow 86 | set 87 | 88 | idDateRetAct=#{idDateRetAct}, 89 | idOverDay=#{idOverDay}, 90 | idOverMoney=#{idOverMoney}, 91 | idPunishMoney=#{idPunishMoney}, 92 | isHasReturn=#{isHasReturn}, 93 | operatorRet=#{operatorRet} 94 | where 95 | rdID=#{rdID}and bkID=#{bkID} 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/target/classes/com/chen/PLoveLibrary/mybatis/BorrowMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | insert into 8 | tb_Borrow(rdID,bkID,idContinueTimes,idDateOut,idDateRetPlan,idDateRetAct,idOverDay,idOverMoney, 9 | idPunishMoney,isHasReturn,operatorLend,operatorRet) 10 | values(#{rdID},#{bkID},#{idContinueTimes},#{idDateOut},#{idDateRetPlan},#{idDateRetAct},#{idOverDay},#{idOverMoney}, 11 | #{idPunishMoney},#{isHasReturn},#{operatorLend},#{operatorRet}) 12 | 13 | 14 | 15 | update tb_book 16 | set bkStatus=#{bkStatus} 17 | where bkID=#{bkID} 18 | 19 | 20 | 21 | update tb_reader 22 | set 23 | rdBorrowQty=#{rdBorrowQty} 24 | where rdID=#{rdID} 25 | 26 | 27 | 28 | update tb_reader 29 | set 30 | 31 | rdStatus=#{rdStatus} 32 | 33 | 34 | ,rdBorrowQty=#{rdBorrowQty} 35 | 36 | where rdID=#{rdID} 37 | 38 | 39 | 42 | 43 | 46 | 47 | 56 | 57 | 63 | 64 | 65 | delete from tb_borrow where borrowID=#{id} 66 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | update tb_Borrow set 76 | idContinueTimes=#{idContinueTimes}, 77 | idDateOut=#{idDateOut}, 78 | idDateRetPlan=#{idDateRetPlan}, 79 | operatorLend=#{operatorLend} 80 | where 81 | rdID=#{rdID}and bkID=#{bkID} 82 | 83 | 84 | 85 | update tb_Borrow 86 | set 87 | 88 | idDateRetAct=#{idDateRetAct}, 89 | idOverDay=#{idOverDay}, 90 | idOverMoney=#{idOverMoney}, 91 | idPunishMoney=#{idPunishMoney}, 92 | isHasReturn=#{isHasReturn}, 93 | operatorRet=#{operatorRet} 94 | where 95 | rdID=#{rdID}and bkID=#{bkID} 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/util/IdentityCode.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.util; 2 | 3 | import java.awt.Color; 4 | import java.awt.Font; 5 | import java.awt.Graphics2D; 6 | import java.awt.image.BufferedImage; 7 | import java.io.IOException; 8 | import java.util.Random; 9 | 10 | import javax.servlet.ServletException; 11 | import javax.servlet.ServletOutputStream; 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | 15 | import com.sun.image.codec.jpeg.JPEGCodec; 16 | import com.sun.image.codec.jpeg.JPEGImageEncoder; 17 | 18 | /** 19 | * @类 名: IdentityCode(工具类) 20 | * @功能描述: 登陆界面的验证码功能 21 | * @作者信息: 陈强 22 | * @创建时间: 2018年4月14日下午3:34:22 23 | * @修改备注: 24 | */ 25 | /** 26 | * @类 名: IdentityCode @功能描述: TODO @作者信息: 陈强 @创建时间: 2018年4月14日下午3:46:04 @修改备注: 27 | */ 28 | @SuppressWarnings("restriction") 29 | public class IdentityCode { 30 | /** 31 | * @Fields CHARS : 验证码的随机数 TODO 32 | */ 33 | public static final char[] CHARS = { '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'D' }; 34 | /** 35 | * @Fields random : 声明随机数的对象 TODO 36 | */ 37 | public static Random random = new Random(); 38 | 39 | /** 40 | * @Title : getRandomString 41 | * @功能描述: TODO 获取验证码在页面显示的六个数 42 | * @开发者:陈强 @参数: @return 43 | * @返回类型:String 44 | * @throws : 45 | */ 46 | public static String getRandomString() { 47 | StringBuffer buffer = new StringBuffer(); 48 | for (int i = 0; i < 4; i++) { 49 | buffer.append(CHARS[random.nextInt(CHARS.length)]); 50 | } 51 | return buffer.toString(); 52 | } 53 | 54 | /** 55 | * @Title : getRandomColor 56 | * @功能描述: TODO 得到背景色 57 | * @开发者:陈强 @参数: @return 58 | * @返回类型:Color 59 | * @throws : 60 | */ 61 | public static Color getRandomColor() { 62 | return new Color(random.nextInt(255), random.nextInt(255), random.nextInt(255)); 63 | } 64 | 65 | /** 66 | * @Title : getReverseColor 67 | * @功能描述: TODO 得到验证码的前景色 68 | * @开发者:陈强 69 | * @参数: @param c 70 | * @参数: @return 71 | * @返回类型:Color 72 | * @throws : 73 | */ 74 | public static Color getReverseColor(Color c) { 75 | return new Color(255 - c.getRed(), 255 - c.getGreen(), 255 - c.getBlue()); 76 | } 77 | 78 | /** 79 | * @Title : outputIdentity 80 | * @功能描述: TODO 生成验证码的图片,并在session中存储验证码的值 81 | * @开发者:陈强 82 | * @参数: @param request 83 | * @参数: @param response 84 | * @参数: @throws ServletException 85 | * @参数: @throws IOException 86 | * @返回类型:void 87 | * @throws : 88 | */ 89 | public static void outputIdentity(HttpServletRequest request, HttpServletResponse response) 90 | throws ServletException, IOException { 91 | //设置图片的格式 92 | response.setContentType("image/jpeg"); 93 | String randomString = getRandomString(); 94 | //将验证码的值绑到session中 95 | request.getSession().setAttribute("randomString", randomString); 96 | int width = 100; 97 | int height = 30; 98 | Color color = getRandomColor(); 99 | Color reverse = getReverseColor(color); 100 | BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); 101 | Graphics2D g = bi.createGraphics(); 102 | g.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 16)); 103 | g.setColor(color); 104 | g.fillRect(0, 0, width, height); 105 | g.setColor(reverse); 106 | g.drawString(randomString, 18, 20); 107 | //转化成jpg的格式 108 | ServletOutputStream out = response.getOutputStream(); 109 | JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); 110 | encoder.encode(bi); 111 | out.flush(); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/domain/Book.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.validation.constraints.Size; 7 | 8 | import org.hibernate.validator.constraints.NotBlank; 9 | 10 | /** 11 | * @类 名: Book 12 | * @功能描述: TODO 图书信息 13 | * @作者信息: 陈强 14 | * @创建时间: 2018年4月22日下午9:04:15 15 | * @修改备注: 16 | */ 17 | @SuppressWarnings("serial") 18 | public class Book implements Serializable { 19 | @NotBlank(message="不能为空") 20 | private String bkID;//图书序号 21 | @NotBlank(message="不能为空") 22 | private String bkCode;//图书编号 23 | @NotBlank(message="不能为空") 24 | private String bkName;//书名 25 | private String bkAuthor;//作者 26 | private String bkPress;//出版社 27 | private Date bkDatePress;//出版日期 28 | @NotBlank(message="不能为空") 29 | private String bkISBN;//ISBN书号 30 | @NotBlank(message="不能为空") 31 | private String bkCatalog;//分类号 32 | private String bkLanguage;//语言 33 | private int bkPages;//页数 34 | private String bkPrice;//价格 35 | private Date bkDateIn;//入馆日期 36 | @NotBlank(message="不能为空") 37 | @Size(min=0,max=100,message="字数超了100个") 38 | private String bkBrief;//内容简介 39 | private String bkCover;//图书封面 40 | private String bkStatus;//图书状态 41 | public String getBkID() { 42 | return bkID; 43 | } 44 | public void setBkID(String bkID) { 45 | this.bkID = bkID; 46 | } 47 | public String getBkCode() { 48 | return bkCode; 49 | } 50 | public void setBkCode(String bkCode) { 51 | this.bkCode = bkCode; 52 | } 53 | public String getBkName() { 54 | return bkName; 55 | } 56 | public void setBkName(String bkName) { 57 | this.bkName = bkName; 58 | } 59 | public String getBkAuthor() { 60 | return bkAuthor; 61 | } 62 | public void setBkAuthor(String bkAuthor) { 63 | this.bkAuthor = bkAuthor; 64 | } 65 | public String getBkPress() { 66 | return bkPress; 67 | } 68 | public void setBkPress(String bkPress) { 69 | this.bkPress = bkPress; 70 | } 71 | public Date getBkDatePress() { 72 | return bkDatePress; 73 | } 74 | public void setBkDatePress(Date bkDatePress) { 75 | this.bkDatePress = bkDatePress; 76 | } 77 | public String getBkISBN() { 78 | return bkISBN; 79 | } 80 | public void setBkISBN(String bkISBN) { 81 | this.bkISBN = bkISBN; 82 | } 83 | public String getBkCatalog() { 84 | return bkCatalog; 85 | } 86 | public void setBkCatalog(String bkCatalog) { 87 | this.bkCatalog = bkCatalog; 88 | } 89 | public String getBkLanguage() { 90 | return bkLanguage; 91 | } 92 | public void setBkLanguage(String bkLanguage) { 93 | this.bkLanguage = bkLanguage; 94 | } 95 | public int getBkPages() { 96 | return bkPages; 97 | } 98 | public void setBkPages(int bkPages) { 99 | this.bkPages = bkPages; 100 | } 101 | public String getBkPrice() { 102 | return bkPrice; 103 | } 104 | public void setBkPrice(String bkPrice) { 105 | this.bkPrice = bkPrice; 106 | } 107 | public Date getBkDateIn() { 108 | return bkDateIn; 109 | } 110 | public void setBkDateIn(Date bkDateIn) { 111 | this.bkDateIn = bkDateIn; 112 | } 113 | public String getBkBrief() { 114 | return bkBrief; 115 | } 116 | public void setBkBrief(String bkBrief) { 117 | this.bkBrief = bkBrief; 118 | } 119 | public String getBkCover() { 120 | return bkCover; 121 | } 122 | public void setBkCover(String bkCover) { 123 | this.bkCover = bkCover; 124 | } 125 | public String getBkStatus() { 126 | return bkStatus; 127 | } 128 | public void setBkStatus(String bkStatus) { 129 | this.bkStatus = bkStatus; 130 | } 131 | 132 | 133 | 134 | } 135 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | PredestinedLoveLibrary 8 | 9 | 10 | 15 | 16 | default 17 | org.apache.catalina.servlets.DefaultServlet 18 | 19 | debug 20 | 0 21 | 22 | 23 | listings 24 | false 25 | 26 | 1 27 | 28 | 29 | 30 | 31 | default 32 | 33 | *.js 34 | 35 | 36 | 37 | 38 | 39 | default 40 | 41 | *.css 42 | 43 | 44 | 45 | 46 | 47 | default 48 | 49 | *.gif 50 | 51 | 52 | 53 | 54 | 55 | default 56 | 57 | *.jpg 58 | 59 | 60 | 61 | 62 | 63 | default 64 | 65 | *.ico 66 | 67 | 68 | 69 | 70 | 71 | default 72 | 73 | *.png 74 | 75 | 76 | 77 | 78 | 79 | default 80 | 81 | *.htm 82 | 83 | 84 | 85 | 86 | 87 | contextConfigLocation 88 | 89 | classpath:springConfig/applicationContext.xml 90 | classpath:shiroConfig/spring-shiro.xml 91 | 92 | 93 | 94 | 95 | 96 | org.springframework.web.context.ContextLoaderListener 97 | 98 | 99 | 100 | spring 101 | org.springframework.web.servlet.DispatcherServlet 102 | 1 103 | 104 | 105 | spring 106 | / 107 | 108 | 109 | 110 | Encoding 111 | org.springframework.web.filter.CharacterEncodingFilter 112 | 113 | encoding 114 | UTF-8 115 | 116 | 117 | 118 | Encoding 119 | * 120 | 121 | 122 | 123 | shiroFilter 124 | org.springframework.web.filter.DelegatingFilterProxy 125 | 126 | 127 | shiroFilter 128 | /* 129 | 130 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/realm/UserRealm.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.realm; 2 | import java.util.ArrayList; 3 | import java.util.List; 4 | 5 | import org.apache.shiro.SecurityUtils; 6 | import org.apache.shiro.authc.AuthenticationException; 7 | import org.apache.shiro.authc.AuthenticationInfo; 8 | import org.apache.shiro.authc.AuthenticationToken; 9 | import org.apache.shiro.authc.IncorrectCredentialsException; 10 | import org.apache.shiro.authc.SimpleAuthenticationInfo; 11 | import org.apache.shiro.authc.UnknownAccountException; 12 | import org.apache.shiro.authz.AuthorizationInfo; 13 | import org.apache.shiro.authz.SimpleAuthorizationInfo; 14 | import org.apache.shiro.realm.AuthorizingRealm; 15 | import org.apache.shiro.subject.PrincipalCollection; 16 | import org.springframework.beans.factory.annotation.Autowired; 17 | 18 | import com.chen.PLoveLibrary.domain.SysPermission; 19 | import com.chen.PLoveLibrary.domain.SysRole; 20 | import com.chen.PLoveLibrary.mybatis.SysurpMapper; 21 | import com.chen.PLoveLibrary.mybatis.UserLoginMapper; 22 | 23 | /** 24 | * @类 名: UserRealm @功能描述: TODO 自定义realm,权限和登录校验,继承AuthorizingRealm @作者信息: 25 | * 陈强 @创建时间: 2018年4月14日下午7:45:05 @修改备注: 26 | */ 27 | /** 28 | * @类 名: UserRealm 29 | * @功能描述: TODO 30 | * @作者信息: 陈强 31 | * @创建时间: 2018年4月22日上午11:04:24 32 | * @修改备注: 33 | */ 34 | /** 35 | * @类 名: UserRealm 36 | * @功能描述: TODO 37 | * @作者信息: 陈强 38 | * @创建时间: 2018年4月22日上午11:04:27 39 | * @修改备注: 40 | */ 41 | public class UserRealm extends AuthorizingRealm { 42 | 43 | /** 44 | * @Fields userLoginMapper : TODO bean自动注入 45 | */ 46 | @Autowired 47 | private UserLoginMapper userLoginMapper; 48 | @Autowired 49 | private SysurpMapper sysurpMapper; 50 | 51 | /* 52 | * (非 Javadoc)

Title: doGetAuthorizationInfo

Description: shiro授权 53 | * :角色和权限

54 | * 55 | * @param principals 56 | * 57 | * @return 58 | * 59 | * @see 60 | * org.apache.shiro.realm.AuthorizingRealm#doGetAuthorizationInfo(org.apache 61 | * .shiro.subject.PrincipalCollection) 62 | */ 63 | @Override 64 | protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { 65 | // TODO Auto-generated method stub 66 | Object username=principals.getPrimaryPrincipal(); 67 | List roleList=sysurpMapper.getRole((String)username); 68 | List permissionList=null; 69 | List permission=new ArrayList(); 70 | List role=new ArrayList(); 71 | SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(); 72 | for (SysRole sysRole : roleList) { 73 | 74 | permissionList=sysurpMapper.getPermission(sysRole.getRoleName()); 75 | for (SysPermission p : permissionList) { 76 | permission.add(p.getPerName()); 77 | 78 | } 79 | role.add(sysRole.getRoleName()); 80 | System.out.println(sysRole.getRoleName()); 81 | 82 | 83 | } 84 | System.out.println(role.get(0)); 85 | info.addRoles(role); 86 | info.addStringPermissions(permission); 87 | return info; 88 | } 89 | 90 | /* 91 | * (非 Javadoc)

Title: doGetAuthenticationInfo

Description: 92 | * shiro的身份验证

93 | * 94 | * @param token 95 | * 96 | * @return 97 | * 98 | * @throws AuthenticationException 99 | * 100 | * @see 101 | * org.apache.shiro.realm.AuthenticatingRealm#doGetAuthenticationInfo(org. 102 | * apache.shiro.authc.AuthenticationToken) 103 | */ 104 | @Override 105 | protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { 106 | // TODO Auto-generated method stub 107 | Object username = token.getPrincipal(); 108 | if (username != null) { 109 | Object password = (Object) userLoginMapper.findpwdByName((String) username); 110 | System.out.println(password); 111 | if (password == null) { 112 | throw new IncorrectCredentialsException("密码错误"); 113 | } else { 114 | 115 | AuthenticationInfo info = new SimpleAuthenticationInfo(username, password, "realm1"); 116 | return info; 117 | } 118 | } else { 119 | throw new UnknownAccountException("无用户"); 120 | } 121 | 122 | } 123 | /** 124 | * @Title : clearCached 125 | * @功能描述: TODO 清除缓存 126 | * @开发者:陈强 127 | * @参数: 128 | * @返回类型:void 129 | * @throws : 130 | */ 131 | public void clearCached() { 132 | PrincipalCollection principals = SecurityUtils.getSubject().getPrincipals(); 133 | super.clearCache(principals); 134 | } 135 | 136 | } 137 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/bookJsp/bookBorrowInfo.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 3 | <%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 4 | <% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 7 | %> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 40 | 41 | 67 | 68 |
69 |

借阅信息展示:

70 |
71 |
72 | 73 |
74 | 80 |
81 | 导出Excel表 82 |
83 |
84 | 85 |
BORROW_INFO
86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 121 | 122 | 123 | 124 | 125 |
序号读者序号图书序号续借次数借书日期应还日期实际还书日期超期天数超期金额罚款金额还书情况借书操作员还书操作员操作
${borrow.borrowID }${borrow.rdID }${borrow.bkID }${borrow.idContinueTimes } ${borrow.idOverDay }${borrow.idOverMoney}${borrow.idPunishMoney }${borrow.isHasReturn}${borrow.operatorLend }${borrow.operatorRet } 119 | 120 |
126 | 127 | 137 |
138 |
139 |
140 |
141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/frame/leftFrame.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 101 | 102 | 103 | 104 | 105 |
106 |
107 | 118 | 129 | 143 | 161 | 172 |
173 |
174 |
175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/readerJsp/readerLoad.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 32 | 33 | 34 | 35 |
36 |
37 | 38 |
39 |
40 | 41 | 42 |
43 |
44 |
45 |
46 |
47 | 用户名  : 48 | 49 |
50 |
51 | 姓名    : 52 | 53 |
54 |
55 | 性别    : 56 | 57 |
58 |
59 | 密码    : 60 | 61 |
62 |
63 | 读者类别: 64 | 68 |
69 |
70 | 单位名称: 71 | 72 |
73 |
74 | 电话号码: 75 | 76 |
77 |
78 | 电子邮箱: 79 | 80 |
81 |
82 | 证件状态: 83 | 88 |
89 |
90 | 管理角色: 91 | 97 |
98 |
99 | 用户照片: 100 | 101 |
102 |
103 | 104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 |
用户名姓名密码性别类型办证日期电话邮箱角色照片
${reader.rdID }${reader.rdName }${reader.rdPwd }${reader.rdSex }${reader.rdType }${reader.rdDateReg }${reader.rdPhone }${reader.rdEmail }${reader.rdAdminRoles }查看
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 | 145 | 146 |
147 |
148 |
149 | 150 | 151 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/bookJsp/book.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 31 | 46 | 47 |
48 |

图书信息录入

49 |
50 |
51 |
52 |
53 |
54 | 图书序号 55 | 56 |
57 |
58 | 图书编号 59 | 60 |
61 |
62 | 书名 63 | 64 |
65 |
66 | 作者 67 | 68 |
69 |
70 | 出版社 71 | 72 |
73 |
74 | 出版日期 75 | 76 |
77 |
78 | ISBN书号 79 | 80 |
81 |
82 | 分类号 83 | 88 |
89 | 90 |
91 |
92 |
93 | 语言 94 | 102 |
103 |
104 | 页数 105 | 106 |
107 |
108 | 价格 109 | 110 |
111 |
112 | 入馆日期 113 | 114 |
115 |
116 | 内容简介 117 | 118 |
119 |
120 | 图书封面照片 121 | 122 |
123 |
124 | 图书状态 125 | 132 |
133 | 134 | 135 | 136 | 137 |
138 | 139 |
140 | 图书封面预览 141 | 142 |
143 | 144 | 145 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/bookJsp/bookInfo.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 3 | <%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> 4 | <% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 7 | %> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 41 | 66 | 67 |
68 |

图书信息展示:

69 |
70 |
71 |
72 |
73 |
74 | 书名 75 | 76 |
77 |
78 | 79 | 80 |
81 |
82 |
83 |
84 |
85 | 93 |
94 | 导出Excel表 95 |
96 |
97 | 98 |
BOOK_INFO
99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 139 | 140 | 141 | 142 | 143 |
图书序号图书编号书名作者出版社出版日期ISBN书号分类号语言页数价格入馆日期图书封面图书简介图书状态操作
${book.bkID }${book.bkCode }${book.bkName }${book.bkAuthor }${book.bkPress }${book.bkISBN }${book.bkCatalog }${book.bkLanguage }${book.bkPages }${book.bkPrice }查看${book.bkBrief }${book.bkStatus } 136 | 137 | 138 |
144 | 145 | 155 |
156 |
157 |
158 |
159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/bookJsp/bookEdit.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 31 | 46 | 47 |
48 |

图书信息录入

49 |
50 |
51 |
52 |
53 |
54 | 图书序号 55 | 56 |
57 |
58 | 图书编号 59 | 60 |
61 |
62 | 书名 63 | 64 |
65 |
66 | 作者 67 | 68 |
69 |
70 | 出版社 71 | 72 |
73 |
74 | 出版日期 75 | 76 |
77 |
78 | ISBN书号 79 | 80 |
81 |
82 | 分类号 83 | 88 |
89 | 90 |
91 |
92 |
93 | 语言 94 | 102 |
103 |
104 | 页数 105 | 106 |
107 |
108 | 价格 109 | 110 |
111 |
112 | 入馆日期 113 | 114 |
115 |
116 | 内容简介 117 | 118 |
119 |
120 | 图书封面照片 121 | 122 |
123 |
124 | 图书状态 125 | 132 |
133 | 134 | 135 | 136 | 137 |
138 | 139 |
140 | 图书封面预览 141 | 142 |
143 | 144 | 145 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/util/ExportExcelUtil.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.util; 2 | 3 | import java.io.BufferedInputStream; 4 | import java.io.FileInputStream; 5 | import java.io.FileNotFoundException; 6 | import java.io.IOException; 7 | import java.io.OutputStream; 8 | import java.util.Collection; 9 | import java.util.Iterator; 10 | 11 | import org.apache.poi.hssf.usermodel.HSSFCell; 12 | import org.apache.poi.hssf.usermodel.HSSFCellStyle; 13 | import org.apache.poi.hssf.usermodel.HSSFClientAnchor; 14 | import org.apache.poi.hssf.usermodel.HSSFComment; 15 | import org.apache.poi.hssf.usermodel.HSSFFont; 16 | import org.apache.poi.hssf.usermodel.HSSFPatriarch; 17 | import org.apache.poi.hssf.usermodel.HSSFRichTextString; 18 | import org.apache.poi.hssf.usermodel.HSSFRow; 19 | import org.apache.poi.hssf.usermodel.HSSFSheet; 20 | import org.apache.poi.hssf.usermodel.HSSFWorkbook; 21 | import org.apache.poi.hssf.util.HSSFColor; 22 | 23 | public class ExportExcelUtil { 24 | 25 | public void exportExcel(Collection dataset, OutputStream out) { 26 | exportExcel("", "测试POI导出EXCEL文档", null, dataset, out, "yyyy-MM-dd"); 27 | } 28 | 29 | public void exportExcel(String rootPath, String title, String[] headers, Collection dataset, 30 | OutputStream out) { 31 | exportExcel(rootPath, title, headers, dataset, out, "yyyy-MM-dd"); 32 | } 33 | 34 | public void exportExcel(String[] headers, Collection dataset, OutputStream out, String pattern) { 35 | exportExcel("", "测试POI导出EXCEL文档", headers, dataset, out, pattern); 36 | } 37 | 38 | /** 39 | * 这是一个通用的方法,可以将放置在JAVA集合中并且符号一定条件的数据以EXCEL 的形式输出到指定IO设备上 40 | * 41 | * @param title 42 | * 表格标题名 43 | * @param headers 44 | * 表格属性列名数组 45 | * @param dataset 46 | * 需要显示的数据集合 47 | * @param out 48 | * 与输出设备关联的流对象,可以将EXCEL文档导出到本地文件或者网络中 49 | * @param pattern 50 | * 如果有时间数据,设定输出格式。默认为"yyy-MM-dd" 51 | */ 52 | 53 | public void exportExcel(String rootPath, String title, String[] headers, Collection dataset, 54 | OutputStream out, String pattern) { 55 | // 声明一个工作薄 56 | HSSFWorkbook workbook = new HSSFWorkbook(); 57 | // 生成一个表格 58 | HSSFSheet sheet = workbook.createSheet(title); 59 | // 设置表格默认列宽度为15个字节 60 | sheet.setDefaultColumnWidth(15); 61 | // 生成一个样式 62 | HSSFCellStyle style = workbook.createCellStyle(); 63 | // 设置这些样式 64 | style.setFillForegroundColor(HSSFColor.SKY_BLUE.index); 65 | style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); 66 | style.setBorderBottom(HSSFCellStyle.BORDER_THIN); 67 | style.setBorderLeft(HSSFCellStyle.BORDER_THIN); 68 | style.setBorderRight(HSSFCellStyle.BORDER_THIN); 69 | style.setBorderTop(HSSFCellStyle.BORDER_THIN); 70 | style.setAlignment(HSSFCellStyle.ALIGN_CENTER); 71 | // 生成一个字体 72 | HSSFFont font = workbook.createFont(); 73 | font.setColor(HSSFColor.VIOLET.index); 74 | font.setFontHeightInPoints((short) 12); 75 | font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); 76 | // 把字体应用到当前的样式 77 | style.setFont(font); 78 | // 生成并设置另一个样式 79 | HSSFCellStyle style2 = workbook.createCellStyle(); 80 | style2.setFillForegroundColor(HSSFColor.LIGHT_YELLOW.index); 81 | style2.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); 82 | style2.setBorderBottom(HSSFCellStyle.BORDER_THIN); 83 | style2.setBorderLeft(HSSFCellStyle.BORDER_THIN); 84 | style2.setBorderRight(HSSFCellStyle.BORDER_THIN); 85 | style2.setBorderTop(HSSFCellStyle.BORDER_THIN); 86 | style2.setAlignment(HSSFCellStyle.ALIGN_CENTER); 87 | style2.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER); 88 | // 生成另一个字体 89 | HSSFFont font2 = workbook.createFont(); 90 | font2.setBoldweight(HSSFFont.BOLDWEIGHT_NORMAL); 91 | // 把字体应用到当前的样式 92 | style2.setFont(font2); 93 | 94 | // 声明一个画图的顶级管理器 95 | HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); 96 | // 定义注释的大小和位置,详见文档 97 | HSSFComment comment = patriarch.createComment(new HSSFClientAnchor(0, 0, 0, 0, (short) 4, 2, (short) 6, 5)); 98 | // 设置注释内容 99 | comment.setString(new HSSFRichTextString("可以在POI中添加注释!")); 100 | // 设置注释作者,当鼠标移动到单元格上是可以在状态栏中看到该内容. 101 | comment.setAuthor("leno"); 102 | 103 | // 产生表格标题行 104 | HSSFRow row = sheet.createRow(0); 105 | for (int i = 0; i < headers.length; i++) { 106 | HSSFCell cell = row.createCell(i); 107 | 108 | cell.setCellStyle(style); 109 | HSSFRichTextString text = new HSSFRichTextString(headers[i]); 110 | cell.setCellValue(text); 111 | } 112 | 113 | // 遍历集合数据,产生数据行 114 | Iterator it = dataset.iterator(); 115 | int index = 0; 116 | while (it.hasNext()) { 117 | index++; 118 | row = sheet.createRow(index); 119 | String[] t = (String[]) it.next(); 120 | for (int i = 0; i < t.length; i++) { 121 | HSSFCell cell = row.createCell(i); 122 | cell.setCellStyle(style2); 123 | // 判断值的类型后进行强制类型转换 124 | String textValue = t[i]; 125 | 126 | if (textValue.startsWith("upload/")) { 127 | // 有图片时,设置行高为50px; 128 | row.setHeightInPoints(50); 129 | // 设置图片所在列宽度为80px,注意这里单位的一个换算 130 | sheet.setColumnWidth(i, (short) (35.7 * 80)); // 131 | // sheet.autoSizeColumn(i); 132 | BufferedInputStream bis; 133 | byte[] buf = null; 134 | try { 135 | bis = new BufferedInputStream(new FileInputStream(rootPath + textValue)); 136 | buf = new byte[bis.available()]; 137 | while ((bis.read(buf)) != -1) { 138 | } 139 | 140 | HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 1023, 255, (short) i, index, (short) i, 141 | index); 142 | anchor.setAnchorType(2); 143 | patriarch.createPicture(anchor, workbook.addPicture(buf, HSSFWorkbook.PICTURE_TYPE_JPEG)); 144 | } catch (Exception e) { 145 | e.printStackTrace(); 146 | } 147 | 148 | } else { 149 | HSSFRichTextString richString = new HSSFRichTextString(textValue); 150 | HSSFFont font3 = workbook.createFont(); 151 | font3.setColor(HSSFColor.BLUE.index); 152 | richString.applyFont(font3); 153 | cell.setCellValue(richString); 154 | } 155 | 156 | 157 | 158 | } 159 | } 160 | try { 161 | workbook.write(out); 162 | } catch (IOException e) { 163 | // TODO Auto-generated catch block 164 | e.printStackTrace(); 165 | } 166 | 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/src/com/chen/PLoveLibrary/controller/BookClassContorller.java: -------------------------------------------------------------------------------- 1 | package com.chen.PLoveLibrary.controller; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.shiro.authz.annotation.Logical; 6 | import org.apache.shiro.authz.annotation.RequiresPermissions; 7 | import org.apache.shiro.authz.annotation.RequiresRoles; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.ui.Model; 11 | import org.springframework.validation.BindingResult; 12 | import org.springframework.validation.ObjectError; 13 | import org.springframework.validation.annotation.Validated; 14 | import org.springframework.web.bind.annotation.RequestMapping; 15 | import org.springframework.web.bind.annotation.RequestMethod; 16 | import org.springframework.web.servlet.mvc.support.RedirectAttributes; 17 | 18 | import com.chen.PLoveLibrary.domain.BookClass; 19 | import com.chen.PLoveLibrary.parameter.Parameter; 20 | import com.chen.PLoveLibrary.service.BookClassService; 21 | 22 | /** 23 | * @类 名: BookClassContorller @功能描述: TODO 图书编目控制器 @作者信息: 陈强 @创建时间: 24 | * 2018年4月22日下午2:30:29 @修改备注: 25 | */ 26 | @Controller 27 | @RequestMapping("/bookClass") 28 | @RequiresRoles(value={"BookManager","SysManager","Manager"},logical=Logical.OR) 29 | public class BookClassContorller { 30 | @Autowired 31 | private BookClassService bookClassService; 32 | 33 | /** 34 | * @Title : comeBookClassJSp 35 | * @功能描述: TODO 进入到图书编目的页面 36 | * @开发者:陈强 @参数: @return 37 | * @返回类型:String 38 | * @throws : 39 | */ 40 | @RequestMapping("/toBookClass") 41 | @RequiresPermissions(value={"bookClass:toBookClass","iterm:all"},logical=Logical.OR) 42 | public String comeBookClassJSp() { 43 | return "WEB-INF/bookJsp/bookClass"; 44 | } 45 | 46 | /** 47 | * @Title : InsertBookClass 48 | * @功能描述: TODO 插入数据 49 | * @开发者:陈强 50 | * @参数: @param bookClass 51 | * @参数: @param br 52 | * @参数: @param model 53 | * @参数: @return 54 | * @返回类型:String 55 | * @throws : 56 | */ 57 | @RequestMapping(value ="/insertBookClass", method = { RequestMethod.POST, RequestMethod.GET }) 58 | @RequiresPermissions(value={"bookClass:insertBookClass","iterm:all"},logical=Logical.OR) 59 | public String InsertBookClass(@Validated BookClass bookClass, BindingResult br, Model model) { 60 | 61 | if (br.hasErrors()) { 62 | String Message = null; 63 | List errors = br.getAllErrors(); 64 | for (ObjectError objectError : errors) { 65 | 66 | model.addAttribute("message", Message + objectError.getDefaultMessage()); 67 | } 68 | return "error"; 69 | } 70 | bookClassService.insertBookClass(bookClass); 71 | model.addAttribute("bkCatalog",bookClass.getBkCatalog()); 72 | model.addAttribute("bkClassName", bookClass.getBkClassName()); 73 | return "WEB-INF/bookJsp/bookClass"; 74 | } 75 | /** 76 | * @Title : BookClassInfo 77 | * @功能描述: TODO 78 | * @开发者:陈强 79 | * @参数: @param parameter 80 | * @参数: @param model 81 | * @参数: @return 82 | * @返回类型:String 83 | * @throws : 84 | */ 85 | @RequestMapping("/selectBookClass") 86 | @RequiresPermissions(value={"bookClass:selectBookClass","iterm:all"},logical=Logical.OR) 87 | public String BookClassInfo(Parameter parameter,Model model) 88 | { 89 | int count=bookClassService.getCount(parameter); 90 | int start=parameter.getStart(); 91 | if(start<0) start=0; 92 | if(start>count)start-=10; 93 | int end= start+10; 94 | parameter.setStart(start); 95 | parameter.setEnd(end); 96 | List bookClassList= bookClassService.selectBookClassByID(parameter); 97 | model.addAttribute("bookClassList", bookClassList); 98 | model.addAttribute("start", start); 99 | 100 | 101 | return "WEB-INF/bookJsp/bookClassInfo"; 102 | } 103 | /** 104 | * @Title : DeleteBookClass 105 | * @功能描述: TODO 删除信息 106 | * @开发者:陈强 107 | * @参数: @param bookClass 108 | * @参数: @param ra 109 | * @参数: @param parameter 110 | * @参数: @return 111 | * @返回类型:String 112 | * @throws : 113 | */ 114 | @RequestMapping("/deleteBookClass") 115 | @RequiresPermissions(value={"bookClass:deleteBookClass","iterm:all"},logical=Logical.OR) 116 | public String DeleteBookClass(BookClass bookClass ,RedirectAttributes ra,Parameter parameter) 117 | { 118 | bookClassService.deleteBookClassByID(bookClass); 119 | ra.addAttribute("start",parameter.getStart()); 120 | return "redirect:/bookClass/selectBookClass"; 121 | } 122 | /** 123 | * @Title : EditBookClass 124 | * @功能描述: TODO 编辑信息 125 | * @开发者:陈强 126 | * @参数: @param parameter 127 | * @参数: @param ra 128 | * @参数: @return 129 | * @返回类型:String 130 | * @throws : 131 | */ 132 | @RequestMapping("/editBookClass") 133 | @RequiresPermissions(value={"bookClass:editBookClass","iterm:all"},logical=Logical.OR) 134 | public String EditBookClass(Parameter parameter,Model model) 135 | { 136 | BookClass bookClass=bookClassService.findBookClassByID(parameter); 137 | model.addAttribute("BookClass", bookClass); 138 | model.addAttribute("start", parameter.getStart()); 139 | return "WEB-INF/bookJsp/bookClassInfo"; 140 | } 141 | 142 | /** 143 | * @Title : UpdateBookClass 144 | * @功能描述: TODO 更新信息 145 | * @开发者:陈强 146 | * @参数: @param parameter 147 | * @参数: @param ra 148 | * @参数: @param bookClass 149 | * @参数: @param br 150 | * @参数: @param model 151 | * @参数: @return 152 | * @返回类型:String 153 | * @throws : 154 | */ 155 | @RequestMapping( value="/updateBookClass",method={ RequestMethod.POST, RequestMethod.GET } ) 156 | @RequiresPermissions(value={"bookClass:updateBookClass","iterm:all"},logical=Logical.OR) 157 | public String UpdateBookClass(Parameter parameter,RedirectAttributes ra,@Validated BookClass bookClass,BindingResult br,Model model) 158 | { 159 | 160 | if (br.hasErrors()) { 161 | String Message = null; 162 | List errors = br.getAllErrors(); 163 | for (ObjectError objectError : errors) { 164 | 165 | model.addAttribute("message", Message + objectError.getDefaultMessage()); 166 | } 167 | return "error"; 168 | } 169 | bookClassService.updateBookClass(bookClass); 170 | ra.addAttribute("start", parameter.getStart()); 171 | return "redirect:/bookClass/selectBookClass"; 172 | 173 | } 174 | 175 | } 176 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/readerJsp/readerType.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 33 | 34 |
35 |
36 |

信息注册

37 |
38 |
39 |
40 | 41 | 42 |
43 |
44 | 45 | 46 |
47 |
48 | 49 | 50 |
51 |
52 | 53 | 54 |
55 |
56 | 57 | 58 |
59 |
60 | 61 | 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 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 105 | 106 | 107 | 108 |
类型名称可借书的数量可借书的天数可续借的次数罚款率证件有效期操作
${readerType.rdType }${readerType.rdTypeName }${readerType.canLendQty }本${readerType.canLendDay }天${readerType.canContinueTimes }次${readerType.punishRate }${readerType.dateValid }天 102 | 103 | 104 |
109 |
110 |
111 | 121 |
122 | 导出Excel表 123 |
124 |
125 |
126 |
127 |
128 |

信息修改

129 |
130 |
131 |
132 | 133 | 134 |
135 |
136 | 137 | 138 |
139 |
140 | 141 | 142 |
143 |
144 | 145 | 146 |
147 |
148 | 149 | 150 |
151 |
152 | 153 | 154 |
155 |
156 | 157 | 158 |
159 |
160 | 161 |
162 |
163 |
164 | 165 | 166 | -------------------------------------------------------------------------------- /PredestinedLoveLibrary/WebRoot/WEB-INF/readerJsp/readerPage.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 2 | <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 3 | <%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> 4 | <% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 7 | %> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 31 | 32 |
33 |
34 | 35 |
36 |
37 | 38 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | 48 | 49 |
50 |
51 | 52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | 60 | 61 | 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 | 91 | 92 | 93 | 94 | 95 | 99 | 100 | 101 | 102 | 103 | 104 | 105 |
用户名姓名密码性别类型办证日期电话邮箱角色证件状态已借书数量照片操作
${reader.rdID }${reader.rdName }${reader.rdPwd }${reader.rdSex }教师学生${reader.rdPhone }${reader.rdEmail }${reader.rdAdminRoles }${reader.rdStatus }${reader.rdBorrowQty }查看 96 | 97 | 98 |
106 |
107 |
108 | 118 |
119 | 导出Excel表 120 |
121 |
122 |
123 |
124 |
125 |
126 | 用户名  : 127 | 128 |
129 |
130 | 姓名    : 131 | 132 |
133 |
134 | 性别    : 135 | 136 |
137 |
138 | 密码    : 139 | 140 |
141 |
142 | 读者类别: 143 | 147 |
148 |
149 | 单位名称: 150 | 151 |
152 |
153 | 电话号码: 154 | 155 |
156 |
157 | 电子邮箱: 158 | 159 |
160 |
161 | 证件状态: 162 | 167 |
168 |
169 | 管理角色: 170 | 176 |
177 |
178 | 用户照片: 179 | 180 |
181 |
182 | 183 |
184 |
185 |
186 | 187 | 188 | --------------------------------------------------------------------------------