Skip to content

Commit

Permalink
V1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghuanhao committed Jan 19, 2019
1 parent 63b361b commit 1a2d466
Show file tree
Hide file tree
Showing 23 changed files with 128 additions and 2 deletions.
120 changes: 119 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,119 @@
# LibrarySystem
# 图书馆管理系统

### 概述
基于Maven + Spring MVC + MySql5.7 的图书馆管理系统,对刚学习Spring MVC的人来说容易上手。主要功能包括:图书查询、图书管理、图书编辑、读者管理、图书的借阅与归还以及借还日志记录等。

### 环境配置
#### 开发环境:Windows 10,IntelliJ IDEA 2018.3
#### 运行配置
1. 首先安装Mysql5.7,设置用户名为root,密码为123456,并保证其在运行状态,并执行library.sql文件导入数据。
2. 然后再配置Maven到环境变量中,在源代码目录下运行
```sh
# mvn jetty:run
```
3. 使用浏览器访问http://localhost:8080即可进入系统。

### 概念设计
用户分为两类:读者、图书馆管理员。图书馆管理员可以修改读者信息,修改书目信息,查看所有借还日志等;读者仅可以修改个人信息、借阅或归还书籍和查看自己的借还日志。
<img src="./preview/1.png" style="width: 50%"><img src="./preview/2.png" style="width: 50%;float: right">

#### 数据库E-R图
<img src="./preview/3.png">

### 逻辑设计
共有6个表:

#### 1. 图书书目表book_info
|| 类型 | 长度 | 小数点 | NULL | 用途 ||
| :----------- | :------ | ---- | ------ | ---- | -------- | ---- |
| book_id | bigint | 20 | 0 || 图书号 ||
| name | varchar | 20 | 0 || 书名 | |
| author | varchar | 15 | 0 || 作者 | |
| publish | varchar | 20 | 0 || 出版社 | |
| ISBN | varchar | 15 | 0 || 标准书号 | |
| introduction | text | 0 | 0 || 简介 | |
| language | varchar | 4 | 0 || 语言 | |
| price | decimal | 10 | 2 || 价格 | |
| pub_date | date | 0 | 0 || 出版时间 | |
| class_id | int | 11 | 0 || 分类号 | |
| number | int | 11 | 0 || 剩余数量 | |

#### 2. 数据库管理员表admin
|| 类型 | 长度 | 小数点 | NULL | 用途 ||
| :------- | :------ | ---- | ------ | ---- | ------ | ---- |
| admin_id | bigint | 20 | 0 || 账号 ||
| password | varchar | 15 | 0 || 密码 | |
| username | varchar | 15 | 0 || 用户名 | |

#### 3. 图书分类表class_info
|| 类型 | 长度 | 小数点 | NULL | 用途 ||
| :--------- | :------ | ---- | ------ | ---- | ------ | ---- |
| class_id | int | 11 | 0 || 类别号 ||
| class_name | varchar | 15 | 0 || 类别名 | |

#### 4. 借阅信息表lend_list
|| 类型 | 长度 | 小数点 | NULL | 用途 ||
| :-------- | :----- | ---- | ------ | ---- | -------- | ---- |
| ser_num | bigint | 20 | 0 || 流水号 ||
| book_id | bigint | 20 | 0 || 图书号 | |
| reader_id | bigint | 20 | 0 || 读者证号 | |
| lend_date | date | 0 | 0 || 借出日期 | |
| back_date | date | 0 | 0 || 归还日期 | |

#### 5. 借阅卡信息表reader_card
|| 类型 | 长度 | 小数点 | NULL | 用途 ||
| :-------- | :------ | ---- | ------ | ---- | -------- | ---- |
| reader_id | bigint | 20 | 0 || 读者证号 ||
| password | varchar | 15 | 0 || 密码 | |
| username | varchar | 15 | 0 || 用户名 | |

#### 6. 读者信息表reader_info
|| 类型 | 长度 | 小数点 | NULL | 用途 ||
| :-------- | :------ | ---- | ------ | ---- | -------- | ---- |
| reader_id | bigint | 20 | 0 || 读者证号 ||
| name | varchar | 10 | 0 || 姓名 | |
| sex | varchar | 2 | 0 || 性别 | |
| birth | date | 0 | 0 || 生日 | |
| address | varchar | 50 | 0 || 地址 | |
| phone | varchar | 15 | 0 || 电话 | |

### 功能展示
#### 1. 登陆系统
<img src="./preview/5.png">

#### 2. 管理员系统
用管理者账号(123456/123456)登陆进入管理者系统
<img src="./preview/6.png">

##### 2.1 图书管理
* 查看全部图书
<img src="./preview/7.png">
* 图书详情:
<img src="./preview/8.png">
* 图书编辑:
<img src="./preview/9.png">
* 添加新图书:
<img src="./preview/10.png">
##### 2.2 读者管理
* 查看全部读者:
<img src="./preview/11.png">
* 编辑读者:
<img src="./preview/12.png">
* 添加新读者:
<img src="./preview/13.png">
##### 2.3 借还管理
借还日志,未归还图书的日志无法删除。
<img src="./preview/14.png">
##### 2.4 修改密码
<img src="./preview/15.png">
#### 3. 读者系统
使用读者账号(如:10000/123456)登陆进入首页:
<img src="./preview/16.png">
##### 3.1 查看全部图书,可以根据输入的书名检索书籍:
<img src="./preview/17.png">
##### 3.2 个人信息查看,可以修个个人信息
<img src="./preview/18.png">
##### 3.3 个人借阅情况查看
<img src="./preview/19.png">
##### 3.4 修改密码
<img src="./preview/20.png">
2 changes: 1 addition & 1 deletion library.sql
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ VALUES
( 22, '综合' );
CREATE TABLE `lend_list` (
`ser_num` BIGINT NOT NULL PRIMARY KEY,
`book_id` VARCHAR ( 15 ) NOT NULL,
`book_id` BIGINT NOT NULL,
`reader_id` BIGINT NOT NULL,
`lend_date` date DEFAULT NULL,
`back_date` date DEFAULT NULL
Expand Down
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@
<threadCount>10</threadCount>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
Binary file added preview/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1a2d466

Please sign in to comment.