From: Sudarshan Kumar Date: Fri, 18 Sep 2020 08:00:32 +0000 (+0530) Subject: Updated DB scrip and EPUesrApp X-Git-Tag: 3.4.0~6 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=portal.git;a=commitdiff_plain;h=f951915573eebe953317fe3d077857a80b422a6f Updated DB scrip and EPUesrApp Updated DB scrip and EPUesrApp Issue-ID: PORTAL-1012 Change-Id: If8385754583e29c57fceb466d3eeaf6edc601920 Signed-off-by: Sudarshan Kumar --- diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUserApp.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUserApp.java index d644c998..2b23568f 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUserApp.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUserApp.java @@ -116,8 +116,7 @@ public class EPUserApp extends DomainVo implements java.io.Serializable, Compara return (otherUserIdIsSameAsThisUserId(castOther)) && (otherAppIdIsSameAsThis(castOther)) - && (otherRoleIsSameAsThis(castOther)) - && (otherPriorityIsSameAsThis(castOther)); + && (otherRoleIsSameAsThis(castOther)); } public int hashCode() { @@ -126,22 +125,18 @@ public class EPUserApp extends DomainVo implements java.io.Serializable, Compara result = 37 * result + (int) (this.getUserId()==null ? 0 : this.getUserId().intValue()); result = 37 * result + (int) (this.getApp().getId()==null ? 0 : this.getApp().getId().intValue()); result = 37 * result + (int) (this.getRole().getId()==null ? 0 : this.getRole().getId().intValue()); - result = 37 * result + (int) (this.priority==null ? 0 : this.priority); return result; } public int compareTo(Object other){ EPUserApp castOther = (EPUserApp) other; - Long c1 = (this.getUserId()==null ? 0 : this.getUserId()) + (this.getApp()==null||this.getApp().getId()==null ? 0 : this.getApp().getId()) + (this.getRole()==null||this.getRole().getId()==null ? 0 : this.getRole().getId()) + (this.priority==null ? 0 : this.priority); - Long c2 = (castOther.getUserId()==null ? 0 : castOther.getUserId()) + (castOther.getApp()==null||castOther.getApp().getId()==null ? 0 : castOther.getApp().getId()) + (castOther.getRole()==null||castOther.getRole().getId()==null ? 0 : castOther.getRole().getId()) + (castOther.priority==null ? 0 : castOther.priority); + Long c1 = (this.getUserId()==null ? 0 : this.getUserId()) + (this.getApp()==null||this.getApp().getId()==null ? 0 : this.getApp().getId()) + (this.getRole()==null||this.getRole().getId()==null ? 0 : this.getRole().getId()); + Long c2 = (castOther.getUserId()==null ? 0 : castOther.getUserId()) + (castOther.getApp()==null||castOther.getApp().getId()==null ? 0 : castOther.getApp().getId()) + (castOther.getRole()==null||castOther.getRole().getId()==null ? 0 : castOther.getRole().getId()); return c1.compareTo(c2); } - private boolean otherPriorityIsSameAsThis(EPUserApp other){ - return (this.priority==null && other.getPriority()==null) || this.getPriority().equals(other.getPriority()); - } - + private boolean otherRoleIsSameAsThis(EPUserApp other){ return this.getRole().getId().equals(other.getRole().getId()); } diff --git a/ecomp-portal-DB-os/PortalDMLMySql_3_3_OS.sql b/ecomp-portal-DB-os/PortalDMLMySql_3_3_OS.sql index b163ae28..abeb42ef 100644 --- a/ecomp-portal-DB-os/PortalDMLMySql_3_3_OS.sql +++ b/ecomp-portal-DB-os/PortalDMLMySql_3_3_OS.sql @@ -15,6 +15,11 @@ UPDATE fn_menu SET function_cd = 'menu_acc_admin' WHERE label = 'Users'; +--- update fn_menu for Onboarding Page +UPDATE fn_menu +SET function_cd = 'menu_acc_admin' +WHERE label = 'Application Onboarding'; + -- fn_user Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS,is_system_user,language_id) values (1,NULL,NULL,'Demo',NULL,'User',NULL,NULL,NULL,'demo@onap.org',NULL,NULL,NULL,'demo',NULL,'demo','4Gl6WL1bmwviYm+XZa6pS1vC0qKXWtn9wcZWdLx61L0=','2016-10-20 15:11:16','Y',NULL,'2016-10-14 21:00:00',1,'2016-10-20 15:11:16','N',NULL,NULL,NULL,'NJ',NULL,'US',NULL,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,'N',1);