select eo.id, eo.customer_id, eo.customer_name, eo.table_id, eo.order_date, eo.order_type, eo.order_status,
eo.total_amount, eo.receivable, eo.discount_amount, eo.actual_received_amount, eo.change_amount, eo.zero_amount,
eo.payment_method, eo.payment_status, eo.product_total_count, eo.create_by, eo.create_time, eo.update_by,
eo.update_time, eo.remark, eo.merchant_id, eo.shop_name, eo.shop_address, eo.shop_phone, eo.diners_count
from zdy_eatery_order eo
left join sys_dept d on eo.merchant_id = d.dept_id
insert into zdy_eatery_order
id,
refund_id,
customer_id,
customer_name,
table_id,
order_date,
order_type,
order_status,
total_amount,
discount_amount,
actual_received_amount,
change_amount,
zero_amount,
payment_method,
payment_status,
product_total_count,
create_by,
create_time,
update_by,
update_time,
remark,
merchant_id,
shop_name,
shop_address,
shop_phone,
diners_count,
#{id},
#{refundId},
#{customerId},
#{customerName},
#{tableId},
#{orderDate},
#{orderType},
#{orderStatus},
#{totalAmount},
#{discountAmount},
#{actualReceivedAmount},
#{changeAmount},
#{zeroAmount},
#{paymentMethod},
#{paymentStatus},
#{productTotalCount},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
#{merchantId},
#{shopName},
#{shopAddress},
#{shopPhone},
#{dinersCount},
update zdy_eatery_order
customer_id =
#{customerId},
customer_name =
#{customerName},
table_id =
#{tableId},
order_date =
#{orderDate},
order_type =
#{orderType},
order_status =
#{orderStatus},
total_amount =
#{totalAmount},
receivable =
#{receivable},
discount_amount =
#{discountAmount},
actual_received_amount =
#{actualReceivedAmount},
change_amount =
#{changeAmount},
zero_amount =
#{zeroAmount},
payment_method =
#{paymentMethod},
payment_status =
#{paymentStatus},
product_total_count =
#{productTotalCount},
create_by =
#{createBy},
create_time =
#{createTime},
update_by =
#{updateBy},
update_time =
#{updateTime},
remark =
#{remark},
shop_name =
#{shopName},
shop_address =
#{shopAddress},
shop_phone =
#{shopPhone},
diners_count =
#{dinersCount},
where id = #{id}
and merchant_id = #{merchantId}
delete from zdy_eatery_order where id = #{id}
delete from zdy_eatery_order where id in
#{id}