Compare commits

...

40 Commits
webapp ... main

Author SHA1 Message Date
p9j6olisp 3e5c5c83f0 ADD file via upload
2 months ago
p9j6olisp dbdedcd02e ADD file via upload
2 months ago
p9j6olisp d58b760e1e ADD file via upload
2 months ago
p9j6olisp 1c559c2616 ADD file via upload
2 months ago
p9j6olisp c04ab16652 ADD file via upload
2 months ago
p9j6olisp a157186d21 ADD file via upload
2 months ago
p9j6olisp 3ae05765c6 ADD file via upload
2 months ago
p2yx7vgsl 53c69f2270 ADD file via upload
2 months ago
p2yx7vgsl e56a134b61 ADD file via upload
2 months ago
p2yx7vgsl 48549457c2 ADD file via upload
2 months ago
p2yx7vgsl 8c591a1f0f ADD file via upload
2 months ago
p2yx7vgsl 9a41bdc5ba ADD file via upload
2 months ago
p2yx7vgsl 8141589113 Delete 'ReaderInfoMapper.java'
2 months ago
p2yx7vgsl 2370a0130d Delete 'NoticeMapper.java'
2 months ago
p2yx7vgsl f7b6c65321 Delete 'LendListMapper.java'
2 months ago
p2yx7vgsl 4712597705 ADD file via upload
2 months ago
p2yx7vgsl 43f00ef9a6 ADD file via upload
2 months ago
p2yx7vgsl 99bc69fb34 ADD file via upload
2 months ago
p2yx7vgsl e12aea55b3 ADD file via upload
2 months ago
p2yx7vgsl e2f640a7d1 ADD file via upload
2 months ago
p2yx7vgsl 9ba2925c5a ADD file via upload
2 months ago
p2yx7vgsl 4895e7b78a ADD file via upload
2 months ago
p2yx7vgsl f478837d03 ADD file via upload
2 months ago
p2yx7vgsl d07626382e ADD file via upload
2 months ago
p2yx7vgsl 3114258dfe ADD file via upload
2 months ago
p2yx7vgsl e0efc3fc54 ADD file via upload
2 months ago
p2yx7vgsl 41ab885933 ADD file via upload
2 months ago
p2yx7vgsl 1c6c3b0193 ADD file via upload
2 months ago
p2yx7vgsl d1b899d03a ADD file via upload
2 months ago
p2yx7vgsl 3b7a30f5fb ADD file via upload
2 months ago
p2yx7vgsl f9b3f8f913 ADD file via upload
2 months ago
p2yx7vgsl 901d21e4e5 ADD file via upload
2 months ago
p2yx7vgsl 8f43755a73 Delete 'service\impl/AdminServiceImpl.java'
2 months ago
p2yx7vgsl 602547772f ADD file via upload
2 months ago
p2yx7vgsl 779fa9042d Delete 'service/impl/AdminServiceImpl.java'
2 months ago
p2yx7vgsl 13b364ac0b ADD file via upload
2 months ago
p2yx7vgsl 62590a370b Delete 'servicelimpl/AdminServiceImpl.java'
2 months ago
p2yx7vgsl be589567ad ADD file via upload
2 months ago
p2yx7vgsl 90b28d0909 Delete 'service/impl/AdminServiceImpl.java'
2 months ago
p2yx7vgsl 56f607a843 ADD file via upload
2 months ago

