salix/db/routines/hedera/triggers/order_afterInsert.sql

18 lines
463 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `hedera`.`order_afterInsert`
AFTER INSERT ON `order`
FOR EACH ROW
BEGIN
IF NEW.address_id = 2850 THEN
-- Fallo que se insertan no se sabe como tickets en este cliente
CALL vn.mail_insert(
'jgallego@verdnatura.es',
'noreply@verdnatura.es',
'Creada order al address 2850',
CONCAT(account.myUser_getName(), ' ha creado la order ',NEW.id)
);
END IF;
END$$
DELIMITER ;