INSERT INTO student_registration (parents_phone_,id_,user_id_,music_group_id_,current_grade_,current_class_,subject_id_,is_allow_adjust_,kit_purchase_method_,remark_,create_time_,update_time_,parents_name_,parents_company_,payment_status_,last_payment_date_,next_payment_date_,actual_subject_id_) VALUES(#{parentsPhone},#{id},#{userId},#{musicGroupId},#{currentGrade},#{currentClass},#{subjectId},#{isAllowAdjust,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{kitPurchaseMethod,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{remark},now(),now(),#{parentsName},#{parentsCompany},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{lastPaymentDate},#{nextPaymentDate},#{subjectId}) UPDATE student_registration parents_phone_ = #{parentsPhone}, subject_id_ = #{subjectId}, next_payment_date_ = #{nextPaymentDate}, current_grade_ = #{currentGrade}, last_payment_date_ = #{lastPaymentDate}, current_class_ = #{currentClass}, is_allow_adjust_ = #{isAllowAdjust,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, kit_purchase_method_ = #{kitPurchaseMethod,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, user_id_ = #{userId}, remark_ = #{remark}, payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, parents_name_ = #{parentsName}, update_time_ = #{updateTime}, parents_company_ = #{parentsCompany}, music_group_id_ = #{musicGroupId}, actual_subject_id_ = #{actualSubjectId}, WHERE id_ = #{id} DELETE FROM student_registration WHERE id_ = #{id} AND is_allow_adjust_ = #{isAllowAdjust,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} AND subject_id_ = #{subjectId} sr.music_group_id_ = #{musicGroupId} sr.subject_id_ = #{subjectId} sr.is_allow_adjust_ = #{isAllowAdjust} sr.actual_subject_id_ = #{actualSubjectId}