From 4bb353699fe8495c46cdf579338c432a3a10a2ac Mon Sep 17 00:00:00 2001
From: wenyu441069198 <14186472+wenyu441069198@user.noreply.gitee.com>
Date: Fri, 9 Aug 2024 19:19:27 +0800
Subject: [PATCH] =?UTF-8?q?=E8=82=96=E6=B5=B7=E5=8D=97=E5=AD=A6=E7=94=9F?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E6=8E=A5=E5=8F=A3=E7=BC=96=E5=86=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 2 -
.../controller/courses/CoursesController.java | 5 +-
.../CourseLearningRecordController.java | 15 +++
.../umsAdmin/UmsStudentManageController.java | 72 ++++++++++++++
.../umsStudent/UmsStudentController.java | 13 ---
.../umsAdmin/UmsStudentManageMapper.java | 22 +++++
.../mapper/umsAdmin/UmsStudentMapper.java | 1 +
.../dto/umsAdmin/UmsStudentPageQueryDTO.java | 25 +++++
.../entity/umsAdmin/UmsStudentManage.java | 84 +++++++++++++++++
.../entity/umsAdmin/UmsStudentPageQuery.java | 21 +++++
.../model/entity/umsAdmin/UmsUser.java | 3 +-
.../service/courses/ICoursesService.java | 5 +-
.../impl/courses/CoursesServiceImpl.java | 34 +++++--
.../CourseLearningRecordServiceImpl.java | 17 ++++
.../impl/report/ReportServiceImpl.java | 2 -
.../umsAdmin/UmsStudentManageServiceImpl.java | 94 +++++++++++++++++++
.../impl/umsAdmin/UmsUserServiceImpl.java | 4 +-
.../records/ICourseLearningRecordService.java | 2 +
.../umsAdmin/UmsStudentManageService.java | 21 +++++
.../resources/mapper/UmsPermissionMapper.xml | 5 -
.../mapper/UmsStudentManageService.xml | 46 +++++++++
.../resources/mapper/UmsStudentMapper.xml | 20 ++--
src/main/resources/mapper/UmsUserMapper.xml | 14 +--
23 files changed, 472 insertions(+), 55 deletions(-)
create mode 100644 src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java
delete mode 100644 src/main/java/com/teaching/backend/controller/umsStudent/UmsStudentController.java
create mode 100644 src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentManageMapper.java
create mode 100644 src/main/java/com/teaching/backend/model/dto/umsAdmin/UmsStudentPageQueryDTO.java
create mode 100644 src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentManage.java
create mode 100644 src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentPageQuery.java
create mode 100644 src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java
create mode 100644 src/main/java/com/teaching/backend/service/umsAdmin/UmsStudentManageService.java
delete mode 100644 src/main/resources/mapper/UmsPermissionMapper.xml
create mode 100644 src/main/resources/mapper/UmsStudentManageService.xml
diff --git a/pom.xml b/pom.xml
index 4e9e452..f3f4d71 100644
--- a/pom.xml
+++ b/pom.xml
@@ -227,8 +227,6 @@
commons-lang
2.6
-
-
commons-fileupload
diff --git a/src/main/java/com/teaching/backend/controller/courses/CoursesController.java b/src/main/java/com/teaching/backend/controller/courses/CoursesController.java
index 7e14395..adba450 100644
--- a/src/main/java/com/teaching/backend/controller/courses/CoursesController.java
+++ b/src/main/java/com/teaching/backend/controller/courses/CoursesController.java
@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.LinkedHashSet;
+import java.util.List;
import java.util.Map;
/**
@@ -132,8 +133,8 @@ public class CoursesController {
@ApiOperation("查询学生列表")
@PostMapping("/studentList")
- public CommonResult> getStudentList(@RequestParam String userId){
- LinkedHashSet umsStudentList = coursesService.queryStudentList(userId);
+ public CommonResult> getStudentList(@RequestParam String userId){
+ List umsStudentList = coursesService.queryStudentList(userId);
return CommonResult.success(umsStudentList);
}
diff --git a/src/main/java/com/teaching/backend/controller/records/CourseLearningRecordController.java b/src/main/java/com/teaching/backend/controller/records/CourseLearningRecordController.java
index ed7b1b3..32be4d1 100644
--- a/src/main/java/com/teaching/backend/controller/records/CourseLearningRecordController.java
+++ b/src/main/java/com/teaching/backend/controller/records/CourseLearningRecordController.java
@@ -70,4 +70,19 @@ public class CourseLearningRecordController {
}
return CommonResult.success(coursesVOList);
}
+
+ /**
+ * 推荐课程
+ * @return
+ */
+ @ApiOperation("推荐课程")
+ @PostMapping("/recommendCourses")
+ public CommonResult> recommendCourses(@RequestParam String userId) {
+ List coursesVOList = courseLearningRecordService.queryrecommendCourses(userId);
+ if (coursesVOList == null){
+ CommonResult.failed("用户或角色错误");
+ }
+ return CommonResult.success(coursesVOList);
+ }
+
}
diff --git a/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java b/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java
new file mode 100644
index 0000000..6dbf21c
--- /dev/null
+++ b/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java
@@ -0,0 +1,72 @@
+package com.teaching.backend.controller.umsAdmin;
+
+import com.teaching.backend.common.CommonResult;
+import com.teaching.backend.model.dto.umsAdmin.UmsStudentPageQueryDTO;
+import com.teaching.backend.model.entity.umsAdmin.UmsStudentManage;
+import com.teaching.backend.service.umsAdmin.UmsStudentManageService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import java.util.Map;
+
+@RestController
+@Api(tags = "学生管理")
+@RequestMapping("/api/studentManage")
+@Slf4j
+public class UmsStudentManageController {
+
+ @Autowired
+ private UmsStudentManageService umsStudentManageService;
+
+ /**
+ * 学生管理分页查询
+ * @param umsStudentPageQueryDTO
+ * @return
+ */
+ @GetMapping("/page")
+ @ApiOperation("学生管理分页查询")
+ public CommonResult