diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..753e615 --- /dev/null +++ b/Readme.md @@ -0,0 +1,3 @@ +软件工程结对作业前后端实现 + +> 前端参考之前的UU考勤项目 \ No newline at end of file diff --git a/backend/src/main/java/com/flyingpig/kclassrollcall/controller/StudentController.java b/backend/src/main/java/com/flyingpig/kclassrollcall/controller/StudentController.java index 4f28335..3496094 100644 --- a/backend/src/main/java/com/flyingpig/kclassrollcall/controller/StudentController.java +++ b/backend/src/main/java/com/flyingpig/kclassrollcall/controller/StudentController.java @@ -1,21 +1,15 @@ package com.flyingpig.kclassrollcall.controller; -import com.alibaba.excel.EasyExcel; import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.read.listener.ReadListener; import com.flyingpig.kclassrollcall.common.Result; import com.flyingpig.kclassrollcall.entity.Student; -import com.flyingpig.kclassrollcall.filter.UserContext; import com.flyingpig.kclassrollcall.service.IStudentService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; - -import java.io.File; -import java.io.IOException; - /** *

* 前端控制器 diff --git a/backend/src/main/resources/table.sql b/backend/src/main/resources/table.sql new file mode 100644 index 0000000..dcf3dde --- /dev/null +++ b/backend/src/main/resources/table.sql @@ -0,0 +1,59 @@ +/* + Navicat Premium Data Transfer + + Source Server : k-class-roll-call + Source Server Type : MySQL + Source Server Version : 80032 (8.0.32) + Source Host : localhost:3306 + Source Schema : k-class-roll-call + + Target Server Type : MySQL + Target Server Version : 80032 (8.0.32) + File Encoding : 65001 + + Date: 28/09/2024 11:06:20 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for student +-- ---------------------------- +DROP TABLE IF EXISTS `student`; +CREATE TABLE `student` ( + `id` bigint NOT NULL, + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, + `no` int NULL DEFAULT NULL, + `major` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, + `score` decimal(10, 2) NULL DEFAULT NULL, + `teacher_id` bigint NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of student +-- ---------------------------- +INSERT INTO `student` VALUES (1, '朱嘉翔', 102201604, '计算机科学与技术', 25.50, 1); +INSERT INTO `student` VALUES (2, '范国鑫', 102201525, '计算机科学与技术', 34.00, 1); +INSERT INTO `student` VALUES (1839635335860477954, '庄学鹏', 102201605, '计算机科学与技术', 9.00, 1); + +-- ---------------------------- +-- Table structure for teacher +-- ---------------------------- +DROP TABLE IF EXISTS `teacher`; +CREATE TABLE `teacher` ( + `id` bigint NOT NULL, + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of teacher +-- ---------------------------- +INSERT INTO `teacher` VALUES (1, '1', '1', '1'); +INSERT INTO `teacher` VALUES (1839133469267496961, 'flyingpig', 'flyingpig', 'flyingpig'); + +SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file