select borrow_detail_id, borrow_id, borrow_item, unit, price, quantity, apply_amount, xm_amount, manager_amount from cmc_borrow_detail insert into cmc_borrow_detail borrow_detail_id, borrow_id, borrow_item, unit, price, quantity, apply_amount, xm_amount, manager_amount, #{borrowDetailId}, #{borrowId}, #{borrowItem}, #{unit}, #{price}, #{quantity}, #{applyAmount}, #{xmAmount}, #{managerAmount}, update cmc_borrow_detail borrow_id = #{borrowId}, borrow_item = #{borrowItem}, unit = #{unit}, price = #{price}, quantity = #{quantity}, apply_amount = #{applyAmount}, xm_amount = #{xmAmount}, manager_amount = #{managerAmount}, where borrow_detail_id = #{borrowDetailId} delete from cmc_borrow_detail where borrow_id = #{borrowId} delete from cmc_borrow_detail where borrow_id in #{borrowId}