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);