1234567891011121314151617181920212223 |
- <?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.yonge.cooleshow.biz.dal.dao.CourseScheduleStudentDao">
- <insert id="insertBatch">
- INSERT INTO course_schedule_student (course_id_, student_id_) VALUES
- <foreach collection ="list" item="item" separator =",">
- (#{item.courseId}, #{item.studentId})
- </foreach >
- </insert>
- <select id="selectUser" resultType="com.yonge.cooleshow.biz.dal.vo.CourseScheduleStudentVo">
- SELECT
- c.id_ AS courseId,
- c.teacher_id_ AS teacherId,
- s.student_id_ AS studentId,
- c.end_time_ AS endTime,
- c.single_course_time_ AS singleCourseTime
- FROM course_schedule c
- LEFT JOIN course_schedule_student s ON c.id_ = s.course_id_
- WHERE c.lock_ = 0
- AND c.status_ IN ('ING','NOT_START')
- AND NOW() >= c.end_time_
- </select>
- </mapper>
|