From 627badaf69987c01811c477219fd943757a635f5 Mon Sep 17 00:00:00 2001 From: "Christopher Lott (Christopher) (cl778h)" Date: Mon, 12 Jun 2017 09:49:00 -0400 Subject: [PORTAL-16 PORTAL-18] Widget ms; staging Remove staging repositories from poms. Add widget microservice code base. Add portal unit tests. Repair defects. Normalize line endings. Change-Id: Ia5e48da2a3141b352439ecd548cddf918f4df585 Signed-off-by: Christopher Lott (cl778h) --- .../src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml | 160 ++++++++++++++++++--- 1 file changed, 140 insertions(+), 20 deletions(-) (limited to 'ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml') 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)) + ]]> + -- cgit 1.2.3-korg