feat: 自动识别移动端配置

This commit is contained in:
fit2cloud-chenyw
2023-09-06 21:21:20 +08:00
parent 5d1f484a27
commit 5db47c1126
9 changed files with 44 additions and 3 deletions

View File

@@ -116,7 +116,7 @@ public interface ParamConstants {
DS_CHECK_INTERVAL_TYPE("basic.dsCheckIntervalType"),
DEFAULT_LOGIN_TYPE("basic.loginType"),
OPEN_HOME_PAGE("ui.openHomePage"),
AUTO_MOBILE("ui.autoMobile"),
OPEN_MARKET_PAGE("ui.openMarketPage"),
TEMPLATE_MARKET_ULR("basic.templateMarketUlr"),

View File

@@ -29,5 +29,7 @@ public class BasicInfo extends LoginLimitInfo implements Serializable {
private String dsCheckInterval;
@ApiModelProperty("数据源检测时间间隔类型")
private String dsCheckIntervalType;
@ApiModelProperty("自动识别移动端")
private String autoMobile = "true";
}

View File

@@ -62,9 +62,11 @@ public class SystemParameterService {
List<SystemParameter> homePageList = this.getParamList("ui.openHomePage");
List<SystemParameter> marketPageList = this.getParamList("ui.openMarketPage");
List<SystemParameter> loginLimitList = this.getParamList("loginlimit");
List<SystemParameter> autoMobileList = this.getParamList("ui.autoMobile");
paramList.addAll(homePageList);
paramList.addAll(marketPageList);
paramList.addAll(loginLimitList);
paramList.addAll(autoMobileList);
BasicInfo result = new BasicInfo();
result.setOpenHomePage("true");
Map<String, LoginLimitXpackService> beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType((LoginLimitXpackService.class));
@@ -92,6 +94,10 @@ public class SystemParameterService {
boolean open = StringUtils.equals("true", param.getParamValue());
result.setOpenMarketPage(open ? "true" : "false");
}
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.AUTO_MOBILE.getValue())) {
boolean close = StringUtils.equals("false", param.getParamValue());
result.setAutoMobile(close ? "false" : "true");
}
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.TEMPLATE_MARKET_ULR.getValue())) {
result.setTemplateMarketUlr(param.getParamValue());
}