mirror of
https://github.com/dataease/dataease.git
synced 2026-05-18 17:58:11 +08:00
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
@@ -42,7 +42,8 @@ public class ShiroServiceImpl implements ShiroService {
|
||||
filterChainDefinitionMap.put("/index.html", ANON);
|
||||
filterChainDefinitionMap.put("/link.html", ANON);
|
||||
filterChainDefinitionMap.put("/board/**", ANON);
|
||||
filterChainDefinitionMap.put("/websocket/**", "anon");
|
||||
filterChainDefinitionMap.put("/websocket/**", ANON);
|
||||
filterChainDefinitionMap.put("/system/defaultLoginType", ANON);
|
||||
|
||||
// 获取主题信息
|
||||
filterChainDefinitionMap.put("/plugin/theme/themes", ANON);
|
||||
|
||||
@@ -110,6 +110,7 @@ public interface ParamConstants {
|
||||
enum BASIC implements ParamConstants {
|
||||
FRONT_TIME_OUT("basic.frontTimeOut"),
|
||||
MSG_TIME_OUT("basic.msgTimeOut"),
|
||||
DEFAULT_LOGIN_TYPE("basic.loginType"),
|
||||
OPEN_HOME_PAGE("ui.openHomePage");
|
||||
|
||||
private String value;
|
||||
|
||||
@@ -115,4 +115,9 @@ public class SystemParameterController {
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value = "/defaultLoginType")
|
||||
public Integer defaultLoginType() {
|
||||
return systemParameterService.defaultLoginType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,5 +14,7 @@ public class BasicInfo implements Serializable {
|
||||
private String msgTimeOut;
|
||||
@ApiModelProperty("显示首页")
|
||||
private String openHomePage;
|
||||
@ApiModelProperty("默认登录方式")
|
||||
private Integer loginType = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import io.dataease.ext.*;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class SystemParameterService {
|
||||
|
||||
private final static String LOGIN_TYPE_KEY = "basic.loginType";
|
||||
@Resource
|
||||
private SystemParameterMapper systemParameterMapper;
|
||||
@Resource
|
||||
@@ -53,6 +54,10 @@ public class SystemParameterService {
|
||||
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.MSG_TIME_OUT.getValue())) {
|
||||
result.setMsgTimeOut(param.getParamValue());
|
||||
}
|
||||
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.DEFAULT_LOGIN_TYPE.getValue())) {
|
||||
String paramValue = param.getParamValue();
|
||||
result.setLoginType(StringUtils.isNotBlank(paramValue) ? Integer.parseInt(paramValue) : 0);
|
||||
}
|
||||
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.OPEN_HOME_PAGE.getValue())) {
|
||||
boolean open = StringUtils.equals("true", param.getParamValue());
|
||||
result.setOpenHomePage(open ? "true" : "false");
|
||||
@@ -126,6 +131,11 @@ public class SystemParameterService {
|
||||
return param.getParamValue();
|
||||
}
|
||||
|
||||
public Integer defaultLoginType() {
|
||||
String value = getValue(LOGIN_TYPE_KEY);
|
||||
return StringUtils.isNotBlank(value) ? Integer.parseInt(value) : 0;
|
||||
}
|
||||
|
||||
public List<SystemParameterDTO> getSystemParameterInfo(String paramConstantsType) {
|
||||
List<SystemParameter> paramList = this.getParamList(paramConstantsType);
|
||||
List<SystemParameterDTO> dtoList = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user