|
@@ -9,7 +9,6 @@
|
|
|
<resultMap type="com.ym.mec.web.dal.entity.StudentAttendance" id="StudentAttendance">
|
|
|
<result column="id_" property="id"/>
|
|
|
<result column="music_group_id_" property="musicGroupId"/>
|
|
|
- <result column="subject_id_" property="subjectId"/>
|
|
|
<result column="class_group_id_" property="classGroupId"/>
|
|
|
<result column="course_schedule_id_" property="courseScheduleId"/>
|
|
|
<result column="user_id_" property="userId"/>
|
|
@@ -38,15 +37,15 @@
|
|
|
</selectKey>
|
|
|
-->
|
|
|
INSERT INTO student_attendance
|
|
|
- (id_,music_group_id_,subject_id_,class_group_id_,course_schedule_id_,user_id_,teacher_id_,status_,create_time_,remark_)
|
|
|
- VALUES(#{id},#{musicGroupId},#{subjectId},#{classGroupId},#{courseScheduleId},#{userId},#{teacherId},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),#{remark})
|
|
|
+ (id_,music_group_id_,class_group_id_,course_schedule_id_,user_id_,teacher_id_,status_,create_time_,remark_)
|
|
|
+ VALUES(#{id},#{musicGroupId},#{classGroupId},#{courseScheduleId},#{userId},#{teacherId},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),#{remark})
|
|
|
</insert>
|
|
|
|
|
|
<insert id="addStudentAttendances" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id_">
|
|
|
- INSERT INTO student_attendance ( music_group_id_, subject_id_, class_group_id_, course_schedule_id_, user_id_, teacher_id_, status_, create_time_, remark_ )
|
|
|
+ INSERT INTO student_attendance ( music_group_id_, class_group_id_, course_schedule_id_, user_id_, teacher_id_, status_, create_time_, remark_ )
|
|
|
VALUES
|
|
|
<foreach collection="list" item="studentAttendance" separator=",">
|
|
|
- (#{studentAttendance.musicGroupId},#{studentAttendance.subjectId},#{studentAttendance.classGroupId},#{studentAttendance.courseScheduleId},#{studentAttendance.userId},#{studentAttendance.teacherId},#{studentAttendance.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),#{studentAttendance.remark})
|
|
|
+ (#{studentAttendance.musicGroupId},#{studentAttendance.classGroupId},#{studentAttendance.courseScheduleId},#{studentAttendance.userId},#{studentAttendance.teacherId},#{studentAttendance.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),#{studentAttendance.remark})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
@@ -54,9 +53,6 @@
|
|
|
<update id="update" parameterType="com.ym.mec.web.dal.entity.StudentAttendance">
|
|
|
UPDATE student_attendance
|
|
|
<set>
|
|
|
- <if test="subjectId != null">
|
|
|
- subject_id_ = #{subjectId},
|
|
|
- </if>
|
|
|
<if test="status != null">
|
|
|
status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
</if>
|