Commit 8c276cc0 by liuyongshuai

调整部分页面选择权限和单位代码按钮样式;去掉菜单管理;修复新增用户无法登陆的问题;修复3.0切换用户跳转失败问题

parent f6d5bccf
...@@ -477,7 +477,7 @@ ...@@ -477,7 +477,7 @@
ID, NAME, MENUNAME, PID, PERMISSION, URL, DESCRIPTION, TYPE ID, NAME, MENUNAME, PID, PERMISSION, URL, DESCRIPTION, TYPE
FROM FROM
sys_permission_new sys_permission_new
where flag=1/*生成菜单*/ where scbz = 0 AND flag=1/*生成菜单*/
</select> </select>
<!--根据userid查询菜单--> <!--根据userid查询菜单-->
<select id="selectMencusByUserId" resultType="com.xzxtshiro.pojo.SysPermissionNew"> <select id="selectMencusByUserId" resultType="com.xzxtshiro.pojo.SysPermissionNew">
......
...@@ -60,7 +60,7 @@ public class SysUser extends BaseModel implements Serializable { ...@@ -60,7 +60,7 @@ public class SysUser extends BaseModel implements Serializable {
protected String policemanid; protected String policemanid;
protected BigDecimal defaultDesktop; protected Integer defaultDesktop;
protected String theme; protected String theme;
......
...@@ -105,6 +105,7 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -105,6 +105,7 @@ public class SysUserServiceImpl implements SysUserService {
user.setId(userId); user.setId(userId);
user.setLrsj(new Date()); user.setLrsj(new Date());
user.setScbz(0); user.setScbz(0);
user.setDefaultDesktop(0);
user.setLrr("admin"); user.setLrr("admin");
int i = userDao.insert(user); int i = userDao.insert(user);
String roleIds = user.getRoleId(); String roleIds = user.getRoleId();
......
...@@ -18,9 +18,11 @@ import org.apache.shiro.authc.UnknownAccountException; ...@@ -18,9 +18,11 @@ import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.authz.AuthorizationInfo; import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo; import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.crypto.hash.SimpleHash; import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.subject.SimplePrincipalCollection;
import org.apache.shiro.util.ByteSource; import org.apache.shiro.util.ByteSource;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -96,4 +98,50 @@ public class ShiroRealm extends AuthorizingRealm { ...@@ -96,4 +98,50 @@ public class ShiroRealm extends AuthorizingRealm {
logger.info("permission => " + resStrList); logger.info("permission => " + resStrList);
return info; return info;
} }
@Override
protected void clearCachedAuthenticationInfo(PrincipalCollection principals) {
Cache c = getAuthenticationCache();
logger.info("清除【认证】缓存之前");
for (Object o : c.keys()) {
logger.info(o + " , " + c.get(o));
}
super.clearCachedAuthenticationInfo(principals);
logger.info("调用父类清除【认证】缓存之后");
for (Object o : c.keys()) {
logger.info(o + " , " + c.get(o));
}
// 添加下面的代码清空【认证】的缓存
SysUser user = (SysUser) principals.getPrimaryPrincipal();
SimplePrincipalCollection spc = new SimplePrincipalCollection(user.getUsername(), getName());
super.clearCachedAuthenticationInfo(spc);
logger.info("添加了代码清除【认证】缓存之后");
int cacheSize = c.keys().size();
logger.info("【认证】缓存的大小:" + c.keys().size());
if (cacheSize == 0) {
logger.info("说明【认证】缓存被清空了。");
}
}
@Override
protected void clearCachedAuthorizationInfo(PrincipalCollection principals) {
logger.info("清除【授权】缓存之前");
Cache c = getAuthorizationCache();
for (Object o : c.keys()) {
logger.info(o + " , " + c.get(o));
}
super.clearCachedAuthorizationInfo(principals);
logger.info("清除【授权】缓存之后");
int cacheSize = c.keys().size();
logger.info("【授权】缓存的大小:" + cacheSize);
for (Object o : c.keys()) {
logger.info(o + " , " + c.get(o));
}
if (cacheSize == 0) {
logger.info("说明【授权】缓存被清空了。");
}
}
} }
\ No newline at end of file
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<input type="text" name="pidName" id="pidName" lay-verify="required" <input type="text" name="pidName" id="pidName" lay-verify="required"
class="layui-input"> class="layui-input">
<input type="text" id="pid" Name="pid" style="display: none;"> <input type="text" id="pid" Name="pid" style="display: none;">
<span class="layui-btn" id="checkPer" onclick="checkTree('mytree');" style="left: 363px">选择父级</span> <span class="layui-btn" id="checkPer" onclick="checkTree('mytree');" style="left: 448px">选择父级</span>
<div id="mytree" style="display: none"> <div id="mytree" style="display: none">
<ul id="tree" class="ztree"></ul> <ul id="tree" class="ztree"></ul>
</div> </div>
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<input type="text" name="pidName" id="pidName" lay-verify="required" <input type="text" name="pidName" id="pidName" lay-verify="required"
class="layui-input"> class="layui-input">
<input type="text" id="pid" Name="pid" style="display: none;"> <input type="text" id="pid" Name="pid" style="display: none;">
<span class="layui-btn" id="checkPer" onclick="checkTree('mytree');" style="left: 363px">选择父级</span> <span class="layui-btn" id="checkPer" onclick="checkTree('mytree');" style="left: 448px">选择父级</span>
<div id="mytree" style="display: none"> <div id="mytree" style="display: none">
<ul id="tree" class="ztree"></ul> <ul id="tree" class="ztree"></ul>
</div> </div>
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<input type="text" name="unitname" id="unitname" lay-verify="required" <input type="text" name="unitname" id="unitname" lay-verify="required"
class="layui-input"> class="layui-input">
<input type="text" id="unitcode" Name="unitcode" style="display: none;"> <input type="text" id="unitcode" Name="unitcode" style="display: none;">
<span class="layui-btn" id="checkPer" onclick="checkTree('myUnitTree');">选择单位</span> <span class="layui-btn" id="checkPer" onclick="checkTree('myUnitTree');" style="left: 448px;">选择单位</span>
<div id="myUnitTree" style="display: none"> <div id="myUnitTree" style="display: none">
<ul id="unit" class="ztree"></ul> <ul id="unit" class="ztree"></ul>
</div> </div>
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<input type="text" name="roleName" id="roleName" lay-verify="required" <input type="text" name="roleName" id="roleName" lay-verify="required"
class="layui-input"> class="layui-input">
<input type="text" id="roleId" Name="roleId" style="display: none;"> <input type="text" id="roleId" Name="roleId" style="display: none;">
<span class="layui-btn" id="checkRolePid" onclick="checkTree('myRoleTree');">选择角色</span> <span class="layui-btn" id="checkRolePid" onclick="checkTree('myRoleTree');" style="left: 448px;">选择角色</span>
<div id="myRoleTree" style="display: none"> <div id="myRoleTree" style="display: none">
<ul id="roleTree" class="ztree"></ul> <ul id="roleTree" class="ztree"></ul>
</div> </div>
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<input type="text" name="unitname" id="unitname" lay-verify="required" <input type="text" name="unitname" id="unitname" lay-verify="required"
class="layui-input"> class="layui-input">
<input type="text" id="unitcode" Name="unitcode" style="display: none;"> <input type="text" id="unitcode" Name="unitcode" style="display: none;">
<span class="layui-btn" id="checkPer" onclick="checkTree('myUnitTree');">选择单位</span> <span class="layui-btn" id="checkPer" onclick="checkTree('myUnitTree');" style="left: 448px;">选择单位</span>
<div id="myUnitTree" style="display: none"> <div id="myUnitTree" style="display: none">
<ul id="unit" class="ztree"></ul> <ul id="unit" class="ztree"></ul>
</div> </div>
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
<input type="text" name="roleName" id="roleName" lay-verify="required" <input type="text" name="roleName" id="roleName" lay-verify="required"
class="layui-input"> class="layui-input">
<input type="text" id="roleId" Name="roleId" style="display: none;"> <input type="text" id="roleId" Name="roleId" style="display: none;">
<span class="layui-btn" id="checkRolePid" onclick="checkTree('myRoleTree');">选择角色</span> <span class="layui-btn" id="checkRolePid" onclick="checkTree('myRoleTree');" style="left: 448px;">选择角色</span>
<div id="myRoleTree" style="display: none"> <div id="myRoleTree" style="display: none">
<ul id="roleTree" class="ztree"></ul> <ul id="roleTree" class="ztree"></ul>
</div> </div>
......
...@@ -75,10 +75,6 @@ ...@@ -75,10 +75,6 @@
style="width:21pt; text-indent:0pt; display:inline-block"></span><span style="width:21pt; text-indent:0pt; display:inline-block"></span><span
style="font-family:等线; font-size:14pt">权限管理</span></p> style="font-family:等线; font-size:14pt">权限管理</span></p>
<p style="margin:0pt; orphans:0; text-align:justify; text-indent:20pt; widows:0"><span <p style="margin:0pt; orphans:0; text-align:justify; text-indent:20pt; widows:0"><span
style="width:1pt; text-indent:0pt; display:inline-block"></span><span
style="width:21pt; text-indent:0pt; display:inline-block"></span><span
style="font-family:等线; font-size:14pt">菜单管理</span></p>
<p style="margin:0pt; orphans:0; text-align:justify; text-indent:20pt; widows:0"><span
style="font-family:等线; font-size:14pt">&#xa0;</span></p> style="font-family:等线; font-size:14pt">&#xa0;</span></p>
<p style="margin:0pt; orphans:0; text-align:justify; text-indent:20pt; widows:0"><span <p style="margin:0pt; orphans:0; text-align:justify; text-indent:20pt; widows:0"><span
style="font-family:等线; font-size:14pt">开发环境</span><span style="font-family:等线; font-size:14pt">:</span> style="font-family:等线; font-size:14pt">开发环境</span><span style="font-family:等线; font-size:14pt">:</span>
......
...@@ -101,6 +101,6 @@ ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height ...@@ -101,6 +101,6 @@ ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height
} }
.layui-form-item>.layui-input-block>span{ .layui-form-item>.layui-input-block>span{
position: relative; position: relative;
left: 553px; left: 634px;
top: -37px; top: -38px;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment