From d67fca8671d311836d26eff72b212fee7ee3c845 Mon Sep 17 00:00:00 2001 From: msyu Date: Thu, 7 Nov 2024 06:19:01 +0300 Subject: [PATCH] debug --- v1/resources/notification_ls.cfc | 163 +++++++++++++++---------------- 1 file changed, 80 insertions(+), 83 deletions(-) diff --git a/v1/resources/notification_ls.cfc b/v1/resources/notification_ls.cfc index a6b58fd..ba03512 100644 --- a/v1/resources/notification_ls.cfc +++ b/v1/resources/notification_ls.cfc @@ -21,94 +21,91 @@ - + + - - - - - - - - + + + + + + + + + + + + + + + + - - - + + + - - - + + + + select + + n.notification_uid::text as notification_uid + n.notification + n.descr + n.contragent_id + k.external_uid + as arguments_company_uid + to_char(n.dt_show_from, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_show_from + to_char(n.dt_show_to, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_show_to + + + from notification n + left outer join contragent k on (n.contragent_id=k.contragent_id) + where 1=1 + AND (n.dt_show_from <= CURRENT_TIMESTAMP OR n.dt_show_from IS NULL) + AND (n.dt_show_to >= CURRENT_TIMESTAMP OR n.dt_show_to IS NULL) + AND (k.external_uid = OR n.contragent_id IS NULL) + order by dt_show_from desc + + limit #maxrows# + + + + + select count(*) as cnt + from notification n + left outer join contragent k on (n.contragent_id=k.contragent_id) + where 1=1 + AND (n.dt_show_from <= CURRENT_TIMESTAMP OR n.dt_show_from IS NULL) + AND (n.dt_show_to >= CURRENT_TIMESTAMP OR n.dt_show_to IS NULL) + AND (k.external_uid = OR n.contragent_id IS NULL) + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - select - - n.notification_uid::text as notification_uid - n.notification - n.descr - n.contragent_id - k.external_uid - as arguments_company_uid - to_char(n.dt_show_from, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_show_from - to_char(n.dt_show_to, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_show_to - - - from notification n - left outer join contragent k on (n.contragent_id=k.contragent_id) - where 1=1 - AND (n.dt_show_from <= CURRENT_TIMESTAMP OR n.dt_show_from IS NULL) - AND (n.dt_show_to >= CURRENT_TIMESTAMP OR n.dt_show_to IS NULL) - AND (k.external_uid = OR n.contragent_id IS NULL) - order by dt_show_from desc - - limit #maxrows# - - - - - select count(*) as cnt - from notification n - left outer join contragent k on (n.contragent_id=k.contragent_id) - where 1=1 - AND (n.dt_show_from <= CURRENT_TIMESTAMP OR n.dt_show_from IS NULL) - AND (n.dt_show_to >= CURRENT_TIMESTAMP OR n.dt_show_to IS NULL) - AND (k.external_uid = OR n.contragent_id IS NULL) - - - - - - - - - - - - - - - - - - - - - - - - +