Global增加getConfigToBoolean、getConfigToInteger、getPropertyToBoolean、getPropertyToInteger方法
This commit is contained in:
@@ -24,7 +24,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.lang.ObjectUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.shiro.filter.FormAuthenticationFilter;
|
||||
import com.jeesite.common.shiro.realm.BaseAuthorizingRealm;
|
||||
@@ -87,7 +86,7 @@ public class LoginController extends BaseController{
|
||||
}
|
||||
|
||||
// 是否显示验证码
|
||||
model.addAttribute("isValidCodeLogin", ObjectUtils.toInteger(Global.getConfig("sys.login.failedNumAfterValidCode", "200")) == 0);
|
||||
model.addAttribute("isValidCodeLogin", Global.getConfigToInteger("sys.login.failedNumAfterValidCode", "200") == 0);
|
||||
|
||||
//获取当前会话对象
|
||||
Session session = UserUtils.getSession();
|
||||
@@ -272,7 +271,7 @@ public class LoginController extends BaseController{
|
||||
}
|
||||
|
||||
// 是否允许刷新主页,如果已登录,再次访问主页,则退出原账号。
|
||||
if (!ObjectUtils.toBoolean(Global.getConfig("shiro.isAllowRefreshIndex", "true"))){
|
||||
if (!Global.getConfigToBoolean("shiro.isAllowRefreshIndex", "true")){
|
||||
String logined = CookieUtils.getCookie(request, "LOGINED");
|
||||
if (StringUtils.isBlank(logined) || "false".equals(logined)){
|
||||
CookieUtils.setCookie(response, "LOGINED", "true");
|
||||
|
||||
@@ -47,7 +47,7 @@ else {
|
||||
href="http://jeesite.com">JeeSite ${@Global.getProperty('jeesiteVersion')}</a>
|
||||
</div>
|
||||
</div>
|
||||
<% if (@ObjectUtils.toBoolean(@Global.getConfig('error.page.printErrorInfo', 'true'))){ %>
|
||||
<% if (@Global.getConfigToBoolean('error.page.printErrorInfo', 'true')){ %>
|
||||
<div class="box mt20">
|
||||
${@StringUtils.toHtml(@ExceptionUtils.getStackTraceAsString(ex))}<br/>
|
||||
此异常信息若不想输出,可打开jeesite.yml文件,设置error.page.printErrorInfo=false即可
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<#form:hidden path="userCode"/>
|
||||
<div class="box-body">
|
||||
<div class="form-unit">基本信息</div>
|
||||
<div class="row ${@ObjectUtils.toBoolean(@Global.getConfig('user.useCorpModel'))?'':'hide'}">
|
||||
<div class="row ${@Global.getConfigToBoolean('user.useCorpModel', 'false')?'':'hide'}">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" title="">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="box-tools pull-right">
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="查询"><i class="fa fa-filter"></i> 查询</a>
|
||||
<% if(hasPermi('sys:corpAdmin:edit')){ %>
|
||||
<% if(@ObjectUtils.toBoolean(@Global.getConfig('user.useCorpModel'))){ %>
|
||||
<% if(@Global.getConfigToBoolean('user.useCorpModel', 'false')){ %>
|
||||
<a href="${ctx}/sys/corpAdmin/form?op=addCorp" class="btn btn-default btnTool" title="新增租户管理员"><i class="fa fa-plus"></i> 新增租户管理员</a>
|
||||
<% }else{ %>
|
||||
<a href="${ctx}/sys/corpAdmin/form?corpCode_=${user.currentUser.corpCode_}&corpName_=${user.currentUser.corpName_}&op=addAdmin" class="btn btn-default btnTool" title="新增管理员"><i class="fa fa-plus"></i> 新增管理员</a>
|
||||
@@ -31,13 +31,13 @@
|
||||
<#form:input path="userName" maxlength="100" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group ${@ObjectUtils.toBoolean(@Global.getConfig('user.useCorpModel'))?'':'hide'}">
|
||||
<div class="form-group ${@Global.getConfigToBoolean('user.useCorpModel', 'false')?'':'hide'}">
|
||||
<label class="control-label">租户代码:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="corpCode_" maxlength="100" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group ${@ObjectUtils.toBoolean(@Global.getConfig('user.useCorpModel'))?'':'hide'}">
|
||||
<div class="form-group ${@Global.getConfigToBoolean('user.useCorpModel', 'false')?'':'hide'}">
|
||||
<label class="control-label">租户名称:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="corpName_" maxlength="100" class="form-control width-90"/>
|
||||
@@ -69,7 +69,7 @@ $('#dataGrid').dataGrid({
|
||||
return '<a href="${ctx}/sys/corpAdmin/form?userCode='+row.userCode+'&op=edit" class="btnList" data-title="编辑用户">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'用户昵称', name:'userName', index:'a.user_name', width:200, align:"center"},
|
||||
<% if(@ObjectUtils.toBoolean(@Global.getConfig('user.useCorpModel'))){ %>
|
||||
<% if(@Global.getConfigToBoolean('user.useCorpModel', 'false')){ %>
|
||||
{header:'租户代码', name:'corpCode_', index:'a.corp_code', width:200, align:"center", formatter: function(val, obj, row, act){
|
||||
return '<a href="javascript:" onclick="$(\'#corpCode_\').val(\''+val+'\');$(\'#searchForm\').submit()">'+val+'</a>';
|
||||
}},
|
||||
@@ -93,7 +93,7 @@ $('#dataGrid').dataGrid({
|
||||
actions.push('<a href="${ctx}/sys/corpAdmin/enable?userCode='+row.userCode+'" class="btnList" title="启用用户" data-confirm="确认要启用该用户吗?"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/sys/corpAdmin/delete?userCode='+row.userCode+'" class="btnList" title="删除用户" data-confirm="确认要删除该用户吗?"><i class="fa fa-trash-o"></i></a> ');
|
||||
<% if(@ObjectUtils.toBoolean(@Global.getConfig('user.useCorpModel'))){ %>
|
||||
<% if(@Global.getConfigToBoolean('user.useCorpModel', 'false')){ %>
|
||||
actions.push('<a href="${ctx}/sys/corpAdmin/form?corpCode_='+row.corpCode_+'&corpName_='+row.corpName_+'&op=addAdmin" class="btnList" title="新增管理员"><i class="fa fa-plus-square"></i></a> ');
|
||||
<% } %>
|
||||
actions.push('<a href="javascript:" class="btnMore" title="更多操作"><i class="fa fa-chevron-circle-right"></i></a> ');
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<#form:input type="password" name="password" class="form-control required"
|
||||
data-msg-required="${text('请填写登录密码.')}" placeholder="${text('登录密码')}" autocomplete="off"/>
|
||||
</div>
|
||||
<%/*<!-- if(@ObjectUtils.toBoolean(@Global.getConfig('user.useCorpModel'))){ %>
|
||||
<%/*<!-- if(@Global.getConfigToBoolean('user.useCorpModel', 'false')){ %>
|
||||
<div class="form-group has-feedback">
|
||||
<select name="param_corpCode" class="form-control">
|
||||
<% for(var user in @UserUtils.findCorpList()){ %>
|
||||
@@ -55,7 +55,7 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<a href="${ctxPath}/account/forgetPwd" class="pull-left">[ ${text('忘记密码')} ]</a>
|
||||
<% if(@ObjectUtils.toBoolean(@Global.getConfig('user.registerUser'))){ %>
|
||||
<% if(@Global.getConfigToBoolean('user.registerUser', 'false')){ %>
|
||||
<a href="${ctxPath}/account/registerUser" class="pull-left ml10">[ ${text('注册账号')} ]</a>
|
||||
<% } %>
|
||||
<%
|
||||
|
||||
Reference in New Issue
Block a user