fix terminalInfo for perspective
This commit is contained in:
parent
5524ceae6d
commit
0639aec58d
@ -501,6 +501,22 @@ public class TerminalInfo {
|
|||||||
return tm.allNames();
|
return tm.allNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static TerminalInfo buildByLegacyTerminalAndLegacyPerspective(String legacyTerminal, String legacyPerspective) {
|
||||||
|
TerminalInfo tm1 = new TerminalInfo(legacyTerminal);
|
||||||
|
if(tm1.isCMS()) {
|
||||||
|
if("proj".equals(legacyPerspective))
|
||||||
|
return new TerminalInfo(TerminalInfo.NT_CMS_WEB_PROJ);
|
||||||
|
else if("ent".equals(legacyPerspective))
|
||||||
|
return new TerminalInfo(TerminalInfo.NT_CMS_WEB_ENT_ZB);
|
||||||
|
} else if(tm1.isCMP()) {
|
||||||
|
if("proj".equals(legacyPerspective))
|
||||||
|
return new TerminalInfo(TerminalInfo.NT_CMP_APP_PROJ);
|
||||||
|
else if("ent".equals(legacyPerspective))
|
||||||
|
return new TerminalInfo(TerminalInfo.NT_CMP_APP_ENT_ZB);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TerminalInfo tm = new TerminalInfo("proj");
|
TerminalInfo tm = new TerminalInfo("proj");
|
||||||
System.out.println(tm.getRawTerminalString());
|
System.out.println(tm.getRawTerminalString());
|
||||||
@ -523,6 +539,13 @@ public class TerminalInfo {
|
|||||||
System.out.println(TerminalInfo.parseLegacyTerminalLegacyPerspective(tm.getRawTerminalString(), "proj", "ent"));
|
System.out.println(TerminalInfo.parseLegacyTerminalLegacyPerspective(tm.getRawTerminalString(), "proj", "ent"));
|
||||||
System.out.println("--------");
|
System.out.println("--------");
|
||||||
|
|
||||||
|
tm = new TerminalInfo("cmp");
|
||||||
|
System.out.println(tm.getRawTerminalString());
|
||||||
|
System.out.println(tm.toString());
|
||||||
|
System.out.println(TerminalInfo.parseLegacyTerminal(tm.getRawTerminalString()));
|
||||||
|
System.out.println(TerminalInfo.parseLegacyTerminalLegacyPerspective(tm.getRawTerminalString(), "proj", "ent"));
|
||||||
|
System.out.println("--------");
|
||||||
|
|
||||||
tm = new TerminalInfo(TerminalInfo.NT_CMS_WEB_PROJ);
|
tm = new TerminalInfo(TerminalInfo.NT_CMS_WEB_PROJ);
|
||||||
System.out.println(tm.getRawTerminalString());
|
System.out.println(tm.getRawTerminalString());
|
||||||
System.out.println(tm.toString());
|
System.out.println(tm.toString());
|
||||||
|
|||||||
@ -160,7 +160,11 @@ public class UserInfo {
|
|||||||
// */
|
// */
|
||||||
// private boolean credentialsNonExpired;
|
// private boolean credentialsNonExpired;
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 原来用来传projectId的字段,apollo用的最多
|
||||||
|
// */
|
||||||
|
// private Long tenantId;
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 分包机构名称
|
// * 分包机构名称
|
||||||
// */
|
// */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user