diff --git a/docs/sql/2026-10-29-course-resources.sql b/docs/sql/2026-10-29-course-resources.sql
new file mode 100644
index 0000000..c75c9ea
--- /dev/null
+++ b/docs/sql/2026-10-29-course-resources.sql
@@ -0,0 +1,47 @@
+-- 课程资源独立大纲。部署时执行本脚本,不复制或备份附件目录。
+CREATE TABLE course_resource_node (
+ id BIGINT NOT NULL AUTO_INCREMENT,
+ parent_id BIGINT NULL,
+ owner_id VARCHAR(64) NOT NULL DEFAULT '' COMMENT '空字符串为内置目录,否则为教师ID',
+ name VARCHAR(200) NOT NULL,
+ depth INT NOT NULL,
+ sort_order INT NOT NULL DEFAULT 0,
+ default_open BOOLEAN NOT NULL DEFAULT FALSE COMMENT '内置第一章默认开放,教师目录默认开放',
+ created_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
+ PRIMARY KEY (id),
+ KEY idx_course_node_parent_owner (parent_id, owner_id, sort_order),
+ CONSTRAINT fk_course_node_parent FOREIGN KEY (parent_id) REFERENCES course_resource_node(id) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+CREATE TABLE course_resource_file (
+ id BIGINT NOT NULL AUTO_INCREMENT,
+ node_id BIGINT NOT NULL,
+ owner_id VARCHAR(64) NOT NULL DEFAULT '',
+ uploader_name VARCHAR(200) NOT NULL,
+ name VARCHAR(255) NOT NULL,
+ storage_path VARCHAR(1024) NOT NULL,
+ size BIGINT NOT NULL,
+ created_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
+ PRIMARY KEY (id),
+ KEY idx_course_file_node_owner (node_id, owner_id),
+ CONSTRAINT fk_course_file_node FOREIGN KEY (node_id) REFERENCES course_resource_node(id) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+CREATE TABLE course_resource_visibility (
+ teacher_id VARCHAR(64) NOT NULL,
+ node_id BIGINT NOT NULL,
+ class_id VARCHAR(64) NOT NULL,
+ visible BOOLEAN NOT NULL,
+ opened_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
+ PRIMARY KEY (teacher_id, node_id, class_id),
+ CONSTRAINT fk_course_visibility_node FOREIGN KEY (node_id) REFERENCES course_resource_node(id) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+CREATE TABLE course_resource_learning (
+ student_id VARCHAR(64) NOT NULL,
+ class_id VARCHAR(64) NOT NULL,
+ file_id BIGINT NOT NULL,
+ learned_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
+ PRIMARY KEY (student_id, class_id, file_id),
+ CONSTRAINT fk_course_learning_file FOREIGN KEY (file_id) REFERENCES course_resource_file(id) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
diff --git a/pom.xml b/pom.xml
index abda9de..44aad1a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,6 +20,12 @@
UTF-8
+
+
+ com.h2database
+ h2
+ test
+
diff --git a/src/main/java/com/sztzjy/linkCommerce/controller/common/CourseResourceController.java b/src/main/java/com/sztzjy/linkCommerce/controller/common/CourseResourceController.java
new file mode 100644
index 0000000..e58136e
--- /dev/null
+++ b/src/main/java/com/sztzjy/linkCommerce/controller/common/CourseResourceController.java
@@ -0,0 +1,79 @@
+package com.sztzjy.linkCommerce.controller.common;
+
+import com.sztzjy.linkCommerce.config.security.JwtUser;
+import com.sztzjy.linkCommerce.config.security.TokenProvider;
+import com.sztzjy.linkCommerce.service.CourseResourceService;
+import com.sztzjy.linkCommerce.util.ResultEntity;
+import org.springframework.core.io.Resource;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("api/course-resources")
+public class CourseResourceController {
+ private final CourseResourceService service;
+ public CourseResourceController(CourseResourceService service) { this.service = service; }
+
+ @GetMapping("/management")
+ public ResultEntity