INSERT INTO student_payment_order_detail (type_,goods_id_list_,price_,create_time_,update_time_,payment_order_id_,kit_group_purchase_type_, student_instrument_id_,is_renew_,income_item_,income_,balance_income_,minuend_stock_goods_id_list_,tenant_id_,remit_fee_,delivery_batch_no_) VALUES(#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{goodsIdList},#{price},now(),now(), #{paymentOrderId},#{kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{studentInstrumentId},#{isRenew},#{incomeItem},#{income},#{balanceIncome},#{minuendStockGoodsIdList},#{tenantId},#{remitFee},#{deliveryBatchNo}) UPDATE student_payment_order_detail price_ = #{price}, goods_id_list_ = #{goodsIdList}, update_time_ = NOW(), payment_order_id_ = #{paymentOrderId}, kit_group_purchase_type_ = #{kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, student_instrument_id_ = #{studentInstrumentId}, income_item_ = #{incomeItem}, income_ = #{income}, balance_income_ = #{balanceIncome}, minuend_stock_goods_id_list_ = #{minuendStockGoodsIdList}, delivery_batch_no_ = #{deliveryBatchNo}, WHERE id_ = #{id} and tenant_id_ = #{tenantId} UPDATE student_payment_order_detail price_ = #{item.price}, goods_id_list_ = #{item.goodsIdList}, update_time_ = NOW(), payment_order_id_ = #{item.paymentOrderId}, kit_group_purchase_type_ = #{item.kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, type_ = #{item.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, student_instrument_id_ = #{item.studentInstrumentId}, income_item_ = #{item.incomeItem}, income_ = #{item.income}, balance_income_ = #{item.balanceIncome}, minuend_stock_goods_id_list_ = #{item.minuendStockGoodsIdList}, delivery_batch_no_ = #{item.deliveryBatchNo}, WHERE id_ = #{item.id} and tenant_id_ = #{item.tenantId} DELETE FROM student_payment_order_detail WHERE id_ = #{id} INSERT INTO student_payment_order_detail (type_,goods_id_list_,price_,remit_fee_,create_time_,update_time_,payment_order_id_, kit_group_purchase_type_,student_instrument_id_,is_renew_,income_item_,income_, balance_income_,minuend_stock_goods_id_list_,tenant_id_,delivery_batch_no_) VALUE (#{orderDetail.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{orderDetail.goodsIdList},#{orderDetail.price},#{orderDetail.remitFee},now(),now(),#{orderDetail.paymentOrderId}, #{orderDetail.kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{orderDetail.studentInstrumentId},#{orderDetail.isRenew},#{orderDetail.incomeItem},#{orderDetail.income}, #{orderDetail.balanceIncome},#{orderDetail.minuendStockGoodsIdList},#{orderDetail.tenantId},#{orderDetail.deliveryBatchNo})