复读剔除没有跟标签关联的课程
This commit is contained in:
@@ -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<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user