+ * 前端控制器 + *
+ * + * @author author + * @since 2024-06-07 + */ +@RestController +@RequestMapping("/chapter") +public class ChapterController { + +} diff --git a/src/main/java/com/teaching/backend/controller/CommonController.java b/src/main/java/com/teaching/backend/controller/CommonController.java new file mode 100644 index 0000000..00bb8d3 --- /dev/null +++ b/src/main/java/com/teaching/backend/controller/CommonController.java @@ -0,0 +1,151 @@ +package com.teaching.backend.controller; + +import com.aliyun.oss.OSS; +import com.aliyun.oss.OSSClientBuilder; +import com.aliyun.oss.model.OSSObject; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.teaching.backend.common.BaseResponse; +import com.teaching.backend.common.ResultUtils; +import com.teaching.backend.model.entity.FileTable; +import com.teaching.backend.service.FileTableService; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.awt.*; +import java.io.*; +import java.nio.file.Paths; +import java.util.Date; +import java.util.UUID; + +/** + * ClassName: CommonController + * Package: com.teaching.backend.controller + * Description: + * + * @Author 姜钧瀚 + * @Create 2024/6/1 10:30 + * @Version 1.0 + */ +@RestController +public class CommonController { + + + @Resource + private FileTableService fileTableService; + + @Value("${aliyun.oss.endpoint}") + private String endpoint; + + @Value("${aliyun.oss.accessKeyId}") + private String accessKeyId; + + @Value("${aliyun.oss.accessKeySecret}") + private String accessKeySecret; + + @Value("${aliyun.oss.bucketName}") + private String bucketName; + + + @PostMapping("/upload") + public BaseResponse+ * 前端控制器 + *
+ * + * @author zjh + * @since 2024-05-31 + */ +@Api(tags = "项目目标管理接口") +@RestController +@RequestMapping("/course_objectives") +public class CourseObjectivesController { + + + @Autowired + ICourseObjectivesService courseObjectivesService; + + @Autowired + CourseObjectivesMapper courseObjectivesMapper; + + @ApiOperation("新增分项目标-默认第一个必须添加思政目标") + @PostMapping("/addobjectives") + public BaseResponse+ * 前端控制器 + *
+ * + * @author zjh + * @since 2024-05-30 + */ +@Api(tags = "教师管理课程接口") +@RestController +@RequestMapping("/coursesteacher") +public class CoursesController { + + @Autowired + ICoursesService coursesService; + @ApiOperation("网站首页") + @GetMapping("/index") + public BaseResponse