INSERT INTO lb_order_row (
id, old_id, tenant_id, data_type,
seller_id, seller_name, seller_phone,
buyer_id, buyer_name, buyer_phone,
order_sn, total_money,
pay_time, pay_img, status, is_resell, is_show,
consignee, phone, province, city, area, address,
merchandise_id, confirm_time, buy_time, created_at, updated_at,
today_total_money_sum, today_unresell_count, today_order_count, avg_amt
) VALUES
(
#{item.id}, #{item.oldId}, #{item.tenantId}, #{item.dataType},
#{item.sellerId}, #{item.sellerName}, #{item.sellerPhone},
#{item.buyerId}, #{item.buyerName}, #{item.buyerPhone},
#{item.orderSn}, #{item.totalMoney},
#{item.payTime}, #{item.payImg}, #{item.status}, #{item.isResell}, #{item.isShow},
#{item.consignee}, #{item.phone}, #{item.province}, #{item.city}, #{item.area}, #{item.address},
#{item.merchandiseId}, #{item.confirmTime}, #{item.buyTime}, #{item.createdAt}, #{item.updatedAt},
#{item.todayTotalMoneySum}, #{item.todayUnresellCount}, #{item.todayOrderCount}, #{item.avgAmt}
)
ON DUPLICATE KEY UPDATE
old_id = VALUES(old_id),
tenant_id = VALUES(tenant_id),
data_type = VALUES(data_type),
seller_id = VALUES(seller_id),
seller_name = VALUES(seller_name),
seller_phone = VALUES(seller_phone),
buyer_id = VALUES(buyer_id),
buyer_name = VALUES(buyer_name),
buyer_phone = VALUES(buyer_phone),
order_sn = VALUES(order_sn),
total_money = VALUES(total_money),
pay_time = VALUES(pay_time),
pay_img = VALUES(pay_img),
status = VALUES(status),
is_resell = VALUES(is_resell),
is_show = VALUES(is_show),
consignee = VALUES(consignee),
phone = VALUES(phone),
province = VALUES(province),
city = VALUES(city),
area = VALUES(area),
address = VALUES(address),
merchandise_id = VALUES(merchandise_id),
confirm_time = VALUES(confirm_time),
buy_time = VALUES(buy_time),
created_at = VALUES(created_at),
updated_at = VALUES(updated_at),
today_total_money_sum = VALUES(today_total_money_sum),
today_unresell_count = VALUES(today_unresell_count),
today_order_count = VALUES(today_order_count),
avg_amt = VALUES(avg_amt)