-- 增加订单产品项最后单价变更时间 alter table ecw_order_item add COLUMN `last_freight_charge_price_time` datetime DEFAULT NULL COMMENT '运费最后单价变更时间'; alter table ecw_order_item add COLUMN `last_clearance_charge_price_time` datetime DEFAULT NULL COMMENT '清关费最后单价变更时间'; -- 批量更新订单产品项的最后单价变更时间 update ecw_order_item set `last_freight_charge_price_time` = update_time where last_freight_charge_price_time is null; update ecw_order_item set `last_clearance_charge_price_time` = update_time where last_clearance_charge_price_time is null;