<select id="selectTeacherCourseList" resultType="com.roncoo.education.adult.common.resp.AdultTeacherCourseListRESP"> select c.id, c.course_id, c.course_name, c.teaching_plan_id, c.examination_type, p.grade_id, p.grade_name, p.arrangement_id, p.arrangement_name, p.major_id, p.major_name, p.semester_id, p.now_semester, sc.course_logo, sc.course_abbreviation, c.learning_steps, eb.id as batch_id, eb.batch_name, eb.start_time, eb.end_time from adult_teaching_plan_course c left join adult_teaching_plan p on c.teaching_plan_id = p.id and p.is_deleted=0 left join adult_school_course sc on c.school_course_id = sc.id and sc.is_deleted=0 left join adult_exam_batch eb on eb.id = c.batch_id and eb.is_deleted = 0 ${ew.customSqlSegment} and c.is_deleted=0 and c.course_type = 1 </select>
时间: 2024-02-14 20:26:20 浏览: 30
这段代码是一个SQL查询语句,用于从数据库中获取教师课程列表的相关信息。它使用了多个表的连接操作,包括adult_teaching_plan_course、adult_teaching_plan、adult_school_course和adult_exam_batch。查询结果包括课程的ID、课程名称、教学计划ID、考试类型等信息。同时,还包括了年级、排课、专业、学期、批次等相关信息。查询条件包括自定义的SQL片段和其他限定条件。最后,需要注意的是查询结果中只包含course_type为1(表示教师课程)且未被删除的课程记录。
相关问题
<select id="findByName" resultType="com.xujunfei.entity.UserInfo">
这是 MyBatis 中的一个 SQL 映射文件的 XML 标签,用于定义一个查询语句。其中,id 属性指定了这个查询语句的名称,resultType 属性指定了查询结果集的映射类型。在这个例子中,查询语句的名称是 findByName,查询结果集的映射类型是 com.xujunfei.entity.UserInfo。
<select id="selectAll" resultType="org.example.pojo.User">
这是一个 Mybatis 中的 XML 配置文件,其中 `<select>` 标签表示定义一个查询语句,`id` 属性为查询语句的唯一标识符,`resultType` 属性表示返回结果的类型。在这个示例中,查询语句的唯一标识符为 `selectAll`,返回结果的类型为 `org.example.pojo.User`。具体查询语句的实现需要在 XML 文件的后续部分进行定义。