Browse Source

1、试听课
2、收费网管课活动

Joburgess 5 years ago
parent
commit
b378cecae4
1 changed files with 4 additions and 2 deletions
  1. 4 2
      mec-biz/src/main/resources/config/mybatis/PracticeGroupMapper.xml

+ 4 - 2
mec-biz/src/main/resources/config/mybatis/PracticeGroupMapper.xml

@@ -611,11 +611,13 @@
     </select>
     <select id="countStudentTrialPractices" resultType="int">
         SELECT
-            COUNT(pg.id_)
+            COUNT( DISTINCT pg.id_ )
         FROM
-            practice_group pg
+            course_schedule cs
+            LEFT JOIN practice_group pg ON pg.id_ = cs.music_group_id_
         WHERE
             pg.student_id_ = #{studentId}
+            AND cs.group_type_ = 'PRACTICE'
             AND pg.type_ = 'TRIAL'
     </select>
     <select id="findStudentAndTeacherTrialPractices" resultMap="com.ym.mec.biz.dal.dao.CourseScheduleDao.CourseSchedule">