From 56a2f1313d871862111a8cfbc18ee940cc876872 Mon Sep 17 00:00:00 2001 From: wuchunlei Date: Thu, 10 Jul 2025 10:37:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E8=BF=91=E5=AD=A6=E4=B9=A0=E5=89=94?= =?UTF-8?q?=E9=99=A4=E5=8F=96=E6=B6=88=E7=BB=91=E5=AE=9A=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E5=BE=97=E8=AF=BE=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../peanut/modules/psyche/controller/PsycheHomeController.java | 2 +- .../modules/sociology/service/impl/CourseServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/peanut/modules/psyche/controller/PsycheHomeController.java b/src/main/java/com/peanut/modules/psyche/controller/PsycheHomeController.java index 363c8c30..d961d75e 100644 --- a/src/main/java/com/peanut/modules/psyche/controller/PsycheHomeController.java +++ b/src/main/java/com/peanut/modules/psyche/controller/PsycheHomeController.java @@ -111,10 +111,10 @@ public class PsycheHomeController { MPJLambdaWrapper wrapper = new MPJLambdaWrapper<>(); wrapper.selectAll(CourseEntity.class); wrapper.distinct(); + wrapper.rightJoin(CourseToPsyche.class,CourseToPsyche::getCourseId,CourseEntity::getId); wrapper.leftJoin(UserToCourseEntity.class,UserToCourseEntity::getCourseId,CourseEntity::getId); wrapper.eq(UserToCourseEntity::getUserId, ShiroUtils.getUId()); wrapper.orderByDesc(UserToCourseEntity::getUpdateTime); - wrapper.exists("select * from course_to_psyche where course_id = t.id"); wrapper.last("Limit 4"); List courseList = courseService.list(wrapper); return R.ok().put("courseList",courseList); 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 d18b5166..50a5c302 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 @@ -95,10 +95,10 @@ public class CourseServiceImpl extends ServiceImpl impl MPJLambdaWrapper wrapper = new MPJLambdaWrapper<>(); wrapper.selectAll(CourseEntity.class); wrapper.distinct(); + wrapper.rightJoin(CourseToSociologyEntity.class,CourseToSociologyEntity::getCourseId,CourseEntity::getId); wrapper.leftJoin(UserToCourseEntity.class,UserToCourseEntity::getCourseId,CourseEntity::getId); wrapper.eq(UserToCourseEntity::getUserId,param.getId()); wrapper.orderByDesc(UserToCourseEntity::getUpdateTime); - wrapper.exists("select * from course_to_sociology where course_id = t.id"); wrapper.last("Limit 4"); List courseEntities = this.getBaseMapper().selectJoinList(CourseEntity.class, wrapper); return courseEntities;