失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > 图书馆借阅管理系统 springboot开发的java项目源码

图书馆借阅管理系统 springboot开发的java项目源码

时间:2022-02-15 19:45:27

相关推荐

图书馆借阅管理系统 springboot开发的java项目源码

目录

项目简介:

需求说明:

项目截图:

1.登录界面

2.管理首页-查看图书

3.图书详情

4.查看读者列表

5.编辑读者信息

6.借还日志

项目源码参考:

项目源码下载:

项目简介:

项目编号:J103

图书借阅管理系统

基于Springboot 2.7+ MyBatis3的图书馆管理系统。主要功能包括:

图书查询、图书管理、图书编辑、读者管理、图书的借阅与归还以及借还日志记录等。

开发环境:idea 、eclipse两个都支持

数据库:建议mysql 8,或者mysql 5.7、5.5也可以

需求说明:

用户分为两类:读者、管理员。图书馆管理员可以修改读者信息,修改书目信息,查看所有借还

日志等;读者仅可以修改个人信息、借阅或归还书籍和查看自己的借还日志。

项目截图:

1.登录界面

2.管理首页-查看图书

3.图书详情

4.查看读者列表

5.编辑读者信息

6.借还日志

项目源码参考:

Admin.java

package demo.domain;import com.baomidou.mybatisplus.annotation.IdType;import com.baomidou.mybatisplus.annotation.TableField;import com.baomidou.mybatisplus.annotation.TableId;import com.baomidou.mybatisplus.annotation.TableName;import java.io.Serializable;/*** * @TableName admin*/@TableName(value ="admin")public class Admin implements Serializable {/*** */@TableIdprivate Long adminId;/*** */private String password;/*** */private String username;@TableField(exist = false)private static final long serialVersionUID = 1L;/*** */public Long getAdminId() {return adminId;}/*** */public void setAdminId(Long adminId) {this.adminId = adminId;}/*** */public String getPassword() {return password;}/*** */public void setPassword(String password) {this.password = password;}/*** */public String getUsername() {return username;}/*** */public void setUsername(String username) {this.username = username;}@Overridepublic boolean equals(Object that) {if (this == that) {return true;}if (that == null) {return false;}if (getClass() != that.getClass()) {return false;}Admin other = (Admin) that;return (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId()))&& (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))&& (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()));}@Overridepublic int hashCode() {final int prime = 31;int result = 1;result = prime * result + ((getAdminId() == null) ? 0 : getAdminId().hashCode());result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());return result;}@Overridepublic String toString() {StringBuilder sb = new StringBuilder();sb.append(getClass().getSimpleName());sb.append(" [");sb.append("Hash = ").append(hashCode());sb.append(", adminId=").append(adminId);sb.append(", password=").append(password);sb.append(", username=").append(username);sb.append(", serialVersionUID=").append(serialVersionUID);sb.append("]");return sb.toString();}}

AdminMapper.java

package demo.mapper;import demo.domain.Admin;/*** @author Hello* @description 针对表【admin】的数据库操作Mapper* @createDate -02-08 10:54:20* @Entity demo.domain.Admin*/public interface AdminMapper {int deleteByPrimaryKey(Long id);int insert(Admin record);int insertSelective(Admin record);Admin selectByPrimaryKey(Long id);int updateByPrimaryKeySelective(Admin record);int updateByPrimaryKey(Admin record);}

AdminMapper.xml

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapperPUBLIC "-////DTD Mapper 3.0//EN""/dtd/mybatis-3-mapper.dtd"><mapper namespace="demo.mapper.AdminMapper"><resultMap id="BaseResultMap" type="demo.domain.Admin"><id property="adminId" column="admin_id" jdbcType="BIGINT"/><result property="password" column="password" jdbcType="VARCHAR"/><result property="username" column="username" jdbcType="VARCHAR"/></resultMap><sql id="Base_Column_List">admin_id,password,username</sql><select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">select<include refid="Base_Column_List" />from adminwhere admin_id = #{adminId,jdbcType=BIGINT} </select><delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from adminwhere admin_id = #{adminId,jdbcType=BIGINT} </delete><insert id="insert" keyColumn="admin_id" keyProperty="adminId" parameterType="demo.domain.Admin" useGeneratedKeys="true">insert into admin( admin_id,password,username)values (#{adminId,jdbcType=BIGINT},#{password,jdbcType=VARCHAR},#{username,jdbcType=VARCHAR})</insert><insert id="insertSelective" keyColumn="admin_id" keyProperty="adminId" parameterType="demo.domain.Admin" useGeneratedKeys="true">insert into admin<trim prefix="(" suffix=")" suffixOverrides=","><if test="adminId != null">admin_id,</if><if test="password != null">password,</if><if test="username != null">username,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="adminId != null">#{adminId,jdbcType=BIGINT},</if><if test="password != null">#{password,jdbcType=VARCHAR},</if><if test="username != null">#{username,jdbcType=VARCHAR},</if></trim></insert><update id="updateByPrimaryKeySelective" parameterType="demo.domain.Admin">update admin<set><if test="password != null">password = #{password,jdbcType=VARCHAR},</if><if test="username != null">username = #{username,jdbcType=VARCHAR},</if></set>where admin_id = #{adminId,jdbcType=BIGINT} </update><update id="updateByPrimaryKey" parameterType="demo.domain.Admin">update adminset password = #{password,jdbcType=VARCHAR},username = #{username,jdbcType=VARCHAR}where admin_id = #{adminId,jdbcType=BIGINT} </update></mapper>

项目源码下载:

/download/xia15000506007/87427738

如果觉得《图书馆借阅管理系统 springboot开发的java项目源码》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。