INSERT INTO music_group_payment_calender_student_detail (id_,user_id_,phone_,username_,course_original_price_,
course_current_price_,course_type_,course_time_,class_group_id_,batch_no_,create_time_,update_time_,master_sub_course_price_)
VALUES(#{id},#{userId},#{phone},#{username},#{courseOriginalPrice},#{courseCurrentPrice},
#{courseType},#{courseTime},#{classGroupId},#{batchNo},NOW(),NOW(),#{masterSubCoursePrice})
UPDATE music_group_payment_calender_student_detail
user_id_ = #{userId},
master_sub_course_price_ = #{masterSubCoursePrice},
class_group_id_ = #{classGroupId},
course_current_price_ = #{courseCurrentPrice},
course_type_ = #{courseType},
course_original_price_ = #{courseOriginalPrice},
batch_no_ = #{batchNo},
phone_ = #{phone},
course_time_ = #{courseTime},
username_ = #{username},
update_time_ = NOW()
WHERE id_ = #{id}
DELETE FROM music_group_payment_calender_student_detail WHERE id_ = #{id}
INSERT INTO music_group_payment_calender_student_detail (user_id_,phone_,username_,course_original_price_,
course_current_price_,course_type_,course_time_,class_group_id_,batch_no_,create_time_,update_time_,master_sub_course_price_)
VALUES
(#{item.userId},#{item.phone},#{item.username},#{item.courseOriginalPrice},#{item.courseCurrentPrice},
#{item.courseType},#{item.courseTime},#{item.classGroupId},#{batchNo},NOW(),NOW(),#{item.masterSubCoursePrice})
UPDATE music_group_payment_calender_student_detail
course_current_price_ = #{item.courseCurrentPrice},
course_original_price_ = #{item.courseOriginalPrice},
update_time_ = NOW()
WHERE id_ = #{item.id}
UPDATE music_group_payment_calender_student_detail
SET course_current_price_ = #{courseCurrentPrice},update_time_ = NOW()
WHERE course_type_ = #{courseType} AND batch_no_ = #{batchNo} AND user_id_ IN
#{userId}
DELETE FROM music_group_payment_calender_student_detail WHERE batch_no_ = #{batchNo}