select id, declare_port_id, warehouse_id, mode, user_id, s_order_no, declare_order_no, status, express_name, ship_order_number, buyer_reg_no, buyer_name, buyer_telephone, buyer_id_type, buyer_id_number, consignee, consignee_telephone, consignee_address, consignee_province, consignee_city, consignee_district, total_amount, discount_amount, pay_total_amount, tax_total_amount, shop_tax_total_amount, freight_amount, total_gross_weight, total_net_weight, total_quantity, pay_name, pay_code, pay_time, gateway_order_id, consignor, consignor_address, consignor_telephone, consignor_country, consignor_province, consignor_city, consignor_district, receipt_account, ver_dept, pay_type, inital_request, inital_response, remark, express_return, process, add_time, inventory_no, batch_number from custom_order
insert into custom_order
declare_port_id,
warehouse_id,
mode,
user_id,
s_order_no,
declare_order_no,
status,
express_name,
ship_order_number,
buyer_reg_no,
buyer_name,
buyer_telephone,
buyer_id_type,
buyer_id_number,
consignee,
consignee_telephone,
consignee_address,
consignee_province,
consignee_city,
consignee_district,
total_amount,
discount_amount,
pay_total_amount,
tax_total_amount,
shop_tax_total_amount,
freight_amount,
total_gross_weight,
total_net_weight,
total_quantity,
pay_name,
pay_code,
pay_time,
gateway_order_id,
consignor,
consignor_address,
consignor_telephone,
consignor_country,
consignor_province,
consignor_city,
consignor_district,
receipt_account,
ver_dept,
pay_type,
inital_request,
inital_response,
remark,
express_return,
process,
add_time,
inventory_no,
batch_number,
#{declarePortId},
#{warehouseId},
#{mode},
#{userId},
#{sOrderNo},
#{declareOrderNo},
#{status},
#{expressName},
#{shipOrderNumber},
#{buyerRegNo},
#{buyerName},
#{buyerTelephone},
#{buyerIdType},
#{buyerIdNumber},
#{consignee},
#{consigneeTelephone},
#{consigneeAddress},
#{consigneeProvince},
#{consigneeCity},
#{consigneeDistrict},
#{totalAmount},
#{discountAmount},
#{payTotalAmount},
#{taxTotalAmount},
#{shopTaxTotalAmount},
#{freightAmount},
#{totalGrossWeight},
#{totalNetWeight},
#{totalQuantity},
#{payName},
#{payCode},
#{payTime},
#{gatewayOrderId},
#{consignor},
#{consignorAddress},
#{consignorTelephone},
#{consignorCountry},
#{consignorProvince},
#{consignorCity},
#{consignorDistrict},
#{receiptAccount},
#{verDept},
#{payType},
#{initalRequest},
#{initalResponse},
#{remark},
#{expressReturn},
#{process},
#{addTime},
#{inventoryNo},
#{batchNumber},
update custom_order
declare_port_id = #{declarePortId},
warehouse_id = #{warehouseId},
mode = #{mode},
user_id = #{userId},
s_order_no = #{sOrderNo},
declare_order_no = #{declareOrderNo},
status = #{status},
express_name = #{expressName},
ship_order_number = #{shipOrderNumber},
buyer_reg_no = #{buyerRegNo},
buyer_name = #{buyerName},
buyer_telephone = #{buyerTelephone},
buyer_id_type = #{buyerIdType},
buyer_id_number = #{buyerIdNumber},
consignee = #{consignee},
consignee_telephone = #{consigneeTelephone},
consignee_address = #{consigneeAddress},
consignee_province = #{consigneeProvince},
consignee_city = #{consigneeCity},
consignee_district = #{consigneeDistrict},
total_amount = #{totalAmount},
discount_amount = #{discountAmount},
pay_total_amount = #{payTotalAmount},
tax_total_amount = #{taxTotalAmount},
shop_tax_total_amount = #{shopTaxTotalAmount},
freight_amount = #{freightAmount},
total_gross_weight = #{totalGrossWeight},
total_net_weight = #{totalNetWeight},
total_quantity = #{totalQuantity},
pay_name = #{payName},
pay_code = #{payCode},
pay_time = #{payTime},
gateway_order_id = #{gatewayOrderId},
consignor = #{consignor},
consignor_address = #{consignorAddress},
consignor_telephone = #{consignorTelephone},
consignor_country = #{consignorCountry},
consignor_province = #{consignorProvince},
consignor_city = #{consignorCity},
consignor_district = #{consignorDistrict},
receipt_account = #{receiptAccount},
ver_dept = #{verDept},
pay_type = #{payType},
inital_request = #{initalRequest},
inital_response = #{initalResponse},
remark = #{remark},
express_return = #{expressReturn},
process = #{process},
add_time = #{addTime},
inventory_no = #{inventoryNo},
batch_number = #{batchNumber},
where id = #{id}
delete from custom_order where id = #{id}
delete from custom_order where id in
#{id}
delete from custom_order_item where order_id in
#{orderId}
delete from custom_order_item where order_id = #{orderId}
insert into custom_order_item( id, order_id, declare_port_id, warehouse_id, bar_code, quantity, price, shop_price, freight, tax_amount, item_link, book_number, product_code, name, brand, specification_model, description, quantity_unit, produce_country, inspection_and_quarantine_code, hs_code, tax_rate, declared_count, legal_metering_unit, second_declared_count, second_metering_unit, gross_weight, net_weight) values
( #{item.id}, #{item.orderId}, #{item.declarePortId}, #{item.warehouseId}, #{item.barCode}, #{item.quantity}, #{item.price}, #{item.shopPrice}, #{item.freight}, #{item.taxAmount}, #{item.itemLink}, #{item.bookNumber}, #{item.productCode}, #{item.name}, #{item.brand}, #{item.specificationModel}, #{item.description}, #{item.quantityUnit}, #{item.produceCountry}, #{item.inspectionAndQuarantineCode}, #{item.hsCode}, #{item.taxRate}, #{item.declaredCount}, #{item.legalMeteringUnit}, #{item.secondDeclaredCount}, #{item.secondMeteringUnit}, #{item.grossWeight}, #{item.netWeight})