├── .gitignore ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml ├── readme.md └── src ├── main ├── java │ └── fun │ │ └── juhua │ │ └── library_springboot │ │ ├── LibrarySpringbootApplication.java │ │ ├── config │ │ ├── AdminWebConfig.java │ │ ├── LoginWebConfig.java │ │ └── ReaderWebConfig.java │ │ ├── controller │ │ ├── AdminController.java │ │ ├── BookController.java │ │ ├── BorrowController.java │ │ ├── IndexController.java │ │ └── ReaderController.java │ │ ├── entity │ │ ├── Admin.java │ │ ├── Book.java │ │ ├── Borrow.java │ │ └── Reader.java │ │ ├── interceptor │ │ ├── AdminInterceptor.java │ │ ├── LoginInterceptor.java │ │ └── ReaderInterceptor.java │ │ ├── mapper │ │ ├── AdminMapper.java │ │ ├── BookMapper.java │ │ ├── BorrowMapper.java │ │ └── ReaderMapper.java │ │ ├── service │ │ ├── AdminService.java │ │ ├── BookService.java │ │ ├── BorrowService.java │ │ ├── Impl │ │ │ ├── AdminServiceImpl.java │ │ │ ├── BookServiceImpl.java │ │ │ ├── BorrowServiceImpl.java │ │ │ └── ReaderServiceImpl.java │ │ └── ReaderService.java │ │ └── utils │ │ └── DateUtils.java └── resources │ ├── application.properties │ ├── library.sql │ ├── static │ ├── css │ │ ├── error.css │ │ ├── font.css │ │ ├── login.css │ │ ├── theme1.css │ │ ├── theme2.css │ │ ├── theme3.css │ │ ├── theme4.css │ │ ├── theme5.css │ │ ├── welcome.css │ │ └── xadmin.css │ ├── favicon.ico │ ├── fonts │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ ├── images │ │ ├── aiwrap.png │ │ ├── bg.png │ │ └── loginBackground.jpg │ ├── js │ │ ├── 404.js │ │ ├── 500.js │ │ ├── jquery.min.js │ │ ├── xadmin.js │ │ └── xcity.js │ └── lib │ │ ├── dist │ │ └── sliderVerify │ │ │ └── sliderVerify.js │ │ ├── layui │ │ ├── css │ │ │ ├── layui.css │ │ │ ├── layui.mobile.css │ │ │ └── modules │ │ │ │ ├── code.css │ │ │ │ ├── laydate │ │ │ │ └── default │ │ │ │ │ └── laydate.css │ │ │ │ └── layer │ │ │ │ └── default │ │ │ │ ├── icon-ext.png │ │ │ │ ├── icon.png │ │ │ │ ├── layer.css │ │ │ │ ├── loading-0.gif │ │ │ │ ├── loading-1.gif │ │ │ │ └── loading-2.gif │ │ ├── font │ │ │ ├── iconfont.eot │ │ │ ├── iconfont.svg │ │ │ ├── iconfont.ttf │ │ │ └── iconfont.woff │ │ ├── images │ │ │ └── face │ │ │ │ ├── 0.gif │ │ │ │ ├── 1.gif │ │ │ │ ├── 10.gif │ │ │ │ ├── 11.gif │ │ │ │ ├── 12.gif │ │ │ │ ├── 13.gif │ │ │ │ ├── 14.gif │ │ │ │ ├── 15.gif │ │ │ │ ├── 16.gif │ │ │ │ ├── 17.gif │ │ │ │ ├── 18.gif │ │ │ │ ├── 19.gif │ │ │ │ ├── 2.gif │ │ │ │ ├── 20.gif │ │ │ │ ├── 21.gif │ │ │ │ ├── 22.gif │ │ │ │ ├── 23.gif │ │ │ │ ├── 24.gif │ │ │ │ ├── 25.gif │ │ │ │ ├── 26.gif │ │ │ │ ├── 27.gif │ │ │ │ ├── 28.gif │ │ │ │ ├── 29.gif │ │ │ │ ├── 3.gif │ │ │ │ ├── 30.gif │ │ │ │ ├── 31.gif │ │ │ │ ├── 32.gif │ │ │ │ ├── 33.gif │ │ │ │ ├── 34.gif │ │ │ │ ├── 35.gif │ │ │ │ ├── 36.gif │ │ │ │ ├── 37.gif │ │ │ │ ├── 38.gif │ │ │ │ ├── 39.gif │ │ │ │ ├── 4.gif │ │ │ │ ├── 40.gif │ │ │ │ ├── 41.gif │ │ │ │ ├── 42.gif │ │ │ │ ├── 43.gif │ │ │ │ ├── 44.gif │ │ │ │ ├── 45.gif │ │ │ │ ├── 46.gif │ │ │ │ ├── 47.gif │ │ │ │ ├── 48.gif │ │ │ │ ├── 49.gif │ │ │ │ ├── 5.gif │ │ │ │ ├── 50.gif │ │ │ │ ├── 51.gif │ │ │ │ ├── 52.gif │ │ │ │ ├── 53.gif │ │ │ │ ├── 54.gif │ │ │ │ ├── 55.gif │ │ │ │ ├── 56.gif │ │ │ │ ├── 57.gif │ │ │ │ ├── 58.gif │ │ │ │ ├── 59.gif │ │ │ │ ├── 6.gif │ │ │ │ ├── 60.gif │ │ │ │ ├── 61.gif │ │ │ │ ├── 62.gif │ │ │ │ ├── 63.gif │ │ │ │ ├── 64.gif │ │ │ │ ├── 65.gif │ │ │ │ ├── 66.gif │ │ │ │ ├── 67.gif │ │ │ │ ├── 68.gif │ │ │ │ ├── 69.gif │ │ │ │ ├── 7.gif │ │ │ │ ├── 70.gif │ │ │ │ ├── 71.gif │ │ │ │ ├── 8.gif │ │ │ │ └── 9.gif │ │ ├── lay │ │ │ └── modules │ │ │ │ ├── carousel.js │ │ │ │ ├── code.js │ │ │ │ ├── colorpicker.js │ │ │ │ ├── element.js │ │ │ │ ├── flow.js │ │ │ │ ├── form.js │ │ │ │ ├── jquery.js │ │ │ │ ├── laydate.js │ │ │ │ ├── layedit.js │ │ │ │ ├── layer.js │ │ │ │ ├── laypage.js │ │ │ │ ├── laytpl.js │ │ │ │ ├── mobile.js │ │ │ │ ├── rate.js │ │ │ │ ├── slider.js │ │ │ │ ├── table.js │ │ │ │ ├── tree.js │ │ │ │ ├── upload.js │ │ │ │ └── util.js │ │ ├── layui.all.js │ │ └── layui.js │ │ └── sliderVerify │ │ └── sliderVerify.js │ └── templates │ ├── admin │ ├── addAdmin.html │ ├── addBook.html │ ├── addBorrow.html │ ├── adminList.html │ ├── bookList.html │ ├── borrowList.html │ ├── editAdmin.html │ ├── editBook.html │ ├── editReader.html │ ├── index.html │ └── readerList.html │ ├── error │ ├── 404.html │ └── 500.html │ ├── index.html │ ├── login.html │ ├── reader │ ├── bookList.html │ ├── borrowList.html │ ├── edit.html │ └── index.html │ ├── register.html │ └── welcome.html └── test └── java └── fun └── juhua └── library_springboot └── LibrarySpringbootApplicationTests.java /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 3 | -------------------------------------------------------------------------------- /mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* 50 | if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 124 | 125 | FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% ^ 162 | %JVM_CONFIG_MAVEN_PROPS% ^ 163 | %MAVEN_OPTS% ^ 164 | %MAVEN_DEBUG_OPTS% ^ 165 | -classpath %WRAPPER_JAR% ^ 166 | "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ 167 | %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 168 | if ERRORLEVEL 1 goto error 169 | goto end 170 | 171 | :error 172 | set ERROR_CODE=1 173 | 174 | :end 175 | @endlocal & set ERROR_CODE=%ERROR_CODE% 176 | 177 | if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost 178 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 179 | if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" 180 | if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" 181 | :skipRcPost 182 | 183 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 184 | if "%MAVEN_BATCH_PAUSE%"=="on" pause 185 | 186 | if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% 187 | 188 | cmd /C exit /B %ERROR_CODE% 189 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.6.2 9 | 10 | 11 | fun.juhua 12 | library_springboot 13 | 0.0.1-SNAPSHOT 14 | library_springboot 15 | library_springboot 16 | 17 | 1.8 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-jdbc 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-thymeleaf 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-devtools 35 | runtime 36 | true 37 | 38 | 39 | mysql 40 | mysql-connector-java 41 | 8.0.17 42 | 43 | 44 | org.projectlombok 45 | lombok 46 | true 47 | 48 | 49 | org.springframework.boot 50 | spring-boot-starter-test 51 | test 52 | 53 | 54 | com.baomidou 55 | mybatis-plus-boot-starter 56 | 3.4.3.4 57 | 58 | 59 | org.springframework.boot 60 | spring-boot-starter-logging 61 | 62 | 63 | 64 | 65 | 66 | 67 | org.springframework.boot 68 | spring-boot-maven-plugin 69 | 70 | 71 | 72 | org.projectlombok 73 | lombok 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/LibrarySpringbootApplication.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.transaction.annotation.EnableTransactionManagement; 7 | 8 | @SpringBootApplication 9 | @MapperScan("fun.juhua.library_springboot.mapper") 10 | public class LibrarySpringbootApplication { 11 | 12 | public static void main(String[] args) { 13 | SpringApplication.run(LibrarySpringbootApplication.class, args); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/config/AdminWebConfig.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.config; 2 | 3 | import fun.juhua.library_springboot.interceptor.AdminInterceptor; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 7 | 8 | @Configuration 9 | public class AdminWebConfig implements WebMvcConfigurer { 10 | @Override 11 | public void addInterceptors(InterceptorRegistry registry) { 12 | registry.addInterceptor(new AdminInterceptor()) 13 | .addPathPatterns("/reader/**"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/config/LoginWebConfig.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.config; 2 | 3 | import fun.juhua.library_springboot.interceptor.LoginInterceptor; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 7 | 8 | @Configuration 9 | public class LoginWebConfig implements WebMvcConfigurer { 10 | @Override 11 | public void addInterceptors(InterceptorRegistry registry) { 12 | registry.addInterceptor(new LoginInterceptor()) 13 | .addPathPatterns("/UpdateReader","/toEditReader") 14 | .addPathPatterns("/admin/**") 15 | .addPathPatterns("/reader/**"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/config/ReaderWebConfig.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.config; 2 | 3 | import fun.juhua.library_springboot.interceptor.ReaderInterceptor; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 7 | 8 | @Configuration 9 | public class ReaderWebConfig implements WebMvcConfigurer { 10 | @Override 11 | public void addInterceptors(InterceptorRegistry registry) { 12 | registry.addInterceptor(new ReaderInterceptor()) 13 | .addPathPatterns("/admin/**"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/controller/AdminController.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.controller; 2 | 3 | import fun.juhua.library_springboot.entity.Admin; 4 | import fun.juhua.library_springboot.service.AdminService; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.ui.Model; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | 10 | 11 | import javax.annotation.Resource; 12 | import javax.servlet.http.HttpSession; 13 | import java.util.List; 14 | 15 | @Controller 16 | @RequestMapping("/admin") 17 | // @RestController渲染成json格式返回给前台 18 | public class AdminController { 19 | @Resource 20 | AdminService adminServiceImpl; 21 | 22 | @RequestMapping("/toAdminList") 23 | public String toAdminList(String name, Model model) { 24 | List adminList = adminServiceImpl.getAdminList(name); 25 | model.addAttribute("adminList", adminList); 26 | return "admin/adminList"; 27 | } 28 | 29 | @RequestMapping("/DeleteAdmin") 30 | public String deleteAdmin(String id) { 31 | int raw = adminServiceImpl.deleteAdminById(id); 32 | return "redirect:/admin/"; 33 | } 34 | 35 | 36 | @RequestMapping("/") 37 | public String toIndex(HttpSession session, Model model) { 38 | model.addAttribute("user", session.getAttribute("user")); 39 | return "admin/index"; 40 | } 41 | 42 | @RequestMapping("/toAddReader") 43 | public String toAddReader() { 44 | return "redirect:/toRegister"; 45 | } 46 | 47 | @RequestMapping("/toEditAdmin") 48 | public String toEditAdmin(String id, HttpSession session, Model model) { 49 | Admin admin = null; 50 | if (id == "" || id == null || id.equals("")) { 51 | admin = (Admin) session.getAttribute("user"); 52 | } else { 53 | admin = adminServiceImpl.findAdmin(id); 54 | } 55 | model.addAttribute("editUser", admin); 56 | return "admin/editAdmin"; 57 | } 58 | 59 | @RequestMapping("/UpdateAdmin") 60 | @ResponseBody 61 | public String updateAdmin(String id, String name, String password, String oldPassword, String gender, String telephone, String email) { 62 | Admin admin = new Admin(id, name, password == "" ? oldPassword : password, gender, telephone, email); 63 | int state = adminServiceImpl.updateAdmin(admin); 64 | String msg = "更新失败,请重试"; 65 | if (state == 1) { 66 | msg = "更新成功!"; 67 | } 68 | return "{\"state\":" + state + ",\"msg\":\"" + msg + "\"}"; 69 | } 70 | 71 | @RequestMapping("/toAddAdmin") 72 | public String toAddAdmin() { 73 | return "admin/addAdmin"; 74 | } 75 | 76 | @RequestMapping("/RegisterAdmin") 77 | @ResponseBody 78 | public String registerReader(Admin admin) { 79 | int state = 0; 80 | String msg = "用户名已存在!"; 81 | if (!adminServiceImpl.haveAdmin(admin.getId())) { 82 | state = adminServiceImpl.addAdmin(admin); 83 | if (state == 1) { 84 | msg = "注册成功!";//注册成功! 85 | } else { 86 | msg = "请重试!";//请重试! 87 | } 88 | } 89 | //System.out.println("ReaderController -> registerReader(49): " + msg); 90 | return "{\"state\":" + state + ",\"msg\":\"" + msg + "\"}"; 91 | } 92 | 93 | } -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/controller/BookController.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.controller; 2 | 3 | import fun.juhua.library_springboot.entity.Book; 4 | import fun.juhua.library_springboot.service.BookService; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.ui.Model; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | 10 | import javax.annotation.Resource; 11 | import java.util.List; 12 | 13 | @Controller 14 | public class BookController { 15 | @Resource 16 | BookService bookServiceImpl; 17 | 18 | @RequestMapping("/admin/toBookList") 19 | public String toBookList(String bookName, String bookID, Model model) { 20 | List bookList = bookServiceImpl.getBookList(bookName, bookID); 21 | model.addAttribute("bookList", bookList); 22 | return "admin/bookList"; 23 | } 24 | 25 | @RequestMapping("/admin/toEditBook") 26 | public String toEditBook(String id, Model model) { 27 | //System.out.println(id); 28 | Book book = bookServiceImpl.findById(id); 29 | model.addAttribute("editBook", book); 30 | return "admin/editBook"; 31 | } 32 | 33 | @RequestMapping("/admin/UpdateBook") 34 | @ResponseBody 35 | public String updateBook(String bookID, String bookName, String bookAuthor, String bookPublisher, String publishTime, String bookPrice, String bookSum, String bookLend, String tag, String isbn) { 36 | Book book = new Book(bookID, bookName, bookAuthor, bookPublisher, publishTime, bookPrice, bookSum, bookLend, tag, isbn); 37 | int state = bookServiceImpl.updateBook(book); 38 | String msg = "更新失败,请重试"; 39 | if (state == 1) { 40 | msg = "更新成功!"; 41 | } 42 | return "{\"state\":" + state + ",\"msg\":\"" + msg + "\"}"; 43 | } 44 | 45 | @RequestMapping("/admin/DeleteBook") 46 | public String deleteBook(String id) { 47 | int raw = bookServiceImpl.deleteBook(id); 48 | //System.out.println("BookController -> deleteBook(49): " + raw); 49 | return "redirect:/admin/"; 50 | } 51 | 52 | @RequestMapping("/admin/toAddBook") 53 | public String toAddBook() { 54 | return "admin/addBook"; 55 | } 56 | 57 | @RequestMapping("/admin/AddBook") 58 | @ResponseBody 59 | public String addBook(String bookID, String bookName, String bookAuthor, String bookPublisher, String publishTime, String bookPrice, String bookSum, String tag, String isbn) { 60 | Book book = new Book(bookID, bookName, bookAuthor, bookPublisher, publishTime, bookPrice, bookSum, "0", tag, isbn); 61 | int state = bookServiceImpl.addBook(book); 62 | String msg = "添加失败,请重试"; 63 | if (state == 1) { 64 | msg = "添加成功!"; 65 | } 66 | return "{\"state\":" + state + ",\"msg\":\"" + msg + "\"}"; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/controller/BorrowController.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.controller; 2 | 3 | import fun.juhua.library_springboot.entity.Book; 4 | import fun.juhua.library_springboot.entity.Borrow; 5 | import fun.juhua.library_springboot.entity.Reader; 6 | import fun.juhua.library_springboot.service.BookService; 7 | import fun.juhua.library_springboot.service.BorrowService; 8 | import fun.juhua.library_springboot.service.ReaderService; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.ui.Model; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.ResponseBody; 13 | 14 | import javax.annotation.Resource; 15 | import javax.servlet.http.HttpSession; 16 | import java.util.Date; 17 | import java.util.List; 18 | 19 | @Controller 20 | public class BorrowController { 21 | @Resource 22 | BorrowService borrowServiceImpl; 23 | @Resource 24 | BookService bookService; 25 | @Resource 26 | ReaderService readerServiceImpl; 27 | 28 | @RequestMapping("/admin/toBorrowList") 29 | public String toBorrowList(String bookID, String readerID, String isNull, Model model) { 30 | List borrowList = borrowServiceImpl.getBorrowList(bookID, readerID, isNull); 31 | model.addAttribute("borrowList", borrowList); 32 | return "admin/borrowList"; 33 | } 34 | 35 | @RequestMapping("/reader/toReaderBorrow") 36 | public String toReaderBorrow(HttpSession httpSession, String isNull, Model model) { 37 | Reader reader = (Reader) httpSession.getAttribute("user"); 38 | List borrowList = borrowServiceImpl.getBorrowList(null, reader.getId(), isNull); 39 | model.addAttribute("borrowList", borrowList); 40 | model.addAttribute("user", reader); 41 | return "reader/borrowList"; 42 | } 43 | 44 | @RequestMapping("/admin/toReturnBook") 45 | @ResponseBody 46 | public String toReturnBook(String readerID, String bookID, String borrowTime) { 47 | borrowTime = borrowTime.toString().replace("T", " ").replace(".000+08:00", ""); 48 | Borrow borrow = new Borrow(readerID, bookID, borrowTime, new Date()); 49 | int state = bookService.returnBook(bookID); 50 | String msg = "归还失败,请重试!"; 51 | if (state == 1) { 52 | state = borrowServiceImpl.updateBorrow(borrow); 53 | msg = "归还成功!"; 54 | } 55 | return "{\"state\":" + state + ",\"msg\":\"" + msg + "\"}"; 56 | } 57 | 58 | @RequestMapping("/admin/toAddBorrow") 59 | public String toAddBorrow(Model model) { 60 | List readerList = readerServiceImpl.getReaderList(null, null); 61 | List bookList = bookService.getBookList(null, null); 62 | model.addAttribute("readerList", readerList); 63 | model.addAttribute("bookList", bookList); 64 | return "admin/addBorrow"; 65 | } 66 | 67 | @RequestMapping("/admin/AddBorrow") 68 | @ResponseBody 69 | public String addBorrow(String readerID, String bookID, String borrowTime) { 70 | int state = 0; 71 | String msg = "馆内暂时无货,请等待。"; 72 | //判断借出数是否小于书本总数 73 | if (bookService.check(bookID) == 1) { 74 | state = borrowServiceImpl.check(readerID); 75 | Reader reader = readerServiceImpl.findReader(readerID); 76 | if (reader != null) { 77 | if (state == 1) { 78 | state = borrowServiceImpl.addBorrow(readerID, bookID, borrowTime); 79 | msg = "借阅成功!"; 80 | } else { 81 | msg = "达到最大借书数量!请尽快归还!"; 82 | } 83 | } else { 84 | state = 0; 85 | msg = "查无此用户!"; 86 | } 87 | } 88 | //System.out.println("ReaderController -> registerReader(49): " + msg); 89 | return "{\"state\":" + state + ",\"msg\":\"" + msg + "\"}"; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.controller; 2 | 3 | import fun.juhua.library_springboot.entity.Reader; 4 | import fun.juhua.library_springboot.service.AdminService; 5 | import fun.juhua.library_springboot.service.BorrowService; 6 | import fun.juhua.library_springboot.service.ReaderService; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.ui.Model; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | import javax.annotation.Resource; 12 | import javax.servlet.http.HttpSession; 13 | 14 | @Controller 15 | public class IndexController { 16 | @Resource 17 | AdminService adminServiceImpl; 18 | @Resource 19 | ReaderService readerServiceImpl; 20 | @Resource 21 | BorrowService borrowServiceImpl; 22 | 23 | @RequestMapping("/welcome") 24 | public String toWelcome() { 25 | return "welcome"; 26 | } 27 | 28 | @RequestMapping("/toLogin") 29 | public String toLogin() { 30 | return "login"; 31 | } 32 | 33 | @RequestMapping("/Login") 34 | public String login(String id, String password, HttpSession session, Model model) { 35 | String checkAdmin = id.substring(0, 1); 36 | boolean state = false; 37 | if (checkAdmin.equals("m")) { 38 | state = adminServiceImpl.login(id, password); 39 | if (state) { 40 | session.setAttribute("role", "admin"); 41 | session.setAttribute("user", adminServiceImpl.findAdmin(id)); 42 | model.addAttribute("user", adminServiceImpl.findAdmin(id)); 43 | return "redirect:/admin/"; 44 | } 45 | } else if (checkAdmin.equals("r")) { 46 | state = readerServiceImpl.login(id, password); 47 | if (state) { 48 | session.setAttribute("role", "reader"); 49 | boolean allow = borrowServiceImpl.check(id) == 1 ? true : false; 50 | session.setAttribute("allow", allow); 51 | Reader reader = readerServiceImpl.findReader(id); 52 | System.out.println("IndexController -> login(49)reader: " + reader); 53 | session.setAttribute("user", reader); 54 | model.addAttribute("user", readerServiceImpl.findReader(id)); 55 | return "redirect:/reader/"; 56 | } 57 | } 58 | model.addAttribute("errorMsg", "用户名或密码错误"); 59 | return "redirect:/toLogin"; 60 | } 61 | 62 | @RequestMapping("/Logout") 63 | public String logout(HttpSession session) { 64 | session.invalidate(); 65 | return "redirect:/toIndex"; 66 | } 67 | 68 | @RequestMapping("/toIndex") 69 | public String toIndex(HttpSession session, Model model) { 70 | String role = (String) session.getAttribute("role"); 71 | //System.out.println("IndexController -> toIndex(63)role: " + role); 72 | Object user = session.getAttribute("user"); 73 | //System.out.println("IndexController -> toIndex(70)user: " + user); 74 | //System.out.println(user == null); 75 | if (role != null && user != null && role.equals("admin")) { 76 | model.addAttribute("user", session.getAttribute("user")); 77 | return "redirect:/admin/"; 78 | } else if (role != null && user != null && role.equals("reader")) { 79 | model.addAttribute("user", session.getAttribute("user")); 80 | return "redirect:/reader/"; 81 | } 82 | return "redirect:/toLogin"; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/controller/ReaderController.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.controller; 2 | 3 | import fun.juhua.library_springboot.entity.Book; 4 | import fun.juhua.library_springboot.entity.Reader; 5 | import fun.juhua.library_springboot.service.BookService; 6 | import fun.juhua.library_springboot.service.ReaderService; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.ui.Model; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import javax.annotation.Resource; 13 | import javax.servlet.http.HttpSession; 14 | import java.util.List; 15 | 16 | @Controller 17 | public class ReaderController { 18 | @Resource 19 | ReaderService readerServiceImpl; 20 | @Resource 21 | BookService bookService; 22 | 23 | @RequestMapping("/reader") 24 | public String toIndex(HttpSession session, Model model) { 25 | model.addAttribute("user", session.getAttribute("user")); 26 | return "reader/index"; 27 | } 28 | 29 | @RequestMapping("/toRegister") 30 | public String toRegister() { 31 | return "register"; 32 | } 33 | 34 | @RequestMapping("/RegisterReader") 35 | @ResponseBody 36 | public String registerReader(Reader reader) { 37 | int state = 0; 38 | String msg = "用户名已存在!"; 39 | if (!readerServiceImpl.haveReader(reader.getId())) { 40 | state = readerServiceImpl.addReader(reader); 41 | if (state == 1) { 42 | msg = "注册成功!";//注册成功! 43 | } else { 44 | msg = "请重试!";//请重试! 45 | } 46 | } 47 | //System.out.println("ReaderController -> registerReader(49): " + msg); 48 | return "{\"state\":" + state + ",\"msg\":\"" + msg + "\"}"; 49 | } 50 | 51 | @RequestMapping("/admin/toReaderList") 52 | public String toReaderList(String name, String id, Model model) { 53 | List readerList = readerServiceImpl.getReaderList(name, id); 54 | model.addAttribute("readerList", readerList); 55 | return "admin/readerList"; 56 | } 57 | 58 | @RequestMapping("/reader/toBookshelf") 59 | public String toBookshelf(String bookName, String bookID, HttpSession session, Model model) { 60 | List bookList = bookService.getBookList(bookName, bookID); 61 | model.addAttribute("bookList", bookList); 62 | Boolean allow = (Boolean) session.getAttribute("allow"); 63 | model.addAttribute("allow", allow); 64 | return "reader/bookList"; 65 | } 66 | 67 | @RequestMapping("/UpdateReader") 68 | @ResponseBody 69 | public String updateReader(String id, String name, String password, String oldPassword, String gender, String telephone, String email) { 70 | Reader reader = new Reader(id, name, password == "" ? oldPassword : password, gender, telephone, email); 71 | int state = readerServiceImpl.updateReader(reader); 72 | String msg = "请重试"; 73 | if (state == 1) { 74 | msg = "更新成功!"; 75 | } 76 | return "{\"state\":" + state + ",\"msg\":\"" + msg + "\"}"; 77 | } 78 | 79 | @RequestMapping("/toEditReader") 80 | public String toEditReader(HttpSession session, Model model) { 81 | Reader reader = (Reader) session.getAttribute("user"); 82 | model.addAttribute("user", reader); 83 | return "reader/edit"; 84 | } 85 | 86 | @RequestMapping("/admin/toEditReader") 87 | public String toEditReader(String id, Model model) { 88 | Reader reader = readerServiceImpl.findReader(id); 89 | model.addAttribute("user", reader); 90 | return "admin/editReader"; 91 | } 92 | 93 | @RequestMapping("/admin/DeleteReader") 94 | public String deleteReader(String id) { 95 | int raw = readerServiceImpl.deleteAdminById(id); 96 | return "redirect:/admin/"; 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/entity/Admin.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * @program: library 10 | * @description: 管理员实体类 11 | * @author: 12 | * @create: 2021-10-25 11:06 13 | **/ 14 | public class Admin implements Serializable { 15 | 16 | //管理员id 17 | @TableId(type = IdType.INPUT) 18 | private String id; 19 | //名 20 | private String name; 21 | //密 22 | private String password; 23 | //性 24 | private String gender; 25 | //电 26 | private String telephone; 27 | //邮 28 | private String email; 29 | 30 | public Admin(String id, String name, String password, String gender, String telephone, String email) { 31 | this.id = id; 32 | this.name = name; 33 | this.password = password; 34 | this.gender = gender; 35 | this.telephone = telephone; 36 | this.email = email; 37 | } 38 | 39 | public Admin() { 40 | } 41 | 42 | 43 | public String getId() { 44 | return id; 45 | } 46 | 47 | 48 | public void setId(String id) { 49 | this.id = id; 50 | } 51 | 52 | 53 | public String getName() { 54 | return name; 55 | } 56 | 57 | 58 | public void setName(String name) { 59 | this.name = name; 60 | } 61 | 62 | 63 | public String getPassword() { 64 | return password; 65 | } 66 | 67 | public void setPassword(String password) { 68 | this.password = password; 69 | } 70 | 71 | 72 | public String getGender() { 73 | return gender; 74 | } 75 | 76 | 77 | public void setGender(String gender) { 78 | this.gender = gender; 79 | } 80 | 81 | 82 | public String getTelephone() { 83 | return telephone; 84 | } 85 | 86 | 87 | public void setTelephone(String telephone) { 88 | this.telephone = telephone; 89 | } 90 | 91 | public String getEmail() { 92 | return email; 93 | } 94 | 95 | 96 | public void setEmail(String email) { 97 | this.email = email; 98 | } 99 | 100 | @Override 101 | public String toString() { 102 | return "Admin{" + 103 | "id='" + id + '\'' + 104 | ", name='" + name + '\'' + 105 | ", password='" + password + '\'' + 106 | ", gender='" + gender + '\'' + 107 | ", telephone='" + telephone + '\'' + 108 | ", email='" + email + '\'' + 109 | '}'; 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/entity/Book.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.entity; 2 | 3 | 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import fun.juhua.library_springboot.utils.DateUtils; 7 | 8 | import java.util.Date; 9 | 10 | /** 11 | * @program: library 12 | * @description: 书籍实体类 13 | * @author: 14 | * @create: 2021-10-25 10:57 15 | **/ 16 | public class Book { 17 | //书籍ID 18 | @TableId(type = IdType.INPUT) 19 | private String bookID; 20 | //书名 21 | private String bookName; 22 | //书籍作者 23 | private String bookAuthor; 24 | //出版社 25 | private String bookPublisher; 26 | //出版日期 27 | private Date publishTime; 28 | //单价 29 | private float bookPrice; 30 | //总数 31 | private int bookSum; 32 | //借出数量 33 | private int bookLend; 34 | //书籍类型 35 | private String tag; 36 | //ISBN编号 37 | private String isbn; 38 | 39 | public Book(String bookID, String bookName, String bookAuthor, String bookPublisher, Date publishTime, float bookPrice, int bookSum, int bookLend, String tag, String isbn) { 40 | this.bookID = bookID; 41 | this.bookName = bookName; 42 | this.bookAuthor = bookAuthor; 43 | this.bookPublisher = bookPublisher; 44 | this.publishTime = publishTime; 45 | this.bookPrice = bookPrice; 46 | this.bookSum = bookSum; 47 | this.bookLend = bookLend; 48 | this.tag = tag; 49 | this.isbn = isbn; 50 | } 51 | 52 | public Book(String bookID, String bookName, String bookAuthor, String bookPublisher, String publishTime, String bookPrice, String bookSum, String bookLend, String tag, String isbn) { 53 | this.bookID = bookID; 54 | this.bookName = bookName; 55 | this.bookAuthor = bookAuthor; 56 | this.bookPublisher = bookPublisher; 57 | // System.out.println("Book -> Book(57): " + publishTime); 58 | this.publishTime = new DateUtils().toDate(publishTime); 59 | this.bookPrice = Float.parseFloat(bookPrice); 60 | this.bookSum = Integer.parseInt(bookSum); 61 | this.bookLend = Integer.parseInt(bookLend); 62 | this.tag = tag; 63 | this.isbn = isbn; 64 | } 65 | 66 | public Book() { 67 | } 68 | 69 | @Override 70 | public String toString() { 71 | return "Book{" + 72 | "bookID='" + bookID + '\'' + 73 | ", bookName='" + bookName + '\'' + 74 | ", bookAuthor='" + bookAuthor + '\'' + 75 | ", bookPublisher='" + bookPublisher + '\'' + 76 | ", publishTime=" + publishTime + 77 | ", bookPrice=" + bookPrice + 78 | ", bookSum=" + bookSum + 79 | ", bookLend=" + bookLend + 80 | ", tag='" + tag + '\'' + 81 | ", isbn='" + isbn + '\'' + 82 | '}'; 83 | } 84 | 85 | public String getBookID() { 86 | return bookID; 87 | } 88 | 89 | public void setBookID(String bookID) { 90 | this.bookID = bookID; 91 | } 92 | 93 | public String getBookName() { 94 | return bookName; 95 | } 96 | 97 | public void setBookName(String bookName) { 98 | this.bookName = bookName; 99 | } 100 | 101 | public String getBookAuthor() { 102 | return bookAuthor; 103 | } 104 | 105 | public void setBookAuthor(String bookAuthor) { 106 | this.bookAuthor = bookAuthor; 107 | } 108 | 109 | public String getBookPublisher() { 110 | return bookPublisher; 111 | } 112 | 113 | public void setBookPublisher(String bookPublisher) { 114 | this.bookPublisher = bookPublisher; 115 | } 116 | 117 | public Date getPublishTime() { 118 | return publishTime; 119 | } 120 | 121 | public void setPublishTime(Date publishTime) { 122 | this.publishTime = publishTime; 123 | } 124 | 125 | public float getBookPrice() { 126 | return bookPrice; 127 | } 128 | 129 | public void setBookPrice(float bookPrice) { 130 | this.bookPrice = bookPrice; 131 | } 132 | 133 | public int getBookSum() { 134 | return bookSum; 135 | } 136 | 137 | public void setBookSum(int bookSum) { 138 | this.bookSum = bookSum; 139 | } 140 | 141 | public int getBookLend() { 142 | return bookLend; 143 | } 144 | 145 | public void setBookLend(int bookLend) { 146 | this.bookLend = bookLend; 147 | } 148 | 149 | public String getTag() { 150 | return tag; 151 | } 152 | 153 | public void setTag(String tag) { 154 | this.tag = tag; 155 | } 156 | 157 | public String getIsbn() { 158 | return isbn; 159 | } 160 | 161 | public void setIsbn(String isbn) { 162 | this.isbn = isbn; 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/entity/Borrow.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import fun.juhua.library_springboot.utils.DateUtils; 6 | 7 | import java.util.Date; 8 | 9 | /** 10 | * @program: library 11 | * @description: 借书记录实体类 12 | * @author: 13 | * @create: 2021-10-25 11:13 14 | **/ 15 | public class Borrow { 16 | //读者id 17 | @TableId(type = IdType.INPUT) 18 | private String readerID; 19 | //书籍id 20 | private String bookID; 21 | //借出时间 22 | private Date borrowTime; 23 | //归还时间 24 | private Date returnTime; 25 | 26 | public Borrow(String readerID, String bookID, Date borrowTime, Date returnTime) { 27 | this.readerID = readerID; 28 | this.bookID = bookID; 29 | this.borrowTime = borrowTime; 30 | this.returnTime = returnTime; 31 | } 32 | 33 | public Borrow(String readerID, String bookID, String borrowTime, Date returnTime) { 34 | this.readerID = readerID; 35 | this.bookID = bookID; 36 | this.borrowTime = new DateUtils().toDate(borrowTime); 37 | this.returnTime = returnTime; 38 | } 39 | 40 | public Borrow(String readerID, String bookID, String borrowTime) { 41 | this.readerID = readerID; 42 | this.bookID = bookID; 43 | this.borrowTime = new DateUtils().toDate(borrowTime); 44 | this.returnTime = null; 45 | } 46 | 47 | public Borrow(String readerID, String bookID, Date borrowTime) { 48 | this.readerID = readerID; 49 | this.bookID = bookID; 50 | this.borrowTime = borrowTime; 51 | this.returnTime = null; 52 | } 53 | 54 | public Borrow() { 55 | } 56 | 57 | @Override 58 | public String toString() { 59 | return "borrow{" + 60 | "readerID='" + readerID + '\'' + 61 | ", bookID='" + bookID + '\'' + 62 | ", borrowTime=" + borrowTime + 63 | ", returnTime=" + returnTime + 64 | '}'; 65 | } 66 | 67 | public String getReaderID() { 68 | return readerID; 69 | } 70 | 71 | public void setReaderID(String readerID) { 72 | this.readerID = readerID; 73 | } 74 | 75 | public String getBookID() { 76 | return bookID; 77 | } 78 | 79 | public void setBookID(String bookID) { 80 | this.bookID = bookID; 81 | } 82 | 83 | public Date getBorrowTime() { 84 | return borrowTime; 85 | } 86 | 87 | public void setBorrowTime(Date borrowTime) { 88 | this.borrowTime = borrowTime; 89 | } 90 | 91 | public Date getReturnTime() { 92 | return returnTime; 93 | } 94 | 95 | public void setReturnTime(Date returnTime) { 96 | this.returnTime = returnTime; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/entity/Reader.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | 6 | /** 7 | * @program: library 8 | * @description: 读者实体类 9 | * @author: 10 | * @create: 2021-10-25 11:11 11 | **/ 12 | public class Reader { 13 | //id 14 | @TableId(type = IdType.INPUT) 15 | private String id; 16 | //名 17 | private String name; 18 | //密 19 | private String password; 20 | //性 21 | private String gender; 22 | //电 23 | private String telephone; 24 | //邮 25 | private String email; 26 | 27 | public Reader(String id, String name, String password, String gender, String telephone, String email) { 28 | 29 | this.id = id; 30 | this.name = name; 31 | this.password = password; 32 | this.gender = gender; 33 | this.telephone = telephone; 34 | this.email = email; 35 | } 36 | 37 | public Reader() { 38 | } 39 | 40 | 41 | public String getId() { 42 | return id; 43 | } 44 | 45 | 46 | public void setId(String id) { 47 | this.id = id; 48 | } 49 | 50 | 51 | public String getName() { 52 | return name; 53 | } 54 | 55 | 56 | public void setName(String name) { 57 | this.name = name; 58 | } 59 | 60 | 61 | public String getPassword() { 62 | return password; 63 | } 64 | 65 | 66 | public void setPassword(String password) { 67 | this.password = password; 68 | } 69 | 70 | 71 | public String getGender() { 72 | return gender; 73 | } 74 | 75 | 76 | public void setGender(String gender) { 77 | this.gender = gender; 78 | } 79 | 80 | 81 | public String getTelephone() { 82 | return telephone; 83 | } 84 | 85 | 86 | public void setTelephone(String telephone) { 87 | this.telephone = telephone; 88 | } 89 | 90 | public String getEmail() { 91 | return email; 92 | } 93 | 94 | public void setEmail(String email) { 95 | this.email = email; 96 | } 97 | 98 | @Override 99 | public String toString() { 100 | return "Reader{" + 101 | "id='" + id + '\'' + 102 | ", name='" + name + '\'' + 103 | ", password='" + password + '\'' + 104 | ", gender='" + gender + '\'' + 105 | ", telephone='" + telephone + '\'' + 106 | ", email='" + email + '\'' + 107 | '}'; 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/interceptor/AdminInterceptor.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.interceptor; 2 | 3 | import org.springframework.web.servlet.HandlerInterceptor; 4 | import org.springframework.web.servlet.ModelAndView; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import javax.servlet.http.HttpSession; 9 | 10 | /** 11 | * 登录检查 12 | * 1.配置好拦截器要拦截哪些请求 13 | * 2.把这些配置放在容器中 14 | */ 15 | public class AdminInterceptor implements HandlerInterceptor { 16 | /** 17 | * 目标执行方法之前 18 | * 19 | * @param request 20 | * @param response 21 | * @param handler 22 | * @return 23 | * @throws Exception 24 | */ 25 | @Override 26 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 27 | HttpSession session = request.getSession(); 28 | Object user = session.getAttribute("user"); 29 | String role = (String) session.getAttribute("role"); 30 | if (user != null && role != null && role.equals("reader")) { 31 | //放行 32 | return true; 33 | } 34 | response.sendRedirect("/admin/"); 35 | return false; 36 | } 37 | 38 | /** 39 | * 目标执行方法完成以后 40 | * 41 | * @param request 42 | * @param response 43 | * @param handler 44 | * @param modelAndView 45 | * @throws Exception 46 | */ 47 | @Override 48 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { 49 | HandlerInterceptor.super.postHandle(request, response, handler, modelAndView); 50 | } 51 | 52 | /** 53 | * 页面渲染以后 54 | * 55 | * @param request 56 | * @param response 57 | * @param handler 58 | * @param ex 59 | * @throws Exception 60 | */ 61 | @Override 62 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { 63 | HandlerInterceptor.super.afterCompletion(request, response, handler, ex); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/interceptor/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.interceptor; 2 | 3 | import org.springframework.web.servlet.HandlerInterceptor; 4 | import org.springframework.web.servlet.ModelAndView; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import javax.servlet.http.HttpSession; 9 | 10 | /** 11 | * 登录检查 12 | * 1.配置好拦截器要拦截哪些请求 13 | * 2.把这些配置放在容器中 14 | */ 15 | public class LoginInterceptor implements HandlerInterceptor { 16 | /** 17 | * 目标执行方法之前 18 | * 19 | * @param request 20 | * @param response 21 | * @param handler 22 | * @return 23 | * @throws Exception 24 | */ 25 | @Override 26 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 27 | HttpSession session = request.getSession(); 28 | Object user = session.getAttribute("user"); 29 | String role = (String) session.getAttribute("role"); 30 | if (user != null) { 31 | //放行 32 | return true; 33 | } 34 | response.sendRedirect("/"); 35 | return false; 36 | } 37 | 38 | /** 39 | * 目标执行方法完成以后 40 | * 41 | * @param request 42 | * @param response 43 | * @param handler 44 | * @param modelAndView 45 | * @throws Exception 46 | */ 47 | @Override 48 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { 49 | HandlerInterceptor.super.postHandle(request, response, handler, modelAndView); 50 | } 51 | 52 | /** 53 | * 页面渲染以后 54 | * 55 | * @param request 56 | * @param response 57 | * @param handler 58 | * @param ex 59 | * @throws Exception 60 | */ 61 | @Override 62 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { 63 | HandlerInterceptor.super.afterCompletion(request, response, handler, ex); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/interceptor/ReaderInterceptor.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.interceptor; 2 | 3 | import org.springframework.web.servlet.HandlerInterceptor; 4 | import org.springframework.web.servlet.ModelAndView; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import javax.servlet.http.HttpSession; 9 | 10 | /** 11 | * 登录检查 12 | * 1.配置好拦截器要拦截哪些请求 13 | * 2.把这些配置放在容器中 14 | */ 15 | public class ReaderInterceptor implements HandlerInterceptor { 16 | /** 17 | * 目标执行方法之前 18 | * 19 | * @param request 20 | * @param response 21 | * @param handler 22 | * @return 23 | * @throws Exception 24 | */ 25 | @Override 26 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 27 | HttpSession session = request.getSession(); 28 | Object user = session.getAttribute("user"); 29 | String role = (String) session.getAttribute("role"); 30 | if (user != null && role != null && role.equals("admin")) { 31 | //放行 32 | return true; 33 | } 34 | response.sendRedirect("/reader/"); 35 | return false; 36 | } 37 | 38 | /** 39 | * 目标执行方法完成以后 40 | * 41 | * @param request 42 | * @param response 43 | * @param handler 44 | * @param modelAndView 45 | * @throws Exception 46 | */ 47 | @Override 48 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { 49 | HandlerInterceptor.super.postHandle(request, response, handler, modelAndView); 50 | } 51 | 52 | /** 53 | * 页面渲染以后 54 | * 55 | * @param request 56 | * @param response 57 | * @param handler 58 | * @param ex 59 | * @throws Exception 60 | */ 61 | @Override 62 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { 63 | HandlerInterceptor.super.afterCompletion(request, response, handler, ex); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/mapper/AdminMapper.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import fun.juhua.library_springboot.entity.Admin; 5 | import org.apache.ibatis.annotations.Select; 6 | import org.springframework.stereotype.Repository; 7 | 8 | import java.util.List; 9 | 10 | //在对应的Mapper.上面继承基本的类BaseMapper 11 | 12 | //@Repository 代表持久层 13 | @Repository 14 | public interface AdminMapper extends BaseMapper { 15 | // //增加管理员 16 | // 17 | // //删除管理员 18 | // 19 | // //通过id删除管理员 20 | // 21 | // //更新管理员信息 22 | // 23 | //查询管理员 24 | // 25 | //通过id查询管理员 26 | // 27 | //通过用户名查询管理员 28 | 29 | // //根据账密查询 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/mapper/BookMapper.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import fun.juhua.library_springboot.entity.Book; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface BookMapper extends BaseMapper { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/mapper/BorrowMapper.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import fun.juhua.library_springboot.entity.Borrow; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface BorrowMapper extends BaseMapper { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/mapper/ReaderMapper.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import fun.juhua.library_springboot.entity.Reader; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface ReaderMapper extends BaseMapper { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/service/AdminService.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.service; 2 | 3 | import fun.juhua.library_springboot.entity.Admin; 4 | 5 | import java.util.List; 6 | 7 | public interface AdminService { 8 | /** 9 | * 查询admin列表,如果有名,根据名模糊查询,否则返回全部admin用户 10 | * 11 | * @param name 12 | * @return List 13 | */ 14 | List getAdminList(String name); 15 | 16 | int deleteAdminById(String id); 17 | 18 | boolean login(String id, String password); 19 | 20 | Admin findAdmin(String id); 21 | 22 | int updateAdmin(Admin admin); 23 | 24 | int addAdmin(Admin admin); 25 | 26 | boolean haveAdmin(String id); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/service/BookService.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.service; 2 | 3 | import fun.juhua.library_springboot.entity.Book; 4 | 5 | import java.util.List; 6 | 7 | public interface BookService { 8 | List getBookList(String bookName, String bookID); 9 | 10 | Book findById(String bookID); 11 | 12 | int updateBook(Book book); 13 | 14 | int deleteBook(String bookID); 15 | 16 | int addBook(Book book); 17 | 18 | int returnBook(String bookID); 19 | 20 | int check(String bookID); 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/service/BorrowService.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.service; 2 | 3 | import fun.juhua.library_springboot.entity.Borrow; 4 | 5 | import java.util.List; 6 | 7 | public interface BorrowService { 8 | 9 | List getBorrowList(String bookID, String readerID, String isNull); 10 | 11 | int updateBorrow(Borrow borrow); 12 | 13 | int check(String readerID); 14 | 15 | int addBorrow(String readerID, String bookID, String borrowTime); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/service/Impl/AdminServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.service.Impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 4 | import fun.juhua.library_springboot.entity.Admin; 5 | import fun.juhua.library_springboot.mapper.AdminMapper; 6 | import fun.juhua.library_springboot.service.AdminService; 7 | import org.springframework.stereotype.Service; 8 | 9 | import javax.annotation.Resource; 10 | import java.util.List; 11 | 12 | @Service 13 | public class AdminServiceImpl implements AdminService { 14 | @Resource 15 | AdminMapper adminMapper; 16 | 17 | /** 18 | * 查询admin列表,如果有名,根据名模糊查询,否则返回全部admin用户 19 | * 20 | * @param name 21 | * @return List 22 | */ 23 | @Override 24 | public List getAdminList(String name) { 25 | //System.out.println("AdminService -> getAdminList(19): " + name); 26 | List adminList = null; 27 | if (name == null || name == "") { 28 | adminList = adminMapper.selectList(null); 29 | } else { 30 | QueryWrapper wrapper = new QueryWrapper<>(); 31 | adminList = adminMapper.selectList(wrapper.like("name", name)); 32 | } 33 | return adminList; 34 | } 35 | 36 | @Override 37 | public int deleteAdminById(String id) { 38 | return adminMapper.deleteById(id); 39 | } 40 | 41 | @Override 42 | public boolean login(String id, String password) { 43 | Admin admin = findAdmin(id); 44 | if (admin == null || !admin.getPassword().equals(password)) { 45 | return false; 46 | } 47 | return true; 48 | } 49 | 50 | @Override 51 | public Admin findAdmin(String id) { 52 | QueryWrapper wrapper = new QueryWrapper<>(); 53 | return adminMapper.selectOne(wrapper.eq("id", id)); 54 | } 55 | 56 | @Override 57 | public int updateAdmin(Admin admin) { 58 | return adminMapper.updateById(admin); 59 | } 60 | 61 | @Override 62 | public int addAdmin(Admin admin) { 63 | return adminMapper.insert(admin); 64 | } 65 | 66 | @Override 67 | public boolean haveAdmin(String id) { 68 | QueryWrapper wrapper = new QueryWrapper<>(); 69 | return adminMapper.selectOne(wrapper.eq("id", id)) != null; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/service/Impl/BookServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.service.Impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 4 | import fun.juhua.library_springboot.entity.Book; 5 | import fun.juhua.library_springboot.mapper.BookMapper; 6 | import fun.juhua.library_springboot.service.BookService; 7 | import org.springframework.stereotype.Service; 8 | 9 | import javax.annotation.Resource; 10 | import java.util.List; 11 | 12 | @Service 13 | public class BookServiceImpl implements BookService { 14 | @Resource 15 | BookMapper bookMapper; 16 | 17 | @Override 18 | public List getBookList(String bookName, String bookID) { 19 | List bookList = null; 20 | QueryWrapper wrapper = new QueryWrapper<>(); 21 | if ((bookName == null || bookName == "") && (bookID == null || bookID == "")) { 22 | bookList = bookMapper.selectList(null); 23 | } else if ((bookID == null || bookID == "")) { 24 | bookList = bookMapper.selectList(wrapper.like("bookName", bookName)); 25 | } else { 26 | bookList = bookMapper.selectList(wrapper.eq("bookID", bookID)); 27 | } 28 | return bookList; 29 | } 30 | 31 | @Override 32 | public Book findById(String bookID) { 33 | return bookMapper.selectById(bookID); 34 | } 35 | 36 | @Override 37 | public int updateBook(Book book) { 38 | if (book.getBookSum() < book.getBookLend()) { 39 | return 0; 40 | } 41 | return bookMapper.updateById(book); 42 | } 43 | 44 | @Override 45 | public int deleteBook(String bookID) { 46 | return bookMapper.deleteById(bookID); 47 | } 48 | 49 | @Override 50 | public int addBook(Book book) { 51 | return bookMapper.insert(book); 52 | } 53 | 54 | @Override 55 | public int returnBook(String bookID) { 56 | Book book = findById(bookID); 57 | //如果借出数量大于库存,已借数量小于等于0,返回不成功 58 | if (book.getBookSum() < book.getBookLend() || book.getBookLend() < 1) { 59 | return 0; 60 | } 61 | book.setBookLend(book.getBookLend() - 1); 62 | return bookMapper.updateById(book); 63 | } 64 | 65 | @Override 66 | public int check(String bookID) { 67 | Book book = findById(bookID); 68 | if (book == null || book.getBookSum() <= book.getBookLend()) { 69 | return 0; 70 | } 71 | return 1; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/service/Impl/BorrowServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.service.Impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 4 | import fun.juhua.library_springboot.entity.Borrow; 5 | import fun.juhua.library_springboot.mapper.BorrowMapper; 6 | import fun.juhua.library_springboot.service.BorrowService; 7 | import org.springframework.stereotype.Service; 8 | 9 | import javax.annotation.Resource; 10 | import java.util.List; 11 | 12 | @Service 13 | public class BorrowServiceImpl implements BorrowService { 14 | @Resource 15 | BorrowMapper borrowMapper; 16 | 17 | @Override 18 | public List getBorrowList(String bookID, String readerID, String isNull) { 19 | List borrowList = null; 20 | QueryWrapper wrapper = new QueryWrapper<>(); 21 | //当bookID和readerID都为空,说明显示全部 22 | if ((bookID == null || bookID == "") && (readerID == null || readerID == "")) { 23 | //如果isNull为T,查询未归还的书籍 24 | if ("T".equals(isNull)) { 25 | borrowList = borrowMapper.selectList(wrapper.isNull("returnTime")); 26 | } else { 27 | borrowList = borrowMapper.selectList(null); 28 | } 29 | } else if (bookID == null || bookID == "") { 30 | //readerID不为空,查询某人所有借阅记录 31 | //如果isNull为T,查询此人未归还的书籍 32 | if ("T".equals(isNull)) { 33 | borrowList = borrowMapper.selectList(wrapper.eq("readerID", readerID).isNull("returnTime")); 34 | } else { 35 | borrowList = borrowMapper.selectList(wrapper.eq("readerID", readerID)); 36 | } 37 | } else { 38 | //bookID不为空,查询某人所有借阅记录 39 | //如果isNull为T,查询此人未归还的书籍 40 | if ("T".equals(isNull)) { 41 | borrowList = borrowMapper.selectList(wrapper.eq("bookID", bookID).isNull("returnTime")); 42 | } else { 43 | borrowList = borrowMapper.selectList(wrapper.eq("bookID", bookID)); 44 | } 45 | } 46 | return borrowList; 47 | } 48 | 49 | @Override 50 | public int updateBorrow(Borrow borrow) { 51 | QueryWrapper wrapper = new QueryWrapper(); 52 | wrapper.eq("readerID", borrow.getReaderID()) 53 | .eq("bookID", borrow.getBookID()) 54 | .eq("borrowTime", borrow.getBorrowTime()); 55 | return borrowMapper.update(borrow, wrapper); 56 | } 57 | 58 | /** 59 | * 判断用户是否超过8本未还,未超过返回1 60 | * 61 | * @param readerID 62 | * @return 63 | */ 64 | @Override 65 | public int check(String readerID) { 66 | QueryWrapper wrapper = new QueryWrapper(); 67 | wrapper.eq("readerID", readerID).isNull("returnTime"); 68 | Long raw = borrowMapper.selectCount(wrapper); 69 | if (raw < 8) { 70 | return 1; 71 | } 72 | return 0; 73 | } 74 | 75 | @Override 76 | public int addBorrow(String readerID, String bookID, String borrowTime) { 77 | Borrow borrow = new Borrow(readerID, bookID, borrowTime); 78 | return borrowMapper.insert(borrow); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/service/Impl/ReaderServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.service.Impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 4 | import fun.juhua.library_springboot.entity.Reader; 5 | import fun.juhua.library_springboot.mapper.ReaderMapper; 6 | import fun.juhua.library_springboot.service.ReaderService; 7 | import org.springframework.stereotype.Service; 8 | 9 | import javax.annotation.Resource; 10 | import java.util.List; 11 | 12 | @Service 13 | public class ReaderServiceImpl implements ReaderService { 14 | @Resource 15 | ReaderMapper readerMapper; 16 | 17 | @Override 18 | public List getReaderList(String name, String id) { 19 | List readerList = null; 20 | QueryWrapper wrapper = new QueryWrapper<>(); 21 | if ((name == null || name == "") && (id == null || id == "")) { 22 | readerList = readerMapper.selectList(null); 23 | } else if ((id == null || id == "")) { 24 | readerList = readerMapper.selectList(wrapper.like("name", name)); 25 | } else { 26 | readerList = readerMapper.selectList(wrapper.eq("id", id)); 27 | } 28 | return readerList; 29 | } 30 | 31 | @Override 32 | public boolean login(String id, String password) { 33 | Reader reader = findReader(id); 34 | if (reader == null || !reader.getPassword().equals(password)) { 35 | return false; 36 | } 37 | return true; 38 | } 39 | 40 | @Override 41 | public Reader findReader(String id) { 42 | QueryWrapper wrapper = new QueryWrapper<>(); 43 | return readerMapper.selectOne(wrapper.eq("id", id)); 44 | } 45 | 46 | @Override 47 | public boolean haveReader(String id) { 48 | QueryWrapper wrapper = new QueryWrapper<>(); 49 | return readerMapper.selectOne(wrapper.eq("id", id)) != null; 50 | } 51 | 52 | @Override 53 | public int addReader(Reader reader) { 54 | return readerMapper.insert(reader); 55 | } 56 | 57 | @Override 58 | public int updateReader(Reader reader) { 59 | return readerMapper.updateById(reader); 60 | } 61 | 62 | @Override 63 | public int deleteAdminById(String id) { 64 | return readerMapper.deleteById(id); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/service/ReaderService.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.service; 2 | 3 | import fun.juhua.library_springboot.entity.Reader; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface ReaderService { 9 | List getReaderList(String name, String id); 10 | 11 | boolean login(String id, String password); 12 | 13 | Reader findReader(String id); 14 | 15 | boolean haveReader(String id); 16 | 17 | int addReader(Reader reader); 18 | 19 | int updateReader(Reader reader); 20 | 21 | int deleteAdminById(String id); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fun/juhua/library_springboot/utils/DateUtils.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot.utils; 2 | 3 | import java.sql.Timestamp; 4 | import java.text.ParsePosition; 5 | import java.text.SimpleDateFormat; 6 | import java.util.Date; 7 | import java.util.Locale; 8 | 9 | /** 10 | * @program: library 11 | * @description: 时间工具类,实现字符串转换成Date类型 12 | * @author: 13 | * @create: 2021-10-28 20:29 14 | **/ 15 | public class DateUtils { 16 | public Date toDate(String strDate) { 17 | strDate = strDate.replace("+", " "); 18 | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 19 | ParsePosition pos = new ParsePosition(0); 20 | Date date = formatter.parse(strDate, pos); 21 | return Timestamp.valueOf( 22 | new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.SIMPLIFIED_CHINESE).format(date) 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.url=jdbc:mysql://localhost:3306/library?useSSL=false&serverTimezone=Hongkong&characterEncoding=utf-8&autoReconnect=true 2 | spring.datasource.username=root 3 | spring.datasource.password=root 4 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 5 | spring.thymeleaf.cache=false 6 | # ???? 7 | mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl 8 | mybatis-plus.configuration.map-underscore-to-camel-case=false 9 | -------------------------------------------------------------------------------- /src/main/resources/static/css/error.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | color: #F1F1F1; 6 | } 7 | 8 | body{ 9 | font-family: Verdana, Geneva, Tahoma, sans-serif; 10 | background: rgb(238,174,202); 11 | background: radial-gradient(circle, rgba(238,174,202,1) 0%, rgba(148,187,233,1) 100%); 12 | } 13 | .container{ 14 | height : 100vh; 15 | width: 80vw; 16 | margin: 0 auto; 17 | display: flex; 18 | align-items: center; 19 | justify-content: center; 20 | flex-direction: column; 21 | text-align: center; 22 | } 23 | 24 | .container .num { 25 | font-size: 8rem; 26 | margin-bottom: 40px; 27 | } 28 | .container .stg { 29 | font-size: 3rem; 30 | margin-bottom: 40px; 31 | display: none; 32 | animation: .7s ease-in-out show; 33 | } 34 | 35 | @keyframes show { 36 | 0%{ 37 | opacity : 0; 38 | }100%{ 39 | opacity: 1; 40 | } 41 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; 3 | src: url('../fonts/iconfont.eot'); 4 | src: url('../fonts/iconfont.eot?#iefix') format('embedded-opentype'), 5 | url('../fonts/iconfont.woff') format('woff'), 6 | url('../fonts/iconfont.ttf') format('truetype'), 7 | url('../fonts/iconfont.svg#iconfont') format('svg'); 8 | } 9 | .iconfont{ 10 | font-family:"iconfont" !important; 11 | font-size:16px;font-style:normal; 12 | -webkit-font-smoothing: antialiased; 13 | -webkit-text-stroke-width: 0.2px; 14 | -moz-osx-font-smoothing: grayscale; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/static/css/login.css: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: xuebingsi 3 | * @Date: 2019-04-01 13:37:17 4 | * @Last Modified by: zhibinm 5 | * @Last Modified time: 2019-04-01 13:37:19 6 | */ 7 | .login-bg{ 8 | /*background: #eeeeee url() 0 0 no-repeat;*/ 9 | background:url(../images/loginBackground.jpg) no-repeat center; 10 | background-size: cover; 11 | overflow: hidden; 12 | } 13 | .login{ 14 | margin: 120px auto 0 auto; 15 | min-height: 420px; 16 | max-width: 420px; 17 | padding: 40px; 18 | background-color: #ffffff; 19 | margin-left: auto; 20 | margin-right: auto; 21 | border-radius: 4px; 22 | /* overflow-x: hidden; */ 23 | box-sizing: border-box; 24 | } 25 | .login a.logo{ 26 | display: block; 27 | height: 58px; 28 | width: 167px; 29 | margin: 0 auto 30px auto; 30 | background-size: 167px 42px; 31 | } 32 | .login .message { 33 | margin: 10px 0 0 -58px; 34 | padding: 18px 10px 18px 60px; 35 | background: #189F92; 36 | position: relative; 37 | color: #fff; 38 | font-size: 16px; 39 | } 40 | .login #darkbannerwrap { 41 | background: url(../images/aiwrap.png); 42 | width: 18px; 43 | height: 10px; 44 | margin: 0 0 20px -58px; 45 | position: relative; 46 | } 47 | 48 | .login input[type=text], 49 | .login input[type=file], 50 | .login input[type=password], 51 | .login input[type=email], select { 52 | border: 1px solid #DCDEE0; 53 | vertical-align: middle; 54 | border-radius: 3px; 55 | height: 50px; 56 | padding: 0px 16px; 57 | font-size: 14px; 58 | color: #555555; 59 | outline:none; 60 | width:100%; 61 | box-sizing: border-box; 62 | } 63 | .login input[type=text]:focus, 64 | .login input[type=file]:focus, 65 | .login input[type=password]:focus, 66 | .login input[type=email]:focus, select:focus { 67 | border: 1px solid #27A9E3; 68 | } 69 | .login input[type=submit], 70 | .login input[type=button]{ 71 | display: inline-block; 72 | vertical-align: middle; 73 | padding: 12px 24px; 74 | margin: 0px; 75 | font-size: 18px; 76 | line-height: 24px; 77 | text-align: center; 78 | white-space: nowrap; 79 | vertical-align: middle; 80 | cursor: pointer; 81 | color: #ffffff; 82 | background-color: #189F92; 83 | border-radius: 3px; 84 | border: none; 85 | -webkit-appearance: none; 86 | outline:none; 87 | width:100%; 88 | } 89 | .login hr { 90 | background: #fff 0 0 no-repeat; 91 | } 92 | .login hr.hr15 { 93 | height: 15px; 94 | border: none; 95 | margin: 0px; 96 | padding: 0px; 97 | width: 100%; 98 | } 99 | .login hr.hr20 { 100 | height: 20px; 101 | border: none; 102 | margin: 0px; 103 | padding: 0px; 104 | width: 100%; 105 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/theme1.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background:#F2F1F2; 3 | } 4 | .container{ 5 | background:#1A1B20; 6 | } 7 | .left-nav{ 8 | background:#1A1B20; 9 | } 10 | 11 | .left-nav a{ 12 | color:rgba(255,255,255,.7); 13 | } 14 | .left-nav a.active{ 15 | background: #009688 !important; 16 | color: #fff; 17 | } 18 | .left-nav a:hover{ 19 | background: #009688 !important; 20 | color: #fff; 21 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/theme2.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background:#EEF5F9; 3 | } 4 | .container{ 5 | background:#323640; 6 | } 7 | .left-nav{ 8 | background:#fff; 9 | } 10 | 11 | .left-nav a{ 12 | color:#686a76; 13 | } 14 | .left-nav a.active{ 15 | background: #786AED !important; 16 | color: #fff; 17 | } 18 | .left-nav a:hover{ 19 | background: #786AED !important; 20 | color: #fff; 21 | } 22 | -------------------------------------------------------------------------------- /src/main/resources/static/css/theme3.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background:#E8E8E8; 3 | } 4 | .container{ 5 | background:#F34743; 6 | } 7 | 8 | .left-nav{ 9 | background:#F4F4F4; 10 | } 11 | 12 | .left-nav a{ 13 | color:#686a76; 14 | } 15 | .left-nav a.active{ 16 | background: #FEFEFE !important; 17 | color: #F34743; 18 | } 19 | .left-nav a:hover{ 20 | background: #FEFEFE !important; 21 | color: #F34743; 22 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/theme4.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background:#E4E4E4; 3 | } 4 | .container{ 5 | background:#019587; 6 | } 7 | .left-nav{ 8 | background:#263035; 9 | } 10 | 11 | .left-nav a{ 12 | color:#fff; 13 | } 14 | .left-nav a.active{ 15 | background: #212525 !important; 16 | color: #fff !important; 17 | } 18 | .left-nav a:hover{ 19 | background: #212525 !important; 20 | color: #fff !important; 21 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/theme5.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background:#EEF5F9 !important; 3 | } 4 | .container{ 5 | background:linear-gradient(to left, #7b4397, #2196f3); 6 | } 7 | 8 | .left-nav{ 9 | background:#fff !important; 10 | } 11 | 12 | .left-nav a{ 13 | color:#686a76 !important; 14 | } 15 | .left-nav a.active{ 16 | background: linear-gradient(to left, #7c8ce4, #2196f3) !important; 17 | color: #fff !important; 18 | border-color: #7b4397 !important; 19 | } 20 | .left-nav a:hover{ 21 | background: linear-gradient(to left, #7c8ce4, #2196f3) !important; 22 | color: #fff !important; 23 | border-color: #7b4397 !important; 24 | } 25 | .container .logo a{ 26 | background: rgba(0,0,0,0) !important; 27 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/welcome.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: url("../images/bg.png"); 3 | background-repeat: no-repeat; 4 | -moz-background-size: 100% 100%; 5 | background-size: cover; 6 | } -------------------------------------------------------------------------------- /src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/static/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/fonts/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/fonts/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/fonts/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/images/aiwrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/images/aiwrap.png -------------------------------------------------------------------------------- /src/main/resources/static/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/images/bg.png -------------------------------------------------------------------------------- /src/main/resources/static/images/loginBackground.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/images/loginBackground.jpg -------------------------------------------------------------------------------- /src/main/resources/static/js/404.js: -------------------------------------------------------------------------------- 1 | // Declare the Elements 2 | const dispNum = document.querySelector(".display .num"); 3 | const dispErr = document.querySelector(".container .stg"); 4 | 5 | 6 | window.onload = function () { 7 | 8 | function showNum() { 9 | const randomNum = Math.floor(Math.random() * 1000); 10 | const randomStr = randomNum.toString() 11 | dispNum.textContent = randomStr 12 | } 13 | 14 | var interval = setInterval(showNum, 100); 15 | 16 | setTimeout(() => { 17 | clearInterval(interval); 18 | dispNum.textContent = "404"; 19 | dispErr.style.display = "block"; 20 | dispErr.textContent = "呀!这个页面走丢了" 21 | }, 500); 22 | } -------------------------------------------------------------------------------- /src/main/resources/static/js/500.js: -------------------------------------------------------------------------------- 1 | // Declare the Elements 2 | const dispNum = document.querySelector(".display .num"); 3 | const dispErr = document.querySelector(".container .stg"); 4 | 5 | 6 | window.onload = function () { 7 | 8 | function showNum() { 9 | const randomNum = Math.floor(Math.random() * 1000); 10 | const randomStr = randomNum.toString() 11 | dispNum.textContent = randomStr 12 | } 13 | 14 | var interval = setInterval(showNum, 100); 15 | 16 | setTimeout(() => { 17 | clearInterval(interval); 18 | dispNum.textContent = "500"; 19 | dispErr.style.display = "block"; 20 | dispErr.textContent = "呀!服务器发生了错误!" 21 | }, 500); 22 | } -------------------------------------------------------------------------------- /src/main/resources/static/lib/dist/sliderVerify/sliderVerify.js: -------------------------------------------------------------------------------- 1 | layui.define(["jquery","layer","form"],function(s){var d=layui.jquery,b=layui.form,r=layui.layer,k=layui.device(),h={read:(function(){var u=".slider-item{height:38px;line-height:38px;background-color:#d0d0d0;position:relative;border: 1px solid white;}.slider-bg{position:absolute;width:40px;height:100%;z-index:100}.slider-btn{width:40px;height:96%;position:absolute;border:1px solid #ccc;cursor:move;text-align:center;background-color:#fff;user-select:none;color:#666;z-index:120}.slider-btn-success{font-size:26px}.slider-text{position:absolute;text-align:center;width:100%;height:100%;user-select:none;font-size:14px;color:#fff;z-index:120}.slider-error{animation:glow 800ms ease-out infinite alternate;}@keyframes glow{0%{border-color:#e6e6e6}100%{border-color:#ff5722}}",v=document.createElement("style");v.innerHTML=u;v.type="text/css";(d("head link:last")[0]&&d("head link:last").after(v))||d("head").append(v)})()},m=function(u){return u[0]},o=function(){var u=this;return{isOk:function(){return u.isOk.call(u)},reset:function(){return u.reset.call(u)},version:"1.7.1"}},g="sliderVerify",i="slider-btn",j="slider-bg",q="slider-text",a="layui-icon-next",t="layui-icon-ok-circle",f="slider-btn-success",n="layui-bg-green",c="slider-error",p="请拖动滑块验证",e="验证通过",l=function(u){var v=this;v.config=d.extend({},v.config,u);v.render()};l.prototype.config={elem:"",onOk:null,isOk:false,isAutoVerify:true,timer:null,bg:n,text:p};l.prototype.render=function(){var w=this,u=w.config,v=d(u.elem);if(!v[0]){return}if(u.domid){u.domid.remove()}u.domid=w.createIdNum();var x=d(['
','
','
'+u.text+"
",'
'].join(""));v.hide().after(x);u.domid=d("#"+u.domid);w.events();if(u.isAutoVerify){b.verify({sliderVerify:function(y,z){if(!y){z.classList.add(c);return u.text}}})}};l.prototype.isMobile=function(){return(k.os=="ios"||k.os=="android"||k.android||k.ios)||(k.weixin&&typeof k.weixin===Boolean)};l.prototype.createIdNum=function(){return(g+(+new Date()).toString()+Math.random().toString().substr(2,7))};l.prototype.isOk=function(){return this.config.isOk};l.prototype.error=function(u){return r.msg(u,{icon:5})};l.prototype.distance=function(){var u=this.config.container;return u.box.offsetWidth-u.btn.offsetWidth};l.prototype.reset=function(){this.config.isOk=false;return this.render()};l.prototype.resize=function(w){var v=this,u=v.config.container;var w=w||v.distance();u.btn.style.left=w+"px";u.bg.style.width=w+"px"};l.prototype.cancelTransition=function(){var u=this.config.container;this.config.domid[0].classList.remove(c);u.btn.style.transition="";u.bg.style.transition=""};l.prototype.down=function(y){var x=this,w=x.config,v=w.container,y=y||window.event,z=y.clientX||y.touches[0].clientX;x.cancelTransition();var u=function(A){x.move(z,A)};x.events.move=u;if(x.isMobile()){document.addEventListener("touchmove",x.events.move)}else{document.onmousemove=u}if(navigator.userAgent.indexOf("UCBrowser")>-1){y.preventDefault()}};l.prototype.move=function(C,B){var A=this,y=A.config,u=y.container;var B=B||window.event;var w=B.clientX||B.touches[0].clientX;var z=w-C;if(z>u.distance){z=u.distance}else{if(z<0){z=0}}u.btn.style.left=z+"px";u.bg.style.width=z+"px";if(z==u.distance){u.text.innerHTML=e;var v=window.getComputedStyle?window.getComputedStyle(u.bg,null):u.bg.currentStyle;u.btn.style.border="1px solid "+v.backgroundColor;u.btn.style.color=v.backgroundColor;u.btn.classList.remove(a);u.btn.classList.add(t,f);y.isOk=true;u.box.value=true;if(A.isMobile()){u.btn.removeEventListener("touchstart",A.events.down,false);document.removeEventListener("touchmove",A.events.move,false)}else{u.btn.onmousedown=null;document.onmousemove=null}y.onOk&&typeof y.onOk=="function"&&y.onOk();return}var x=function(D){A.stop(D)};A.events.seup=x;if(A.isMobile()){document.addEventListener("touchend",x)}else{document.onmouseup=x}};l.prototype.stop=function(x){var w=this,v=w.config,u=v.container;if(w.isOk()){return}else{u.btn.style.left=0;u.bg.style.width=0;u.btn.style.transition="left 1s";u.bg.style.transition="width 1s"}document.onmousemove=null;document.onmouseup=null;if(w.isMobile()){document.removeEventListener("touchmove",w.events.move,false);document.removeEventListener("touchend",w.events.seup,false)}};l.prototype.events=function(){var z=this,y=z.config;if(!y.domid){return z.error("创建滑块验证失败")}var x=y.domid.find("."+i),w=y.domid.find("."+j),A=y.domid.find("."+q),v={box:m(y.domid),btn:m(x),bg:m(w),text:m(A)};y.container=v;v.distance=z.distance();var B=function(C){z.down(C)};z.events.down=B;if(z.isMobile()){v.btn.addEventListener("touchstart",z.events.down)}else{v.btn.onmousedown=B}var u=d(window);u.on("resize",y.domid,function(){if(z.config.isOk){z.resize()}else{clearTimeout(y.timer);y.timer=setTimeout(function(){z.render()},400)}})};h.render=function(u){var v=new l(u);return o.call(v)};s(g,h)}); -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/css/modules/laydate/default/laydate.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | .laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px} -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/0.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/1.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/10.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/11.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/12.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/13.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/14.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/15.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/16.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/17.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/18.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/19.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/2.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/20.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/21.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/22.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/23.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/24.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/25.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/26.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/27.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/28.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/29.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/3.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/30.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/31.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/32.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/33.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/34.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/35.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/36.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/37.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/38.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/39.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/4.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/40.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/41.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/42.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/43.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/44.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/45.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/46.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/47.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/48.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/49.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/5.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/50.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/51.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/52.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/53.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/54.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/55.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/56.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/57.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/58.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/59.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/6.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/60.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/61.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/62.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/63.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/64.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/65.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/66.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/67.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/68.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/69.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/7.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/70.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/71.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/8.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ifwlzs/library_springboot/af6c5ae44bfc87f9a5452d2a312f1930f67aef80/src/main/resources/static/lib/layui/images/face/9.gif -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
    ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/lay/modules/element.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
  • "+(i.title||"unnaming")+"
  • ";return s[0]?s.before(r):n.append(r),o.append('
    '+(i.content||"")+"
    "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)}); -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
    ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
    "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
      ",u=1;u<=i.length;u++){var r='
    • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
    • ":n+=r}n+="
    "+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/lay/modules/slider.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
    '+(t.tips?'
    ':"")+'
    '+(t.range?'
    ':"")+"
    ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x
    ')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
    ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
    f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)}); -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
      '),s=o(["
    • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
    • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
      '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/lay/modules/upload.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap('
      '),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i(''),a=i(['
      ',"
      "].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(c)||(e.elemFile.wrap(a),t.elem.next("."+c).append(function(){var e=[];return layui.each(t.data,function(i,t){t="function"==typeof t?t():t,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){i="function"==typeof i?i():i,r.append(e,i)}),i.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files},resetFile:function(e,i,t){var n=new File([i],t);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==t&&!l.auto||(l.choose&&l.choose(g),"choose"!==t))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?t.toFixed(2)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after(''+o+"")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)}); -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
        ',t.bar1?'
      • '+c[0]+"
      • ":"",t.bar2?'
      • '+c[1]+"
      • ":"",'
      • '+c[2]+"
      • ","
      "].join("")),s=g.find("."+r),u=function(){var e=o.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+n)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),a=i.attr("lay-type");"top"===a&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,a)}),o.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var a=this,n="function"==typeof e,r=new Date(t).getTime(),o=new Date(!e||n?(new Date).getTime():e).getTime(),l=r-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];n&&(i=e);var g=setTimeout(function(){a.countdown(t,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,a=[[],[]],n=(new Date).getTime()-new Date(t).getTime();return n>6912e5?(n=new Date(t),a[0][0]=i.digit(n.getFullYear(),4),a[0][1]=i.digit(n.getMonth()+1),a[0][2]=i.digit(n.getDate()),e||(a[1][0]=i.digit(n.getHours()),a[1][1]=i.digit(n.getMinutes()),a[1][2]=i.digit(n.getSeconds())),a[0].join("-")+" "+a[1].join(":")):n>=864e5?(n/1e3/60/60/24|0)+"天前":n>=36e5?(n/1e3/60/60|0)+"小时前":n>=12e4?(n/1e3/60|0)+"分钟前":n<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var a=t.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};!function(t,e,i){"$:nomunge";function a(){n=e[l](function(){r.each(function(){var e=t(this),i=e.width(),a=e.height(),n=t.data(this,g);(i!==n.w||a!==n.h)&&e.trigger(c,[n.w=i,n.h=a])}),a()},o[s])}var n,r=t([]),o=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";o[s]=250,o[u]=!0,t.event.special[c]={setup:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===r.length&&a()},teardown:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.not(e),e.removeData(g),r.length||clearTimeout(n)},add:function(e){function a(e,a,r){var o=t(this),l=t.data(this,g)||{};l.w=a!==i?a:o.width(),l.h=r!==i?r:o.height(),n.apply(this,arguments)}if(!o[u]&&this[l])return!1;var n;return t.isFunction(e)?(n=e,a):(n=e.handler,void(e.handler=a))}}}(e,window),t("util",i)}); -------------------------------------------------------------------------------- /src/main/resources/static/lib/layui/layui.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.4.5"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:r','
      ','
      '+u.text+"
      ",'
      '].join(""));v.hide().after(x);u.domid=d("#"+u.domid);w.events();if(u.isAutoVerify){b.verify({sliderVerify:function(y,z){if(!y){z.classList.add(c);return u.text}}})}};l.prototype.isMobile=function(){return(k.os=="ios"||k.os=="android"||k.android||k.ios)||(k.weixin&&typeof k.weixin===Boolean)};l.prototype.createIdNum=function(){return(g+(+new Date()).toString()+Math.random().toString().substr(2,7))};l.prototype.isOk=function(){return this.config.isOk};l.prototype.error=function(u){return r.msg(u,{icon:5})};l.prototype.distance=function(){var u=this.config.container;return u.box.offsetWidth-u.btn.offsetWidth};l.prototype.reset=function(){this.config.isOk=false;return this.render()};l.prototype.resize=function(w){var v=this,u=v.config.container;var w=w||v.distance();u.btn.style.left=w+"px";u.bg.style.width=w+"px"};l.prototype.cancelTransition=function(){var u=this.config.container;this.config.domid[0].classList.remove(c);u.btn.style.transition="";u.bg.style.transition=""};l.prototype.down=function(y){var x=this,w=x.config,v=w.container,y=y||window.event,z=y.clientX||y.touches[0].clientX;x.cancelTransition();var u=function(A){x.move(z,A)};x.events.move=u;if(x.isMobile()){document.addEventListener("touchmove",x.events.move)}else{document.onmousemove=u}if(navigator.userAgent.indexOf("UCBrowser")>-1){y.preventDefault()}};l.prototype.move=function(C,B){var A=this,y=A.config,u=y.container;var B=B||window.event;var w=B.clientX||B.touches[0].clientX;var z=w-C;if(z>u.distance){z=u.distance}else{if(z<0){z=0}}u.btn.style.left=z+"px";u.bg.style.width=z+"px";if(z==u.distance){u.text.innerHTML=e;var v=window.getComputedStyle?window.getComputedStyle(u.bg,null):u.bg.currentStyle;u.btn.style.border="1px solid "+v.backgroundColor;u.btn.style.color=v.backgroundColor;u.btn.classList.remove(a);u.btn.classList.add(t,f);y.isOk=true;u.box.value=true;if(A.isMobile()){u.btn.removeEventListener("touchstart",A.events.down,false);document.removeEventListener("touchmove",A.events.move,false)}else{u.btn.onmousedown=null;document.onmousemove=null}y.onOk&&typeof y.onOk=="function"&&y.onOk();return}var x=function(D){A.stop(D)};A.events.seup=x;if(A.isMobile()){document.addEventListener("touchend",x)}else{document.onmouseup=x}};l.prototype.stop=function(x){var w=this,v=w.config,u=v.container;if(w.isOk()){return}else{u.btn.style.left=0;u.bg.style.width=0;u.btn.style.transition="left 1s";u.bg.style.transition="width 1s"}document.onmousemove=null;document.onmouseup=null;if(w.isMobile()){document.removeEventListener("touchmove",w.events.move,false);document.removeEventListener("touchend",w.events.seup,false)}};l.prototype.events=function(){var z=this,y=z.config;if(!y.domid){return z.error("创建滑块验证失败")}var x=y.domid.find("."+i),w=y.domid.find("."+j),A=y.domid.find("."+q),v={box:m(y.domid),btn:m(x),bg:m(w),text:m(A)};y.container=v;v.distance=z.distance();var B=function(C){z.down(C)};z.events.down=B;if(z.isMobile()){v.btn.addEventListener("touchstart",z.events.down)}else{v.btn.onmousedown=B}var u=d(window);u.on("resize",y.domid,function(){if(z.config.isOk){z.resize()}else{clearTimeout(y.timer);y.timer=setTimeout(function(){z.render()},400)}})};h.render=function(u){var v=new l(u);return o.call(v)};s(g,h)}); -------------------------------------------------------------------------------- /src/main/resources/templates/admin/addBorrow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 借书登记 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 |
      21 |
      22 |
      23 |
      24 | 26 |
      27 | 33 |
      34 |
      35 |
      36 | 38 |
      39 | 44 |
      45 |
      46 |
      47 | 49 |
      50 |
      53 |
      54 |
      55 |
      56 | 57 |
      58 | 59 | 60 |
      61 |
      62 |
      63 |
      64 | 77 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/adminList.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 管理员列表 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | 24 |
      25 |
      26 |
      27 |
      28 |
      29 | 32 |
      33 |
      34 |
      35 | 36 |
      37 |
      38 | 40 |
      41 |
      42 |
      43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
      59 |
      60 | 61 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 80 | 81 | 82 | 83 |
      序号选择用户ID用户名密码性别手机邮箱操作
      62 | 63 | 71 | 74 | 75 | 76 | 77 | 78 | 79 |
      84 |
      85 |
      86 |
      87 |
      88 | 89 | 1 90 | 91 |
      92 |
      93 |
      94 |
      95 |
      96 |
      97 |
      98 | 99 | 166 | 167 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 图书馆管理系统 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 27 | 28 | 29 | 30 |
      31 | 33 |
      34 | 35 |
      36 | 58 |
      59 | 60 | 61 | 62 |
      63 |
      64 | 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 |
      137 |
      138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /src/main/resources/templates/error/404.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 该页面不存在 7 | 8 | 9 | 10 | 11 | 12 | 13 |
      14 |
      15 |

      16 |

      17 |
      18 |
      19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/resources/templates/error/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 服务器错误 6 | 7 | 8 | 9 | 10 | 11 | 12 |
      13 |
      14 |

      15 |

      16 |
      17 |
      18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 图书馆管理系统 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/resources/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 登录-图书馆管理系统 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 25 | 26 | 27 | 50 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/resources/templates/reader/bookList.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 书籍列表 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | 24 |
      25 |
      26 |
      27 |
      28 |
      29 |
      30 | 31 |
      32 |
      33 | 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 | 86 | 87 | 88 |
      序号书籍ID书名作者出版社出版日期单价剩余库存分类ISBN号操作
      68 | 72 | 去借阅 73 | 74 | 78 | 去借阅 79 | 80 | 83 | 去借阅 84 | 85 |
      89 |
      90 |
      91 |
      92 |
      93 | 94 | 1 95 | 96 |
      97 |
      98 |
      99 |
      100 |
      101 |
      102 |
      103 | 104 | 148 | 149 | -------------------------------------------------------------------------------- /src/main/resources/templates/reader/borrowList.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 借阅信息 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | 24 |
      25 |
      26 |
      27 |
      28 |
      29 | 30 | 31 |
      32 | 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 | 65 | 66 | 67 | 78 | 79 | 80 |
      序号用户ID姓名书籍ID借阅时间归还时间操作
      59 | 62 | 书籍详情 63 | 64 | 68 | 归还书籍 72 | 73 | 已归还 76 | 77 |
      81 |
      82 |
      83 |
      84 |
      85 | 86 | 1 87 | 88 |
      89 |
      90 |
      91 |
      92 |
      93 |
      94 |
      95 | 96 | 124 | 125 | -------------------------------------------------------------------------------- /src/main/resources/templates/reader/index.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 图书馆管理系统 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 26 | 27 | 28 | 29 |
      30 | 32 |
      33 | 34 |
      35 | 56 |
      57 | 58 | 59 | 60 |
      61 |
      62 | 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 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /src/main/resources/templates/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 欢迎界面 7 | 8 | 9 | 10 |
      欢迎使用图书馆管理系统
      11 | 12 | -------------------------------------------------------------------------------- /src/test/java/fun/juhua/library_springboot/LibrarySpringbootApplicationTests.java: -------------------------------------------------------------------------------- 1 | package fun.juhua.library_springboot; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 4 | import fun.juhua.library_springboot.entity.Reader; 5 | import fun.juhua.library_springboot.mapper.ReaderMapper; 6 | import org.junit.jupiter.api.Test; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | 9 | import javax.annotation.Resource; 10 | import java.util.HashMap; 11 | import java.util.Map; 12 | 13 | @SpringBootTest 14 | class LibrarySpringbootApplicationTests { 15 | @Resource 16 | ReaderMapper readerMapper; 17 | 18 | @Test 19 | public void login() { 20 | String id = "r001"; 21 | String password = "r0012"; 22 | QueryWrapper wrapper = new QueryWrapper<>(); 23 | Reader reader = readerMapper.selectOne(wrapper.eq("id", id)); 24 | Map map = new HashMap<>(); 25 | if (reader == null || !reader.getPassword().equals(password)) { 26 | System.out.println("false"); 27 | } else { 28 | System.out.println("true"); 29 | } 30 | } 31 | 32 | } 33 | --------------------------------------------------------------------------------