refactor(SQL): Staging tables and Calc stored procedures used for modular stored procedure archicture for scalability. Implemented for Product Catalogue. \n BREAKING CHANGE: BIT argument a_debug added to all but basic stored procedures for analysis of performance and results.
This commit is contained in:
@@ -271,11 +271,11 @@ BEGIN
|
||||
) G
|
||||
);
|
||||
|
||||
CALL p_shop_user_eval(v_guid_permission, a_id_user, 0, v_id_permission_supplier_purchase_order, v_id_access_level_edit, v_ids_product);
|
||||
CALL p_shop_calc_user(v_guid_permission, a_id_user, 0, v_id_permission_supplier_purchase_order, v_id_access_level_edit, v_ids_product);
|
||||
|
||||
/*
|
||||
UPDATE tmp_Shop_Supplier t_S
|
||||
INNER JOIN Shop_User_Eval_Temp TP
|
||||
INNER JOIN Shop_Calc_User_Temp TP
|
||||
ON TP.GUID = v_guid_permission
|
||||
SET tP.can_view = TP.can_view,
|
||||
tP.can_edit = TP.can_edit,
|
||||
@@ -284,7 +284,7 @@ BEGIN
|
||||
/*
|
||||
SET v_has_permission := (
|
||||
SELECT can_edit
|
||||
FROM Shop_User_Eval_Temp
|
||||
FROM Shop_Calc_User_Temp
|
||||
WHERE
|
||||
GUID = v_guid_permission
|
||||
AND can_edit = 0
|
||||
@@ -306,7 +306,7 @@ BEGIN
|
||||
*/
|
||||
SET v_ids_product_no_permission := (
|
||||
SELECT GROUP_CONCAT(PT.id_product SEPARATOR ',')
|
||||
FROM Shop_User_Eval_Temp PT
|
||||
FROM Shop_Calc_User_Temp PT
|
||||
WHERE
|
||||
PT.can_edit = 0
|
||||
AND NOT ISNULL(PT.id_product)
|
||||
@@ -324,7 +324,7 @@ BEGIN
|
||||
;
|
||||
END IF;
|
||||
|
||||
DELETE FROM Shop_User_Eval_Temp
|
||||
DELETE FROM Shop_Calc_User_Temp
|
||||
WHERE GUID = a_guid;
|
||||
END IF;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user