图书管理系统
- 一、系统介绍
- 二、系统展示
- 三、代码实现
-
- Book
- User
- Record
- Comment
- BookShelf
- BookDao
- BookShelfDao
- CommentDao
- RecordDao
- UserDao
- BookService
- BookShelfService
- CommentService
- RecordService
- login.jsp
- login-do-info.jsp
- login-fail.jsp
- logout.jsp
- register.jsp
- register-do.jsp
- search-password.jsp
- search-password-do.jsp
- search-password-info.jsp
- admin-home.jsp
- admin-book-add.jsp
- admin-book-delete.jsp
- admin-book-update.jsp
- admin-user-add.jsp
- admin-user-delete.jsp
- admin-user-update.jsp
- user-home.jsp
- user-comment-add.jsp
- 四、其他
一、系统介绍
1.软件环境
IDEA:2018.2
Java:jdk1.8
Mysql:8.0.13
Tomcat:8.5.23
2.功能模块图
3.系统功能
1.系统的注册、登录、注销
2.读者信息管理
系统管理员可以对读者信息进行查询、添加、修改、删除等操作。
3.图书信息管理
系统管理员可以对图书信息进行查询、添加、修改、删除等操作。
4.借阅信息管理
管理管理可以对借阅信息进行查询和删除操作,用户可以对借阅信息进行新增、查看操作。
5.个人书架管理
用户对个人书架的新增、删处、查看操作。
6.留言管理
用户可以对留言进行新增、查看操作。
4.数据库表
1.读者表
2.借阅信息表
3.评论留言表
4.图书表
5.书架表
5.工程截图
二、系统展示
1.系统注册
2.系统登录
3.找回密码
4.管理员-主页
5.管理员-用户管理主页
6.管理员-新增用户
7.管理员-修改用户
8.管理员-借阅信息管理
9.管理员-图书管理主页
10.管理员-新增图书
11.管理员-修改图书
12.用户-主页
13.用户-图书明细查看
14.用户-新增留言
15.用户-借阅信息管理
16.用户-书架管理
三、代码实现
Book
package com.sjsq.po;
import java.io.Serializable;
import java.util.Date;
/**
* @author shuijianshiqing
* @date 2020/5/19 22:40
*/
public class Book implements Serializable {
private static final long serialVersionUID = 1L;
private Integer bookid;
private String bookname;
private Double price;
private String author;
private String publish;
private Integer categoryid;
private String booklink;
private Date deadline;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public Integer getBookid() {
return bookid;
}
public void setBookid(Integer bookid) {
this.bookid = bookid;
}
public String getBookname() {
return bookname;
}
public void setBookname(String bookname) {
this.bookname = bookname;
}
public Double getPrice() {
return price;
}
public void setPrice(Double price) {
this.price = price;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getPublish() {
return publish;
}
public void setPublish(String publish) {
this.publish = publish;
}
public Integer getCategoryid() {
return categoryid;
}
public void setCategoryid(Integer categoryid) {
this.categoryid = categoryid;
}
public String getBooklink() {
return booklink;
}
public void setBooklink(String booklink) {
this.booklink = booklink;
}
public Date getDeadline() {
return deadline;
}
public void setDeadline(Date deadline) {
this.deadline = deadline;
}
@Override
public String toString() {
return "Book{" +
"bookid=" + bookid +
", bookname='" + bookname + ''' +
", price=" + price +
", author='" + author + ''' +
", publish='" + publish + ''' +
", categoryid=" + categoryid +
", booklink='" + booklink + ''' +
", deadline=" + deadline +
'}';
}
}
User
package com.sjsq.po;
import java.io.Serializable;
/**
* @author shuijianshiqing
* @date 2020/5/19 22:19
* 用户的实体类
*/
public class User implements Serializable {
// 增加序列号,作用是反序列化的时候不会报错,切能进行IO的持久化
public static final long serialVersionUID = 1L;
private Integer userid;
private String username;
private String password;
private String email;
private String phone;
private Integer isadmin;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public Integer getUserid() {
return userid;
}
public void setUserid(Integer userid) {
this.userid = userid;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public Integer getIsadmin() {
return isadmin;
}
public void setIsadmin(Integer isadmin) {
this.isadmin = isadmin;
}
@Override
public String toString() {
return "User{" +
"userid=" + userid +
", username='" + username + ''' +
", password='" + password + ''' +
", email='" + email + ''' +
", phone='" + phone + ''' +
", isadmin=" + isadmin +
'}';
}
}
Record
package com.sjsq.po;
import java.util.Date;
/**
* @author shuijianshiqing
* @date 2021/5/22 22:05
* 借阅记录实体类
*/
public class Record {
private Integer borrowid;
private Integer userid;
private Integer bookid;
private String bookname;
private String booklink;
private Date borrowtime;
public Integer getBorrowid() {
return borrowid;
}
public void setBorrowid(Integer borrowid) {
this.borrowid = borrowid;
}
public Integer getUserid() {
return userid;
}
public void setUserid(Integer userid) {
this.userid = userid;
}
public Integer getBookid() {
return bookid;
}
public void setBookid(Integer bookid) {
this.bookid = bookid;
}
public String getBookname() {
return bookname;
}
public void setBookname(String bookname) {
this.bookname = bookname;
}
public String getBooklink() {
return booklink;
}
public void setBooklink(String booklink) {
this.booklink = booklink;
}
public Date getBorrowtime() {
return borrowtime;
}
public void setBorrowtime(Date borrowtime) {
this.borrowtime = borrowtime;
}
@Override
public String toString() {
return "Record{" +
"borrowid=" + borrowid +
", userid=" + userid +
", bookid=" + bookid +
", bookname='" + bookname + ''' +
", booklink='" + booklink + ''' +
", borrowtime=" + borrowtime +
'}';
}
}