|
@@ -2,31 +2,39 @@
|
|
|
<!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.dao.CourseScheduleEvaluateDao">
|
|
|
<resultMap id="CourseScheduleEvaluate" type="com.ym.mec.biz.dal.entity.CourseScheduleEvaluate">
|
|
|
- <id column="id_" jdbcType="BIGINT" property="id" />
|
|
|
- <result column="music_group_id_" jdbcType="VARCHAR" property="musicGroupId" />
|
|
|
- <result column="class_group_id_" jdbcType="INTEGER" property="classGroupId" />
|
|
|
- <result column="course_schedule_id_" jdbcType="BIGINT" property="courseScheduleId" />
|
|
|
- <result column="teacher_id_" jdbcType="INTEGER" property="teacherId" />
|
|
|
- <result column="item_" jdbcType="VARCHAR" property="item" />
|
|
|
- <result column="comment_" jdbcType="LONGVARCHAR" property="comment" />
|
|
|
- <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
- <result column="student_id_" jdbcType="INTEGER" property="studentId" />
|
|
|
- <result column="subject_name_" jdbcType="VARCHAR" property="subjectName" />
|
|
|
+ <id column="id_" jdbcType="BIGINT" property="id"/>
|
|
|
+ <result column="music_group_id_" jdbcType="VARCHAR" property="musicGroupId"/>
|
|
|
+ <result column="class_group_id_" jdbcType="INTEGER" property="classGroupId"/>
|
|
|
+ <result column="course_schedule_id_" jdbcType="BIGINT" property="courseScheduleId"/>
|
|
|
+ <result column="teacher_id_" jdbcType="INTEGER" property="teacherId"/>
|
|
|
+ <result column="item_" jdbcType="VARCHAR" property="item"/>
|
|
|
+ <result column="comment_" jdbcType="LONGVARCHAR" property="comment"/>
|
|
|
+ <result column="create_time_" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
+ <result column="student_id_" jdbcType="INTEGER" property="studentId"/>
|
|
|
+ <result column="subject_name_" jdbcType="VARCHAR" property="subjectName"/>
|
|
|
</resultMap>
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleEvaluate" useGeneratedKeys="true"
|
|
|
keyColumn="id" keyProperty="id">
|
|
|
insert into course_schedule_evaluate (music_group_id_, class_group_id_, course_schedule_id_,
|
|
|
- teacher_id_, item_, comment_,
|
|
|
- create_time_)
|
|
|
+ teacher_id_, item_, comment_,
|
|
|
+ create_time_)
|
|
|
values (#{musicGroupId,jdbcType=VARCHAR}, #{classGroupId,jdbcType=INTEGER}, #{courseScheduleId,jdbcType=BIGINT},
|
|
|
- #{teacherId,jdbcType=INTEGER}, #{item,jdbcType=VARCHAR}, #{comment,jdbcType=LONGVARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ #{teacherId,jdbcType=INTEGER}, #{item,jdbcType=VARCHAR}, #{comment,jdbcType=LONGVARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP})
|
|
|
</insert>
|
|
|
|
|
|
<select id="findByClassGroupId" resultMap="CourseScheduleEvaluate">
|
|
|
- SELECT cse.*,s.name_ subject_name_,pg.student_id_ FROM course_schedule_evaluate cse
|
|
|
- LEFT JOIN practice_group pg ON pg.id_ = cse.music_group_id_
|
|
|
- LEFT JOIN subject s on s.id_ = pg.subject_id_
|
|
|
+ SELECT cse.*, s.name_ subject_name_, pg.student_id_
|
|
|
+ FROM course_schedule_evaluate cse
|
|
|
+ LEFT JOIN practice_group pg ON pg.id_ = cse.music_group_id_
|
|
|
+ LEFT JOIN subject s on s.id_ = pg.subject_id_
|
|
|
WHERE cse.class_group_id_ = #{classGroupId}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="findByClassGroupIds" resultMap="CourseScheduleEvaluate">
|
|
|
+ SELECT * FROM course_schedule_evaluate WHERE class_group_id_ IN
|
|
|
+ <foreach collection="classGroupIds" item="classGroupId" separator="," open="(" close=")">
|
|
|
+ #{classGroupId}
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
</mapper>
|