复读剔除没有跟标签关联的课程

This commit is contained in:
wuchunlei
2025-05-26 13:48:12 +08:00
parent 18715b08f1
commit 08ce88ac6f

View File

@@ -129,6 +129,10 @@ public class CourseRelearnController {
if (cc != null) { if (cc != null) {
CourseEntity courseEntity = courseService.getById(cc.getCourseId()); CourseEntity courseEntity = courseService.getById(cc.getCourseId());
if (courseEntity != null){ if (courseEntity != null){
int mCount = courseToMedicalService.count(new LambdaQueryWrapper<CourseToMedicine>().eq(CourseToMedicine::getCourseId,courseEntity.getId()));
int sCount = courseToSociologyService.count(new LambdaQueryWrapper<CourseToSociologyEntity>().eq(CourseToSociologyEntity::getCourseId,courseEntity.getId()));
int pCount = courseToPsycheService.count(new LambdaQueryWrapper<CourseToPsyche>().eq(CourseToPsyche::getCourseId,courseEntity.getId()));
if (mCount>0||sCount > 0||pCount > 0){
MPJLambdaWrapper<ShopProduct> wrapper = new MPJLambdaWrapper<>(); MPJLambdaWrapper<ShopProduct> wrapper = new MPJLambdaWrapper<>();
wrapper.leftJoin(ShopProductCourseEntity.class,ShopProductCourseEntity::getProductId,ShopProduct::getProductId); wrapper.leftJoin(ShopProductCourseEntity.class,ShopProductCourseEntity::getProductId,ShopProduct::getProductId);
wrapper.selectAll(ShopProduct.class); wrapper.selectAll(ShopProduct.class);
@@ -163,6 +167,7 @@ public class CourseRelearnController {
} }
} }
} }
}
return R.ok().put("productList",new ArrayList<>()); return R.ok().put("productList",new ArrayList<>());
} }