@ -0,0 +1,66 @@
package com.yx.dao;
import com.yx.po.Admin;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface AdminMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table admin
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table admin
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int insert(Admin record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table admin
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int insertSelective(Admin record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table admin
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
Admin selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table admin
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int updateByPrimaryKeySelective(Admin record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table admin
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int updateByPrimaryKey(Admin record);
/**
*
*/
List<Admin> queryAdminInfoAll(Admin admin);
/**
*
*/
Admin queryUserByNameAndPassword(@Param("username") String username,@Param("password") String password);
}

@ -0,0 +1,66 @@
package com.yx.dao;
import com.yx.po.BookInfo;
import java.awt.print.Book;
import java.util.List;
public interface BookInfoMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int insert(BookInfo record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int insertSelective(BookInfo record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
BookInfo selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int updateByPrimaryKeySelective(BookInfo record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int updateByPrimaryKey(BookInfo record);
/**
*
*/
List<BookInfo> queryBookInfoAll(BookInfo bookInfo);
/**
*
*/
List<BookInfo> getBookCountByType();
}

@ -0,0 +1,73 @@
package com.yx.dao;
import com.yx.po.LendList;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface LendListMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table lend_list
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
void deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table lend_list
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
void insert(LendList record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table lend_list
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
void insertSelective(LendList record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table lend_list
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
LendList selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table lend_list
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
void updateByPrimaryKeySelective(LendList record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table lend_list
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
void updateByPrimaryKey(LendList record);
/**
*
*/
List<LendList> queryLendListAll(LendList lendList);
/**
* 线
*/
List<LendList> queryLookBookList(@Param("rid") Integer rid, @Param("bid") Integer bid);
/**
* ()
*/
void updateLendListSubmit(LendList lendList);
}

@ -0,0 +1,62 @@
package com.yx.dao;
import com.yx.po.Notice;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface NoticeMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table notice
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table notice
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int insert(Notice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table notice
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int insertSelective(Notice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table notice
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
Notice selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table notice
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int updateByPrimaryKeySelective(Notice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table notice
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int updateByPrimaryKey(Notice record);
/**
*
*/
List<Notice> queryNoticeAll(Notice notice);
}

@ -0,0 +1,66 @@
package com.yx.dao;
import com.yx.po.ReaderInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ReaderInfoMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table reader_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table reader_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int insert(ReaderInfo record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table reader_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int insertSelective(ReaderInfo record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table reader_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
ReaderInfo selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table reader_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int updateByPrimaryKeySelective(ReaderInfo record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table reader_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
int updateByPrimaryKey(ReaderInfo record);
/**
*
*/
List<ReaderInfo> queryAllReaderInfo(ReaderInfo readerInfo);
/**
*
*/
ReaderInfo queryUserInfoByNameAndPassword(@Param("username") String username, @Param("password") String password);
}

@ -0,0 +1,35 @@
package com.yx.dao;
import com.yx.po.TypeInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface TypeInfoMapper {
/**
*
*/
List<TypeInfo> queryTypeInfoAll(@Param(value = "name") String name);
/**
*
*/
void addTypeSubmit(TypeInfo info);
/**
* id
*/
TypeInfo queryTypeInfoById(Integer id);
/**
*
*/
void updateTypeSubmit(TypeInfo info);
/**
* ids
*/
void deleteTypeByIds(List<Integer> id);
//List<TypeInfo> queryTypeName();
}

@ -0,0 +1,162 @@
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50733
Source Host : localhost:3306
Source Schema : library
Target Server Type : MySQL
Target Server Version : 50733
File Encoding : 65001
Date: 06/04/2021 13:18:44
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`username` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
`password` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
`adminType` int(11) NULL DEFAULT NULL COMMENT '管理员类型',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '管理员' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES (1, 'admin', '12345', 1);
INSERT INTO `admin` VALUES (2, 'yx5411', '12345', 0);
INSERT INTO `admin` VALUES (4, 'xy1221', '12345', 0);
-- ----------------------------
-- Table structure for book_info
-- ----------------------------
DROP TABLE IF EXISTS `book_info`;
CREATE TABLE `book_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图书名称',
`author` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '作者',
`publish` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '出版社',
`isbn` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '书籍编号',
`introduction` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '简介',
`language` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '语言',
`price` double NULL DEFAULT NULL COMMENT '价格',
`publish_date` date NULL DEFAULT NULL COMMENT '出版时间',
`type_id` int(11) NULL DEFAULT NULL COMMENT '书籍类型',
`status` int(11) NULL DEFAULT NULL COMMENT '状态0未借出1已借出',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '图书信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of book_info
-- ----------------------------
INSERT INTO `book_info` VALUES (1, '西游记', '施耐庵', '机械工业出版社', '100011', '师徒四人去西天取真经', '中文', 42, '2020-03-20', 1, 0);
INSERT INTO `book_info` VALUES (2, '三国演义', '罗贯中', '清华大学出版社', '100012', '东汉末年分三国。。。', '中文', 48, '2018-03-30', 1, 1);
INSERT INTO `book_info` VALUES (3, '红楼梦', '曹雪芹', '机械工业出版社', '100013', '宝玉与众多男女之间故事', '中文', 39, '2019-04-04', 1, 1);
INSERT INTO `book_info` VALUES (4, '资本论', '马克思', '原子能出版社', '100014', '马克思的剩余价值理论', '英文', 42, '2019-04-05', 5, 0);
INSERT INTO `book_info` VALUES (5, '经济学原理', '马歇尔', '机械工业出版社', '100015', '西方经济学界公认为划时代的著作', '英文', 45, '2020-04-06', 5, 0);
INSERT INTO `book_info` VALUES (6, '大变局下的中国法治', '李卫东', '北京大学出版社', '100016', '十大经典法学著作', '中文', 42, '2015-04-05', 4, 1);
-- ----------------------------
-- Table structure for lend_list
-- ----------------------------
DROP TABLE IF EXISTS `lend_list`;
CREATE TABLE `lend_list` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`bookId` int(11) NULL DEFAULT NULL COMMENT '图书id',
`readerId` int(11) NULL DEFAULT NULL COMMENT '读者id',
`lendDate` datetime(0) NULL DEFAULT NULL COMMENT '借书时间',
`backDate` datetime(0) NULL DEFAULT NULL COMMENT '还书时间',
`backType` int(11) NULL DEFAULT NULL,
`exceptRemarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 40 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '借阅记录(谁在何时借走了什么书,并且有没有归还,归还时间多少)' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of lend_list
-- ----------------------------
INSERT INTO `lend_list` VALUES (15, 1, 1, '2021-04-04 10:07:31', '2021-04-04 21:09:27', 0, NULL);
INSERT INTO `lend_list` VALUES (36, 2, 2, '2021-04-04 21:48:17', '2021-04-04 21:50:00', 2, NULL);
INSERT INTO `lend_list` VALUES (37, 3, 3, '2021-04-04 21:50:22', '2021-04-04 21:50:32', 3, NULL);
INSERT INTO `lend_list` VALUES (38, 5, 1, '2021-04-05 21:35:35', '2021-04-05 21:35:47', 1, NULL);
INSERT INTO `lend_list` VALUES (39, 6, 3, '2021-04-05 21:42:35', NULL, NULL, NULL);
-- ----------------------------
-- Table structure for notice
-- ----------------------------
DROP TABLE IF EXISTS `notice`;
CREATE TABLE `notice` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`topic` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公告内容',
`author` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布人',
`createDate` datetime(0) NULL DEFAULT NULL COMMENT '公告发布时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '公告' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of notice
-- ----------------------------
INSERT INTO `notice` VALUES (1, '公告内部测试1', '这是第一个内容测试啊', 'admin', '2021-04-01 21:35:53');
INSERT INTO `notice` VALUES (2, '公告内部测试2', '这是第二个内容测试啊', 'admin', '2021-04-02 22:38:03');
INSERT INTO `notice` VALUES (3, '公告内部测试3', '这是第三个内容测试啊', 'yx5411', '2021-04-03 06:47:54');
INSERT INTO `notice` VALUES (4, '公告内部测试4', '这是第四个内容测试啊', 'yx5411', '2021-04-04 06:48:01');
INSERT INTO `notice` VALUES (5, '公告内部测试5', '这是第五个内容测试啊', 'xy1221', '2021-04-04 06:49:03');
INSERT INTO `notice` VALUES (6, '公告内部测试6', '这是第六个内容测试啊', 'yx5411', '2021-04-05 07:48:04');
-- ----------------------------
-- Table structure for reader_info
-- ----------------------------
DROP TABLE IF EXISTS `reader_info`;
CREATE TABLE `reader_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`username` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
`password` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
`realName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '真实姓名',
`sex` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '性别',
`birthday` date NULL DEFAULT NULL COMMENT '出生日期',
`address` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '籍贯',
`tel` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话',
`email` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
`registerDate` datetime(0) NULL DEFAULT NULL COMMENT '注册日期',
`readerNumber` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '读者编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '读者信息(包括登录账号密码等)' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of reader_info
-- ----------------------------
INSERT INTO `reader_info` VALUES (1, 'zhangsan', '12345', '彭于晏', '', '2001-04-01', '江西南昌', '13767134834', 'yu123@163.com', '2021-04-02 13:18:59', '8120116041');
INSERT INTO `reader_info` VALUES (2, 'mary', '12345', '陈恋', '', '2004-04-01', '湖北武汉', '15270839599', 'yx123@163.com', '2021-03-06 07:57:56', '8120116044');
INSERT INTO `reader_info` VALUES (3, 'cindy', '12345', '辛帝', '', '2010-04-04', '北京海淀', '13834141133', 'zs1314@163.com', '2021-04-04 13:36:42', '8120116042');
-- ----------------------------
-- Table structure for type_info
-- ----------------------------
DROP TABLE IF EXISTS `type_info`;
CREATE TABLE `type_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图书分类名称',
`remarks` char(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '图书类型表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of type_info
-- ----------------------------
INSERT INTO `type_info` VALUES (1, '文学类', '陶冶情操');
INSERT INTO `type_info` VALUES (2, '历史类', '了解历史文化');
INSERT INTO `type_info` VALUES (3, '工学类', '造火箭');
INSERT INTO `type_info` VALUES (4, '法学类', '学习法律,打官司');
INSERT INTO `type_info` VALUES (5, '经济学类', '搞经济');
INSERT INTO `type_info` VALUES (6, '统计学类', '学习统计,天下无敌');
SET FOREIGN_KEY_CHECKS = 1;

@ -0,0 +1,141 @@
package com.yx.po;
import java.io.Serializable;
public class Admin implements Serializable {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column admin.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column admin.username
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String username;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column admin.password
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String password;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column admin.admin_type
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer adminType;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table admin
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column admin.id
*
* @return the value of admin.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column admin.id
*
* @param id the value for admin.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column admin.username
*
* @return the value of admin.username
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getUsername() {
return username;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column admin.username
*
* @param username the value for admin.username
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column admin.password
*
* @return the value of admin.password
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getPassword() {
return password;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column admin.password
*
* @param password the value for admin.password
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setPassword(String password) {
this.password = password == null ? null : password.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column admin.admin_type
*
* @return the value of admin.admin_type
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getAdminType() {
return adminType;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column admin.admin_type
*
* @param adminType the value for admin.admin_type
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setAdminType(Integer adminType) {
this.adminType = adminType;
}
}

@ -0,0 +1,386 @@
package com.yx.po;
import java.io.Serializable;
import java.util.Date;
public class BookInfo implements Serializable {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.name
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String name;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.author
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String author;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.publish
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String publish;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.ISBN
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String isbn;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.introduction
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String introduction;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.language
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String language;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.price
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Double price;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.publish_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Date publishDate;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.type_id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer typeId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.status
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer status;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table book_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private TypeInfo typeInfo;//图书类型,在图书馆里中显示什么类型的书
private Integer counts;
public Integer getCounts() {
return counts;
}
public void setCounts(Integer counts) {
this.counts = counts;
}
public TypeInfo getTypeInfo() {
return typeInfo;
}
public void setTypeInfo(TypeInfo typeInfo) {
this.typeInfo = typeInfo;
}
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.id
*
* @return the value of book_info.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.id
*
* @param id the value for book_info.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.name
*
* @return the value of book_info.name
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.name
*
* @param name the value for book_info.name
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.author
*
* @return the value of book_info.author
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getAuthor() {
return author;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.author
*
* @param author the value for book_info.author
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setAuthor(String author) {
this.author = author == null ? null : author.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.publish
*
* @return the value of book_info.publish
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getPublish() {
return publish;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.publish
*
* @param publish the value for book_info.publish
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setPublish(String publish) {
this.publish = publish == null ? null : publish.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.ISBN
*
* @return the value of book_info.ISBN
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getIsbn() {
return isbn;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.ISBN
*
* @param isbn the value for book_info.ISBN
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setIsbn(String isbn) {
this.isbn = isbn == null ? null : isbn.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.introduction
*
* @return the value of book_info.introduction
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getIntroduction() {
return introduction;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.introduction
*
* @param introduction the value for book_info.introduction
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setIntroduction(String introduction) {
this.introduction = introduction == null ? null : introduction.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.language
*
* @return the value of book_info.language
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getLanguage() {
return language;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.language
*
* @param language the value for book_info.language
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setLanguage(String language) {
this.language = language == null ? null : language.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.price
*
* @return the value of book_info.price
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Double getPrice() {
return price;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.price
*
* @param price the value for book_info.price
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setPrice(Double price) {
this.price = price;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.publish_date
*
* @return the value of book_info.publish_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Date getPublishDate() {
return publishDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.publish_date
*
* @param publishDate the value for book_info.publish_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setPublishDate(Date publishDate) {
this.publishDate = publishDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.type_id
*
* @return the value of book_info.type_id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getTypeId() {
return typeId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.type_id
*
* @param typeId the value for book_info.type_id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setTypeId(Integer typeId) {
this.typeId = typeId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.status
*
* @return the value of book_info.status
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getStatus() {
return status;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.status
*
* @param status the value for book_info.status
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setStatus(Integer status) {
this.status = status;
}
}

@ -0,0 +1,249 @@
package com.yx.po;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
public class LendList implements Serializable {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column lend_list.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column lend_list.book_id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer bookId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column lend_list.reader_id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer readerId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column lend_list.lend_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//接收页面输入的时间,将其格式化
@JSONField(format = "yyyy-MM-dd HH:mm:ss")//后端传的日期格式化
private Date lendDate;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column lend_list.back_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date backDate;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column lend_list.back_type
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer backType;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column lend_list.exceptRemarks
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String exceptRemarks;
private BookInfo bookInfo;
private ReaderInfo readerInfo;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table lend_list
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column lend_list.id
*
* @return the value of lend_list.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column lend_list.id
*
* @param id the value for lend_list.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column lend_list.book_id
*
* @return the value of lend_list.book_id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getBookId() {
return bookId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column lend_list.book_id
*
* @param bookId the value for lend_list.book_id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setBookId(Integer bookId) {
this.bookId = bookId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column lend_list.reader_id
*
* @return the value of lend_list.reader_id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getReaderId() {
return readerId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column lend_list.reader_id
*
* @param readerId the value for lend_list.reader_id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setReaderId(Integer readerId) {
this.readerId = readerId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column lend_list.lend_date
*
* @return the value of lend_list.lend_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Date getLendDate() {
return lendDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column lend_list.lend_date
*
* @param lendDate the value for lend_list.lend_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setLendDate(Date lendDate) {
this.lendDate = lendDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column lend_list.back_date
*
* @return the value of lend_list.back_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Date getBackDate() {
return backDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column lend_list.back_date
*
* @param backDate the value for lend_list.back_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setBackDate(Date backDate) {
this.backDate = backDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column lend_list.back_type
*
* @return the value of lend_list.back_type
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getBackType() {
return backType;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column lend_list.back_type
*
* @param backType the value for lend_list.back_type
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setBackType(Integer backType) {
this.backType = backType;
}
public String getExceptRemarks() {
return exceptRemarks;
}
public void setExceptRemarks(String exceptRemarks) {
this.exceptRemarks = exceptRemarks;
}
public BookInfo getBookInfo() {
return bookInfo;
}
public void setBookInfo(BookInfo bookInfo) {
this.bookInfo = bookInfo;
}
public ReaderInfo getReaderInfo() {
return readerInfo;
}
public void setReaderInfo(ReaderInfo readerInfo) {
this.readerInfo = readerInfo;
}
}

@ -0,0 +1,179 @@
package com.yx.po;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
public class Notice implements Serializable {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column notice.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column notice.topic
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String topic;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column notice.content
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String content;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column notice.author
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String author;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column notice.create_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//接收页面传来的时间格式
@JSONField(format="yyyy-MM-dd HH:mm:ss")//对返回的时间对象用fastjson格式化时间
private Date createDate;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table notice
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column notice.id
*
* @return the value of notice.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column notice.id
*
* @param id the value for notice.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column notice.topic
*
* @return the value of notice.topic
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getTopic() {
return topic;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column notice.topic
*
* @param topic the value for notice.topic
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setTopic(String topic) {
this.topic = topic == null ? null : topic.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column notice.content
*
* @return the value of notice.content
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getContent() {
return content;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column notice.content
*
* @param content the value for notice.content
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column notice.author
*
* @return the value of notice.author
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getAuthor() {
return author;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column notice.author
*
* @param author the value for notice.author
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setAuthor(String author) {
this.author = author == null ? null : author.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column notice.create_date
*
* @return the value of notice.create_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Date getCreateDate() {
return createDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column notice.create_date
*
* @param createDate the value for notice.create_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
}

@ -0,0 +1,373 @@
package com.yx.po;
import java.io.Serializable;
import java.util.Date;
public class ReaderInfo implements Serializable {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.username
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String username;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.password
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String password;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.number
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.real_name
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String realName;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.sex
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String sex;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.birthday
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Date birthday;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.address
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String address;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.tel
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String tel;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.email
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String email;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.register_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Date registerDate;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column reader_info.reader_number
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String readerNumber;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table reader_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column reader_info.id
*
* @return the value of reader_info.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column reader_info.id
*
* @param id the value for reader_info.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column reader_info.username
*
* @return the value of reader_info.username
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getUsername() {
return username;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column reader_info.username
*
* @param username the value for reader_info.username
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column reader_info.password
*
* @return the value of reader_info.password
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getPassword() {
return password;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column reader_info.password
*
* @param password the value for reader_info.password
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setPassword(String password) {
this.password = password == null ? null : password.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column reader_info.real_name
*
* @return the value of reader_info.real_name
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getRealName() {
return realName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column reader_info.real_name
*
* @param realName the value for reader_info.real_name
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setRealName(String realName) {
this.realName = realName == null ? null : realName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column reader_info.sex
*
* @return the value of reader_info.sex
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getSex() {
return sex;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column reader_info.sex
*
* @param sex the value for reader_info.sex
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setSex(String sex) {
this.sex = sex == null ? null : sex.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column reader_info.birthday
*
* @return the value of reader_info.birthday
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Date getBirthday() {
return birthday;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column reader_info.birthday
*
* @param birthday the value for reader_info.birthday
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column reader_info.address
*
* @return the value of reader_info.address
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getAddress() {
return address;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column reader_info.address
*
* @param address the value for reader_info.address
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setAddress(String address) {
this.address = address == null ? null : address.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column reader_info.tel
*
* @return the value of reader_info.tel
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getTel() {
return tel;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column reader_info.tel
*
* @param tel the value for reader_info.tel
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setTel(String tel) {
this.tel = tel == null ? null : tel.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column reader_info.email
*
* @return the value of reader_info.email
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getEmail() {
return email;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column reader_info.email
*
* @param email the value for reader_info.email
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setEmail(String email) {
this.email = email == null ? null : email.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column reader_info.register_date
*
* @return the value of reader_info.register_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Date getRegisterDate() {
return registerDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column reader_info.register_date
*
* @param registerDate the value for reader_info.register_date
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setRegisterDate(Date registerDate) {
this.registerDate = registerDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column reader_info.reader_number
*
* @return the value of reader_info.reader_number
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getReaderNumber() {
return readerNumber;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column reader_info.reader_number
*
* @param readerNumber the value for reader_info.reader_number
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setReaderNumber(String readerNumber) {
this.readerNumber = readerNumber == null ? null : readerNumber.trim();
}
}

@ -0,0 +1,103 @@
package com.yx.po;
import java.io.Serializable;
public class TypeInfo implements Serializable {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column type_info.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private Integer id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column type_info.name
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String name;
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column type_info.reamrks
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private String remarks;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table type_info
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column type_info.id
*
* @return the value of type_info.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column type_info.id
*
* @param id the value for type_info.id
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column type_info.name
*
* @return the value of type_info.name
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column type_info.name
*
* @param name the value for type_info.name
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column type_info.reamrks
*
* @return the value of type_info.reamrks
*
* @mbggenerated Tue Mar 30 16:30:04 CST 2021
*/
}

@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.yx</groupId>
<artifactId>LibraryProject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>LibraryProject Maven Webapp</name>
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring.version>5.1.3.RELEASE</spring.version>
<slf4j.version>1.6.6</slf4j.version>
<log4j.version>1.2.12</log4j.version>
<mysql.version>5.1.6</mysql.version>
<mybatis.version>3.4.5</mybatis.version>
</properties>
<dependencies>
<!-- spring -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.6.8</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!--fastjson-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.54</version>
</dependency>
<!-- log start -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.12</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- log end -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<!--druid连接池-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.16</version>
</dependency>
<!--分页-->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.1.10</version>
</dependency>
<!--mybatis逆向工程依赖-->
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.7</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,52 @@
package com.yx.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yx.dao.BookInfoMapper;
import com.yx.po.BookInfo;
import com.yx.service.BookInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("bookInfoService")
public class BookInfoServiceImpl implements BookInfoService {
@Autowired
private BookInfoMapper bookInfoMapper;
@Override
public PageInfo<BookInfo> queryBookInfoAll(BookInfo bookInfo, Integer pageNum, Integer limit) {
PageHelper.startPage(pageNum,limit);
List<BookInfo> bookInfoList = bookInfoMapper.queryBookInfoAll(bookInfo);
return new PageInfo<>(bookInfoList);
}
@Override
public void addBookSubmit(BookInfo bookInfo) {
bookInfoMapper.insert(bookInfo);
}
@Override
public BookInfo queryBookInfoById(Integer id) {
return bookInfoMapper.selectByPrimaryKey(id);
}
@Override
public void updateBookSubmit(BookInfo info) {
bookInfoMapper.updateByPrimaryKeySelective(info);
}
@Override
public void deleteBookByIds(List<String> ids) {
for (String id : ids){
bookInfoMapper.deleteByPrimaryKey(Integer.parseInt(id));
}
}
@Override
public List<BookInfo> getBookCountByType() {
return bookInfoMapper.getBookCountByType();
}
}

@ -0,0 +1,39 @@
package com.yx.service;
import com.github.pagehelper.PageInfo;
import com.yx.po.Admin;
import java.util.List;
public interface AdminService {
/**
*
*/
PageInfo<Admin> queryAdminAll(Admin admin,Integer pageNum,Integer limit);
/**
*
*/
void addAdminSubmit(Admin admin);
/**
* id
*/
Admin queryAdminById(Integer id);
/**
*
*/
void updateAdminSubmit(Admin admin);
/**
*
*/
void deleteAdminByIds(List<String> ids);
/**
*
*/
Admin queryUserByNameAndPassword(String username,String password);
}

@ -0,0 +1,38 @@
package com.yx.service;
import com.github.pagehelper.PageInfo;
import com.yx.po.BookInfo;
import java.util.List;
public interface BookInfoService {
/**
*
*/
PageInfo<BookInfo> queryBookInfoAll(BookInfo bookInfo,Integer pageNum,Integer limit);
/**
*
*/
void addBookSubmit(BookInfo bookInfo);
/**
* id
*/
BookInfo queryBookInfoById(Integer id);
/**
*
*/
void updateBookSubmit(BookInfo info);
/**
* ids
*/
void deleteBookByIds(List<String> ids);
/**
*
*/
List<BookInfo> getBookCountByType();
}

@ -0,0 +1,36 @@
package com.yx.service;
import com.github.pagehelper.PageInfo;
import com.yx.po.LendList;
import java.util.List;
public interface LendListService {
//分页查询
PageInfo<LendList> queryLendListAll(LendList lendList, int page, int limit);
//添加借阅记录
void addLendListSubmit(LendList lendList);
/**
*
*/
void deleteLendListById(List<String> ids, List<String> bookIds);
/**
*
*/
void updateLendListSubmit(List<String> ids, List<String> bookIds);
/**
*
*/
void backBook(LendList lendList);
/**
* 线
*/
List<LendList> queryLookBookList(Integer rid, Integer bid);
}

@ -0,0 +1,31 @@
package com.yx.service;
import com.github.pagehelper.PageInfo;
import com.yx.po.Notice;
import java.util.List;
public interface NoticeService {
/**
*
*/
PageInfo<Notice> queryAllNotice(Notice notice,Integer pageNum,Integer limit);
/**
*
*/
void addNotice(Notice notice);
/**
* 便
*
*/
Notice queryNoticeById(Integer id);
/**
*
* @param ids
*/
void deleteNoticeByIds(List<String> ids);
}

@ -0,0 +1,39 @@
package com.yx.service;
import com.github.pagehelper.PageInfo;
import com.yx.po.ReaderInfo;
import java.util.List;
public interface ReaderInfoService {
/**
*
*/
PageInfo<ReaderInfo> queryAllReaderInfo(ReaderInfo readerInfo,Integer pageNum,Integer limit);
/**
*
*/
void addReaderInfoSubmit(ReaderInfo readerInfo);
/**
*
*/
ReaderInfo queryReaderInfoById(Integer id);
/**
*
*/
void updateReaderInfoSubmit(ReaderInfo readerInfo);
/**
*
*/
void deleteReaderInfoByIds(List<String> ids);
/**
*
*/
ReaderInfo queryUserInfoByNameAndPassword(String username,String password);
}

@ -0,0 +1,34 @@
package com.yx.service;
import com.github.pagehelper.PageInfo;
import com.yx.po.TypeInfo;
import java.util.List;
public interface TypeInfoService {
/**
*
*/
PageInfo<TypeInfo> queryTypeInfoAll(String name, Integer pageNum, Integer limit);
/**
*
*/
void addTypeSubmit(TypeInfo info);
/**
* id
*/
TypeInfo queryTypeInfoById(Integer id);
/**
*
*/
void updateTypeSubmit(TypeInfo info);
/**
* ids
*/
void deleteTypeByIds(List<String> id);
}

@ -0,0 +1,52 @@
package com.yx.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yx.dao.BookInfoMapper;
import com.yx.po.BookInfo;
import com.yx.service.BookInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("bookInfoService")
public class BookInfoServiceImpl implements BookInfoService {
@Autowired
private BookInfoMapper bookInfoMapper;
@Override
public PageInfo<BookInfo> queryBookInfoAll(BookInfo bookInfo, Integer pageNum, Integer limit) {
PageHelper.startPage(pageNum,limit);
List<BookInfo> bookInfoList = bookInfoMapper.queryBookInfoAll(bookInfo);
return new PageInfo<>(bookInfoList);
}
@Override
public void addBookSubmit(BookInfo bookInfo) {
bookInfoMapper.insert(bookInfo);
}
@Override
public BookInfo queryBookInfoById(Integer id) {
return bookInfoMapper.selectByPrimaryKey(id);
}
@Override
public void updateBookSubmit(BookInfo info) {
bookInfoMapper.updateByPrimaryKeySelective(info);
}
@Override
public void deleteBookByIds(List<String> ids) {
for (String id : ids){
bookInfoMapper.deleteByPrimaryKey(Integer.parseInt(id));
}
}
@Override
public List<BookInfo> getBookCountByType() {
return bookInfoMapper.getBookCountByType();
}
}

@ -0,0 +1,100 @@
package com.yx.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yx.dao.BookInfoMapper;
import com.yx.dao.LendListMapper;
import com.yx.po.BookInfo;
import com.yx.po.LendList;
import com.yx.service.LendListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service("lendListService")
public class LendListServiceImpl implements LendListService {
@Autowired
private LendListMapper lendListMapper;
@Autowired
private BookInfoMapper bookInfoMapper;
@Override
public PageInfo<LendList> queryLendListAll(LendList lendList, int page, int limit) {
PageHelper.startPage(page,limit);
List<LendList> list=lendListMapper.queryLendListAll(lendList);
PageInfo pageInfo=new PageInfo(list);
return pageInfo;
}
@Override
public void addLendListSubmit(LendList lendList) {
lendListMapper.insert(lendList);
}
@Override
public void deleteLendListById(List<String> ids, List<String> bookIds) {
//删除借阅记录
for(String id:ids){
lendListMapper.deleteByPrimaryKey(Integer.parseInt(id));
}
//更改图书标识,更新状态为未借出
for(String bid:bookIds){
//根据id查询图书记录信息
BookInfo bookInfo=bookInfoMapper.selectByPrimaryKey(Integer.parseInt(bid));
bookInfo.setStatus(0);//该为未借出
bookInfoMapper.updateByPrimaryKey(bookInfo);
}
}
@Override
public void updateLendListSubmit(List<String> ids, List<String> bookIds) {
for(String id:ids){
//根据id查询借阅记录信息
LendList lendList=new LendList();
lendList.setId(Integer.parseInt(id));
lendList.setBackDate(new Date());
lendList.setBackType(0);//正常还书
lendListMapper.updateLendListSubmit(lendList);//如果用updatePrimarykey会默认很多赋值为空
}
//修改书的状态
//更改图书标识,更新状态为未借出
for(String bid:bookIds){
//根据id查询图书记录信息
BookInfo bookInfo=bookInfoMapper.selectByPrimaryKey(Integer.parseInt(bid));
bookInfo.setStatus(0);//该为未借出
bookInfoMapper.updateByPrimaryKey(bookInfo);
}
}
@Override
public void backBook(LendList lendList) {
LendList lend=new LendList();
lend.setId(lendList.getId());
lend.setBackType(lendList.getBackType());
lend.setBackDate(new Date());
lend.setExceptRemarks(lendList.getExceptRemarks());
lend.setBookId(lendList.getBookId());
lendListMapper.updateLendListSubmit(lend);
//判断异常还书 如果是延期或者正常还书,需要更改书的状态
if(lend.getBackType()==0 || lend.getBackType()==1){
BookInfo bookInfo=bookInfoMapper.selectByPrimaryKey(lend.getBookId());
bookInfo.setStatus(0);//该为未借出
bookInfoMapper.updateByPrimaryKey(bookInfo);
}
}
@Override
public List<LendList> queryLookBookList(Integer rid, Integer bid) {
return lendListMapper.queryLookBookList(rid, bid);
}
}

@ -0,0 +1,42 @@
package com.yx.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yx.dao.NoticeMapper;
import com.yx.po.Notice;
import com.yx.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("noticeService")
public class NoticeServiceImpl implements NoticeService {
@Autowired
private NoticeMapper noticeMapper;
@Override
public PageInfo<Notice> queryAllNotice(Notice notice, Integer pageNum, Integer limit) {
PageHelper.startPage(pageNum,limit);//业务层实现分页
List<Notice> noticeList = noticeMapper.queryNoticeAll(notice);
return new PageInfo<>(noticeList);
}
@Override
public void addNotice(Notice notice) {
noticeMapper.insert(notice);
}
@Override
public Notice queryNoticeById(Integer id) {
return noticeMapper.selectByPrimaryKey(id);
}
@Override
public void deleteNoticeByIds(List<String> ids) {
for (String id : ids){
noticeMapper.deleteByPrimaryKey(Integer.parseInt(id));
}
}
}

@ -0,0 +1,52 @@
package com.yx.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yx.dao.ReaderInfoMapper;
import com.yx.po.ReaderInfo;
import com.yx.service.ReaderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("readerInfoService")
public class ReaderInfoServiceImpl implements ReaderInfoService {
@Autowired
private ReaderInfoMapper readerInfoMapper;
@Override
public PageInfo<ReaderInfo> queryAllReaderInfo(ReaderInfo readerInfo, Integer pageNum, Integer limit) {
PageHelper.startPage(pageNum,limit);
List<ReaderInfo> readerInfoList = readerInfoMapper.queryAllReaderInfo(readerInfo);
return new PageInfo<>(readerInfoList);
}
@Override
public void addReaderInfoSubmit(ReaderInfo readerInfo) {
readerInfoMapper.insert(readerInfo);
}
@Override
public ReaderInfo queryReaderInfoById(Integer id) {
return readerInfoMapper.selectByPrimaryKey(id);
}
@Override
public void updateReaderInfoSubmit(ReaderInfo readerInfo) {
readerInfoMapper.updateByPrimaryKey(readerInfo);
}
@Override
public void deleteReaderInfoByIds(List<String> ids) {
for (String id : ids){
readerInfoMapper.deleteByPrimaryKey(Integer.parseInt(id));
}
}
@Override
public ReaderInfo queryUserInfoByNameAndPassword(String username, String password) {
return readerInfoMapper.queryUserInfoByNameAndPassword(username, password);
}
}

@ -0,0 +1,52 @@
package com.yx.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yx.dao.TypeInfoMapper;
import com.yx.po.TypeInfo;
import com.yx.service.TypeInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
@Service("typeInfoService")
public class TypeInfoServiceImpl implements TypeInfoService {
@Autowired
private TypeInfoMapper typeInfoMapper;
@Override
public PageInfo<TypeInfo> queryTypeInfoAll(String name,Integer pageNum,Integer limit) {
PageHelper.startPage(pageNum,limit);
List<TypeInfo> typeInfoList = typeInfoMapper.queryTypeInfoAll(name);
return new PageInfo<>(typeInfoList);
}
@Override
public void addTypeSubmit(TypeInfo info) {
typeInfoMapper.addTypeSubmit(info);
}
@Override
public TypeInfo queryTypeInfoById(Integer id) {
return typeInfoMapper.queryTypeInfoById(id);
}
@Override
public void updateTypeSubmit(TypeInfo info) {
typeInfoMapper.updateTypeSubmit(info);
}
@Override
public void deleteTypeByIds(List<String> id) {
List<Integer> list=new ArrayList<>();
for(String cid:id){
int id2= Integer.valueOf(cid);
list.add(id2);
}
typeInfoMapper.deleteTypeByIds(list);
}
}
Loading…
Cancel
Save