企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` DELIMITER $$ USE `shvpn`$$ DROP TRIGGER /*!50032 IF EXISTS */ `equipment`$$ CREATE /*!50017 DEFINER = 'root'@'%' */ TRIGGER `equipment` AFTER UPDATE ON `dp_chsys_equipment` FOR EACH ROW BEGIN IF NEW.`used` != OLD.`used` || New.`customer_id` != OLD.`customer_id` || New.`addr_id` != OLD.`addr_id` || New.`remark` != OLD.`remark` THEN INSERT INTO dp_chsys_equipmentlog(id,equipment_id,sn,brand,model,used,customer_id,addr_id,start_time,create_time,remark) VALUE (NULL,old.id,old.sn,old.brand,old.model,old.used,old.customer_id,old.addr_id,old.update_time,UNIX_TIMESTAMP(NOW()),old.remark); END IF; END; $$ DELIMITER ; ```