select id, project_code, order_code, version_code, order_name, customer_name, customer_contact, customer_phone, customer_email, order_type, order_dept, partener_dept, order_date, status, remark, created_at, updated_at, deleted_at from order_info
insert into order_info
project_code,
order_code,
version_code,
order_name,
customer_name,
customer_contact,
customer_phone,
customer_email,
order_type,
order_dept,
partener_dept,
order_date,
status,
remark,
created_at,status,
#{projectCode},
#{orderCode},
#{versionCode},
#{orderName},
#{customerName},
#{customerContact},
#{customerPhone},
#{customerEmail},
#{orderType},
#{orderDept},
#{partenerDept},
#{orderDate},
#{status},
#{remark},
NOW(),0
update order_info
project_code = #{projectCode},
order_code = #{orderCode},
version_code = #{versionCode},
order_name = #{orderName},
customer_name = #{customerName},
customer_contact = #{customerContact},
customer_phone = #{customerPhone},
customer_email = #{customerEmail},
order_type = #{orderType},
order_dept = #{orderDept},
partener_dept = #{partenerDept},
order_date = #{orderDate},
status = #{status},
remark = #{remark},
updated_at = NOW(),
where id = #{id}
update order_info set deleted_at=NOW(), status=1 where id = #{id}
update order_info set deleted_at=NOW(), status=1 where id in
#{id}
delete from order_list where order_id in
#{orderId}
delete from order_list where order_id = #{orderId}
insert into order_list( id, order_id, product_code, quantity, price, amount, remark, created_at, updated_at, deleted_at) values
( #{item.id}, #{item.orderId}, #{item.productCode}, #{item.quantity}, #{item.price}, #{item.amount}, #{item.remark}, #{item.createdAt}, #{item.updatedAt}, #{item.deletedAt})