insert into student_repair (id_,music_group_id_, trans_no_,student_instrument_id_,maintenance_status_,repair_name_,
repair_img_,exemption_amount_,organ_id_,student_id_, student_name_,student_school_,employee_id_, employee_name_,
subject_id_,subject_name_, type_, instrument_no_,fee_list_,description_, amount_, finish_time_,send_type_,
contact_name_, contact_mobile_,address_,pay_status_, create_time_,update_time_,repair_status_,goods_json_,coupon_ids_,tenant_id_)
values (#{id,jdbcType=INTEGER},#{musicGroupId}, #{transNo,jdbcType=VARCHAR}, #{studentInstrumentId},
#{maintenanceStatus},#{repairName},#{repairImg},#{exemptionAmount},#{organId,jdbcType=INTEGER},
#{studentId,jdbcType=INTEGER}, #{studentName,jdbcType=VARCHAR}, #{studentSchool,jdbcType=VARCHAR},
#{employeeId,jdbcType=INTEGER}, #{employeeName,jdbcType=VARCHAR}, #{subjectId,jdbcType=INTEGER},
#{subjectName,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{instrumentNo,jdbcType=VARCHAR},
#{feeList,jdbcType=VARCHAR},#{description,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL},
#{finishTime,jdbcType=TIMESTAMP},#{sendType,jdbcType=INTEGER}, #{contactName,jdbcType=VARCHAR},
#{contactMobile,jdbcType=VARCHAR},#{address,jdbcType=VARCHAR}, #{payStatus,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{repairStatus},#{goodsJson},#{couponIds},#{tenantId})
UPDATE student_repair
coupon_ids_ = #{couponIds},
music_group_id_ = #{musicGroupId},
goods_json_ = #{goodsJson},
trans_no_ = #{transNo},
repair_status_ = #{repairStatus},
organ_id_ = #{organId},
student_id_ = #{studentId},
student_name_ = #{studentName},
student_school_ = #{studentSchool},
employee_id_ = #{employeeId},
employee_name_ = #{employeeName},
subject_id_ = #{subjectId},
subject_name_ = #{subjectName},
type_ = #{type},
instrument_no_ = #{instrumentNo},
fee_list_ = #{feeList},
description_ = #{description},
amount_ = #{amount},
finish_time_ = #{finishTime},
send_type_ = #{sendType},
contact_name_ = #{contactName},
contact_mobile_ = #{contactMobile},
address_ = #{address},
pay_status_ = #{payStatus},
update_time_ = #{updateTime},
WHERE id_ = #{id} and tenant_id_ = #{tenantId}
sr.tenant_id_ = #{tenantId}
AND (sr.trans_no_ LIKE CONCAT('%',#{search},'%') OR sr.student_id_ = #{search} OR su.username_ LIKE
CONCAT('%',#{search},'%'))
AND sr.employee_id_ = #{employeeId}
AND sr.student_id_ = #{studentId}
AND FIND_IN_SET(sr.organ_id_,#{organIdList})
AND sr.subject_id_ = #{subjectId}
AND sr.type_ = #{type}
AND sr.repair_status_ = #{repairStatus}
AND sr.pay_status_ = #{payStatus}
AND sr.create_time_ >= #{startTime}
AND sr.create_time_ <= #{endTime}
AND sr.student_instrument_id_ = #{studentInstrumentId}
AND sr.exemption_amount_ > 0
AND sr.exemption_amount_ = 0