Pre Merge pull request !157 from li_oxen/master

This commit is contained in:
li_oxen 2020-03-21 20:22:31 +08:00 committed by Gitee
commit 645fbb5807
28 changed files with 81 additions and 84 deletions

View File

@ -67,7 +67,7 @@
<version>${shiro.version}</version>
</dependency>
<!-- Shiro使用Srping框架 -->
<!-- Shiro使用Spring框架 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>

View File

@ -11,6 +11,7 @@
<!-- timeToLiveSeconds: 失效前的存活秒数创建时间到失效时间的间隔为存活时间当eternal为false时这个属性才有效0为不限制 -->
<!-- overflowToDisk如果内存中数据超过内存限制是否要缓存到磁盘上 -->
<!-- statistics是否收集统计信息。如果需要监控缓存使用情况应该打开这个选项。默认为关闭统计会影响性能。设置statistics="true"开启统计 -->
<!-- diskPersistent是否持久化磁盘缓存,当这个属性的值为true时,系统在初始化时会在磁盘中查找文件名为cache名称,后缀名为data的文件。指重启jvm后数据是否有效。默认为false -->
<!-- 默认缓存 -->
<defaultCache

View File

@ -3083,10 +3083,6 @@ a:hover, a:focus {
margin-bottom: 15px;
}
video {
width: 100% !important;
height: auto !important;
}
/* GALLERY */
.gallery>.row>div {
margin-bottom: 15px;

View File

@ -14,13 +14,11 @@ $(function() {
$('#side-menu').metisMenu();
//固定菜单栏
$(function() {
$('.sidebar-collapse').slimScroll({
height: '100%',
height: '96%',
railOpacity: 0.9,
alwaysVisible: false
});
});
// 菜单切换
$('.navbar-minimalize').click(function() {
@ -36,8 +34,8 @@ $(function() {
if ($('body').hasClass('canvas-menu mini-navbar')) {
NavToggle();
}
});
$('#side-menu>li li a:not(:has(span))').click(function() {
if ($(window).width() < 769) {
NavToggle();

View File

@ -215,9 +215,15 @@ var table = {
$(optionsIds).off("click").on("click", '.img-circle', function() {
var src = $(this).attr('src');
var target = $(this).data('target');
if($.common.equals("self", target)) {
var height = $(this).data('height');
var width = $(this).data('width');
if($.common.equals("self", target)) {
//如果是移动端,就使用自适应大小弹窗
if ($.common.isMobile()) {
width = 'auto';
height = 'auto';
}
layer.open({
title: false,
type: 1,

View File

@ -2,6 +2,7 @@
<head th:fragment=header(title)>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="">
<meta name="description" content="">
<title th:text="${title}"></title>

View File

@ -5,9 +5,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<title>若依系统首页</title>
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html"/>
<![endif]-->
<!-- 避免IE使用兼容模式 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link th:href="@{favicon.ico}" rel="stylesheet"/>
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{/css/jquery.contextMenu.min.css}" rel="stylesheet"/>
@ -276,6 +275,7 @@ function resetPwd() {
var url = ctx + 'system/user/profile/resetPwd';
$.modal.open("重置密码", url, '770', '380');
}
/* 切换主题 */
function switchSkin() {
layer.open({

View File

@ -108,7 +108,10 @@
},
{
field: 'remark',
title: '备注'
title: '备注',
formatter: function(value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'createTime',

View File

@ -14,7 +14,7 @@
<div class="form-group">
<label class="col-sm-4 control-label is-required">用户名称:</label>
<div class="col-sm-8">
<input name="userName" placeholder="请输入用户名称" class="form-control" type="text" maxlength="30" required>
<input name="userName" placeholder="请输入用户名称" class="form-control" type="text" maxlength="30" autocomplete="new-password" required>
</div>
</div>
</div>
@ -61,7 +61,7 @@
<div class="form-group">
<label class="col-sm-4 control-label is-required">登录密码:</label>
<div class="col-sm-8">
<input name="password" placeholder="请输入登录密码" class="form-control" type="password" th:value="${@config.getKey('sys.user.initPassword')}" required>
<input name="password" placeholder="请输入登录密码" class="form-control" type="password" th:value="${@config.getKey('sys.user.initPassword')}" autocomplete="new-password" required>
</div>
</div>
</div>

View File

@ -20,22 +20,22 @@ public interface ShiroConstants
/**
* 消息key
*/
public static String MESSAGE = "message";
public static final String MESSAGE = "message";
/**
* 错误key
*/
public static String ERROR = "errorMsg";
public static final String ERROR = "errorMsg";
/**
* 编码格式
*/
public static String ENCODING = "UTF-8";
public static final String ENCODING = "UTF-8";
/**
* 当前在线会话
*/
public String ONLINE_SESSION = "online_session";
public static final String ONLINE_SESSION = "online_session";
/**
* 验证码key

View File

@ -91,7 +91,7 @@ public class FileUploadUtils
*
* @param baseDir 相对应用的基目录
* @param file 上传的文件
* @param extension 上传文件类型
* @param allowedExtension 上传文件类型
* @return 返回上传成功的文件名
* @throws FileSizeLimitExceededException 如果超出最大大小
* @throws FileNameLengthLimitExceededException 文件名太长

View File

@ -9,8 +9,6 @@ import com.ruoyi.common.utils.StringUtils;
*/
public class EscapeUtil
{
public static final String RE_HTML_MARK = "(<[^<]*?>)|(<[\\s]*?/[^<]*?>)|(<[^<]*?/[\\s]*?>)";
private static final char[][] TEXT = new char[64][];
static
@ -141,14 +139,4 @@ public class EscapeUtil
}
return tmp.toString();
}
public static void main(String[] args)
{
String html = "<script>alert(1);</script>";
// String html = "<scr<script>ipt>alert(\"XSS\")</scr<script>ipt>";
// String html = "<123";
System.out.println(EscapeUtil.clean(html));
System.out.println(EscapeUtil.escape(html));
System.out.println(EscapeUtil.unescape(html));
}
}

View File

@ -92,7 +92,8 @@ public class DataScopeAspect
*
* @param joinPoint 切点
* @param user 用户
* @param alias 别名
* @param deptAlias 别名
* @param userAlias 别名
*/
public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias)
{

View File

@ -47,7 +47,7 @@ public abstract class RepeatSubmitInterceptor extends HandlerInterceptorAdapter
/**
* 验证是否重复提交由子类实现具体的防重复提交的规则
*
* @param httpServletRequest
* @param request
* @return
* @throws Exception
*/

View File

@ -80,7 +80,7 @@ public class SysPasswordService
public String encryptPassword(String username, String password, String salt)
{
return new Md5Hash(username + password + salt).toHex().toString();
return new Md5Hash(username + password + salt).toHex();
}
public void unlock(String loginName){

View File

@ -80,12 +80,12 @@ public class OnlineSessionDAO extends EnterpriseCacheSessionDAO
boolean isGuest = onlineSession.getUserId() == null || onlineSession.getUserId() == 0L;
// session 数据变更了 同步
if (isGuest == false && onlineSession.isAttributeChanged())
if (!isGuest && onlineSession.isAttributeChanged())
{
needSync = true;
}
if (needSync == false)
if (!needSync)
{
return;
}

View File

@ -18,7 +18,7 @@ public class ConfigService
/**
* 根据键名查询参数配置信息
*
* @param configName 参数名称
* @param configKey 参数名称
* @return 参数键值
*/
public String getKey(String configKey)

View File

@ -65,7 +65,7 @@ public class JobInvokeUtil
/**
* 校验是否为为class包名
*
* @param str 名称
* @param invokeTarget 名称
* @return true是 false否
*/
public static boolean isValidClassName(String invokeTarget)

View File

@ -177,6 +177,7 @@ public class SysRole extends BaseEntity
this.deptIds = deptIds;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("roleId", getRoleId())

View File

@ -346,6 +346,7 @@ public class SysUser extends BaseEntity
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("dept", getDept())
.append("roles", getRoles())
.toString();
}
}

View File

@ -307,7 +307,7 @@ public class SysUserServiceImpl implements ISysUserService
}
/**
* 校验用户名称是否唯一
* 校验手机号是否唯一
*
* @param user 用户信息
* @return

View File

@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">
AND status = #{status}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
order by d.parent_id, d.order_num
@ -65,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
<include refid="selectDeptVo"/>
where dept_name=#{deptName} and parent_id = #{parentId}
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0'
</select>
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">

View File

@ -131,13 +131,13 @@
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
<if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
<if test="url != null and url != ''">url = #{url},</if>
<if test="url != null">url = #{url},</if>
<if test="target != null and target != ''">target = #{target},</if>
<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
<if test="visible != null">visible = #{visible},</if>
<if test="perms !=null">perms = #{perms},</if>
<if test="icon !=null and icon != ''">icon = #{icon},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>

View File

@ -119,29 +119,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectUserByLoginName" parameterType="String" resultMap="SysUserResult">
<include refid="selectUserVo"/>
where u.login_name = #{userName}
where u.login_name = #{userName} and u.del_flag = '0'
</select>
<select id="selectUserByPhoneNumber" parameterType="String" resultMap="SysUserResult">
<include refid="selectUserVo"/>
where u.phonenumber = #{phonenumber}
where u.phonenumber = #{phonenumber} and u.del_flag = '0'
</select>
<select id="selectUserByEmail" parameterType="String" resultMap="SysUserResult">
<include refid="selectUserVo"/>
where u.email = #{email}
where u.email = #{email} and u.del_flag = '0'
</select>
<select id="checkLoginNameUnique" parameterType="String" resultType="int">
select count(1) from sys_user where login_name=#{loginName}
select count(1) from sys_user where login_name=#{loginName} and del_flag = '0'
</select>
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
select user_id, phonenumber from sys_user where phonenumber=#{phonenumber}
select user_id, phonenumber from sys_user where phonenumber=#{phonenumber} and del_flag = '0'
</select>
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
select user_id, email from sys_user where email=#{email}
select user_id, email from sys_user where email=#{email} and del_flag = '0'
</select>
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
@ -150,7 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<delete id="deleteUserById" parameterType="Long">
delete from sys_user where user_id = #{userId}
update sys_user set del_flag = '2' where user_id = #{userId}
</delete>
<delete id="deleteUserByIds" parameterType="Long">