feat: refs #7544 crear evento claim_changeState #2552

Merged
robert merged 8 commits from 7544-claimChangeState into dev 2024-07-10 05:24:02 +00:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit f8169b3034 - Show all commits

View File

@ -6,15 +6,15 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`claim_changeState`
ENABLE
DO BEGIN
DECLARE vClaimStete INT;
DECLARE vClaimState INT;
robert marked this conversation as resolved Outdated

revisa

revisa
SELECT id INTO vClaimStete
SELECT id INTO vClaimState
FROM claimState cs
WHERE cs.code = 'canceled';
UPDATE claim c
JOIN claimState cs ON cs.id = c.claimStateFk
SET c.claimStateFk = vClaimStete
SET c.claimStateFk = vClaimState
WHERE c.created < util.VN_CURDATE() - INTERVAL 2 MONTH
AND cs.code IN('incomplete','coming','waiting','out');