| | |
| | | <mapper namespace="com.dsh.course.mapper.CancelledClassesMapper"> |
| | | |
| | | <select id="listAll" resultType="com.dsh.course.model.CancelClassesVO"> |
| | | select t1.insertTime as insertTime,t2.coachId as coachId,CONCAT(t2.province,t2.city) as provinceAndCity, |
| | | t2.storeId as storeId,CONCAT(t3.classDate,t3.endDate) as startAndEnd, |
| | | t5.name as `courseName`,t4.appUserId as studentId from t_cancelled_classes t1 |
| | | left join t_course_package t2 on t1.coursePackageId = t2.id |
| | | left join t_course_package_scheduling t3 on t3.coursePackageId = t2.id |
| | | left join t_course_package_student t4 on t4.coursePackageSchedulingId = t3.id |
| | | left join t_course t5 on t3.courseId = t5.id |
| | | SELECT |
| | | t1.*, |
| | | t2.name, |
| | | CONCAT(t2.province, t2.city) AS provinceAndCity, |
| | | t2.storeId, |
| | | CONCAT(t3.classDate, t3.endDate) AS startAndEnd |
| | | FROM |
| | | t_cancelled_classes t1 |
| | | LEFT JOIN |
| | | t_course_package t2 ON t1.coursePackageId = t2.id |
| | | LEFT JOIN (SELECT id,classDate,endDate FROM t_course_package_scheduling |
| | | ) t3 |
| | | ON t1.coursePackageSchedulingId = t3.id |
| | | <where> |
| | | <if test="query.courseName!=null and query.courseName!= ''"> |
| | | and t5.name = #{query.courseName} |