delete from class_group_teacher_salary
where id_ = #{id}
DELETE FROM class_group_teacher_salary WHERE music_group_id_=#{groupId} AND group_type_=#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
insert into class_group_teacher_salary
group_type_,
music_group_id_,
class_group_id_,
teacher_role_,
user_id_,
salary_,
online_classes_salary_,
create_time_,
update_time_,
#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
#{musicGroupId,jdbcType=INTEGER},
#{classGroupId,jdbcType=INTEGER},
#{teacherRole,jdbcType=VARCHAR},
#{userId,jdbcType=INTEGER},
#{salary,jdbcType=DECIMAL},
#{onlineClassesSalary,jdbcType=DECIMAL},
NOW(),
NOW(),
update class_group_teacher_salary
music_group_id_ = #{musicGroupId,jdbcType=INTEGER},
group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
class_group_id_ = #{classGroupId,jdbcType=INTEGER},
teacher_role_ = #{teacherRole,jdbcType=VARCHAR},
user_id_ = #{userId,jdbcType=INTEGER},
salary_ = #{salary,jdbcType=DECIMAL},
online_classes_salary_ = #{onlineClassesSalary,jdbcType=DECIMAL},
update_time_ = NOW()
where id_ = #{id,jdbcType=BIGINT}
UPDATE class_group_teacher_salary SET user_id_ = #{teacherId},update_time_ = NOW()
WHERE teacher_role_ = 'BISHOP' AND music_group_id_ = #{groupId} AND group_type_ = #{groupType}