ソースを参照

update vip列表修改

zouxuan 5 年 前
コミット
dd9c7b71ee
1 ファイル変更14 行追加5 行削除
  1. 14 5
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml

+ 14 - 5
mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml

@@ -110,12 +110,17 @@
 	</select>
 
     <select id="findStudentVipGroups" resultMap="studentManageVipGroup">
-        SELECT CONCAT(cs.class_date_," ",cs.start_class_time_) course_date_,cs.teach_mode_,cs.status_ course_status_,cs.name_ class_group_name_
-        FROM course_schedule cs
-        WHERE cs.group_type_ = 'VIP'
+        SELECT CONCAT(cs.class_date_," ",cs.start_class_time_) course_date_,cs.teach_mode_,
+        cs.status_ course_status_,cs.name_ class_group_name_
+        FROM course_schedule_student_payment cssp
+        LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
+        WHERE cssp.group_type_ = 'VIP'
         <if test="vipGroupId != null">
             AND cs.music_group_id_ = #{vipGroupId}
         </if>
+        <if test="studentId != null">
+            AND cssp.user_id_ = #{studentId}
+        </if>
         <if test="classGroupName != null">
             AND cs.name_ LIKE CONCAT('%',#{classGroupName},'%')
         </if>
@@ -124,12 +129,16 @@
     </select>
 
     <select id="countStudentVipGroups" resultType="java.lang.Integer">
-        SELECT COUNT(cs.id_)
-        FROM course_schedule cs
+        SELECT COUNT(cssp.id_)
+        FROM course_schedule_student_payment cssp
+        LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
         WHERE cs.group_type_ = 'VIP'
         <if test="vipGroupId != null">
             AND cs.music_group_id_ = #{vipGroupId}
         </if>
+        <if test="studentId != null">
+            AND cssp.user_id_ = #{studentId}
+        </if>
         <if test="classGroupName != null">
             AND cs.name_ LIKE CONCAT('%',#{classGroupName},'%')
         </if>