ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的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 ; ```