7596-devToTest_2426 #2600
|
@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expedition_beforeInse
|
|||
BEFORE INSERT ON `expedition`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE intcounter INT;
|
||||
DECLARE vMaxCounter INT;
|
||||
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
|
||||
|
@ -11,7 +11,7 @@ BEGIN
|
|||
|
||||
UPDATE ticket SET packages = IFNULL(packages, 0) + 1 WHERE id = NEW.ticketFk;
|
||||
|
||||
SELECT IFNULL(MAX(counter),0) + 1 INTO intcounter
|
||||
SELECT IFNULL(MAX(counter),0) + 1 INTO vMaxCounter
|
||||
FROM expedition e
|
||||
JOIN alertLevel al ON al.code = 'DELIVERED'
|
||||
JOIN ticket t1 ON e.ticketFk = t1.id
|
||||
|
@ -21,7 +21,7 @@ BEGIN
|
|||
WHERE t2.id = NEW.ticketFk AND ts.alertLevel < al.id AND t1.companyFk = t2.companyFk
|
||||
AND t1.agencyModeFk = t2.agencyModeFk;
|
||||
|
||||
SET NEW.`counter` = intcounter;
|
||||
SET NEW.`counter` = vMaxCounter;
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"name": "RoleInherit",
|
||||
"base": "VnModel",
|
||||
"mixins": {
|
||||
"Loggable": true
|
||||
},
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "account.roleInherit"
|
||||
|
|
Loading…
Reference in New Issue