首页展示未开班小班

This commit is contained in:
wuchunlei
2024-08-30 15:55:39 +08:00
parent 83d35846e9
commit 66e91fed7a

View File

@@ -548,6 +548,7 @@ public class ClassEntityServiceImpl extends ServiceImpl<ClassEntityDao, ClassEnt
public List<ClassEntity> getClassNoUser() {
MPJLambdaWrapper<ClassEntity> wrapper = new MPJLambdaWrapper<>();
wrapper.selectAll(ClassEntity.class);
wrapper.eq(ClassEntity::getState,"0");
String classSql = "select 1 from ( select c.id from class c left join class_course cc on cc.model_id = c.model_id left join class_user cu on cu.class_id = c.id where c.del_flag = 0 and cc.del_flag = 0 and cu.del_flag = 0 and cu.user_id = "+ShiroUtils.getUId()+" ) s where s.id = t.id";
String courseSql = "select 1 from (select cc.model_id from class_course cc where cc.del_flag = 0 and cc.course_id in (select cc.course_id from class_course cc left join class_model cm on cm.id = cc.model_id left join class c on c.model_id = cm.id left join class_user cu on cu.class_id = c.id where cc.del_flag = 0 and cm.del_flag = 0 and c.del_flag = 0 and cu.del_flag = 0 and cu.user_id = "+ShiroUtils.getUId()+")) q where q.model_id = t.model_id";
wrapper.notExists(classSql);