Browse Source

查询失效学生人数不关联vip表

shenhao 4 years ago
parent
commit
f3f878774b

+ 1 - 1
src/main/java/com/ssj/dao/sys/imlibuser/dao/impl/TbClassQueryDaoImpl.java

@@ -25,7 +25,7 @@ public class TbClassQueryDaoImpl implements TbClassQueryDao {
 		List<Object> queryParams = new ArrayList<Object>();
 		selSql.append(" SELECT t.*    ");
 		selSql.append(" ,( SELECT COUNT(DISTINCT(v.id)) from tb_lib_vip v  where v.stat=1 AND v.lib_id=t.id  ) as student_num     ");
-		selSql.append(" ,( select COUNT(DISTINCT(t11.id)) from tb_lib_vip_service t12 join tb_lib_vip t11 on t12.vip_id = t11.id where t12.lib_id=t.id and t12.type in('C024','C025') and t12.species='S003' and t12.stat=2 ) as invalid_student_num     ");
+		selSql.append(" ,( select COUNT(DISTINCT(t12.vip_id)) from tb_lib_vip_service t12  where t12.lib_id=t.id and t12.type in('C024','C025') and t12.species='S003' and t12.stat=2 ) as invalid_student_num     ");
 		selSql.append(" ,( SELECT COUNT(a.teacher_id) from tb_class_teacher a  where a.status=1 and a.type=1 AND a.lib_id=t.id ) as teacher_num    ");
 		selSql.append(" ,( SELECT COUNT(DISTINCT(a.user_id)) from tb_lib_manager a  where a.state=1  AND a.type in (4) AND a.lib_id=t.id  ) as principal_num    ");
 		selSql.append(" ,( SELECT COUNT(DISTINCT(a.user_id)) from tb_lib_manager a  where a.state=1  AND a.type in (19) AND a.lib_id=t.id  ) as leader_num    ");