电子公文传输系统 团队作业 冲刺总结(五)
1.今日任务安排
- 确定每个人撰写的前端和后端部分代码以及数据库部分代码
- 开始撰写具体的代码
2.遇到的困难
- 具体代码编写过程中由于编程语言和web网页设计不是很熟练,所以花了不少时间在相关编程网站学习并回忆之前遗忘的知识点。
- 在和chatgpt描述功能设计时不够清楚,写出来的代码不尽如人意,在找到学长学姐的代码后具体分析后成功解决了这一问题。
3.今日成果
创建一个 MySQL 数据库,代码如下:
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`id` bigint NOT NULL AUTO_INCREMENT,
`category_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '类别' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of category
-- ----------------------------
INSERT INTO `category` VALUES (1, '密码系');
INSERT INTO `category` VALUES (2, '电通系');
INSERT INTO `category` VALUES (3, '网空系');
INSERT INTO `category` VALUES (4, '管理系');
-- ----------------------------
-- Table structure for file
-- ----------------------------
DROP TABLE IF EXISTS `file`;
CREATE TABLE `file` (
`id` bigint NOT NULL AUTO_INCREMENT,
`title` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '标题',
`remark` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注',
`url` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '文件地址',
`input_date` datetime NULL DEFAULT NULL COMMENT '存入日期',
`from_user` bigint NULL DEFAULT NULL COMMENT '上传者',
`type_id` bigint NULL DEFAULT NULL COMMENT '密级ID',
`level` int NULL DEFAULT NULL COMMENT '紧急程度',
`is_deleted` int NULL DEFAULT 0 COMMENT '逻辑删除',
`number` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '字号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 28 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '文件' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of file
-- ----------------------------
INSERT INTO `file` VALUES (24, '123', '123', '', '2023-11-27 19:04:25', 1, 2, 1, 0, NULL);
INSERT INTO `file` VALUES (25, '20211309', '20211309', '49e34607-6117-42a6-bbe1-07ca49441afd.txt', '2023-11-27 19:14:33', 1, 3, 2, 0, NULL);
INSERT INTO `file` VALUES (26, 'test', 'test', '00f647f5-6bcc-4810-8e3c-812f1d30cd84.txt', '2023-11-28 19:05:11', 1, 3, 3, 0, NULL);
INSERT INTO `file` VALUES (27, 'test01', 'test01', '7c5d5ef2-ff5d-409f-8d8c-a717ab1e2685.txt', '2023-11-28 19:18:19', 1, 3, 4, 0, NULL);
INSERT INTO `file` VALUES (28, '20211309nxy', '测试', '7347f2e5-8f7a-4d33-83ee-c1a8f370c343.txt', '2023-11-28 22:59:45', 3, 2, 2, 0, NULL);
-- ----------------------------
-- Table structure for file_category_list
-- ----------------------------
DROP TABLE IF EXISTS `file_category_list`;
CREATE TABLE `file_category_list` (
`id` bigint NOT NULL,
`user_id` bigint NULL DEFAULT NULL COMMENT '用户ID',
`file_id` bigint NULL DEFAULT NULL COMMENT '文件ID',
`category_id` bigint NULL DEFAULT NULL COMMENT '归档ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of file_category_list
-- ----------------------------
INSERT INTO `file_category_list` VALUES (1596392096267730946, 2, 2, 1596381194499895298);
INSERT INTO `file_category_list` VALUES (1728760802596057089, 1, 4, 1728760780575961089);
INSERT INTO `file_category_list` VALUES (1728760844950138882, 1, 2, 1728760780575961089);
INSERT INTO `file_category_list` VALUES (1729095917402529793, 1, 5, 1728760780575961089);
INSERT INTO `file_category_list` VALUES (1729096959322169346, 1, 25, 1728760780575961089);
-- ----------------------------
-- Table structure for filecategory
-- ----------------------------
DROP TABLE IF EXISTS `filecategory`;
CREATE TABLE `filecategory` (
`id` bigint NOT NULL,
`name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '分类归档名',
`user_id` bigint NULL DEFAULT NULL COMMENT '用户ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of filecategory
-- ----------------------------
INSERT INTO `filecategory` VALUES (1596381165043298305, '文化', 2);
INSERT INTO `filecategory` VALUES (1596381194499895298, '重要', 2);
INSERT INTO `filecategory` VALUES (1596381639230337025, '213', 2);
INSERT INTO `filecategory` VALUES (1596451774389538817, '123333', 2);
INSERT INTO `filecategory` VALUES (1728760760120340482, '', 1);
INSERT INTO `filecategory` VALUES (1728760780575961089, 'abc', 1);
-- ----------------------------
-- Table structure for filesend
-- ----------------------------
DROP TABLE IF EXISTS `filesend`;
CREATE TABLE `filesend` (
`id` bigint NOT NULL AUTO_INCREMENT,
`from_user` bigint NULL DEFAULT NULL COMMENT '源用户',
`to_user` bigint NULL DEFAULT NULL COMMENT '目标用户',
`file` bigint NULL DEFAULT NULL COMMENT '文件',
`status` int NULL DEFAULT NULL COMMENT '状态(0:已发送,1:已接收,2:已退回)',
`send_time` datetime NULL DEFAULT NULL COMMENT '发送时间',
`solve_time` datetime NULL DEFAULT NULL COMMENT '处理时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '文件收发' ROW_FORMAT = DYNAMIC;