<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.dsh.course.mapper.CancelledClassesMapper">
|
|
<select id="listAll" resultType="com.dsh.course.model.CancelClassesVO">
|
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}
|
</if>
|
<if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''">
|
and t1.insertTime between #{sTime} and #{eTime}
|
</if>
|
</where>
|
</select>
|
|
</mapper>
|