CREATE TRIGGER `after_plan_order_insert` AFTER INSERT ON `plan_order` FOR EACH ROW BEGIN INSERT INTO `plan_order_log` ( id, operate_type, plan_id, number, orderTimeStart, orderTimeEnd, orderTime, unit, shipBoarding, visitRoute, paymentMethod, phonenumber, contact, orderNature, create_by, create_time, update_by, update_time, remark, status, guideNum, shipNum ) VALUES ( NEW.id, 'insert', NEW.plan_id, NEW.number, NEW.orderTimeStart, NEW.orderTimeEnd, NEW.orderTime, NEW.unit, NEW.shipBoarding, NEW.visitRoute, NEW.paymentMethod, NEW.phonenumber, NEW.contact, NEW.orderNature, NEW.create_by, NEW.create_time, NEW.update_by, NEW.update_time, NEW.remark, NEW.status, NEW.guideNum, NEW.shipNum ); END; CREATE TRIGGER `after_plan_order_update` AFTER UPDATE ON `plan_order` FOR EACH ROW BEGIN INSERT INTO `plan_order_log` ( id, operate_type, plan_id, number, orderTimeStart, orderTimeEnd, orderTime, unit, shipBoarding, visitRoute, paymentMethod, phonenumber, contact, orderNature, create_by, create_time, update_by, update_time, remark, status, guideNum, shipNum ) VALUES ( NEW.id, 'update', NEW.plan_id, NEW.number, NEW.orderTimeStart, NEW.orderTimeEnd, NEW.orderTime, NEW.unit, NEW.shipBoarding, NEW.visitRoute, NEW.paymentMethod, NEW.phonenumber, NEW.contact, NEW.orderNature, NEW.create_by, NEW.create_time, NEW.update_by, NEW.update_time, NEW.remark, NEW.status, NEW.guideNum, NEW.shipNum ); END; CREATE TRIGGER `after_plan_order_delete` AFTER DELETE ON `plan_order` FOR EACH ROW BEGIN INSERT INTO `plan_order_log` ( id, operate_type, plan_id, number, orderTimeStart, orderTimeEnd, orderTime, unit, shipBoarding, visitRoute, paymentMethod, phonenumber, contact, orderNature, create_by, create_time, update_by, update_time, remark, status, guideNum, shipNum ) VALUES ( OLD.id, 'delete', OLD.plan_id, OLD.number, OLD.orderTimeStart, OLD.orderTimeEnd, OLD.orderTime, OLD.unit, OLD.shipBoarding, OLD.visitRoute, OLD.paymentMethod, OLD.phonenumber, OLD.contact, OLD.orderNature, OLD.create_by, OLD.create_time, OLD.update_by, OLD.update_time, OLD.remark, OLD.status, OLD.guideNum, OLD.shipNum ); END;