Fix: Remove notes from bottom of sitemap.xml

This commit is contained in:
2025-08-13 13:05:23 +01:00
parent e5eee00beb
commit b1d34d951a
46 changed files with 891 additions and 260 deletions

View File

@@ -10,11 +10,15 @@ CREATE PROCEDURE fetchmetrics.p_dog_get_many_location (
, IN a_get_inactive_location BIT
, IN a_ids_location TEXT
, IN a_names_location TEXT
, IN a_get_all_user BIT
, IN a_get_inactive_user BIT
, IN a_ids_user TEXT
, IN a_names_user TEXT
, IN a_emails_user TEXT
, IN a_require_all_id_search_filters_met BIT
, IN a_require_any_id_search_filters_met BIT
, IN a_require_all_non_id_search_filters_met BIT
, IN a_require_any_non_id_search_filters_met BIT
, IN a_output_LOCATIONS BIT
, IN a_debug BIT
)
BEGIN
@@ -24,9 +28,12 @@ BEGIN
DECLARE v_guid BINARY(36);
DECLARE v_id_access_level_view INT;
DECLARE v_id_minimum INT;
DECLARE v_id_permission_dog_view INT;
DECLARE v_id_permission_command_view INT;
DECLARE v_id_type_error_bad_data INT;
DECLARE v_id_type_error_no_permission INT;
DECLARE v_is_super_user BIT;
DECLARE v_priority_access_level_none INT;
DECLARE v_priority_access_level_view INT;
DECLARE v_time_start TIMESTAMP(6);
DECLARE exit handler for SQLEXCEPTION
@@ -82,9 +89,11 @@ BEGIN
SET v_code_type_error_no_permission := 'NO_PERMISSION';
SET v_id_type_error_bad_data := (SELECT ERROR_TYPE.id_type FROM fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_bad_data LIMIT 1);
SET v_id_type_error_no_permission := (SELECT ERROR_TYPE.id_type FROM fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_no_permission LIMIT 1);
SET v_id_permission_dog_view := (SELECT PERMISSION.id_permission FROM fetchmetrics.DOG_Permission PERMISSION WHERE PERMISSION.code = 'DOG_VIEW' LIMIT 1);
SET v_id_permission_command_view := (SELECT PERMISSION.id_permission FROM fetchmetrics.DOG_Permission PERMISSION WHERE PERMISSION.code = 'COMMAND_VIEW' LIMIT 1);
SET v_id_access_level_view := (SELECT ACCESS_LEVEL.id_access_level FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.code = 'VIEW' LIMIT 1);
SET v_priority_access_level_none := (SELECT ACCESS_LEVEL.priority FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.code = 'NONE' LIMIT 1);
SET v_priority_access_level_view := (SELECT ACCESS_LEVEL.priority FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.id_access_level = v_id_access_level_view);
SET a_id_user := IFNULL(a_id_user, 0);
/*
SET a_get_all_location := IFNULL(a_get_all_location, 0);
@@ -98,7 +107,6 @@ BEGIN
SET a_require_all_non_id_search_filters_met := IFNULL(a_require_all_non_id_search_filters_met, 0);
SET a_require_any_non_id_search_filters_met := IFNULL(a_require_any_non_id_search_filters_met, 1);
*/
SET a_output_LOCATIONS := IFNULL(a_output_LOCATIONS, 0);
SET a_debug := IFNULL(a_debug, 0);
IF a_debug = 1 THEN
@@ -108,11 +116,15 @@ BEGIN
, a_get_inactive_location
, a_ids_location
, a_names_location
, a_get_all_user
, a_get_inactive_user
, a_ids_user
, a_names_user
, a_emails_user
, a_require_all_id_search_filters_met
, a_require_any_id_search_filters_met
, a_require_all_non_id_search_filters_met
, a_require_any_non_id_search_filters_met
, a_output_LOCATIONS
, a_debug
;
@@ -120,7 +132,7 @@ BEGIN
v_id_type_error_bad_data
, v_id_type_error_no_permission
, v_guid
, v_id_permission_dog_view
, v_id_permission_command_view
, v_time_start
;
END IF;
@@ -160,7 +172,7 @@ BEGIN
, 1 -- a_require_any_id_search_filters_met
, 0 -- a_require_all_non_id_search_filters_met
, 0 -- a_require_any_non_id_search_filters_met
, v_id_permission_dog_view -- ids_permission
, v_id_permission_command_view -- ids_permission
, v_id_access_level_view -- ids_access_level
, 0 -- a_show_errors
, 0 -- a_debug
@@ -179,7 +191,7 @@ BEGIN
, 1 -- a_require_any_id_search_filters_met
, 0 -- a_require_all_non_id_search_filters_met
, 0 -- a_require_any_non_id_search_filters_met
, v_id_permission_dog_view -- ids_permission
, v_id_permission_command_view -- ids_permission
, v_id_access_level_view -- ids_access_level
, 0 -- a_show_errors
, 0 -- a_debug
@@ -234,6 +246,11 @@ BEGIN
, a_get_inactive_location -- a_get_inactive_location
, a_ids_location -- a_ids_location
, a_names_location -- a_names_location
, a_get_all_user
, a_get_inactive_user
, a_ids_user
, a_names_user
, a_emails_user
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
, a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
@@ -250,6 +267,11 @@ BEGIN
, a_get_inactive_location -- a_get_inactive_location
, a_ids_location -- a_ids_location
, a_names_location -- a_names_location
, a_get_all_user
, a_get_inactive_user
, a_ids_user
, a_names_user
, a_emails_user
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
, a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
@@ -259,6 +281,7 @@ BEGIN
);
IF a_debug = 1 THEN
SELECT 'After Location Calc';
SELECT COUNT(*) FROM fetchmetrics.DOG_Location_Temp;
SELECT * FROM fetchmetrics.DOG_Location_Temp;
END IF;
@@ -287,6 +310,7 @@ BEGIN
;
IF a_debug = 1 THEN
SELECT 'After pulling Locations from Staging table';
SELECT COUNT(*) FROM tmp_Location;
SELECT * FROM tmp_Location;
END IF;
@@ -304,24 +328,22 @@ BEGIN
-- Outputs
-- Locations
IF a_output_LOCATIONS = 1 THEN
SELECT
t_LOCATIONS.id_location
, t_LOCATIONS.id_location_parent
, LOCATION_PARENT.name AS name_location_parent
, t_LOCATIONS.code
, t_LOCATIONS.name
, t_LOCATIONS.active
SELECT
t_LOCATIONS.id_location
, t_LOCATIONS.id_location_parent
, LOCATION_PARENT.name AS name_location_parent
, t_LOCATIONS.code
, t_LOCATIONS.name
, t_LOCATIONS.active
, t_LOCATIONS.does_meet_id_filters
, t_LOCATIONS.does_meet_non_id_filters
FROM tmp_Location t_LOCATIONS
LEFT JOIN fetchmetrics.DOG_Location LOCATION_PARENT ON t_LOCATIONS.id_location_parent = LOCATION_PARENT.id_location
ORDER BY
LOCATION_PARENT.name
, t_LOCATIONS.name
;
END IF;
, t_LOCATIONS.does_meet_id_filters
, t_LOCATIONS.does_meet_non_id_filters
FROM tmp_Location t_LOCATIONS
LEFT JOIN fetchmetrics.DOG_Location LOCATION_PARENT ON t_LOCATIONS.id_location_parent = LOCATION_PARENT.id_location
ORDER BY
LOCATION_PARENT.name
, t_LOCATIONS.name
;
-- Errors
SELECT
@@ -365,26 +387,34 @@ CALL fetchmetrics.p_dog_get_many_location (
, 0 -- a_get_inactive_location
, '' -- a_ids_location
, '' -- a_names_location
, 1 -- a_get_all_user
, 0 -- a_get_inactive_user
, '' -- a_ids_user
, '' -- a_names_user
, '' -- a_emails_user
, 1 -- a_require_all_id_search_filters_met
, 1 -- a_require_any_id_search_filters_met
, 0 -- a_require_all_non_id_search_filters_met
, 1 -- a_require_any_non_id_search_filters_met
, 1 -- a_output_LOCATIONS
, 1 -- a_debug
);
CALL demo.p_dog_get_many_location (
CALL fetchmetrics.p_dog_get_many_location (
1 -- 'auth0|6582b95c895d09a70ba10fef', -- a_id_user
, 1 -- a_get_all_location
, 0 -- a_get_inactive_location
, '' -- a_ids_location
, 'pat,point' -- a_names_location
, 1 -- a_get_all_user
, 0 -- a_get_inactive_user
, '' -- a_ids_user
, 'pat,point' -- a_names_user
, 'pat,point' -- a_emails_user
, 1 -- a_require_all_id_search_filters_met
, 1 -- a_require_any_id_search_filters_met
, 0 -- a_require_all_non_id_search_filters_met
, 1 -- a_require_any_non_id_search_filters_met
, 1 -- a_output_LOCATIONS
, 1 -- a_debug
);