Procházet zdrojové kódy

vip课程续费提醒

Joburgess před 5 roky
rodič
revize
c0be43ec46

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java

@@ -1479,6 +1479,8 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
      */
     List<CourseGroupExportDto> getStudentCourseInfo(@Param("studentIds") Set<Integer> studentIds, @Param("groupType") GroupType groupType);
 
+    List<CourseGroupExportDto> getStudentVipCourseInfo(@Param("studentIds") Set<Integer> studentIds);
+
     /**
      * 获取上一次连堂课
      * @param classGroupId

+ 20 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -3063,6 +3063,26 @@
         AND (cs.del_flag_ IS NULL OR cs.del_flag_ =0)
         GROUP BY cssp.user_id_;
     </select>
+
+    <select id="getStudentVipCourseInfo" resultMap="com.ym.mec.biz.dal.dao.PracticeGroupDao.courseGroupExport">
+        SELECT MIN(concat(cs.`class_date_`,' ',cs.`start_class_time_` )) class_start_date_,
+        MAX(concat(cs.`class_date_`,' ',cs.`start_class_time_` )) class_end_date_,cssp.user_id_ student_id_,
+        GROUP_CONCAT(DISTINCT su.`real_name_`) teacher_name_,GROUP_CONCAT(DISTINCT cs.`actual_teacher_id_`) teacher_ids_
+        FROM course_schedule_student_payment cssp
+        LEFT JOIN course_schedule cs on cs.id_ = cssp.course_schedule_id_
+        LEFT JOIN sys_user su on cs.actual_teacher_id_ = su.id_
+        LEFT JOIN vip_group vg ON cssp.music_group_id_=vg.id_
+        WHERE cssp.user_id_ IN
+        <foreach collection="studentIds" separator="," open="(" close=")" item="studentId">
+            #{studentId}
+        </foreach>
+        AND cssp.group_type_ = 'VIP'
+        AND vg.group_status_!=3
+        AND (cs.is_lock_ IS NULL OR cs.is_lock_ =0)
+        AND (cs.del_flag_ IS NULL OR cs.del_flag_ =0)
+        GROUP BY cssp.user_id_;
+    </select>
+
     <select id="getLastCourse" resultMap="CourseSchedule">
         SELECT cs.* FROM course_schedule cs
         LEFT JOIN teacher_attendance ta ON cs.id_ = ta.course_schedule_id_ AND ta.teacher_id_ = cs.actual_teacher_id_

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -1225,7 +1225,7 @@ public class ExportController extends BaseController {
         }
         OutputStream outputStream = response.getOutputStream();
         Set<Integer> studentIds = vipGroupExports.stream().map(CourseGroupExportDto::getStudentId).collect(Collectors.toSet());
-        List<CourseGroupExportDto> studentCourseInfos = courseScheduleDao.getStudentCourseInfo(studentIds, GroupType.VIP);
+        List<CourseGroupExportDto> studentCourseInfos = courseScheduleDao.getStudentVipCourseInfo(studentIds);
         List<CourseGroupExportDto> totalClassTimes = courseScheduleDao.getStudentCourseScheduleNum(studentIds, GroupType.VIP, null);
         List<CourseGroupExportDto> noStartClassTimes = courseScheduleDao.getStudentCourseScheduleNum(studentIds, GroupType.VIP, CourseStatusEnum.NOT_START);
         for (CourseGroupExportDto vipGroupExport : vipGroupExports) {