main
k_m_x 6 months ago
parent bfeec3b685
commit a93cef1812

@ -1,13 +0,0 @@
package com.example.springboot;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class SpringbootApplicationTests {
@Test
void contextLoads() {
}
}

@ -1,216 +0,0 @@
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50737
Source Host : localhost:3306
Source Schema : library-management
Target Server Type : MySQL
Target Server Version : 50737
File Encoding : 65001
Date: 05/11/2022 13:25:48
*/
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,
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户名',
`phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '联系方式',
`email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '邮箱',
`createtime` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
`updatetime` datetime(0) NULL DEFAULT NULL,
`password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '密码',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '状态',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `username_key`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES (1, 'admin', '13988997788', NULL, '2022-10-08 22:21:26', '2022-10-11 20:37:20', 'ead08e95e9c867a2ee833c232bf55dbc', 1);
INSERT INTO `admin` VALUES (2, 'admin1', '13877889900', 'admin1@qq.com', '2022-10-10 21:28:42', '2022-10-11 20:39:41', 'a7dbef0f88b54fad3f91d010a30eff55', 1);
-- ----------------------------
-- Table structure for book
-- ----------------------------
DROP TABLE IF EXISTS `book`;
CREATE TABLE `book` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '名称',
`description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '描述',
`publish_date` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '出版日期',
`author` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '作者',
`publisher` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '出版社',
`category` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '分类',
`book_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '标准码',
`cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '封面',
`createtime` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`updatetime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`score` int(10) NULL DEFAULT NULL COMMENT '积分',
`nums` int(10) NULL DEFAULT 0 COMMENT '数量',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `book_no_index`(`book_no`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of book
-- ----------------------------
INSERT INTO `book` VALUES (1, '西游记幼儿美绘本全10册', '中国四大名著之一西游记3-8岁版彩绘注音有声伴读。49款夸张角色610张精美插图 29个西游问答10大智力挑战以一种超有趣的方式亲近名著经典。', '2022-10-17', '吕进1', '少年儿童出版社', '历史文化 > 唐朝文化', 'ISBN9787558911156', 'http://img3m7.ddimg.cn/10/30/25276987-1_w_44.jpg', '2022-10-17 21:35:14', '2022-10-19 00:00:00', 10, 1);
INSERT INTO `book` VALUES (6, 'Java学习指南', '2222', '2022-10-06', '222', '2', '历史文化 > 唐朝文化', 'JAVA_212113123', 'http://img3m7.ddimg.cn/10/30/25276987-1_w_44.jpg', '2022-10-17 22:30:01', '2022-10-25 00:00:00', 20, 99);
INSERT INTO `book` VALUES (7, '百科全书', '3333', '2022-10-12', '33', '333', '科技 > 高新科技 > 微分子科技', 'BKQS-233131', 'http://img3m7.ddimg.cn/10/30/25276987-1_w_44.jpg', '2022-10-17 22:30:59', '2022-10-25 00:00:00', 10, 97);
INSERT INTO `book` VALUES (8, '童话故事大全', '345', '2022-10-05', '55', '5', '科技 > 生物科技', 'THGS-10011122', 'http://localhost:9090/api/book/file/download/1666707290390?&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxIiwiZXhwIjoxNjY4MDAzMjkwfQ.FtPUrLjNRTbfzauHObyGwy0LWyrqD4VSLylW9Ef7FW8&play=1', '2022-10-17 22:32:16', '2022-10-25 00:00:00', 30, 92);
INSERT INTO `book` VALUES (10, '钢铁是怎样炼成的', NULL, NULL, NULL, NULL, '历史文化 > 现代文化', 'GT-121313213', 'http://localhost:9090/api/book/file/download/1666706911257?&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxIiwiZXhwIjoxNjY4MDAyOTExfQ.DLB80S9v-eWBECESJiigVZooV7ks58D43KUQ2ByJQrI&play=1', '2022-10-25 22:09:08', NULL, 20, 100);
-- ----------------------------
-- Table structure for borrow
-- ----------------------------
DROP TABLE IF EXISTS `borrow`;
CREATE TABLE `borrow` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`book_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '图书名称',
`book_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '图书标准码',
`user_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户会员码',
`user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户名称',
`user_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户联系方式',
`createtime` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`updatetime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`score` int(10) NULL DEFAULT NULL COMMENT '借书积分',
`status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '已借出' COMMENT '借书状态',
`days` int(11) NULL DEFAULT 1 COMMENT '借书天数',
`return_date` datetime(0) NULL DEFAULT NULL COMMENT '归还日期',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of borrow
-- ----------------------------
INSERT INTO `borrow` VALUES (2, '222', '333', '20220927-2094581083', '李芸', '138999009988', '2022-10-19 22:06:32', NULL, 10, '已借出', 2, '2022-10-21 00:00:00');
INSERT INTO `borrow` VALUES (3, '222', '22222', '20220927-2094581083', '李芸', '138999009988', '2022-10-19 22:15:28', NULL, 25, '已借出', 3, '2022-10-22 00:00:00');
INSERT INTO `borrow` VALUES (4, '222', '22222', '20220927-2094581083', '李芸', '138999009988', '2022-10-19 22:16:00', NULL, 25, '已借出', 4, '2022-10-23 00:00:00');
INSERT INTO `borrow` VALUES (5, '222', '22222', '20220927-2094581083', '李芸', '138999009988', '2022-10-19 22:16:26', NULL, 30, '已借出', 5, '2022-10-24 00:00:00');
INSERT INTO `borrow` VALUES (6, '222', '22222', '202209271239528742', '王二文案', '13988990099', '2022-10-19 22:19:18', NULL, 30, '已借出', 6, '2022-10-25 00:00:00');
INSERT INTO `borrow` VALUES (7, '222', '22222', '202209271239528742', '王二文案', '13988990099', '2022-10-19 22:19:40', NULL, 30, '已借出', 7, '2022-10-26 00:00:00');
INSERT INTO `borrow` VALUES (8, '222', '22222', '202209271239528742', '王二文案', '13988990099', '2022-10-19 22:19:47', NULL, 30, '已归还', 8, '2022-10-27 00:00:00');
INSERT INTO `borrow` VALUES (9, '222', '22222', '202209271018800687', '测试', NULL, '2022-10-19 22:30:22', NULL, 30, '已归还', 9, '2022-10-28 00:00:00');
INSERT INTO `borrow` VALUES (10, '222', '22222', '202209271018800687', '测试', NULL, '2022-10-19 22:30:47', NULL, 30, '已归还', 10, '2022-10-29 00:00:00');
INSERT INTO `borrow` VALUES (12, 'Java学习指南', 'JAVA_212113123', '202209271239528742', '苗洋洋', '13988990099', '2022-10-25 19:34:03', NULL, 20, '已归还', 3, '2022-10-28 00:00:00');
INSERT INTO `borrow` VALUES (13, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-25 21:18:25', NULL, 20, '已归还', 3, '2022-10-28 00:00:00');
INSERT INTO `borrow` VALUES (14, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-25 21:19:58', NULL, 20, '已归还', 3, '2022-10-28 00:00:00');
INSERT INTO `borrow` VALUES (15, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-25 21:23:02', NULL, 20, '已归还', 3, '2022-10-28 00:00:00');
INSERT INTO `borrow` VALUES (16, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-25 21:24:37', NULL, 20, '已归还', 3, '2022-10-28 00:00:00');
INSERT INTO `borrow` VALUES (17, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-25 21:25:49', NULL, 20, '已归还', 4, '2022-10-29 00:00:00');
INSERT INTO `borrow` VALUES (18, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-25 21:27:37', NULL, 80, '已归还', 4, '2022-10-22 00:00:00');
INSERT INTO `borrow` VALUES (19, 'Java学习指南', 'JAVA_212113123', '202209271018800687', '落布', NULL, '2022-11-01 10:34:59', NULL, 20, '已归还', 1, '2022-11-06 00:00:00');
INSERT INTO `borrow` VALUES (20, '百科全书', 'BKQS-233131', '202209271213716465', '卡森', '13988990066', '2022-11-01 10:35:06', NULL, 10, '已归还', 1, '2022-11-06 00:00:00');
INSERT INTO `borrow` VALUES (21, '钢铁是怎样炼成的', 'GT-121313213', '202209271018800687', '落布', NULL, '2022-11-02 10:35:17', NULL, 40, '已归还', 2, '2022-11-07 00:00:00');
INSERT INTO `borrow` VALUES (22, 'Java学习指南', 'JAVA_212113123', '202209271239528742', '苗洋洋', '13988990099', '2022-11-04 10:36:05', NULL, 40, '已归还', 2, '2022-11-07 00:00:00');
INSERT INTO `borrow` VALUES (23, '百科全书', 'BKQS-233131', '202209271239528742', '苗洋洋', '13988990099', '2022-11-05 10:36:15', NULL, 10, '已归还', 1, '2022-11-06 00:00:00');
INSERT INTO `borrow` VALUES (24, 'Java学习指南', 'JAVA_212113123', '20220927-2094581083', '李芸', '138999009988', '2022-11-05 11:46:51', NULL, 20, '已借出', 1, '2022-11-06 00:00:00');
INSERT INTO `borrow` VALUES (25, '百科全书', 'BKQS-233131', '202209271239528742', '苗洋洋', '13988990099', '2022-11-05 11:47:13', NULL, 10, '已借出', 1, '2022-11-06 00:00:00');
-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '名称',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',
`pid` int(11) NULL DEFAULT NULL COMMENT '父级id',
`createtime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
`updatetime` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of category
-- ----------------------------
INSERT INTO `category` VALUES (3, '历史文化', '历史文化', NULL, '2022-10-12 20:42:53', NULL);
INSERT INTO `category` VALUES (4, '唐朝文化', '唐朝文化', 3, '2022-10-12 20:43:21', NULL);
INSERT INTO `category` VALUES (5, '宋朝文化', NULL, 3, '2022-10-12 20:46:29', NULL);
INSERT INTO `category` VALUES (9, '现代文化', '现代文化', 3, '2022-10-12 21:00:41', NULL);
INSERT INTO `category` VALUES (10, '科技', '科技', NULL, '2022-10-12 21:50:08', NULL);
INSERT INTO `category` VALUES (11, '高新科技', NULL, 10, '2022-10-12 21:50:16', NULL);
INSERT INTO `category` VALUES (12, '生物科技', '生物科技', 10, '2022-10-12 21:50:22', NULL);
INSERT INTO `category` VALUES (13, '微分子科技', NULL, 11, '2022-10-17 22:11:44', NULL);
-- ----------------------------
-- Table structure for retur
-- ----------------------------
DROP TABLE IF EXISTS `retur`;
CREATE TABLE `retur` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`book_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '图书名称',
`book_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '图书标准码',
`user_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户会员码',
`user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户名称',
`user_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户联系方式',
`createtime` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`updatetime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`score` int(10) NULL DEFAULT NULL COMMENT '借书积分',
`status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '已借出' COMMENT '借书状态',
`days` int(11) NULL DEFAULT 1 COMMENT '借书天数',
`return_date` datetime(0) NULL DEFAULT NULL COMMENT '归还日期',
`real_date` datetime(0) NULL DEFAULT NULL COMMENT '实际归还日期',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of retur
-- ----------------------------
INSERT INTO `retur` VALUES (2, 'Java学习指南', 'JAVA_212113123', '202209271239528742', '苗洋洋', '13988990099', '2022-10-25 20:18:59', NULL, 20, '已借出', 3, '2022-10-28 00:00:00', NULL);
INSERT INTO `retur` VALUES (3, '222', '22222', '202209271018800687', '测试', NULL, '2022-10-25 20:21:41', NULL, 30, '已借出', 10, '2022-10-29 00:00:00', '2022-10-25 00:00:00');
INSERT INTO `retur` VALUES (4, '222', '22222', '202209271018800687', '测试', NULL, '2022-10-25 20:21:53', NULL, 30, '已借出', 9, '2022-10-28 00:00:00', '2022-10-25 00:00:00');
INSERT INTO `retur` VALUES (5, '222', '22222', '202209271239528742', '王二文案', '13988990099', '2022-10-25 20:21:55', NULL, 30, '已借出', 8, '2022-10-27 00:00:00', '2022-10-25 00:00:00');
INSERT INTO `retur` VALUES (6, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-25 21:19:01', NULL, 20, '已借出', 3, '2022-10-28 00:00:00', '2022-10-25 00:00:00');
INSERT INTO `retur` VALUES (7, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-25 21:20:04', NULL, 20, '已借出', 3, '2022-10-28 00:00:00', '2022-10-25 00:00:00');
INSERT INTO `retur` VALUES (8, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-25 21:23:08', NULL, 20, '已借出', 3, '2022-10-28 00:00:00', '2022-10-25 00:00:00');
INSERT INTO `retur` VALUES (9, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-25 21:24:47', NULL, 20, '已归还', 3, '2022-10-28 00:00:00', '2022-10-25 00:00:00');
INSERT INTO `retur` VALUES (10, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-30 21:27:19', NULL, 20, '已归还', 4, '2022-10-29 00:00:00', '2022-10-25 00:00:00');
INSERT INTO `retur` VALUES (11, 'Java学习指南', 'JAVA_212113123', '20220927688792394', '杰克', '13977889988', '2022-10-31 21:28:35', NULL, 80, '已归还', 4, '2022-10-22 00:00:00', '2022-10-25 00:00:00');
INSERT INTO `retur` VALUES (12, '百科全书', 'BKQS-233131', '202209271239528742', '苗洋洋', '13988990099', '2022-11-01 10:36:18', NULL, 10, '已归还', 1, '2022-11-06 00:00:00', '2022-11-01 00:00:00');
INSERT INTO `retur` VALUES (13, 'Java学习指南', 'JAVA_212113123', '202209271239528742', '苗洋洋', '13988990099', '2022-11-02 10:36:18', NULL, 40, '已归还', 2, '2022-11-07 00:00:00', '2022-11-02 00:00:00');
INSERT INTO `retur` VALUES (14, '钢铁是怎样炼成的', 'GT-121313213', '202209271018800687', '落布', NULL, '2022-11-03 10:36:19', NULL, 40, '已归还', 2, '2022-11-07 00:00:00', '2022-11-03 00:00:00');
INSERT INTO `retur` VALUES (15, '百科全书', 'BKQS-233131', '202209271213716465', '卡森', '13988990066', '2022-11-05 10:36:19', NULL, 10, '已归还', 1, '2022-11-06 00:00:00', '2022-11-05 00:00:00');
INSERT INTO `retur` VALUES (16, 'Java学习指南', 'JAVA_212113123', '202209271018800687', '落布', NULL, '2022-11-05 10:36:20', NULL, 20, '已归还', 1, '2022-11-06 00:00:00', '2022-11-05 00:00:00');
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '姓名',
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '会员码',
`age` int(11) NULL DEFAULT NULL COMMENT '年龄',
`sex` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '性别',
`phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '联系方式',
`address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '地址',
`createtime` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
`updatetime` datetime(0) NULL DEFAULT NULL,
`account` int(10) NULL DEFAULT 0 COMMENT '账户余额',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '禁用状态 1不禁用',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `username_index`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 24 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (19, '苗洋洋', '202209271239528742', 18, '', '13988990099', '合肥', '2022-09-27 22:10:36', '2022-10-25 19:32:13', 130, 1);
INSERT INTO `user` VALUES (20, '李芸', '20220927-2094581083', 24, '', '138999009988', '合肥', '2022-09-27 22:16:03', NULL, 0, 1);
INSERT INTO `user` VALUES (21, '落布', '202209271018800687', 20, NULL, NULL, NULL, '2022-09-27 22:17:06', '2022-10-25 19:31:20', 140, 1);
INSERT INTO `user` VALUES (22, '卡森', '202209271213716465', 22, '', '13988990066', NULL, '2022-09-27 22:34:48', '2022-10-25 19:31:12', 100, 1);
INSERT INTO `user` VALUES (23, '杰克', '20220927688792394', 33, '', '13977889988', NULL, '2022-09-27 22:35:35', '2022-10-25 21:07:15', -40, 0);
SET FOREIGN_KEY_CHECKS = 1;

@ -1,19 +0,0 @@
# vue
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

@ -2,4 +2,4 @@ module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
}

@ -16,4 +16,4 @@
"scripthost"
]
}
}
}

@ -17348,4 +17348,4 @@
}
}
}
}
}

@ -27,4 +27,4 @@
"last 2 versions",
"not dead"
]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

