X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fwebapp%2FWEB-INF%2Ffusion%2Form%2FEP.hbm.xml;h=84f7b7edac64f3628035b03e06e0a9a631dac565;hb=refs%2Fchanges%2F85%2F4985%2F2;hp=bda281c24fa5ce0b40febaee4ee745299e5e8e0d;hpb=ba838f2e13f1e8050c75e68bd3733d56d8f416d5;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml index bda281c2..84f7b7ed 100644 --- a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml +++ b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml @@ -621,7 +621,8 @@ select user_id, notification_id, is_for_online_users, is_for_all_roles, msg_header, msg_description,msg_source,start_Time, end_time, priority, created_date, creator_ID,active_YN from ( - select a.*, b.role_id,b.recv_user_id + select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN, + a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date,b.role_id,b.recv_user_id from ep_notification a, ep_role_notification b where a.notification_id = b.notification_id and (end_time is null || SYSDATE() <= end_time ) @@ -639,7 +640,23 @@ )b where ( - a.role_id = b.role_id||a.recv_user_id=:user_id + a.role_id = b.role_id + ) + union + select :user_id, notification_id, is_for_online_users, is_for_all_roles, msg_header, msg_description,msg_source,start_Time, end_time, priority, created_date, creator_ID,active_YN + from + ( + select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN, + a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date, b.role_id,b.recv_user_id + from ep_notification a, ep_role_notification b + where a.notification_id = b.notification_id + and (end_time is null || SYSDATE() <= end_time ) + and (start_time is null || SYSDATE() >= start_time) + and a.is_for_all_roles = 'N' + ) a + where + ( + a.recv_user_id=:user_id ) union ( @@ -656,9 +673,9 @@ and not exists ( - select * from ep_user_notification m where user_id = :user_id and m.notification_id = a.notification_id and is_viewed = 'Y' + select ID,User_ID,notification_ID,is_viewed,updated_time from ep_user_notification m where user_id = :user_id and m.notification_id = a.notification_id and is_viewed = 'Y' ) - order by priority desc, start_Time desc,created_date desc + order by priority desc, created_date desc,start_Time desc ) t, @@ -682,7 +699,8 @@ @@ -757,7 +801,9 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name creator_ID,active_YN from ( - select a.*, b.role_id,CASE WHEN a.creator_ID IS NOT NULL THEN u.org_user_id + select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN, + a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date, + b.role_id,CASE WHEN a.creator_ID IS NOT NULL THEN u.org_user_id ELSE NULL END AS login_id,b.recv_user_id @@ -785,8 +831,38 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name ) b where ( - a.role_id = b.role_id||a.recv_user_id=:user_id + a.role_id = b.role_id ) + UNION + select + :user_id, login_id,notification_id, is_for_online_users, is_for_all_roles, + msg_header, msg_description,msg_source, start_Time, end_time, priority, created_date, + creator_ID,active_YN + from + ( + select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN, + a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date, + b.role_id,CASE WHEN a.creator_ID IS NOT NULL THEN u.org_user_id + + ELSE NULL + END AS login_id,b.recv_user_id + from ep_notification a, ep_role_notification b,fn_user u + where a.notification_id = b.notification_id and (u.user_id=a.creator_ID OR a.creator_ID IS NULL) + and a.is_for_all_roles = 'N' + and ( + (start_time is null and end_time is null and a.created_date >= DATE_ADD(curdate(),INTERVAL-31 DAY)) + or + (start_time is not null and end_time is null and start_time >= DATE_ADD(curdate(),INTERVAL -31 DAY)) + or + (start_time is null and end_time is not null and end_time >= DATE_ADD(curdate(),INTERVAL -31 DAY)) + or + (start_time is not null and end_time is not null and end_time >= DATE_ADD(curdate(),INTERVAL -31 DAY)) + ) + ) a + where + ( + a.recv_user_id=:user_id + ) union ( select @@ -973,6 +1049,20 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name ]]> + + + + + + + + + + @@ -1322,7 +1412,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name - - + + @@ -1374,7 +1463,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name @@ -1382,7 +1470,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name @@ -1390,7 +1477,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name @@ -1398,7 +1484,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name @@ -1408,12 +1493,20 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name - + + + + + + + + + + + = DATE_ADD(end_time,INTERVAL 3 MONTH) + ]]> + + + + + + + = DATE_ADD(end_time,INTERVAL 3 MONTH)) + ]]> + + + + + + = DATE_ADD(end_time,INTERVAL 3 MONTH)) + ]]> +