course_id, school_id, grade, class_id, single_or_double, week, course_number, course_name,
create_time, update_time,team,course_open_id
insert into sz_sch_class_course ( school_id, grade,
class_id, single_or_double, week,
course_number, course_name, create_time,
update_time,team,course_open_id)
values
(#{emp.schoolId,jdbcType=INTEGER}, #{emp.grade,jdbcType=INTEGER},
#{emp.classId,jdbcType=INTEGER}, #{emp.singleOrDouble,jdbcType=INTEGER}, #{emp.week,jdbcType=INTEGER},
#{emp.courseNumber,jdbcType=INTEGER}, #{emp.courseName,jdbcType=VARCHAR}, #{emp.createTime,jdbcType=TIMESTAMP},
#{emp.updateTime,jdbcType=TIMESTAMP},#{emp.team,jdbcType=VARCHAR}, #{emp.courseOpenId,jdbcType=INTEGER})
update sz_sch_class_course set course_name = null where school_id = #{schoolId}
and course_name = #{courseName}
delete from sz_sch_class_course where team =#{team} and school_id = #{schoolId}
update sz_sch_class_course set course_name = #{courseName} where team =#{team} and school_id = #{schoolId} and grade = #{grade}
and week=#{week} and course_number = #{courseNumber} and single_or_double = #{singleOrDouble}
update sz_sch_class_course
set school_id = #{schoolId,jdbcType=INTEGER},
grade = #{grade,jdbcType=INTEGER},
class_id = #{classId,jdbcType=INTEGER},
single_or_double = #{singleOrDouble,jdbcType=INTEGER},
week = #{week,jdbcType=INTEGER},
course_number = #{courseNumber,jdbcType=INTEGER},
course_name = #{courseName,jdbcType=VARCHAR},
course_open_id = #{courseOpenId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where course_id = #{courseId,jdbcType=INTEGER}