| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?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.ym.mec.biz.dal.mapper.CourseSchedulePlusMapper">
- <select id="teachingPointCourse" resultType="com.ym.mec.biz.dal.wrapper.TeachingPointWrapper$CourseTeachingPoint">
- select cs.id_ as courseId
- ,cs.name_ as courseName
- ,cs.status_ as courseStatus
- ,mg.id_ as musicGroupId
- ,mg.name_ as musicGroupName
- ,cs.actual_teacher_id_ as teacherId
- ,cs.teaching_point_ as teachingPoint
- from course_schedule cs
- left join music_group mg on mg.id_ = cs.music_group_id_
- <where>
- mg.del_flag_ = 0
- <if test="param.cooperationOrganId != null">
- and mg.cooperation_organ_id_ = #{param.cooperationOrganId}
- </if>
- <if test="param.startTime != null">
- and cs.class_date_ >= date_format(#{param.startTime}, '%Y-%m-%d')
- </if>
- <if test="param.endTime != null">
- and cs.class_date_ <= date_format(#{param.endTime}, '%Y-%m-%d')
- </if>
- <if test="param.musicGroupId != null and param.musicGroupId != ''">
- and cs.music_group_id_ = #{param.musicGroupId}
- </if>
- </where>
- order by cs.class_date_ desc,cs.start_class_time_ desc,cs.id_ desc
- </select>
- <select id="teachingPointClass" resultType="com.ym.mec.biz.dal.wrapper.TeachingPointWrapper$ClassTeachingPoint">
- select
- cg.id_ as classGroupId
- ,cg.name_ as classGroupName
- ,mg.id_ as musicGroupId
- ,mg.name_ as musicGroupName
- ,cg.teaching_point_ as teachingPoint
- from class_group cg
- left join music_group mg on mg.id_ = cg.music_group_id_
- <where>
- and cg.del_flag_ = 0 and mg.del_flag_ = 0
- <if test="param.musicGroupId != null and param.musicGroupId != ''">
- and cg.music_group_id_ = #{param.musicGroupId}
- </if>
- <if test="param.cooperationOrganId != null">
- and mg.cooperation_organ_id_ = #{param.cooperationOrganId}
- </if>
- <if test="param.musicGroupId != null">
- and cg.music_group_id_ = #{param.musicGroupId}
- </if>
- </where>
- order by cg.teaching_point_ is null desc,cg.id_ desc
- </select>
- </mapper>
|