From 7921c8bfa9fd041961340365ed70f4b9577e6ad1 Mon Sep 17 00:00:00 2001 From: wuchunlei Date: Wed, 5 Mar 2025 11:47:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=9C=9F=E8=AF=BE=E7=A8=8B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/psyche/controller/PsycheCourseController.java | 5 +++-- .../modules/sociology/service/impl/CourseServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/peanut/modules/psyche/controller/PsycheCourseController.java b/src/main/java/com/peanut/modules/psyche/controller/PsycheCourseController.java index af058787..23234910 100644 --- a/src/main/java/com/peanut/modules/psyche/controller/PsycheCourseController.java +++ b/src/main/java/com/peanut/modules/psyche/controller/PsycheCourseController.java @@ -15,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -69,7 +71,7 @@ public class PsycheCourseController { //我的课程-过期课程 @RequestMapping("/getCourseExpire") public R getCourseExpire(){ - List courseEntities = null; + List courseEntities = new ArrayList(); MPJLambdaWrapper wrapper = new MPJLambdaWrapper<>(); wrapper.distinct(); wrapper.leftJoin(CourseCatalogueEntity.class,CourseCatalogueEntity::getCourseId,CourseEntity::getId); @@ -95,7 +97,6 @@ public class PsycheCourseController { //我的课程-正在学习(收藏) @RequestMapping("/getUserCourseStudying") public R getUserCourseStudying(){ - MyUserEntity user = ShiroUtils.getUser(); MPJLambdaWrapper wrapper = new MPJLambdaWrapper<>(); wrapper.leftJoin(CourseToPsyche.class,CourseToPsyche::getCourseId,CourseEntity::getId); wrapper.leftJoin(UserCourseStudying.class,UserCourseStudying::getCourseId,CourseEntity::getId); diff --git a/src/main/java/com/peanut/modules/sociology/service/impl/CourseServiceImpl.java b/src/main/java/com/peanut/modules/sociology/service/impl/CourseServiceImpl.java index cfd986ea..57f7179d 100644 --- a/src/main/java/com/peanut/modules/sociology/service/impl/CourseServiceImpl.java +++ b/src/main/java/com/peanut/modules/sociology/service/impl/CourseServiceImpl.java @@ -338,7 +338,7 @@ public class CourseServiceImpl extends ServiceImpl impl @Override public List getCourseExpire(Map param) { - List> courseEntities = null; + List> courseEntities = new ArrayList<>(); MPJLambdaWrapper wrapper = new MPJLambdaWrapper<>(); wrapper.distinct(); wrapper.leftJoin(CourseCatalogueEntity.class,CourseCatalogueEntity::getCourseId,CourseEntity::getId);