diff --git a/StudentManagerSystemApi - idea/.idea/.gitignore b/StudentManagerSystemApi - idea/.idea/.gitignore
new file mode 100644
index 00000000..13566b81
--- /dev/null
+++ b/StudentManagerSystemApi - idea/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/StudentManagerSystemApi - idea/.idea/compiler.xml b/StudentManagerSystemApi - idea/.idea/compiler.xml
new file mode 100644
index 00000000..6b1fc771
--- /dev/null
+++ b/StudentManagerSystemApi - idea/.idea/compiler.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/StudentManagerSystemApi - idea/.idea/encodings.xml b/StudentManagerSystemApi - idea/.idea/encodings.xml
new file mode 100644
index 00000000..63e90019
--- /dev/null
+++ b/StudentManagerSystemApi - idea/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/StudentManagerSystemApi - idea/.idea/inspectionProfiles/Project_Default.xml b/StudentManagerSystemApi - idea/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 00000000..27ad6494
--- /dev/null
+++ b/StudentManagerSystemApi - idea/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/StudentManagerSystemApi - idea/.idea/jarRepositories.xml b/StudentManagerSystemApi - idea/.idea/jarRepositories.xml
new file mode 100644
index 00000000..7309c9df
--- /dev/null
+++ b/StudentManagerSystemApi - idea/.idea/jarRepositories.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/StudentManagerSystemApi - idea/.idea/misc.xml b/StudentManagerSystemApi - idea/.idea/misc.xml
new file mode 100644
index 00000000..0d3b99fc
--- /dev/null
+++ b/StudentManagerSystemApi - idea/.idea/misc.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/StudentManagerSystemApi - idea/pom.xml b/StudentManagerSystemApi - idea/pom.xml
new file mode 100644
index 00000000..0a420f26
--- /dev/null
+++ b/StudentManagerSystemApi - idea/pom.xml
@@ -0,0 +1,169 @@
+
+
+ 4.0.0
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.5.6
+
+
+ com.cow.horse
+ StudentManagerSystemApi
+ 0.0.1-SNAPSHOT
+ StudentManagerSystemApi
+ Demo project for Spring Boot
+
+
+ 1.2.0
+ 5.1.39
+ 1.8
+
+
+
+
+
+ com.alibaba
+ fastjson
+ 1.2.62
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+
+ mysql
+ mysql-connector-java
+ 5.1.47
+
+
+
+ com.mchange
+ c3p0
+ 0.9.5.2
+
+
+
+ com.alibaba
+ druid
+ RELEASE
+
+
+
+
+ com.github.pagehelper
+ pagehelper-spring-boot-starter
+ 1.4.1
+
+
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ 1.3.1
+
+
+
+ org.springframework.boot
+ spring-boot-starter-thymeleaf
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.junit.vintage
+ junit-vintage-engine
+
+
+
+
+
+ junit
+ junit
+ 4.12
+
+
+
+
+ com.auth0
+ java-jwt
+ 3.4.0
+
+
+
+
+ compile
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
+ src/main/resources
+
+ **/*.*
+
+
+
+ src/main/webapp
+ META-INF/resources
+
+ **/*.*
+
+
+
+
+
+
+
+ aliyun
+ aliyun
+ http://maven.aliyun.com/nexus/content/groups/public/
+ default
+
+ true
+ never
+
+
+ true
+ never
+
+
+
+
+
+ aliyun
+ aliyun
+ http://maven.aliyun.com/nexus/content/groups/public/
+
+ true
+
+
+ false
+
+
+
+
+
diff --git a/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/StudentMisApplication.java b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/StudentMisApplication.java
new file mode 100644
index 00000000..48f51ad7
--- /dev/null
+++ b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/StudentMisApplication.java
@@ -0,0 +1,14 @@
+package com.cow.horse; // 声明该类所属的包,用于组织项目代码结构,此包名为com.cow.horse
+
+import org.mybatis.spring.annotation.MapperScan; // 导入MyBatis框架中用于扫描Mapper接口的注解类
+import org.springframework.boot.SpringApplication; // 导入Spring Boot框架中用于启动应用的核心类
+import org.springframework.boot.autoconfigure.SpringBootApplication; // 导入Spring Boot的自动配置注解,用于开启自动配置、组件扫描等功能
+import org.springframework.transaction.annotation.EnableTransactionManagement; // 导入用于启用事务管理的注解
+@SpringBootApplication// 使用@SpringBootApplication注解,这是一个组合注解,相当于@Configuration、@EnableAutoConfiguration、@ComponentScan的组合,用于标识这是一个Spring Boot应用的主配置类
+@EnableTransactionManagement// 使用@EnableTransactionManagement注解,开启Spring的事务管理功能,使项目中的事务相关操作能够正常工作
+@MapperScan("com.cow.horse.dao")// 使用@MapperScan注解,指定扫描MyBatis的Mapper接口的包路径为com.cow.horse.dao,以便Spring能自动扫描到这些Mapper接口并进行相关配置
+public class StudentMisApplication {// 定义Spring Boot应用的主类,是整个应用程序的入口
+ public static void main(String[] args) { // 主方法,是Java程序的入口点,Spring Boot应用启动时会从这里开始执行
+ SpringApplication.run(StudentMisApplication.class, args); // 调用SpringApplication类的run方法来启动Spring Boot应用,传入当前主类和命令行参数
+ }
+}
\ No newline at end of file
diff --git a/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/config/DataSourceConfiguration.java b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/config/DataSourceConfiguration.java
new file mode 100644
index 00000000..12ccf354
--- /dev/null
+++ b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/config/DataSourceConfiguration.java
@@ -0,0 +1,42 @@
+package com.cow.horse.config; // 声明该类所在的包,用于组织配置相关的代码,这里是com.cow.horse.config包
+
+import com.mchange.v2.c3p0.ComboPooledDataSource; // 导入c3p0连接池的核心类ComboPooledDataSource,用于创建和管理数据库连接池
+
+import org.mybatis.spring.annotation.MapperScan; // 导入MyBatis的MapperScan注解,用于扫描MyBatis的Mapper接口
+
+import org.springframework.beans.factory.annotation.Value; // 导入Spring的Value注解,用于从配置文件中获取属性值
+
+import org.springframework.context.annotation.Bean; // 导入Spring的Bean注解,用于将方法返回的对象注册为Spring容器中的Bean
+
+import org.springframework.context.annotation.Configuration; // 导入Spring的Configuration注解,标识该类是一个配置类
+
+import java.beans.PropertyVetoException; // 导入处理属性否决异常的类,在设置数据源属性可能会抛出该异常
+
+/**
+ * Description
+ * Author: cow.horse
+ * Date: 2020/2/26 23:39
+ **/
+@Configuration // 标记该类为配置类,Spring会在启动时扫描并处理该类中的配置信息
+@MapperScan("com.zjh.student_mis.dao") // 配置MyBatis扫描指定包下(com.zjh.student_mis.dao)的Mapper接口,以便自动生成Mapper代理对象
+public class DataSourceConfiguration {
+ @Value("${jdbc.driver}") // 从配置文件中获取名为jdbc.driver的属性值,并注入到jdbcDriver变量中
+ private String jdbcDriver;
+ @Value("${jdbc.url}") // 从配置文件中获取名为jdbc.url的属性值,并注入到jdbcUrl变量中
+ private String jdbcUrl;
+ @Value("${jdbc.username}") // 从配置文件中获取名为jdbc.username的属性值,并注入到jdbcUsername变量中
+ private String jdbcUsername;
+ @Value("${jdbc.password}") // 从配置文件中获取名为jdbc.password的属性值,并注入到jdbcPassword变量中
+ private String jdbcPassword;
+
+ @Bean(name = "dataSource") // 将该方法返回的对象注册为Spring容器中的Bean,名称为dataSource
+ public ComboPooledDataSource createDataSource() throws PropertyVetoException {
+ ComboPooledDataSource dataSource = new ComboPooledDataSource(); // 创建一个ComboPooledDataSource对象,用于管理数据库连接
+ dataSource.setDriverClass(jdbcDriver); // 设置数据库驱动类,使用从配置文件中获取的jdbcDriver值
+ dataSource.setJdbcUrl(jdbcUrl); // 设置数据库连接URL,使用从配置文件中获取的jdbcUrl值
+ dataSource.setUser(jdbcUsername); // 设置数据库连接的用户名,使用从配置文件中获取的jdbcUsername值
+ dataSource.setPassword(jdbcPassword); // 设置数据库连接的密码,使用从配置文件中获取的jdbcPassword值
+ dataSource.setAutoCommitOnClose(false); // 设置在关闭连接时不自动提交事务
+ return dataSource; // 返回配置好的数据源对象
+ }
+}
\ No newline at end of file
diff --git a/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/config/SessionFactoryConfiguration.java b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/config/SessionFactoryConfiguration.java
new file mode 100644
index 00000000..bb3ecafd
--- /dev/null
+++ b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/config/SessionFactoryConfiguration.java
@@ -0,0 +1,49 @@
+package com.cow.horse.config; // 声明该类所属的包,用于组织与配置相关的代码,这里是com.cow.horse.config包
+
+import org.mybatis.spring.SqlSessionFactoryBean; // 导入用于创建MyBatis的SqlSessionFactory的工厂Bean类,在Spring整合MyBatis时使用
+import org.springframework.beans.factory.annotation.Autowired; // 导入Spring的自动装配注解,用于自动注入依赖对象
+import org.springframework.beans.factory.annotation.Qualifier; // 导入Spring的限定符注解,当有多个同类型Bean时,用于指定具体要注入的Bean
+import org.springframework.beans.factory.annotation.Value; // 导入Spring的Value注解,用于从配置文件中获取属性值并注入到对应的变量中
+import org.springframework.context.annotation.Bean; // 导入Spring的Bean注解,用于将方法返回的对象注册为Spring容器中的Bean
+import org.springframework.context.annotation.Configuration; // 导入Spring的Configuration注解,标识该类是一个配置类,Spring会扫描并处理该类中的配置信息
+import org.springframework.core.io.ClassPathResource; // 导入用于表示类路径下资源的类,可用于加载配置文件等资源
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver; // 导入用于解析资源路径模式的类,可根据指定模式查找资源
+
+import javax.sql.DataSource; // 导入Java的数据源接口,代表数据库连接的数据源
+import java.io.IOException; // 导入用于处理I/O异常的类,在加载资源等操作时可能会抛出此类异常
+
+/**
+ * Description
+ * Author: cow.horse
+ * Date: 2020/2/27 11:31
+ **/
+@Configuration // 标记该类为配置类,Spring容器会处理该类中定义的Bean和配置信息
+public class SessionFactoryConfiguration {
+ // 从配置文件中获取名为mybatis_config_file的属性值,并注入到mybatisConfigFilePath变量中,代表MyBatis的配置文件路径
+ @Value("${mybatis_config_file}")
+ private String mybatisConfigFilePath;
+ // 从配置文件中获取名为mapper_path的属性值,并注入到mapperPath变量中,代表MyBatis的Mapper文件所在路径
+ @Value("${mapper_path}")
+ private String mapperPath;
+ // 从配置文件中获取名为entity_package的属性值,并注入到entityPackage变量中,代表实体类所在的包路径
+ @Value("${entity_package}")
+ private String entityPackage;
+
+ // 自动装配DataSource类型的Bean,并通过Qualifier注解指定要装配名为"dataSource"的Bean
+ @Autowired
+ @Qualifier("dataSource")
+ private DataSource dataSource;
+
+ // 将该方法返回的对象注册为Spring容器中的Bean,名称为"sqlSessionFactory"
+ @Bean(name = "sqlSessionFactory")
+ public SqlSessionFactoryBean createSqlSessionFactoryBean() throws IOException {
+ SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); // 创建SqlSessionFactoryBean实例,用于构建SqlSessionFactory
+ sqlSessionFactoryBean.setConfigLocation(new ClassPathResource(mybatisConfigFilePath)); // 设置MyBatis的配置文件位置,从类路径加载配置文件
+ PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); // 创建路径匹配资源模式解析器实例
+ String packageSearchPath = PathMatchingResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + mapperPath; // 构建Mapper文件的搜索路径字符串
+ sqlSessionFactoryBean.setMapperLocations(resolver.getResources(packageSearchPath)); // 设置Mapper文件的位置,通过解析器获取Mapper文件资源
+ sqlSessionFactoryBean.setDataSource(dataSource); // 设置数据源,注入之前自动装配的DataSource对象
+ sqlSessionFactoryBean.setTypeAliasesPackage(entityPackage); // 设置类型别名包,让MyBatis自动扫描该包下的类并注册别名
+ return sqlSessionFactoryBean; // 返回配置好的SqlSessionFactoryBean对象
+ }
+}
\ No newline at end of file
diff --git a/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/config/WebConfig.java b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/config/WebConfig.java
new file mode 100644
index 00000000..ac0e3438
--- /dev/null
+++ b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/config/WebConfig.java
@@ -0,0 +1,56 @@
+package com.cow.horse.config; // 声明该类属于com.cow.horse.config包,用于组织项目的配置类
+
+import com.cow.horse.utils.AuthenticationInterceptor; // 导入自定义的身份验证拦截器类,用于拦截请求进行身份验证
+import org.springframework.context.annotation.Bean; // 用于将方法返回的对象注册为Spring容器中的Bean
+import org.springframework.context.annotation.Configuration; // 表明这是一个Spring配置类,会被Spring容器扫描并处理
+import org.springframework.web.servlet.HandlerInterceptor; // Spring中用于拦截请求的拦截器接口
+import org.springframework.web.servlet.config.annotation.*; // 包含了Web MVC配置相关的类和注解
+
+/**
+ * Description 解决vue+spring boot跨域问题
+ * Author: cow.horse
+ * Date: 2022/2/26 22:48
+ **/
+@Configuration // 标记该类为配置类,Spring会自动加载该类中的配置信息
+public class WebConfig extends WebMvcConfigurationSupport { // 继承WebMvcConfigurationSupport类,用于自定义Spring Web MVC的配置
+
+ @Override
+ public void addResourceHandlers(ResourceHandlerRegistry registry) { // 重写此方法,用于配置静态资源的映射
+ // 在windows环境下的图片存放资源路径,user.dir表示当前工作目录
+ String winPath = System.getProperty("user.dir") + "\\src\\main\\resources\\static\\files\\";
+ // 在Linux环境下的图片存放资源路径
+ String linuxPath = "/usr/local/my_project/files/";
+ String os = System.getProperty("os.name"); // 获取当前操作系统的名称
+ if (os.toLowerCase().startsWith("win")) { // 判断当前操作系统是否为Windows
+ // 第一个参数设置访问路径前缀,第二个参数设置资源的实际存储路径,"file:"表示文件系统资源
+ registry.addResourceHandler("/files/**").addResourceLocations("file:" + winPath);
+ } else { // 若为Linux系统
+ registry.addResourceHandler("/files/**").addResourceLocations("file:" + linuxPath);
+ }
+ super.addResourceHandlers(registry); // 调用父类的方法,保证父类的资源映射配置也生效
+ }
+
+ @Override
+ public void addCorsMappings(CorsRegistry registry) { // 重写此方法,用于配置跨域资源共享(CORS)
+ registry.addMapping("/**") // 对所有请求路径都应用跨域配置
+ .allowedOriginPatterns("*") // 允许所有来源的请求进行跨域访问
+ .allowCredentials(true) // 允许跨域请求携带凭证(如cookie)
+ .allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH", "OPTIONS") // 允许的请求方法
+ .maxAge(3600 * 24); // 预检请求的有效期,单位为秒
+ }
+
+ // 重写此方法,用于注册自定义的拦截器
+ @Override
+ public void addInterceptors(InterceptorRegistry registry) {
+ // 添加自定义的拦截器实例,并设置拦截路径
+ registry.addInterceptor(appInterceptor())
+ .addPathPatterns("/api/sms/**") // 拦截所有以/api/sms/开头的请求
+ .excludePathPatterns("/login"); // 排除对/login路径的拦截
+ super.addInterceptors(registry); // 调用父类的方法,确保父类的拦截器配置也生效
+ }
+
+ @Bean // 将方法返回的对象注册为Spring容器中的Bean
+ public HandlerInterceptor appInterceptor() { // 定义一个方法,返回自定义的拦截器实例
+ return new AuthenticationInterceptor(); // 创建并返回身份验证拦截器实例
+ }
+}
\ No newline at end of file
diff --git a/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/controller/Course/CourseController.java b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/controller/Course/CourseController.java
new file mode 100644
index 00000000..78aeb615
--- /dev/null
+++ b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/controller/Course/CourseController.java
@@ -0,0 +1,52 @@
+package com.cow.horse.controller.Course; // 声明该类所在的包,一般用于组织代码结构
+import com.cow.horse.dto.Course; // 导入自定义的数据传输对象Course类,用于在不同层之间传输课程相关的数据
+import com.cow.horse.service.Course.CourseService; // 导入课程服务类CourseService,该类提供了课程相关的业务逻辑处理方法
+import com.cow.horse.utils.PagingResult; // 导入分页结果类PagingResult,用于封装分页查询的结果
+import org.apache.ibatis.session.RowBounds; // 导入MyBatis的RowBounds类,用于分页查询时指定偏移量和每页记录数
+import org.springframework.beans.factory.annotation.Autowired; // 导入Spring框架的Autowired注解,用于实现依赖注入
+import org.springframework.web.bind.annotation.*; // 导入Spring框架的相关注解,用于处理HTTP请求
+import java.util.List; // 导入Java集合框架中的List接口,用于存储一组对象
+import java.util.Map; // 导入Java中的Map接口,用于存储键值对
+import java.util.stream.Collectors; // 导入Java 8引入的Stream API中的Collectors类,用于将流中的元素收集到集合中
+import java.util.stream.Stream; // 导入Java 8引入的Stream API中的Stream类,用于对集合元素进行流式操作
+
+/**
+ * Description 课程控制层
+ * Author: cow.horse
+ * Date: 2020/3/11 14:40
+ **/
+@RestController // 表明这是一个RESTful风格的控制器,Spring会自动将控制器方法的返回值转换为JSON等格式响应给客户端
+@RequestMapping("/api/sms/course") // 该控制器处理的请求URL前缀为 /api/sms/course
+public class CourseController {
+ @Autowired // 使用Spring的依赖注入功能,将CourseService的实例注入到当前控制器中
+ private CourseService courseService;
+
+ @PostMapping // 处理HTTP POST请求,用于添加课程
+ public void addCourse(@RequestBody Course course) { // @RequestBody注解表示从请求体中获取课程对象
+ courseService.addCourse(course); // 调用CourseService的addCourse方法,将课程对象传递过去进行添加操作
+ }
+
+ @DeleteMapping("/{ids}") // 处理HTTP DELETE请求,用于删除课程,{ids}是URL路径变量
+ public void delete(@PathVariable("ids") String[] ids) { // @PathVariable注解表示从URL路径中获取课程ID数组
+ List idsList = Stream.of(ids).map(Long::parseLong).collect(Collectors.toList()); // 将字符串数组ids转换为流,然后对每个元素使用Long::parseLong方法将其转换为Long类型,最后将结果收集到一个List中
+ courseService.delete(idsList); // 调用CourseService的delete方法,传入课程ID列表进行删除操作
+ }
+
+ @PutMapping // 处理HTTP PUT请求,用于更新课程信息
+ public void update(@RequestBody Course course) { // @RequestBody注解表示从请求体中获取课程对象
+ courseService.update(course); // 调用CourseService的update方法,将课程对象传递过去进行更新操作
+ }
+
+ @GetMapping("/getCourseList") // 处理HTTP GET请求,用于获取课程列表
+ private PagingResult getCourseList(@RequestParam Map condition, // @RequestParam注解表示从请求参数中获取查询条件,以Map形式存储
+ @RequestParam(required = false, name = "$limit", defaultValue = "10") Integer limit, // 每页显示的记录数,默认为10
+ @RequestParam(required = false, name = "$offset", defaultValue = "0") Integer offset) { // 偏移量,即从第几条记录开始查询,默认为0
+ RowBounds rowBounds = new RowBounds(offset, limit); // 创建RowBounds对象,用于分页查询,指定偏移量和每页记录数
+ return courseService.getCourseList(rowBounds, condition); // 调用CourseService的getCourseList方法,传入分页信息和查询条件,获取课程列表
+ }
+
+ @GetMapping("/getCourseByMap") // 处理HTTP GET请求,用于根据条件获取课程列表
+ private List getCourseByMap(@RequestParam Map condition) { // @RequestParam注解表示从请求参数中获取查询条件,以Map形式存储
+ return courseService.getCourseByMap(condition); // 调用CourseService的getCourseByMap方法,传入查询条件,获取课程列表
+ }
+}
\ No newline at end of file
diff --git a/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/controller/Profession/ProfessionController.java b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/controller/Profession/ProfessionController.java
new file mode 100644
index 00000000..b269d0fd
--- /dev/null
+++ b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/controller/Profession/ProfessionController.java
@@ -0,0 +1,27 @@
+package com.cow.horse.controller.Profession; // 声明该类所属的包,用于组织项目的代码结构,这里表明该类属于专业相关的控制器包
+
+import com.cow.horse.domain.Profession; // 导入专业领域对象类,该类通常用于封装专业的相关属性,如专业名称、编号等
+import com.cow.horse.service.Profession.ProfessionService; // 导入专业服务类,该类包含了处理专业相关业务逻辑的方法
+import org.springframework.beans.factory.annotation.Autowired; // 导入Spring框架的自动装配注解,用于实现依赖注入,方便在控制器中使用服务类
+import org.springframework.web.bind.annotation.GetMapping; // 导入Spring框架的GetMapping注解,用于处理HTTP的GET请求
+import org.springframework.web.bind.annotation.RequestMapping; // 导入Spring框架的RequestMapping注解,用于映射请求的URL路径
+import org.springframework.web.bind.annotation.RestController; // 导入Spring框架的RestController注解,表明该类是一个RESTful风格的控制器,会自动将返回值转换为JSON格式
+
+import java.util.List; // 导入Java的List接口,用于存储专业对象的集合
+
+/**
+ * Description 所有专业控制层
+ * Author: cow.horse
+ * Date: 2020/3/31 17:28
+ **/
+@RestController // 使用RestController注解,将该类标记为RESTful风格的控制器
+@RequestMapping("/api/sms/profession") // 使用RequestMapping注解,指定该控制器处理的请求URL前缀为 /api/sms/profession
+public class ProfessionController {
+ @Autowired // 使用Autowired注解,将ProfessionService的实例自动注入到该控制器中,方便调用其业务方法
+ private ProfessionService professionService;
+
+ @GetMapping("/getProfessionList") // 处理HTTP的GET请求,请求路径为 /api/sms/profession/getProfessionList
+ private List getProfessionList () { // 该方法用于获取所有专业的列表
+ return professionService.getProfessionList(); // 调用ProfessionService的getProfessionList方法,获取专业列表并返回
+ }
+}
\ No newline at end of file
diff --git a/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/controller/Score/ScoreController.java b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/controller/Score/ScoreController.java
new file mode 100644
index 00000000..4bb832ee
--- /dev/null
+++ b/StudentManagerSystemApi - idea/src/main/java/com/cow/horse/controller/Score/ScoreController.java
@@ -0,0 +1,55 @@
+package com.cow.horse.controller.Score; // 声明该类所在的包,表明这是成绩查询相关的控制器类所在的包
+
+import com.alibaba.fastjson.JSONArray; // 导入阿里巴巴的FastJSON库中的JSONArray类,用于处理JSON数组数据
+import com.alibaba.fastjson.JSONObject; // 导入阿里巴巴的FastJSON库中的JSONObject类,用于处理JSON对象数据
+import com.cow.horse.dto.Course; // 导入自定义的数据传输对象Course类,用于在不同层之间传输课程相关的数据
+import com.cow.horse.dto.Score; // 导入自定义的数据传输对象Score类,用于在不同层之间传输成绩相关的数据
+import com.cow.horse.service.Score.ScoreService; // 导入成绩服务类ScoreService,该类提供了成绩相关的业务逻辑处理方法
+import com.cow.horse.utils.PagingResult; // 导入分页结果类PagingResult,用于封装分页查询的结果
+import org.apache.ibatis.session.RowBounds; // 导入MyBatis的RowBounds类,用于分页查询时指定偏移量和每页记录数
+import org.springframework.beans.factory.annotation.Autowired; // 导入Spring框架的Autowired注解,用于实现依赖注入
+import org.springframework.web.bind.annotation.*; // 导入Spring框架的相关注解,用于处理HTTP请求
+
+import java.util.List; // 导入Java集合框架中的List接口,用于存储一组对象
+import java.util.Map; // 导入Java中的Map接口,用于存储键值对
+
+/**
+ * Description 成绩查询控制层
+ * Author: cow.horse
+ * Date: 2020/3/13 15:25
+ **/
+@RestController // 表明这是一个RESTful风格的控制器,Spring会自动将控制器方法的返回值转换为JSON等格式响应给客户端
+@RequestMapping("/api/sms/score") // 该控制器处理的请求URL前缀为 /api/sms/score
+public class ScoreController {
+ @Autowired // 使用Spring的依赖注入功能,将ScoreService的实例注入到当前控制器中
+ private ScoreService scoreService;
+
+ @GetMapping("/getCourseList") // 处理HTTP GET请求,用于获取课程列表,支持分页查询
+ public PagingResult getCourseList(@RequestParam Map condition, // 请求参数中的查询条件,以Map形式存储
+ @RequestParam(required = false, name = "$limit", defaultValue = "10") Integer limit, // 每页显示的记录数,默认为10
+ @RequestParam(required = false, name = "$offset", defaultValue = "0") Integer offset) { // 偏移量,即从第几条记录开始查询,默认为0
+ RowBounds rowBounds = new RowBounds(offset, limit); // 创建RowBounds对象,用于分页查询,指定偏移量和每页记录数
+ return scoreService.getCourseList(rowBounds, condition); // 调用ScoreService的getCourseList方法,传入分页信息和查询条件,获取课程列表
+ }
+
+ @PostMapping // 处理HTTP POST请求,用于添加成绩记录
+ private void addEntry(@RequestBody JSONArray UserScore) { // 从请求体中获取的JSON数组,包含多个成绩记录
+ List list = JSONObject.parseArray(UserScore.toJSONString(), Score.class); // 将JSON数组转换为Score对象的列表
+ scoreService.addEntry(list); // 调用ScoreService的addEntry方法,传入成绩记录列表进行添加操作
+ }
+
+ @GetMapping("/export") // 处理HTTP GET请求,用于获取可导出的课程列表
+ public List getExportList(@RequestParam Map condition) { // 请求参数中的查询条件,以Map形式存储
+ return scoreService.getExportList(condition); // 调用ScoreService的getExportList方法,传入查询条件,获取可导出的课程列表
+ }
+
+ @GetMapping("/getUserNum") // 处理HTTP GET请求,用于获取用户数量相关信息
+ public List