From 8ce5a4ac284e4147111885d67687de9a730bba02 Mon Sep 17 00:00:00 2001 From: wuchunlei Date: Tue, 24 Jun 2025 16:55:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=AA=E6=B9=96=E4=BA=91=E5=8C=BB=E5=A4=8D?= =?UTF-8?q?=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/controller/CourseRelearnController.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/peanut/modules/common/controller/CourseRelearnController.java b/src/main/java/com/peanut/modules/common/controller/CourseRelearnController.java index ed736c1a..55d885da 100644 --- a/src/main/java/com/peanut/modules/common/controller/CourseRelearnController.java +++ b/src/main/java/com/peanut/modules/common/controller/CourseRelearnController.java @@ -11,8 +11,7 @@ import com.peanut.config.DelayQueueConfig; import com.peanut.modules.book.service.TransactionDetailsService; import com.peanut.modules.common.dao.CourseToMedicineDao; import com.peanut.modules.common.entity.*; -import com.peanut.modules.common.service.BuyOrderService; -import com.peanut.modules.common.service.CourseToPsycheService; +import com.peanut.modules.common.service.*; import com.peanut.modules.common.service.JfTransactionDetailsService; import com.peanut.modules.common.service.MyUserService; import com.peanut.modules.master.service.*; @@ -55,6 +54,8 @@ public class CourseRelearnController { @Autowired private CourseToPsycheService courseToPsycheService; @Autowired + private CourseToTaihumedService courseToTaihumedService; + @Autowired private ShopProductService shopProductService; @Autowired private BuyOrderService buyOrderService; @@ -104,7 +105,8 @@ public class CourseRelearnController { int mCount = courseToMedicalService.count(new LambdaQueryWrapper().eq(CourseToMedicine::getCourseId,courseEntity.getId())); int sCount = courseToSociologyService.count(new LambdaQueryWrapper().eq(CourseToSociologyEntity::getCourseId,courseEntity.getId())); int pCount = courseToPsycheService.count(new LambdaQueryWrapper().eq(CourseToPsyche::getCourseId,courseEntity.getId())); - if (mCount>0||sCount > 0||pCount > 0){ + int tCount = courseToTaihumedService.count(new LambdaQueryWrapper().eq(CourseToTaihumed::getCourseId,courseEntity.getId())); + if (mCount>0||sCount > 0||pCount > 0||tCount > 0){ List list = userCourseBuyService.list(new MPJLambdaWrapper() .disableLogicDel()//查询出已删除数据 .eq(UserCourseBuyEntity::getUserId, ShiroUtils.getUId()) @@ -135,7 +137,8 @@ public class CourseRelearnController { int mCount = courseToMedicalService.count(new LambdaQueryWrapper().eq(CourseToMedicine::getCourseId,courseEntity.getId())); int sCount = courseToSociologyService.count(new LambdaQueryWrapper().eq(CourseToSociologyEntity::getCourseId,courseEntity.getId())); int pCount = courseToPsycheService.count(new LambdaQueryWrapper().eq(CourseToPsyche::getCourseId,courseEntity.getId())); - if (mCount>0||sCount > 0||pCount > 0){ + int tCount = courseToTaihumedService.count(new LambdaQueryWrapper().eq(CourseToTaihumed::getCourseId,courseEntity.getId())); + if (mCount>0||sCount > 0||pCount > 0||tCount > 0){ MPJLambdaWrapper wrapper = new MPJLambdaWrapper<>(); wrapper.leftJoin(ShopProductCourseEntity.class,ShopProductCourseEntity::getProductId,ShopProduct::getProductId); wrapper.selectAll(ShopProduct.class);