select eop.id, eop.refund_id, eop.order_id, eop.product_id, eop.product_name, eop.product_img, eop.product_specs_id,
eop.product_specs_name, eop.product_specs_price, eop.product_extra_id, eop.product_extra_name, eop.product_extra_price,
eop.product_taste_id, eop.product_taste_name, eop.product_taste_price, eop.quantity, eop.returnable_quantity,
eop.unit_price, eop.total_price, eop.finally_unit_price, eop.create_by, eop.create_time, eop.update_by, eop.unit,
eop.update_time, eop.remark, eop.merchant_id
from zdy_eatery_order_product eop
left join sys_dept d on eop.merchant_id = d.dept_id
insert into zdy_eatery_order_product
refund_id,
order_id,
product_id,
product_name,
product_img,
product_specs_id,
product_specs_name,
product_specs_price,
unit,
product_extra_id,
product_extra_name,
product_extra_price,
product_taste_id,
product_taste_name,
product_taste_price,
quantity,
returnable_quantity,
unit_price,
total_price,
finally_unit_price,
create_by,
create_time,
update_by,
update_time,
remark,
merchant_id,
#{refundId},
#{orderId},
#{productId},
#{productName},
#{productImg},
#{productSpecsId},
#{productSpecsName},
#{productSpecsPrice},
#{unit},
#{productExtraId},
#{productExtraName},
#{productExtraPrice},
#{productTasteId},
#{productTasteName},
#{productTastePrice},
#{quantity},
#{returnableQuantity},
#{unitPrice},
#{totalPrice},
#{finallyUnitPrice},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
#{merchantId},
update zdy_eatery_order_product
order_id =
#{orderId},
product_id =
#{productId},
product_name =
#{productName},
product_img =
#{productImg},
product_specs_id =
#{productSpecsId},
product_specs_name =
#{productSpecsName},
unit =
#{unit},
product_specs_price =
#{productSpecsPrice},
product_extra_id =
#{productExtraId},
product_extra_name =
#{productExtraName},
product_extra_price =
#{productExtraPrice},
product_taste_id =
#{productTasteId},
product_taste_name =
#{productTasteName},
product_taste_price =
#{productTastePrice},
quantity =
#{quantity},
returnable_quantity =
#{returnableQuantity},
finally_buy_quantity =
#{finallyBuyQuantity},
unit_price =
#{unitPrice},
total_price =
#{totalPrice},
finally_unit_price =
#{finallyUnitPrice},
create_by =
#{createBy},
create_time =
#{createTime},
update_by =
#{updateBy},
update_time =
#{updateTime},
remark =
#{remark},
merchant_id =
#{merchantId},
where id = #{id}
delete from zdy_eatery_order_product where id = #{id}
delete from zdy_eatery_order_product where id in
#{id}