INSERT INTO courses_group (id_,name_,subject_id_,courses_start_date_,courses_end_date_,teaching_arrangement_,
organ_id_,single_class_minutes_,status_,memo_,teacher_id_,max_student_num_,apply_closing_date_,
teaching_plan_,teacher_salary_settlement_method_,total_courses_price_,total_course_discount_price_,create_time_,update_time_,educational_teacher_id_)
VALUES(#{id},#{name},#{subjectId},#{coursesStartDate},#{coursesEndDate},#{teachingArrangement},
#{organId},#{singleClassMinutes},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
#{memo},#{teacherId},#{maxStudentNum},#{applyClosingDate},#{teachingPlan},#{teacherSalarySettlementMethod},
#{totalCoursesPrice},#{totalCourseDiscountPrice},NOW(),NOW(),#{educationalTeacherId})
UPDATE courses_group
courses_end_date_ = #{coursesEndDate},
educational_teacher_id_ = #{educationalTeacherId},
subject_id_ = #{subjectId},
status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
organ_id_ = #{organId},
total_course_discount_price_ = #{totalCourseDiscountPrice},
id_ = #{id},
courses_start_date_ = #{coursesStartDate},
memo_ = #{memo},
max_student_num_ = #{maxStudentNum},
name_ = #{name},
teacher_salary_settlement_method_ = #{teacherSalarySettlementMethod},
create_time_ = #{createTime},
teaching_plan_ = #{teachingPlan},
apply_closing_date_ = #{applyClosingDate},
total_courses_price_ = #{totalCoursesPrice},
teaching_arrangement_ = #{teachingArrangement},
teacher_id_ = #{teacherId},
single_class_minutes_ = #{singleClassMinutes},
update_time_ = NOW()
WHERE id_ = #{id}
UPDATE courses_group SET status_=#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} WHERE id_ IN
#{groupId}
DELETE FROM courses_group WHERE id_ = #{id}
AND teacher_id_=#{teacherId}
AND (name_ LIKE CONCAT('%', #{search}, '%') OR id_ LIKE CONCAT('%', #{search}, '%'))
AND status_ = #{groupStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}