update odr_order_base
INNER JOIN (select merchant_id,order_base_id from odr_order_commodity) b on odr_order_base.order_base_id = b.order_base_id set odr_order_base.merchant_id = b.merchant_id
update odr_order_base_his a
INNER JOIN (select merchant_id,status,pay_status,pay_time,order_base_id from odr_order_commodity_his) b on a.order_base_id = b.order_base_id set a.merchant_id = b.merchant_id, a.status=b.status,a.pay_status=b.pay_status,a.pay_time=b.pay_time
update odr_order_commodity a
INNER JOIN (select merchant_id,status,pay_status,pay_time,order_base_id from odr_order_base) b on a.order_base_id = b.order_base_id set a.merchant_id = b.merchant_id, a.status=b.status,a.pay_status=b.pay_status,a.pay_time=b.pay_time