Merge branch 'feature/REQ-503' into feature/auth
# Conflicts: # axzo-auth-spring-boot-starter/src/main/java/cn/axzo/framework/auth/domain/TerminalInfo.java
This commit is contained in:
commit
df421173bd
@ -18,4 +18,11 @@ public class SystemAndDeviceInfo {
|
||||
private String appVersion;
|
||||
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 登录的设备,其实是端。模糊了具体的业务类型
|
||||
* {@link TerminalInfo#NT_CM_APP_CM_LEADER} 和 {@link TerminalInfo#NT_CM_APP_CM_WORKER}
|
||||
* 会转换为 {@link TerminalInfo#NT_CM_APP_GENERAL}
|
||||
*/
|
||||
private String loginDevice;
|
||||
}
|
||||
|
||||
@ -1,6 +1,15 @@
|
||||
package cn.axzo.framework.auth.domain;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import jdk.nashorn.internal.ir.Terminal;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
@ -624,6 +633,44 @@ public class TerminalInfo {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//只要端的标识,不需要分的更加的细
|
||||
public String getSimpleTerminal() {
|
||||
String terminalKey = "";
|
||||
//产业工人app
|
||||
if (this.isCM()) {
|
||||
terminalKey = TerminalInfo.NT_CM_APP_GENERAL;
|
||||
}
|
||||
//从业人员app
|
||||
else if (this.isCMP()) {
|
||||
terminalKey = TerminalInfo.NT_CMP_APP_GENERAL;
|
||||
}
|
||||
//cms
|
||||
else if (this.isCMS()) {
|
||||
terminalKey = TerminalInfo.NT_CMS_WEB_GENERAL;
|
||||
}
|
||||
//oms
|
||||
else if (this.isOMS_WEB()) {
|
||||
terminalKey = TerminalInfo.NT_OMS_WEB;
|
||||
}
|
||||
//大屏
|
||||
else if (this.isSCREEN()) {
|
||||
terminalKey = TerminalInfo.NT_SCREEN;
|
||||
}
|
||||
//智能面板
|
||||
else if (this.isPANEL()) {
|
||||
terminalKey = TerminalInfo.NT_PANEL;
|
||||
} //招标
|
||||
else if (this.isBID_WEB_ENT()) {
|
||||
terminalKey = TerminalInfo.NT_BID_WEB_ENT;
|
||||
}
|
||||
//投标
|
||||
else if (this.isBID_WEB_LEADER()) {
|
||||
terminalKey = TerminalInfo.NT_BID_WEB_LEADER;
|
||||
} else {
|
||||
terminalKey = this.NT();
|
||||
}
|
||||
return terminalKey;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
TerminalInfo tm = new TerminalInfo("proj");
|
||||
|
||||
@ -316,6 +316,7 @@ public class ContextInfoBuilderAspect {
|
||||
|
||||
try {
|
||||
fillLegacyGuess(contextInfo, userinfoMap);
|
||||
contextInfo.getSystemAndDeviceInfo().setLoginDevice(contextInfo.getTerminalInfo().getSimpleTerminal());
|
||||
} catch (Exception e) {
|
||||
log.warn("fill legacy guess error for user identityId=" + userInfo.getIdentityId(), e);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user