Browse Source

feat:教务端学员云教练数据统计

Joburgess 3 years ago
parent
commit
ca5a8d80c6
1 changed files with 5 additions and 10 deletions
  1. 5 10
      mec-biz/src/main/resources/config/mybatis/StudentMapper.xml

+ 5 - 10
mec-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -822,13 +822,7 @@
         FROM student_registration sr
         LEFT JOIN sys_user su ON sr.user_id_=su.id_
         WHERE su.del_flag_=0
-        AND sr.music_group_status_='NORMAL'
-        <if test="organIds!=null and organIds.size()>0">
-            AND su.organ_id_ IN
-            <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
-                #{organId}
-            </foreach>
-        </if>)
+        AND sr.music_group_status_='NORMAL')
         UNION ALL
         (SELECT
         su.organ_id_,cssp.user_id_
@@ -839,13 +833,14 @@
         WHERE
         cssp.group_type_ IN ('VIP', 'PRACTICE')
         AND cs.status_='NOT_START'
-        AND su.del_flag_ = 0
+        AND su.del_flag_ = 0)) t
+        WHERE 1=1
         <if test="organIds!=null and organIds.size()>0">
-            AND su.organ_id_ IN
+            AND t.organ_id_ IN
             <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
                 #{organId}
             </foreach>
-        </if>)) t
+        </if>
         GROUP BY t.organ_id_
     </select>