@ -2,5 +2,4 @@
<div id="app">
<router-view />
</div>
</template>
</template>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

@ -1,7 +1,8 @@
body {
margin: 0;
padding: 0;
background-color: #eee;
background-image: url("shouye1.png");
background-size: cover;
}
* {
box-sizing: border-box;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 KiB

@ -13,4 +13,4 @@ Vue.use(ElementUI, { size: 'small' }); // medium small mini
new Vue({
router,
render: h => h(App)
}).$mount('#app')
}).$mount('#app')

@ -8,6 +8,7 @@
</div>
<div style="flex: 1; text-align: right; padding-right: 20px">
<el-dropdown size="medium">
<img src="@/assets/girl.png" alt="" style="width: 30px;position: relative;top: 10px;right: 5px;">
<span class="el-dropdown-link" style="cursor: pointer">
{{ admin.username }}<i class="el-icon-arrow-down el-icon--right"></i>
</span>

@ -14,7 +14,7 @@
</el-form>
<div style="text-align: center; margin-top: 30px">
<el-button type="primary" @click="save" size="medium">提交</el-button>
<el-button class="botton1" @click="save" size="medium">提交</el-button>
</div>
</div>
</template>
@ -64,3 +64,19 @@ export default {
</script>
<style>
.botton1{
color: white;
margin-left: 5px;
border-radius: 10px;
background-color: #4169E1;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.botton1:hover{
background-color: lightblue;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
</style>

@ -14,7 +14,7 @@
</el-form>
<div style="text-align: center; margin-top: 30px">
<el-button type="primary" @click="save" size="medium">提交</el-button>
<el-button class="botton1" @click="save" size="medium">提交</el-button>
</div>
</div>
</template>
@ -51,3 +51,18 @@ export default {
</script>
<style>
.botton1{
color: white;
margin-left: 5px;
border-radius: 10px;
background-color: #4169E1;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.botton1:hover{
background-color: lightblue;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
</style>

@ -53,7 +53,7 @@
</el-form>
<div style="text-align: center; margin-top: 30px">
<el-button type="primary" @click="save" size="medium">提交</el-button>
<el-button class="botton1" @click="save" size="medium">提交</el-button>
</div>
</div>
</template>
@ -149,4 +149,17 @@ export default {
height: 178px;
display: block;
}
.botton1{
color: white;
margin-left: 5px;
border-radius: 10px;
background-color: #4169E1;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.botton1:hover{
background-color: lightblue;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
</style>

@ -50,7 +50,7 @@
</el-form>
<div style="text-align: center; margin-top: 30px">
<el-button type="primary" @click="save" size="medium">提交</el-button>
<el-button class="botton1" @click="save" size="medium">提交</el-button>
</div>
</div>
</template>
@ -138,5 +138,16 @@ export default {
height: 178px;
display: block;
}
.botton1{
margin-left: 5px;
border-radius: 10px;
background-color: #4169E1;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.botton1:hover{
background-color: lightblue;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
</style>

@ -47,7 +47,7 @@
</el-form>
<div style="text-align: center; margin-top: 30px">
<el-button type="primary" @click="save" size="medium">提交</el-button>
<el-button class="botton1" @click="save" size="medium">提交</el-button>
</div>
</div>
</template>
@ -117,3 +117,18 @@ export default {
</script>
<style>
.botton1{
color: white;
margin-left: 5px;
border-radius: 10px;
background-color: #4169E1;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.botton1:hover{
background-color: lightblue;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
</style>

@ -48,7 +48,7 @@
</el-form>
<div style="text-align: center; margin-top: 30px">
<el-button type="primary" @click="save" size="medium">提交</el-button>
<el-button class="botton1" @click="save" size="medium">提交</el-button>
</div>
</div>
</template>
@ -119,3 +119,18 @@ export default {
</script>
<style>
.botton1{
color: white;
margin-left: 5px;
border-radius: 10px;
background-color: #4169E1;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.botton1:hover{
background-color: lightblue;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
</style>

@ -11,7 +11,7 @@
</el-form>
<div style="text-align: center; margin-top: 30px">
<el-button type="primary" @click="save" size="medium">提交</el-button>
<el-button class="botton1" @click="save" size="medium">提交</el-button>
</div>
</div>
</template>
@ -51,3 +51,18 @@ export default {
</script>
<style>
.botton1{
color: white;
margin-left: 5px;
border-radius: 10px;
background-color: #4169E1;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.botton1:hover{
background-color: lightblue;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
</style>

@ -11,7 +11,7 @@
</el-form>
<div style="text-align: center; margin-top: 30px">
<el-button type="primary" @click="save" size="medium">提交</el-button>
<el-button class="botton1" @click="save" size="medium">提交</el-button>
</div>
</div>
</template>
@ -53,3 +53,18 @@ export default {
</script>
<style>
.botton1{
color: white;
margin-left: 5px;
border-radius: 10px;
background-color: #4169E1;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.botton1:hover{
background-color: lightblue;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
</style>

@ -1,19 +1,12 @@
<template>
<div>
<div style="margin: 20px 0">
<el-select
class="input"
v-model="timeRange"
placeholder="请选择"
@change="load"
>
<!-- 从后台加载最新的数据 -->
<el-select class="input" v-model="timeRange" placeholder="请选择" @change="load"> <!-- -->
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
@ -24,90 +17,89 @@
</template>
<script>
import Cookies from "js-cookie";
import Cookies from 'js-cookie'
import request from "@/utils/request";
import * as echarts from "echarts";
import * as echarts from 'echarts'
const option = {
title: {
text: "图书借还统计",
text: '图书借还统计'
},
tooltip: {
trigger: "axis",
trigger: 'axis'
},
legend: {
data: ["借书数量", "还书数量"],
data: ['借书数量', '还书数量']
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {},
},
saveAsImage: {}
}
},
xAxis: {
type: "category",
type: 'category',
boundaryGap: false,
data: [], //
data: [] //
},
yAxis: {
type: "value",
type: 'value'
},
series: [
{
name: "借书数量",
type: "line",
stack: "Total",
name: '借书数量',
type: 'line',
stack: 'Total',
smooth: true,
data: [], //
data: [] //
},
{
name: "还书数量",
type: "line",
stack: "Total",
name: '还书数量',
type: 'line',
stack: 'Total',
smooth: true,
data: [], //
},
],
};
data: [] //
}
]
}
export default {
data() {
return {
admin: Cookies.get("admin") ? JSON.parse(Cookies.get("admin")) : {},
lineBox: null,
timeRange: "week",
options: [
{ label: "最近一周", value: "week" },
{ label: "最近一个月", value: "month" },
{ label: "最近两个月", value: "month2" },
{ label: "最近三个月", value: "month3" },
],
};
},
mounted() {
//
this.load();
},
methods: {
load() {
if (!this.lineBox) {
this.lineBox = echarts.init(document.getElementById("line")); // echarts
export default {
data() {
return {
admin: Cookies.get('admin') ? JSON.parse(Cookies.get('admin')) : {},
lineBox: null,
timeRange: 'week',
options: [
{label: '最近一周', value: 'week'},
{label: '最近一个月', value: 'month'},
{label: '最近两个月', value: 'month2'},
{label: '最近三个月', value: 'month3'},
]
}
//
request.get("/borrow/lineCharts/" + this.timeRange).then((res) => {
option.xAxis.data = res.data.date;
option.series[0].data = res.data.borrow;
option.series[1].data = res.data.retur;
this.lineBox.setOption(option); // setOption
});
},
},
};
mounted() { //
this.load()
},
methods: {
load() {
if (!this.lineBox) {
this.lineBox = echarts.init(document.getElementById('line')) // echarts
}
//
request.get('/borrow/lineCharts/' + this.timeRange).then(res => {
option.xAxis.data = res.data.date
option.series[0].data = res.data.borrow
option.series[1].data = res.data.retur
this.lineBox.setOption(option) // setOption
})
}
}
}
</script>
<style>

@ -16,21 +16,22 @@
></slide-verify>
</el-card>
<div style="width: 500px; height: 400px; background-color: white; border-radius: 10px;
margin: 150px auto; padding:50px">
<div style="margin: 30px; text-align: center; font-size: 30px; font-weight: bold; color: dodgerblue"> </div>
<div class="box1">
<div class="box2">
<div style="margin-top: 50px;text-align: center;font-size: 40px;color: white;margin-bottom: 50px;font-family: Yuanti SC;">L O G I N</div>
<el-form :model="admin" :rules="rules" ref="loginForm">
<el-form-item prop="username">
<el-input placeholder="请输入账号" prefix-icon="el-icon-user" size="medium" v-model="admin.username"></el-input>
<el-input placeholder="请输入账号" prefix-icon="el-icon-user" v-model="admin.username"></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input placeholder="请输入密码" show-password prefix-icon="el-icon-lock" size="medium" v-model="admin.password"></el-input>
<el-input placeholder="请输入密码" show-password prefix-icon="el-icon-lock" v-model="admin.password"></el-input>
</el-form-item>
<el-form-item>
<el-button style="width: 100%" size="medium" type="primary" @click="login"></el-button>
<el-button class="button1-hover" size="medium" @click="login"> </el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
</template>
@ -86,13 +87,48 @@ export default {
</script>
<style>
.cover {
width: fit-content;
background-color: white;
position: absolute;
.cover{
width:fit-content;
background-color:white;
position:absolute;
top:50%;
left:50%;
transform: translate(-50%, -50%);
z-index: 1000;
transform:translate(-50%,-50%);
z-index:1000;
}
.box1{
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: url("background.png");
background-size: cover;
}
.box2{
width: 450px;
height: 500px;
background-color: rgba(60,60,60,0.5);
border-radius: 10px;
display: flex;
flex-direction: column;
margin: 100px auto;
align-items: center;
padding: 40px;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
}
.button1-hover {
margin-top: 15px;
width: 100%;
background-color: rgb(30, 27, 248);
color: white;
border-radius: 15px;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
transition: box-shadow 0.3s ease;
}
.button1-hover:hover {
background-color: #1E90FF;
box-shadow: 0px 8px 10px rgba(0, 0, 0, 0.2);
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 KiB

@ -21,7 +21,7 @@
</el-form>
<div style="text-align: center; margin-top: 30px">
<el-button type="primary" @click="save" size="medium">提交</el-button>
<el-button class="botton1" @click="save" size="medium">提交</el-button>
</div>
</div>
</template>
@ -85,3 +85,18 @@ export default {
</script>
<style>
.botton1{
color: white;
margin-left: 5px;
border-radius: 10px;
background-color: #4169E1;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.botton1:hover{
background-color: lightblue;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
</style>

@ -23,7 +23,7 @@
</el-form>
<div style="text-align: center; margin-top: 30px">
<el-button type="primary" @click="save" size="medium">提交</el-button>
<el-button class="botton1" @click="save" size="medium">提交</el-button>
</div>
</div>
</template>
@ -60,3 +60,18 @@ export default {
</script>
<style>
.botton1{
color: white;
margin-left: 5px;
border-radius: 10px;
background-color: #4169E1;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.botton1:hover{
background-color: lightblue;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
</style>

@ -123,11 +123,6 @@ export default {
})
},
load() {
// fetch('http://localhost:9090/user/list').then(res => res.json()).then(res => {
// console.log(res)
// this.tableData = res
// })
request.get('/user/page', {
params: this.params
}).then(res => {

@ -1,4 +1,4 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})
})
Loading…
Cancel
Save