Merge branch 'master' of gitee.com:y_project/RuoYi into dev
This commit is contained in:
commit
596ce07904
47
README.md
47
README.md
|
|
@ -2,11 +2,14 @@
|
|||
|
||||
一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适的。于是利用空闲休息时间开始自己写了一套后台系统。如此有了若依。她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
|
||||
|
||||
性别男,若依是给还没有出生女儿取的名字(寓意:你若不离不弃,我必生死相依)
|
||||
性别男,若依是给女儿取的名字(寓意:你若不离不弃,我必生死相依)
|
||||
|
||||
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
||||
|
||||
* 感谢 [hplus](https://gitee.com/hplus_admin/hplus) 后台主题 UI 框架。
|
||||
* 前后端分离版本,请移步[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
|
||||
* 阿里云优惠券:[点我进入](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
|
||||
* 感谢 [hplus](https://gitee.com/hplus_admin/hplus) 后台主题 UI 框架。
|
||||
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)
|
||||
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
|
||||
|
||||
## 内置功能
|
||||
|
||||
|
|
@ -40,43 +43,43 @@
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/25b5e333768d013d45a990c152dbe4d9d6e.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/e29fd81b2d43b517f99535564af41f9d1d5.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-42e518aa72a24d228427a1261cb3679f395.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-7f20dd0edba25e5187c5c4dd3ec7d3d9797.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/629f1510fb6205f773c8c284863406b694f.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/9124eda87df0e72427cd63f458b813e3363.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-2dae3d87f6a8ca05057db059cd9a411d51d.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-ea4d98423471e55fba784694e45d12bd4bb.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/438c59467afd0097cfbe9c89db932661687.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/72a015041db6843aca7f7b273688cb346f8.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-7f6c6e9f5873efca09bd2870ee8468b8fce.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-c708b65f2c382a03f69fe1efa8d341e6cff.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/ecb5f1c9929f1933f733f796749b2df73d9.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/e4283d500eb10e8dd8701e7742f7facb065.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-9ab586c47dd5c7b92bca0d727962c90e3b8.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-ef954122a2080e02013112db21754b955c6.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/2531dbf419a1b114e1177f8d2a120b8a9c3.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/8b740a42dddc1e5a8a150d97c5060df258b.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-088edb4d531e122415a1e2342bccb1a9691.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-f886fe19bd820c0efae82f680223cac196c.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/00e642dc3515919b3760968cc496a12a849.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/f72d28a3e60413a4e1b5c7c2f45f962fd65.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-c7a2eb71fa65d6e660294b4bccca613d638.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-e60137fb0787defe613bd83331dc4755a70.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/19222e495869a2a99fc31c5d2bd4539e1e7.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/264d25176f4e22b4b38e95fe6ce73775299.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-7c51c1b5758f0a0f92ed3c60469b7526f9f.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-15181aed45bb2461aa97b594cbf2f86ea5f.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/d85fbb59be27fb33f68bdbb6e8bc967c97b.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/bb902d2c54bad02a052e9a05e5f22a93df1.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-83326ad52ea63f67233d126226738054d98.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-3bd6d31e913b70df00107db51d64ef81df7.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/30cda883bb9a7f74f1454314e64f949942d.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/deebaaa8d6b14a419ed5911f49e3f222a6f.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-70a2225836bc82042a6785edf6299e2586a.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-0184d6ab01fdc6667a14327fcaf8b46345d.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/bed2b98a44e7ae820c2885329e711965c28.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-64d8086dc2c02c8f71170290482f7640098.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-6d73c2140ce694e3de4c05035fdc1868d4c.png"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
11
pom.xml
11
pom.xml
|
|
@ -5,27 +5,26 @@
|
|||
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>4.4.0</version>
|
||||
<version>4.5.0</version>
|
||||
|
||||
<name>ruoyi</name>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<description>若依管理系统</description>
|
||||
|
||||
<properties>
|
||||
<ruoyi.version>4.4.0</ruoyi.version>
|
||||
<ruoyi.version>4.5.0</ruoyi.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||
<shiro.version>1.6.0</shiro.version>
|
||||
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
|
||||
<mybatis.boot.version>1.3.2</mybatis.boot.version>
|
||||
<druid.version>1.1.22</druid.version>
|
||||
<druid.version>1.2.2</druid.version>
|
||||
<bitwalker.version>1.19</bitwalker.version>
|
||||
<kaptcha.version>2.3.2</kaptcha.version>
|
||||
<swagger.version>2.9.2</swagger.version>
|
||||
<pagehelper.boot.version>1.2.5</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.73</fastjson.version>
|
||||
<pagehelper.boot.version>1.3.0</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.74</fastjson.version>
|
||||
<oshi.version>5.2.5</oshi.version>
|
||||
<jna.version>5.5.0</jna.version>
|
||||
<commons.io.version>2.5</commons.io.version>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.4.0</version>
|
||||
<version>4.5.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.OnlineStatus;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.framework.shiro.session.OnlineSession;
|
||||
import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysUserOnline;
|
||||
import com.ruoyi.system.service.ISysUserOnlineService;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ import com.ruoyi.common.core.controller.BaseController;
|
|||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysConfig;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ import com.ruoyi.common.constant.UserConstants;
|
|||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysDept;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysDictData;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ import com.ruoyi.common.constant.UserConstants;
|
|||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictType;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysDictType;
|
||||
import com.ruoyi.system.service.ISysDictTypeService;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
|
@ -10,12 +11,14 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import com.ruoyi.common.config.Global;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.CookieUtils;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysMenu;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.system.service.ISysMenuService;
|
||||
|
||||
|
|
@ -48,6 +51,8 @@ public class SysIndexController extends BaseController
|
|||
mmap.put("ignoreFooter", configService.selectConfigByKey("sys.index.ignoreFooter"));
|
||||
mmap.put("copyrightYear", Global.getCopyrightYear());
|
||||
mmap.put("demoEnabled", Global.isDemoEnabled());
|
||||
mmap.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
|
||||
mmap.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate()));
|
||||
|
||||
// 菜单导航显示风格
|
||||
String menuStyle = configService.selectConfigByKey("sys.index.menuStyle");
|
||||
|
|
@ -89,4 +94,28 @@ public class SysIndexController extends BaseController
|
|||
mmap.put("version", Global.getVersion());
|
||||
return "main";
|
||||
}
|
||||
|
||||
// 检查初始密码是否提醒修改
|
||||
public boolean initPasswordIsModify(Date pwdUpdateDate)
|
||||
{
|
||||
int initPasswordModify = Convert.toInt(configService.selectConfigByKey("sys.account.initPasswordModify"));
|
||||
return initPasswordModify == 1 && pwdUpdateDate == null;
|
||||
}
|
||||
|
||||
// 检查密码是否过期
|
||||
public boolean passwordIsExpiration(Date pwdUpdateDate)
|
||||
{
|
||||
int passwordValidateDays = Convert.toInt(configService.selectConfigByKey("sys.account.passwordValidateDays"));
|
||||
if (passwordValidateDays > 0)
|
||||
{
|
||||
if (StringUtils.isNull(pwdUpdateDate))
|
||||
{
|
||||
// 如果从未修改过初始密码,直接提醒过期
|
||||
return true;
|
||||
}
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
return DateUtils.differentDaysByMillisecond(nowDate, pwdUpdateDate) > passwordValidateDays;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,10 +16,11 @@ import com.ruoyi.common.constant.UserConstants;
|
|||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysMenu;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.framework.shiro.util.AuthorizationUtils;
|
||||
import com.ruoyi.system.service.ISysMenuService;
|
||||
|
||||
/**
|
||||
|
|
@ -70,7 +71,7 @@ public class SysMenuController extends BaseController
|
|||
{
|
||||
return AjaxResult.warn("菜单已分配,不允许删除");
|
||||
}
|
||||
ShiroUtils.clearCachedAuthorizationInfo();
|
||||
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||
return toAjax(menuService.deleteMenuById(menuId));
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +110,7 @@ public class SysMenuController extends BaseController
|
|||
return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
|
||||
}
|
||||
menu.setCreateBy(ShiroUtils.getLoginName());
|
||||
ShiroUtils.clearCachedAuthorizationInfo();
|
||||
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||
return toAjax(menuService.insertMenu(menu));
|
||||
}
|
||||
|
||||
|
|
@ -137,7 +138,7 @@ public class SysMenuController extends BaseController
|
|||
return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
|
||||
}
|
||||
menu.setUpdateBy(ShiroUtils.getLoginName());
|
||||
ShiroUtils.clearCachedAuthorizationInfo();
|
||||
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||
return toAjax(menuService.updateMenu(menu));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
|||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysNotice;
|
||||
import com.ruoyi.system.service.ISysNoticeService;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ import com.ruoyi.common.core.controller.BaseController;
|
|||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysPost;
|
||||
import com.ruoyi.system.service.ISysPostService;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ import com.ruoyi.common.annotation.Log;
|
|||
import com.ruoyi.common.config.Global;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
||||
/**
|
||||
|
|
@ -81,21 +81,23 @@ public class SysProfileController extends BaseController
|
|||
public AjaxResult resetPwd(String oldPassword, String newPassword)
|
||||
{
|
||||
SysUser user = ShiroUtils.getSysUser();
|
||||
if (StringUtils.isNotEmpty(newPassword) && passwordService.matches(user, oldPassword))
|
||||
{
|
||||
user.setSalt(ShiroUtils.randomSalt());
|
||||
user.setPassword(passwordService.encryptPassword(user.getLoginName(), newPassword, user.getSalt()));
|
||||
if (userService.resetUserPwd(user) > 0)
|
||||
{
|
||||
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
|
||||
return success();
|
||||
}
|
||||
return error();
|
||||
}
|
||||
else
|
||||
if (!passwordService.matches(user, oldPassword))
|
||||
{
|
||||
return error("修改密码失败,旧密码错误");
|
||||
}
|
||||
if (passwordService.matches(user, newPassword))
|
||||
{
|
||||
return error("新密码不能与旧密码相同");
|
||||
}
|
||||
user.setSalt(ShiroUtils.randomSalt());
|
||||
user.setPassword(passwordService.encryptPassword(user.getLoginName(), newPassword, user.getSalt()));
|
||||
user.setPwdUpdateDate(DateUtils.getNowDate());
|
||||
if (userService.resetUserPwd(user) > 0)
|
||||
{
|
||||
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
|
||||
return success();
|
||||
}
|
||||
return error("修改密码异常,请联系管理员");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.framework.shiro.service.SysRegisterService;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,12 +15,13 @@ import com.ruoyi.common.annotation.Log;
|
|||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.framework.shiro.util.AuthorizationUtils;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
|
@ -97,7 +98,7 @@ public class SysRoleController extends BaseController
|
|||
return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
||||
}
|
||||
role.setCreateBy(ShiroUtils.getLoginName());
|
||||
ShiroUtils.clearCachedAuthorizationInfo();
|
||||
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||
return toAjax(roleService.insertRole(role));
|
||||
|
||||
}
|
||||
|
|
@ -131,7 +132,7 @@ public class SysRoleController extends BaseController
|
|||
return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
||||
}
|
||||
role.setUpdateBy(ShiroUtils.getLoginName());
|
||||
ShiroUtils.clearCachedAuthorizationInfo();
|
||||
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||
return toAjax(roleService.updateRole(role));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,13 +17,14 @@ import com.ruoyi.common.annotation.Log;
|
|||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.system.service.ISysPostService;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
|
@ -125,11 +126,13 @@ public class SysUserController extends BaseController
|
|||
{
|
||||
return error("新增用户'" + user.getLoginName() + "'失败,登录账号已存在");
|
||||
}
|
||||
else if (UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
||||
else if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||
&& UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
||||
{
|
||||
return error("新增用户'" + user.getLoginName() + "'失败,手机号码已存在");
|
||||
}
|
||||
else if (UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
||||
else if (StringUtils.isNotEmpty(user.getEmail())
|
||||
&& UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
||||
{
|
||||
return error("新增用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
|
||||
}
|
||||
|
|
@ -162,11 +165,13 @@ public class SysUserController extends BaseController
|
|||
public AjaxResult editSave(@Validated SysUser user)
|
||||
{
|
||||
userService.checkUserAllowed(user);
|
||||
if (UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
||||
if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||
&& UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
||||
{
|
||||
return error("修改用户'" + user.getLoginName() + "'失败,手机号码已存在");
|
||||
}
|
||||
else if (UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
||||
else if (StringUtils.isNotEmpty(user.getEmail())
|
||||
&& UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
||||
{
|
||||
return error("修改用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ ruoyi:
|
|||
# 名称
|
||||
name: RuoYi
|
||||
# 版本
|
||||
version: 4.4.0
|
||||
version: 4.5.0
|
||||
# 版权年份
|
||||
copyrightYear: 2019
|
||||
# 实例演示开关
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
timeToIdleSeconds="600"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
statistics="true">
|
||||
statistics="false">
|
||||
</cache>
|
||||
|
||||
<!-- 系统活跃用户缓存 -->
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
diskPersistent="false"
|
||||
timeToLiveSeconds="0"
|
||||
timeToIdleSeconds="0"
|
||||
statistics="true">
|
||||
statistics="false">
|
||||
</cache>
|
||||
|
||||
<!-- 系统缓存 -->
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
maxEntriesLocalHeap="1000"
|
||||
eternal="true"
|
||||
overflowToDisk="true"
|
||||
statistics="true">
|
||||
statistics="false">
|
||||
</cache>
|
||||
|
||||
<!-- 系统参数缓存 -->
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
maxEntriesLocalHeap="1000"
|
||||
eternal="true"
|
||||
overflowToDisk="true"
|
||||
statistics="true">
|
||||
statistics="false">
|
||||
</cache>
|
||||
|
||||
<!-- 系统字典缓存 -->
|
||||
|
|
@ -63,19 +63,18 @@
|
|||
maxEntriesLocalHeap="1000"
|
||||
eternal="true"
|
||||
overflowToDisk="true"
|
||||
statistics="true">
|
||||
statistics="false">
|
||||
</cache>
|
||||
|
||||
<!-- 系统会话缓存 -->
|
||||
<cache name="shiro-activeSessionCache"
|
||||
maxElementsInMemory="10000"
|
||||
overflowToDisk="true"
|
||||
eternal="true"
|
||||
maxEntriesLocalHeap="10000"
|
||||
overflowToDisk="false"
|
||||
eternal="false"
|
||||
diskPersistent="false"
|
||||
timeToLiveSeconds="0"
|
||||
timeToIdleSeconds="0"
|
||||
diskPersistent="true"
|
||||
diskExpiryThreadIntervalSeconds="600">
|
||||
</cache>
|
||||
statistics="false"/>
|
||||
|
||||
</ehcache>
|
||||
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/**
|
||||
* GitHub Gist Theme
|
||||
* Author : Anthony Attard - https://github.com/AnthonyAttard
|
||||
* Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 0.5em;
|
||||
color: #333333;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #d73a49;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #6f42c1;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.hljs-number {
|
||||
color: #005cc5;
|
||||
}
|
||||
|
||||
.hljs-string {
|
||||
color: #032f62;
|
||||
}
|
||||
1102
ruoyi-admin/src/main/resources/static/ajax/libs/highlight/highlight.min.js
vendored
Normal file
1102
ruoyi-admin/src/main/resources/static/ajax/libs/highlight/highlight.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -50,7 +50,7 @@ a:focus {
|
|||
color: #fff;
|
||||
font-size: 14px;
|
||||
height: 50px;
|
||||
padding: 18px 15px;
|
||||
padding: 15px 15px;
|
||||
}
|
||||
|
||||
.nav>li.active>a {
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 137 KiB |
|
|
@ -24,9 +24,9 @@ $(function() {
|
|||
// 菜单切换
|
||||
$('.navbar-minimalize').click(function() {
|
||||
if (isMobile) {
|
||||
$("body").toggleClass("canvas-menu");
|
||||
$("body").toggleClass("canvas-menu");
|
||||
} else {
|
||||
$("body").toggleClass("mini-navbar");
|
||||
$("body").toggleClass("mini-navbar");
|
||||
}
|
||||
SmoothlyMenu();
|
||||
});
|
||||
|
|
@ -62,12 +62,12 @@ $(window).bind("load resize", function() {
|
|||
$('.navbar-static-side').fadeOut();
|
||||
} else {
|
||||
if($('body').hasClass('canvas-menu')) {
|
||||
$('body').addClass('fixed-sidebar');
|
||||
$('body').removeClass('canvas-menu');
|
||||
$("body").removeClass("mini-navbar");
|
||||
$("nav .logo").removeClass("hide");
|
||||
$(".slimScrollDiv").css({ "overflow": "visible" });
|
||||
$('.navbar-static-side').fadeIn();
|
||||
$('body').addClass('fixed-sidebar');
|
||||
$('body').removeClass('canvas-menu');
|
||||
$("body").removeClass("mini-navbar");
|
||||
$("nav .logo").removeClass("hide");
|
||||
$(".slimScrollDiv").css({ "overflow": "visible" });
|
||||
$('.navbar-static-side').fadeIn();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -89,7 +89,7 @@ function syncMenuTab(dataId) {
|
|||
$("#tab_" + menuId + " a").click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function NavToggle() {
|
||||
|
|
@ -97,12 +97,11 @@ function NavToggle() {
|
|||
}
|
||||
|
||||
function fixedSidebar() {
|
||||
$('#side-menu').hide();
|
||||
$("nav .logo").addClass("hide");
|
||||
$('#side-menu').hide();
|
||||
$("nav .logo").addClass("hide");
|
||||
setTimeout(function() {
|
||||
$('#side-menu').fadeIn(500);
|
||||
},
|
||||
100);
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function SmoothlyMenu() {
|
||||
|
|
@ -263,8 +262,8 @@ $(function() {
|
|||
|
||||
var $dataObj = $('a[href$="' + decodeURI(dataUrl) + '"]');
|
||||
if (!$dataObj.hasClass("noactive")) {
|
||||
$('.tab-pane li').removeClass("active");
|
||||
$('.nav ul').removeClass("in");
|
||||
$('.tab-pane li').removeClass("active");
|
||||
$('.nav ul').removeClass("in");
|
||||
$dataObj.parents("ul").addClass("in")
|
||||
$dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active");
|
||||
$dataObj.parents("ul").css('height', 'auto').height();
|
||||
|
|
@ -395,7 +394,7 @@ $(function() {
|
|||
$(this).show().siblings('.RuoYi_iframe').hide();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -450,14 +449,14 @@ $(function() {
|
|||
var currentId = $('.page-tabs-content').find('.active').attr('data-id');
|
||||
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]');
|
||||
var url = target.attr('src');
|
||||
target.attr('src', url).ready();
|
||||
target.attr('src', url).ready();
|
||||
}
|
||||
|
||||
// 页签全屏
|
||||
function fullScreenTab() {
|
||||
var currentId = $('.page-tabs-content').find('.active').attr('data-id');
|
||||
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]');
|
||||
target.fullScreen(true);
|
||||
target.fullScreen(true);
|
||||
}
|
||||
|
||||
// 关闭当前选项卡
|
||||
|
|
@ -538,11 +537,11 @@ $(function() {
|
|||
// 设置锚点
|
||||
function setIframeUrl(href) {
|
||||
if($.common.equals("history", mode)) {
|
||||
storage.set('publicPath', href);
|
||||
storage.set('publicPath', href);
|
||||
} else {
|
||||
var nowUrl = window.location.href;
|
||||
var newUrl = nowUrl.substring(0, nowUrl.indexOf("#"));
|
||||
window.location.href = newUrl + "#" + href;
|
||||
var nowUrl = window.location.href;
|
||||
var newUrl = nowUrl.substring(0, nowUrl.indexOf("#"));
|
||||
window.location.href = newUrl + "#" + href;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -569,14 +568,14 @@ $(function() {
|
|||
name: "关闭当前",
|
||||
icon: "fa-close",
|
||||
callback: function(key, opt) {
|
||||
opt.$trigger.find('i').trigger("click");
|
||||
opt.$trigger.find('i').trigger("click");
|
||||
}
|
||||
},
|
||||
"close_other": {
|
||||
name: "关闭其他",
|
||||
icon: "fa-window-close-o",
|
||||
callback: function(key, opt) {
|
||||
setActiveTab(this);
|
||||
setActiveTab(this);
|
||||
tabCloseOther();
|
||||
}
|
||||
},
|
||||
|
|
@ -584,23 +583,23 @@ $(function() {
|
|||
name: "关闭左侧",
|
||||
icon: "fa-reply",
|
||||
callback: function(key, opt) {
|
||||
setActiveTab(this);
|
||||
this.prevAll('.menuTab').not(":last").each(function() {
|
||||
if ($(this).hasClass('active')) {
|
||||
setActiveTab(this);
|
||||
}
|
||||
$('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
|
||||
$(this).remove();
|
||||
});
|
||||
$('.page-tabs-content').css("margin-left", "0");
|
||||
setActiveTab(this);
|
||||
this.prevAll('.menuTab').not(":last").each(function() {
|
||||
if ($(this).hasClass('active')) {
|
||||
setActiveTab(this);
|
||||
}
|
||||
$('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
|
||||
$(this).remove();
|
||||
});
|
||||
$('.page-tabs-content').css("margin-left", "0");
|
||||
}
|
||||
},
|
||||
"close_right": {
|
||||
name: "关闭右侧",
|
||||
icon: "fa-share",
|
||||
callback: function(key, opt) {
|
||||
setActiveTab(this);
|
||||
this.nextAll('.menuTab').each(function() {
|
||||
setActiveTab(this);
|
||||
this.nextAll('.menuTab').each(function() {
|
||||
$('.menuTab[data-id="' + $(this).data('id') + '"]').remove();
|
||||
$(this).remove();
|
||||
});
|
||||
|
|
@ -618,18 +617,18 @@ $(function() {
|
|||
name: "全屏显示",
|
||||
icon: "fa-arrows-alt",
|
||||
callback: function(key, opt) {
|
||||
setActiveTab(this);
|
||||
setActiveTab(this);
|
||||
var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
|
||||
target.fullScreen(true);
|
||||
target.fullScreen(true);
|
||||
}
|
||||
},
|
||||
"refresh": {
|
||||
name: "刷新页面",
|
||||
icon: "fa-refresh",
|
||||
callback: function(key, opt) {
|
||||
setActiveTab(this);
|
||||
var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
|
||||
var url = target.attr('src');
|
||||
setActiveTab(this);
|
||||
var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
|
||||
var url = target.attr('src');
|
||||
$.modal.loading("数据加载中,请稍后...");
|
||||
target.attr('src', url).load(function () {
|
||||
$.modal.closeLoading();
|
||||
|
|
@ -640,7 +639,7 @@ $(function() {
|
|||
name: "新窗口打开",
|
||||
icon: "fa-link",
|
||||
callback: function(key, opt) {
|
||||
var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
|
||||
var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
|
||||
window.open(target.attr('src'));
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4,195 +4,195 @@
|
|||
*/
|
||||
$(function() {
|
||||
|
||||
// layer扩展皮肤
|
||||
if (window.layer !== undefined) {
|
||||
layer.config({
|
||||
extend: 'moon/style.css',
|
||||
skin: 'layer-ext-moon'
|
||||
});
|
||||
}
|
||||
// layer扩展皮肤
|
||||
if (window.layer !== undefined) {
|
||||
layer.config({
|
||||
extend: 'moon/style.css',
|
||||
skin: 'layer-ext-moon'
|
||||
});
|
||||
}
|
||||
|
||||
// 回到顶部绑定
|
||||
if ($.fn.toTop !== undefined) {
|
||||
$('#scroll-up').toTop();
|
||||
}
|
||||
// 回到顶部绑定
|
||||
if ($.fn.toTop !== undefined) {
|
||||
$('#scroll-up').toTop();
|
||||
}
|
||||
|
||||
// select2复选框事件绑定
|
||||
if ($.fn.select2 !== undefined) {
|
||||
// select2复选框事件绑定
|
||||
if ($.fn.select2 !== undefined) {
|
||||
$.fn.select2.defaults.set( "theme", "bootstrap" );
|
||||
$("select.form-control:not(.noselect2)").each(function () {
|
||||
$(this).select2().on("change", function () {
|
||||
$(this).valid();
|
||||
})
|
||||
})
|
||||
}
|
||||
$("select.form-control:not(.noselect2)").each(function () {
|
||||
$(this).select2().on("change", function () {
|
||||
$(this).valid();
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// iCheck单选框及复选框事件绑定
|
||||
if ($.fn.iCheck !== undefined) {
|
||||
$(".check-box:not(.noicheck),.radio-box:not(.noicheck)").each(function() {
|
||||
// iCheck单选框及复选框事件绑定
|
||||
if ($.fn.iCheck !== undefined) {
|
||||
$(".check-box:not(.noicheck),.radio-box:not(.noicheck)").each(function() {
|
||||
$(this).iCheck({
|
||||
checkboxClass: 'icheckbox-blue',
|
||||
radioClass: 'iradio-blue',
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 气泡弹出框特效(移到元素时)
|
||||
$(document).on("mouseenter", '.table [data-toggle="popover"]', function() {
|
||||
var _this = this;
|
||||
$(this).popover("show");
|
||||
$(".popover").on("mouseleave", function() {
|
||||
$(_this).popover('hide');
|
||||
});
|
||||
})
|
||||
// 气泡弹出框特效(移到元素时)
|
||||
$(document).on("mouseenter", '.table [data-toggle="popover"]', function() {
|
||||
var _this = this;
|
||||
$(this).popover("show");
|
||||
$(".popover").on("mouseleave", function() {
|
||||
$(_this).popover('hide');
|
||||
});
|
||||
})
|
||||
|
||||
// 气泡弹出框特效(离开元素时)
|
||||
$(document).on("mouseleave", '.table [data-toggle="popover"]', function() {
|
||||
var _this = this;
|
||||
setTimeout(function() {
|
||||
if (!$(".popover:hover").length) $(_this).popover("hide");
|
||||
}, 100);
|
||||
});
|
||||
// 气泡弹出框特效(离开元素时)
|
||||
$(document).on("mouseleave", '.table [data-toggle="popover"]', function() {
|
||||
var _this = this;
|
||||
setTimeout(function() {
|
||||
if (!$(".popover:hover").length) $(_this).popover("hide");
|
||||
}, 100);
|
||||
});
|
||||
|
||||
// 取消回车自动提交表单
|
||||
$(document).on("keypress", ":input:not(textarea):not([type=submit])", function(event) {
|
||||
// 取消回车自动提交表单
|
||||
$(document).on("keypress", ":input:not(textarea):not([type=submit])", function(event) {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// laydate 时间控件绑定
|
||||
if ($(".select-time").length > 0) {
|
||||
layui.use('laydate', function() {
|
||||
var laydate = layui.laydate;
|
||||
var startDate = laydate.render({
|
||||
elem: '#startTime',
|
||||
max: $('#endTime').val(),
|
||||
theme: 'molv',
|
||||
trigger: 'click',
|
||||
done: function(value, date) {
|
||||
// 结束时间大于开始时间
|
||||
if (value !== '') {
|
||||
endDate.config.min.year = date.year;
|
||||
endDate.config.min.month = date.month - 1;
|
||||
endDate.config.min.date = date.date;
|
||||
} else {
|
||||
endDate.config.min.year = '';
|
||||
endDate.config.min.month = '';
|
||||
endDate.config.min.date = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
var endDate = laydate.render({
|
||||
elem: '#endTime',
|
||||
min: $('#startTime').val(),
|
||||
theme: 'molv',
|
||||
trigger: 'click',
|
||||
done: function(value, date) {
|
||||
// 开始时间小于结束时间
|
||||
if (value !== '') {
|
||||
startDate.config.max.year = date.year;
|
||||
startDate.config.max.month = date.month - 1;
|
||||
startDate.config.max.date = date.date;
|
||||
} else {
|
||||
startDate.config.max.year = '2099';
|
||||
startDate.config.max.month = '12';
|
||||
startDate.config.max.date = '31';
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
// laydate 时间控件绑定
|
||||
if ($(".select-time").length > 0) {
|
||||
layui.use('laydate', function() {
|
||||
var laydate = layui.laydate;
|
||||
var startDate = laydate.render({
|
||||
elem: '#startTime',
|
||||
max: $('#endTime').val(),
|
||||
theme: 'molv',
|
||||
trigger: 'click',
|
||||
done: function(value, date) {
|
||||
// 结束时间大于开始时间
|
||||
if (value !== '') {
|
||||
endDate.config.min.year = date.year;
|
||||
endDate.config.min.month = date.month - 1;
|
||||
endDate.config.min.date = date.date;
|
||||
} else {
|
||||
endDate.config.min.year = '';
|
||||
endDate.config.min.month = '';
|
||||
endDate.config.min.date = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
var endDate = laydate.render({
|
||||
elem: '#endTime',
|
||||
min: $('#startTime').val(),
|
||||
theme: 'molv',
|
||||
trigger: 'click',
|
||||
done: function(value, date) {
|
||||
// 开始时间小于结束时间
|
||||
if (value !== '') {
|
||||
startDate.config.max.year = date.year;
|
||||
startDate.config.max.month = date.month - 1;
|
||||
startDate.config.max.date = date.date;
|
||||
} else {
|
||||
startDate.config.max.year = '2099';
|
||||
startDate.config.max.month = '12';
|
||||
startDate.config.max.date = '31';
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// laydate time-input 时间控件绑定
|
||||
if ($(".time-input").length > 0) {
|
||||
layui.use('laydate', function () {
|
||||
var com = layui.laydate;
|
||||
$(".time-input").each(function (index, item) {
|
||||
var time = $(item);
|
||||
// 控制控件外观
|
||||
var type = time.attr("data-type") || 'date';
|
||||
// 控制回显格式
|
||||
var format = time.attr("data-format") || 'yyyy-MM-dd';
|
||||
// 控制日期控件按钮
|
||||
var buttons = time.attr("data-btn") || 'clear|now|confirm', newBtnArr = [];
|
||||
// 日期控件选择完成后回调处理
|
||||
var callback = time.attr("data-callback") || {};
|
||||
if (buttons) {
|
||||
if (buttons.indexOf("|") > 0) {
|
||||
var btnArr = buttons.split("|"), btnLen = btnArr.length;
|
||||
for (var j = 0; j < btnLen; j++) {
|
||||
if ("clear" === btnArr[j] || "now" === btnArr[j] || "confirm" === btnArr[j]) {
|
||||
newBtnArr.push(btnArr[j]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ("clear" === buttons || "now" === buttons || "confirm" === buttons) {
|
||||
newBtnArr.push(buttons);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
newBtnArr = ['clear', 'now', 'confirm'];
|
||||
}
|
||||
com.render({
|
||||
elem: item,
|
||||
theme: 'molv',
|
||||
trigger: 'click',
|
||||
type: type,
|
||||
format: format,
|
||||
btns: newBtnArr,
|
||||
done: function (value, data) {
|
||||
if (typeof window[callback] != 'undefined'
|
||||
&& window[callback] instanceof Function) {
|
||||
window[callback](value, data);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
// laydate time-input 时间控件绑定
|
||||
if ($(".time-input").length > 0) {
|
||||
layui.use('laydate', function () {
|
||||
var com = layui.laydate;
|
||||
$(".time-input").each(function (index, item) {
|
||||
var time = $(item);
|
||||
// 控制控件外观
|
||||
var type = time.attr("data-type") || 'date';
|
||||
// 控制回显格式
|
||||
var format = time.attr("data-format") || 'yyyy-MM-dd';
|
||||
// 控制日期控件按钮
|
||||
var buttons = time.attr("data-btn") || 'clear|now|confirm', newBtnArr = [];
|
||||
// 日期控件选择完成后回调处理
|
||||
var callback = time.attr("data-callback") || {};
|
||||
if (buttons) {
|
||||
if (buttons.indexOf("|") > 0) {
|
||||
var btnArr = buttons.split("|"), btnLen = btnArr.length;
|
||||
for (var j = 0; j < btnLen; j++) {
|
||||
if ("clear" === btnArr[j] || "now" === btnArr[j] || "confirm" === btnArr[j]) {
|
||||
newBtnArr.push(btnArr[j]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ("clear" === buttons || "now" === buttons || "confirm" === buttons) {
|
||||
newBtnArr.push(buttons);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
newBtnArr = ['clear', 'now', 'confirm'];
|
||||
}
|
||||
com.render({
|
||||
elem: item,
|
||||
theme: 'molv',
|
||||
trigger: 'click',
|
||||
type: type,
|
||||
format: format,
|
||||
btns: newBtnArr,
|
||||
done: function (value, data) {
|
||||
if (typeof window[callback] != 'undefined'
|
||||
&& window[callback] instanceof Function) {
|
||||
window[callback](value, data);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// tree 关键字搜索绑定
|
||||
if ($("#keyword").length > 0) {
|
||||
$("#keyword").bind("focus", function focusKey(e) {
|
||||
if ($("#keyword").hasClass("empty")) {
|
||||
$("#keyword").removeClass("empty");
|
||||
}
|
||||
}).bind("blur", function blurKey(e) {
|
||||
if ($("#keyword").val() === "") {
|
||||
$("#keyword").addClass("empty");
|
||||
}
|
||||
$.tree.searchNode(e);
|
||||
}).bind("input propertychange", $.tree.searchNode);
|
||||
}
|
||||
// tree 关键字搜索绑定
|
||||
if ($("#keyword").length > 0) {
|
||||
$("#keyword").bind("focus", function focusKey(e) {
|
||||
if ($("#keyword").hasClass("empty")) {
|
||||
$("#keyword").removeClass("empty");
|
||||
}
|
||||
}).bind("blur", function blurKey(e) {
|
||||
if ($("#keyword").val() === "") {
|
||||
$("#keyword").addClass("empty");
|
||||
}
|
||||
$.tree.searchNode(e);
|
||||
}).bind("input propertychange", $.tree.searchNode);
|
||||
}
|
||||
|
||||
// tree表格树 展开/折叠
|
||||
var expandFlag;
|
||||
$("#expandAllBtn").click(function() {
|
||||
var dataExpand = $.common.isEmpty(table.options.expandAll) ? true : table.options.expandAll;
|
||||
expandFlag = $.common.isEmpty(expandFlag) ? dataExpand : expandFlag;
|
||||
if (!expandFlag) {
|
||||
$.bttTable.bootstrapTreeTable('expandAll');
|
||||
} else {
|
||||
$.bttTable.bootstrapTreeTable('collapseAll');
|
||||
}
|
||||
expandFlag = expandFlag ? false: true;
|
||||
})
|
||||
// tree表格树 展开/折叠
|
||||
var expandFlag;
|
||||
$("#expandAllBtn").click(function() {
|
||||
var dataExpand = $.common.isEmpty(table.options.expandAll) ? true : table.options.expandAll;
|
||||
expandFlag = $.common.isEmpty(expandFlag) ? dataExpand : expandFlag;
|
||||
if (!expandFlag) {
|
||||
$.bttTable.bootstrapTreeTable('expandAll');
|
||||
} else {
|
||||
$.bttTable.bootstrapTreeTable('collapseAll');
|
||||
}
|
||||
expandFlag = expandFlag ? false: true;
|
||||
})
|
||||
|
||||
// 按下ESC按钮关闭弹层
|
||||
$('body', document).on('keyup', function(e) {
|
||||
if (e.which === 27) {
|
||||
$.modal.closeAll();
|
||||
}
|
||||
});
|
||||
// 按下ESC按钮关闭弹层
|
||||
$('body', document).on('keyup', function(e) {
|
||||
if (e.which === 27) {
|
||||
$.modal.closeAll();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
(function ($) {
|
||||
'use strict';
|
||||
$.fn.toTop = function(opt) {
|
||||
var elem = this;
|
||||
var win = $(window);
|
||||
var doc = $('html, body');
|
||||
var win = (opt && opt.hasOwnProperty('win')) ? opt.win : $(window);
|
||||
var doc = (opt && opt.hasOwnProperty('doc')) ? opt.doc : $('html, body');
|
||||
var options = $.extend({
|
||||
autohide: true,
|
||||
offset: 50,
|
||||
|
|
@ -233,8 +233,8 @@ $(function() {
|
|||
/** 刷新选项卡 */
|
||||
var refreshItem = function(){
|
||||
var topWindow = $(window.parent.document);
|
||||
var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-id');
|
||||
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow);
|
||||
var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-id');
|
||||
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow);
|
||||
var url = target.attr('src');
|
||||
target.attr('src', url).ready();
|
||||
}
|
||||
|
|
@ -243,29 +243,29 @@ var refreshItem = function(){
|
|||
var closeItem = function(dataId){
|
||||
var topWindow = $(window.parent.document);
|
||||
if($.common.isNotEmpty(dataId)){
|
||||
window.parent.$.modal.closeLoading();
|
||||
// 根据dataId关闭指定选项卡
|
||||
$('.menuTab[data-id="' + dataId + '"]', topWindow).remove();
|
||||
// 移除相应tab对应的内容区
|
||||
$('.mainContent .RuoYi_iframe[data-id="' + dataId + '"]', topWindow).remove();
|
||||
return;
|
||||
window.parent.$.modal.closeLoading();
|
||||
// 根据dataId关闭指定选项卡
|
||||
$('.menuTab[data-id="' + dataId + '"]', topWindow).remove();
|
||||
// 移除相应tab对应的内容区
|
||||
$('.mainContent .RuoYi_iframe[data-id="' + dataId + '"]', topWindow).remove();
|
||||
return;
|
||||
}
|
||||
var panelUrl = window.frameElement.getAttribute('data-panel');
|
||||
$('.page-tabs-content .active i', topWindow).click();
|
||||
if($.common.isNotEmpty(panelUrl)){
|
||||
$('.menuTab[data-id="' + panelUrl + '"]', topWindow).addClass('active').siblings('.menuTab').removeClass('active');
|
||||
$('.mainContent .RuoYi_iframe', topWindow).each(function() {
|
||||
if ($(this).data('id') == panelUrl) {
|
||||
$(this).show().siblings('.RuoYi_iframe').hide();
|
||||
return false;
|
||||
$('.menuTab[data-id="' + panelUrl + '"]', topWindow).addClass('active').siblings('.menuTab').removeClass('active');
|
||||
$('.mainContent .RuoYi_iframe', topWindow).each(function() {
|
||||
if ($(this).data('id') == panelUrl) {
|
||||
$(this).show().siblings('.RuoYi_iframe').hide();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建选项卡 */
|
||||
function createMenuItem(dataUrl, menuName) {
|
||||
var panelUrl = window.frameElement.getAttribute('data-id');
|
||||
var panelUrl = window.frameElement.getAttribute('data-id');
|
||||
dataIndex = $.common.random(1, 100),
|
||||
flag = true;
|
||||
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
|
||||
|
|
@ -300,7 +300,7 @@ function createMenuItem(dataUrl, menuName) {
|
|||
|
||||
window.parent.$.modal.loading("数据加载中,请稍后...");
|
||||
$('.mainContent iframe:visible', topWindow).load(function () {
|
||||
window.parent.$.modal.closeLoading();
|
||||
window.parent.$.modal.closeLoading();
|
||||
});
|
||||
|
||||
// 添加选项卡
|
||||
|
|
@ -312,7 +312,7 @@ function createMenuItem(dataUrl, menuName) {
|
|||
|
||||
// 滚动到指定选项卡
|
||||
function scrollToTab(element) {
|
||||
var topWindow = $(window.parent.document);
|
||||
var topWindow = $(window.parent.document);
|
||||
var marginLeftVal = calSumWidth($(element).prevAll()),
|
||||
marginRightVal = calSumWidth($(element).nextAll());
|
||||
// 可视区域非tab宽度
|
||||
|
|
@ -349,28 +349,28 @@ function calSumWidth(elements) {
|
|||
|
||||
/** 密码规则范围验证 */
|
||||
function checkpwd(chrtype, password) {
|
||||
if (chrtype == 1) {
|
||||
if(!$.common.numValid(password)){
|
||||
$.modal.alertWarning("密码只能为0-9数字");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 2) {
|
||||
if(!$.common.enValid(password)){
|
||||
$.modal.alertWarning("密码只能为a-z和A-Z字母");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 3) {
|
||||
if(!$.common.enNumValid(password)){
|
||||
$.modal.alertWarning("密码必须包含字母以及数字");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 4) {
|
||||
if(!$.common.charValid(password)){
|
||||
$.modal.alertWarning("密码必须包含字母、数字、以及特殊符号-、_");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
if (chrtype == 1) {
|
||||
if(!$.common.numValid(password)){
|
||||
$.modal.alertWarning("密码只能为0-9数字");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 2) {
|
||||
if(!$.common.enValid(password)){
|
||||
$.modal.alertWarning("密码只能为a-z和A-Z字母");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 3) {
|
||||
if(!$.common.enNumValid(password)){
|
||||
$.modal.alertWarning("密码必须包含字母以及数字");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 4) {
|
||||
if(!$.common.charValid(password)){
|
||||
$.modal.alertWarning("密码必须包含字母、数字、以及特殊符号<font color='red'>~!@#$%^&*()-=_+</font>");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// 日志打印封装处理
|
||||
|
|
@ -411,21 +411,21 @@ var sub = {
|
|||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var params = new Array();
|
||||
for (var dataIndex = 0; dataIndex <= count; dataIndex++) {
|
||||
var columns = $('#' + table.options.id + ' tr[data-index="' + dataIndex + '"] td');
|
||||
var obj = new Object();
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
var inputValue = $(columns[i]).find('input');
|
||||
var selectValue = $(columns[i]).find('select');
|
||||
var key = table.options.columns[i].field;
|
||||
if ($.common.isNotEmpty(inputValue.val())) {
|
||||
obj[key] = inputValue.val();
|
||||
} else if ($.common.isNotEmpty(selectValue.val())) {
|
||||
obj[key] = selectValue.val();
|
||||
} else {
|
||||
obj[key] = "";
|
||||
}
|
||||
}
|
||||
params.push({ index: dataIndex, row: obj });
|
||||
var columns = $('#' + table.options.id + ' tr[data-index="' + dataIndex + '"] td');
|
||||
var obj = new Object();
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
var inputValue = $(columns[i]).find('input');
|
||||
var selectValue = $(columns[i]).find('select');
|
||||
var key = table.options.columns[i].field;
|
||||
if ($.common.isNotEmpty(inputValue.val())) {
|
||||
obj[key] = inputValue.val();
|
||||
} else if ($.common.isNotEmpty(selectValue.val())) {
|
||||
obj[key] = selectValue.val();
|
||||
} else {
|
||||
obj[key] = "";
|
||||
}
|
||||
}
|
||||
params.push({ index: dataIndex, row: obj });
|
||||
}
|
||||
$("#" + table.options.id).bootstrapTable("updateRow", params);
|
||||
},
|
||||
|
|
@ -441,16 +441,35 @@ var sub = {
|
|||
}
|
||||
};
|
||||
|
||||
// 动态加载css文件
|
||||
function loadCss(file, headElem) {
|
||||
var link = document.createElement('link');
|
||||
link.href = file;
|
||||
link.rel = 'stylesheet';
|
||||
link.type = 'text/css';
|
||||
if (headElem) headElem.appendChild(link);
|
||||
else document.getElementsByTagName('head')[0].appendChild(link);
|
||||
}
|
||||
|
||||
// 动态加载js文件
|
||||
function loadJs(file, headElem) {
|
||||
var script = document.createElement('script');
|
||||
script.src = file;
|
||||
script.type = 'text/javascript';
|
||||
if (headElem) headElem.appendChild(script);
|
||||
else document.getElementsByTagName('head')[0].appendChild(script);
|
||||
}
|
||||
|
||||
/** 设置全局ajax处理 */
|
||||
$.ajaxSetup({
|
||||
complete: function(XMLHttpRequest, textStatus) {
|
||||
if (textStatus == 'timeout') {
|
||||
$.modal.alertWarning("服务器超时,请稍后再试!");
|
||||
$.modal.enable();
|
||||
$.modal.alertWarning("服务器超时,请稍后再试!");
|
||||
$.modal.enable();
|
||||
$.modal.closeLoading();
|
||||
} else if (textStatus == "parsererror" || textStatus == "error") {
|
||||
$.modal.alertWarning("服务器错误,请联系管理员!");
|
||||
$.modal.enable();
|
||||
$.modal.alertWarning("服务器错误,请联系管理员!");
|
||||
$.modal.enable();
|
||||
$.modal.closeLoading();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,22 +1,22 @@
|
|||
|
||||
$(function() {
|
||||
validateKickout();
|
||||
validateKickout();
|
||||
validateRule();
|
||||
$('.imgcode').click(function() {
|
||||
var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
|
||||
$(".imgcode").attr("src", url);
|
||||
});
|
||||
$('.imgcode').click(function() {
|
||||
var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
|
||||
$(".imgcode").attr("src", url);
|
||||
});
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function() {
|
||||
login();
|
||||
login();
|
||||
}
|
||||
});
|
||||
|
||||
function login() {
|
||||
$.modal.loading($("#btnSubmit").data("loading"));
|
||||
var username = $.common.trim($("input[name='username']").val());
|
||||
$.modal.loading($("#btnSubmit").data("loading"));
|
||||
var username = $.common.trim($("input[name='username']").val());
|
||||
var password = $.common.trim($("input[name='password']").val());
|
||||
var validateCode = $("input[name='validateCode']").val();
|
||||
var rememberMe = $("input[name='rememberme']").is(':checked');
|
||||
|
|
@ -65,26 +65,26 @@ function validateRule() {
|
|||
}
|
||||
|
||||
function validateKickout() {
|
||||
if (getParam("kickout") == 1) {
|
||||
layer.alert("<font color='red'>您已在别处登录,请您修改密码或重新登录</font>", {
|
||||
icon: 0,
|
||||
title: "系统提示"
|
||||
},
|
||||
function(index) {
|
||||
//关闭弹窗
|
||||
layer.close(index);
|
||||
if (top != self) {
|
||||
top.location = self.location;
|
||||
} else {
|
||||
var url = location.search;
|
||||
if (url) {
|
||||
var oldUrl = window.location.href;
|
||||
var newUrl = oldUrl.substring(0, oldUrl.indexOf('?'));
|
||||
self.location = newUrl;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (getParam("kickout") == 1) {
|
||||
layer.alert("<font color='red'>您已在别处登录,请您修改密码或重新登录</font>", {
|
||||
icon: 0,
|
||||
title: "系统提示"
|
||||
},
|
||||
function(index) {
|
||||
//关闭弹窗
|
||||
layer.close(index);
|
||||
if (top != self) {
|
||||
top.location = self.location;
|
||||
} else {
|
||||
var url = location.search;
|
||||
if (url) {
|
||||
var oldUrl = window.location.href;
|
||||
var newUrl = oldUrl.substring(0, oldUrl.indexOf('?'));
|
||||
self.location = newUrl;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getParam(paramName) {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
$(function() {
|
||||
validateRule();
|
||||
$('.imgcode').click(function() {
|
||||
var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
|
||||
$(".imgcode").attr("src", url);
|
||||
});
|
||||
var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
|
||||
$(".imgcode").attr("src", url);
|
||||
});
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
|
|
@ -14,8 +14,8 @@ $.validator.setDefaults({
|
|||
});
|
||||
|
||||
function register() {
|
||||
$.modal.loading($("#btnSubmit").data("loading"));
|
||||
var username = $.common.trim($("input[name='username']").val());
|
||||
$.modal.loading($("#btnSubmit").data("loading"));
|
||||
var username = $.common.trim($("input[name='username']").val());
|
||||
var password = $.common.trim($("input[name='password']").val());
|
||||
var validateCode = $("input[name='validateCode']").val();
|
||||
$.ajax({
|
||||
|
|
@ -29,14 +29,14 @@ function register() {
|
|||
success: function(r) {
|
||||
if (r.code == 0) {
|
||||
layer.alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", {
|
||||
icon: 1,
|
||||
title: "系统提示"
|
||||
},
|
||||
function(index) {
|
||||
//关闭弹窗
|
||||
layer.close(index);
|
||||
location.href = ctx + 'login';
|
||||
});
|
||||
icon: 1,
|
||||
title: "系统提示"
|
||||
},
|
||||
function(index) {
|
||||
//关闭弹窗
|
||||
layer.close(index);
|
||||
location.href = ctx + 'login';
|
||||
});
|
||||
} else {
|
||||
$.modal.closeLoading();
|
||||
$('.imgcode').click();
|
||||
|
|
@ -48,7 +48,7 @@ function register() {
|
|||
}
|
||||
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#registerForm").validate({
|
||||
rules: {
|
||||
username: {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<h2>若依后台管理系统</h2>
|
||||
<p>ruoyi是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b>,<b>网站会员中心</b>,<b>CMS</b>,<b>CRM</b>,<b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
|
||||
<p>
|
||||
<b>当前版本:</b>v4.4.0
|
||||
<b>当前版本:</b>v4.5.0
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">免费开源</span>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
<h3>你好,若依 </h3>
|
||||
<p>H+是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b>,<b>网站会员中心</b>,<b>CMS</b>,<b>CRM</b>,<b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
|
||||
<p>
|
||||
<b>当前版本:</b>v4.4.0
|
||||
<b>当前版本:</b>v4.5.0
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">开源免费</span>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=20200727}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css?v=20200903}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.5.0}" rel="stylesheet"/>
|
||||
</head>
|
||||
|
||||
<!-- 通用JS -->
|
||||
|
|
@ -36,8 +36,8 @@
|
|||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.5.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.5.0}"></script>
|
||||
<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/skins.css?v=20200902}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.5.0}" rel="stylesheet"/>
|
||||
</head>
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden">
|
||||
<div id="wrapper">
|
||||
|
|
@ -305,8 +305,8 @@
|
|||
<script th:src="@{/js/jquery.contextMenu.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.5.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.5.0}"></script>
|
||||
<script th:src="@{/ruoyi/index.js?v=20200902}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
<script th:src="@{/js/resize-tabs.js}"></script>
|
||||
|
|
@ -391,6 +391,32 @@ $(function() {
|
|||
$(".navbar-toolbar li a").eq(0).click();
|
||||
}
|
||||
}
|
||||
|
||||
/* 初始密码提示 */
|
||||
if([[${isDefaultModifyPwd}]]) {
|
||||
layer.confirm("您的密码还是初始密码,请修改密码!", {
|
||||
icon: 0,
|
||||
title: "安全提示",
|
||||
btn: ['确认' , '取消'],
|
||||
offset: ['30%']
|
||||
}, function (index) {
|
||||
resetPwd();
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
|
||||
/* 过期密码提示 */
|
||||
if([[${isPasswordExpired}]]) {
|
||||
layer.confirm("您的密码已过期,请尽快修改密码!", {
|
||||
icon: 0,
|
||||
title: "安全提示",
|
||||
btn: ['确认' , '取消'],
|
||||
offset: ['30%']
|
||||
}, function (index) {
|
||||
resetPwd();
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/skins.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.5.0}" rel="stylesheet"/>
|
||||
</head>
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden">
|
||||
<div id="wrapper">
|
||||
|
|
@ -256,8 +256,8 @@
|
|||
<script th:src="@{/js/jquery.contextMenu.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.5.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.5.0}"></script>
|
||||
<script th:src="@{/ruoyi/index.js}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
|
|
@ -331,6 +331,32 @@ $(function() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 初始密码提示 */
|
||||
if([[${isDefaultModifyPwd}]]) {
|
||||
layer.confirm("您的密码还是初始密码,请修改密码!", {
|
||||
icon: 0,
|
||||
title: "安全提示",
|
||||
btn: ['确认' , '取消'],
|
||||
offset: ['30%']
|
||||
}, function (index) {
|
||||
resetPwd();
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
|
||||
/* 过期密码提示 */
|
||||
if([[${isPasswordExpired}]]) {
|
||||
layer.confirm("您的密码已过期,请尽快修改密码!", {
|
||||
icon: 0,
|
||||
title: "安全提示",
|
||||
btn: ['确认' , '取消'],
|
||||
offset: ['30%']
|
||||
}, function (index) {
|
||||
resetPwd();
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.5.0}" rel="stylesheet"/>
|
||||
<!-- 360浏览器急速模式 -->
|
||||
<meta name="renderer" content="webkit">
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
<script src="../static/ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.4.0}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.5.0}"></script>
|
||||
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
<br><a target="_blank" href="https://www.aliyun.com/minisite/goods?userCode=brki8iof">https://www.aliyun.com/minisite/goods?userCode=brki8iof</a><br>
|
||||
领取腾讯云通用云产品2860优惠券
|
||||
<br><a target="_blank" href="https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console">https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console</a><br>
|
||||
阿里云服务器折扣区 <a target="_blank" href="http://aly.ruoyi.vip">☛☛点我进入☚☚</a> 腾讯云服务器秒杀区 <a target="_blank" href="http://txy.ruoyi.vip">☛☛点我进入☚☚</a><br>
|
||||
<h4 class="text-danger">云产品通用红包,可叠加官网常规优惠使用。(仅限新用户)</h4>
|
||||
</blockquote>
|
||||
|
||||
|
|
@ -96,13 +97,75 @@
|
|||
<div class="ibox-content no-padding">
|
||||
<div class="panel-body">
|
||||
<div class="panel-group" id="version">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v45">v4.5.0</a><code class="pull-right">2020.10.20</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v45" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增菜单导航显示风格(default为左侧导航菜单,topnav为顶部导航菜单)</li>
|
||||
<li>菜单&数据权限新增(展开/折叠 全选/全不选 父子联动)</li>
|
||||
<li>账号密码支持自定义更新周期</li>
|
||||
<li>初始密码支持自定义修改策略</li>
|
||||
<li>新增校验用户修改新密码不能与旧密码相同</li>
|
||||
<li>添加检查密码范围支持的特殊字符包括:~!@#$%^&*()-=_+</li>
|
||||
<li>注册账号设置默认用户名称及密码最后更新时间</li>
|
||||
<li>去除用户手机邮箱部门必填验证</li>
|
||||
<li>新增日期格式化方法</li>
|
||||
<li>代码生成添加bit类型</li>
|
||||
<li>树结构加载添加callBack回调方法</li>
|
||||
<li>修复用户管理页面滚动返回顶部条失效</li>
|
||||
<li>修复代码生成模板文件上传组件缺少ctx的问题</li>
|
||||
<li>限制系统内置参数不允许删除</li>
|
||||
<li>新增表格列宽拖动插件</li>
|
||||
<li>新增Ajax局部刷新demo</li>
|
||||
<li>新增是否开启页脚功能</li>
|
||||
<li>新增表格参数(通过自定义函数设置标题样式headerStyle)</li>
|
||||
<li>新增表格参数(通过自定义函数设置页脚样式footerStyle)</li>
|
||||
<li>修复窗体大小改变后浮动提示框失效问题</li>
|
||||
<li>生成代码补充必填样式</li>
|
||||
<li>生成页面时不忽略remark属性</li>
|
||||
<li>字典数据列表页添加关闭按钮</li>
|
||||
<li>Excel注解支持自动统计数据总和</li>
|
||||
<li>升级springboot到2.1.17 提升安全性</li>
|
||||
<li>升级pagehelper到最新版1.3.0</li>
|
||||
<li>升级druid到最新版本v1.2.1</li>
|
||||
<li>升级fastjson到最新版1.2.74</li>
|
||||
<li>升级bootstrap-fileinput到最新版本5.1.2</li>
|
||||
<li>升级oshi到最新版本v5.2.5</li>
|
||||
<li>表单向导插件更换为jquery-smartwizard</li>
|
||||
<li>修改主子表提交示例代码防止渲染失效</li>
|
||||
<li>添加导入数据弹出窗体自定义宽高</li>
|
||||
<li>用户信息参数返回忽略掉密码字段</li>
|
||||
<li>优化关闭窗体添加index参数</li>
|
||||
<li>回显数据字典(字符串数组)增加空值判断</li>
|
||||
<li>修改前端密码长度校验和错误提示不符问题</li>
|
||||
<li>AjaxResult重写put方法,以方便链式调用</li>
|
||||
<li>增强验证码校验的语义,更易懂</li>
|
||||
<li>导入excel整形值校验优化</li>
|
||||
<li>Excel导出类型NUMERIC支持精度浮点类型</li>
|
||||
<li>导出Excel调整targetAttr获取值方法,防止get方法不规范</li>
|
||||
<li>输入框组验证错误后置图标提示颜色</li>
|
||||
<li>上传媒体类型添加视频格式</li>
|
||||
<li>数据权限判断参数类型</li>
|
||||
<li>修正数据库字符串类型nvarchar</li>
|
||||
<li>优化递归子节点</li>
|
||||
<li>修复多表格搜索formId无效</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v44">v4.4.0</a><code class="pull-right">2020.08.24</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v44" class="panel-collapse collapse in">
|
||||
<div id="v44" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>升级bootstrapTable到最新版本1.17.1</li>
|
||||
|
|
@ -1078,7 +1141,7 @@
|
|||
type: 1,
|
||||
closeBtn:false,
|
||||
shadeClose:true,
|
||||
area: ['600px', 'auto'],
|
||||
area: ['600px', '360px'],
|
||||
content: html
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.5.0}" rel="stylesheet"/>
|
||||
<!-- 360浏览器急速模式 -->
|
||||
<meta name="renderer" content="webkit">
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
<script src="../static/ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.4.0}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.5.0}"></script>
|
||||
<script src="../static/ruoyi/register.js" th:src="@{/ruoyi/register.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@
|
|||
</ul>
|
||||
</body>
|
||||
<script th:src="@{/js/jquery.min.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.5.0}"></script>
|
||||
<script type="text/javascript">
|
||||
//皮肤样式列表
|
||||
var skins = ["skin-blue", "skin-green", "skin-purple", "skin-red", "skin-yellow"];
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@
|
|||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
sortName: "createTime",
|
||||
sortOrder: "desc",
|
||||
sortName: "configId",
|
||||
sortOrder: "asc",
|
||||
modalName: "参数",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
|
|
|
|||
|
|
@ -75,8 +75,8 @@
|
|||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
sortName: "createTime",
|
||||
sortOrder: "desc",
|
||||
sortName: "dictId",
|
||||
sortOrder: "asc",
|
||||
modalName: "类型",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@
|
|||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">归属部门:</label>
|
||||
<label class="col-sm-4 control-label">归属部门:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择归属部门" class="form-control" required>
|
||||
<input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择归属部门" class="form-control">
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -33,10 +33,10 @@
|
|||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">手机号码:</label>
|
||||
<label class="col-sm-4 control-label">手机号码:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="phonenumber" name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" required>
|
||||
<input id="phonenumber" name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11">
|
||||
<span class="input-group-addon"><i class="fa fa-mobile"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -44,10 +44,10 @@
|
|||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">邮箱:</label>
|
||||
<label class="col-sm-4 control-label">邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="email" name="email" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱" required>
|
||||
<input id="email" name="email" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱">
|
||||
<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@
|
|||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">归属部门:</label>
|
||||
<label class="col-sm-4 control-label">归属部门:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" id="treeName" th:field="*{dept.deptName}" required>
|
||||
<input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" id="treeName" th:field="*{dept.deptName}">
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -34,10 +34,10 @@
|
|||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">手机号码:</label>
|
||||
<label class="col-sm-4 control-label">手机号码:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" th:field="*{phonenumber}" required>
|
||||
<input name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" th:field="*{phonenumber}">
|
||||
<span class="input-group-addon"><i class="fa fa-mobile"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -45,10 +45,10 @@
|
|||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">邮箱:</label>
|
||||
<label class="col-sm-4 control-label">邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input name="email" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱" th:field="*{email}" required>
|
||||
<input name="email" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱" th:field="*{email}">
|
||||
<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@
|
|||
<div class="row container">
|
||||
<div class="col-md-10">
|
||||
<div class="imageBox">
|
||||
<img id="avatar" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" >
|
||||
<img id="avatar" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="'this.src=\'' + @{'/img/profile.jpg'} + '\''">
|
||||
</div>
|
||||
<div class="action">
|
||||
<div class="new-contentarea tc">
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="text-center">
|
||||
<p class="user-info-head" onclick="avatar()"><img class="img-circle img-lg" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}"></p>
|
||||
<p class="user-info-head" onclick="avatar()"><img class="img-circle img-lg" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="'this.src=\'' + @{'/img/profile.jpg'} + '\''"></p>
|
||||
<p><a href="javascript:avatar()">修改头像</a></p>
|
||||
</div>
|
||||
<ul class="list-group list-group-striped">
|
||||
|
|
@ -270,7 +270,7 @@
|
|||
},
|
||||
newPassword: {
|
||||
required: "请输入新密码",
|
||||
minlength: "密码不能小于6个字符",
|
||||
minlength: "密码不能小于5个字符",
|
||||
maxlength: "密码不能大于20个字符"
|
||||
},
|
||||
confirmPassword: {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
},
|
||||
newPassword: {
|
||||
required: "请输入新密码",
|
||||
minlength: "密码不能小于6个字符",
|
||||
minlength: "密码不能小于5个字符",
|
||||
maxlength: "密码不能大于20个字符"
|
||||
},
|
||||
confirmPassword: {
|
||||
|
|
|
|||
|
|
@ -101,6 +101,14 @@
|
|||
panehHidden = true;
|
||||
}
|
||||
$('body').layout({ initClosed: panehHidden, west__size: 185 });
|
||||
// 回到顶部绑定
|
||||
if ($.fn.toTop !== undefined) {
|
||||
var opt = {
|
||||
win:$('.ui-layout-center'),
|
||||
doc:$('.ui-layout-center')
|
||||
};
|
||||
$('#scroll-up').toTop(opt);
|
||||
}
|
||||
queryUserList();
|
||||
queryDeptTree();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.4.0</version>
|
||||
<version>4.5.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class GenConstants
|
|||
|
||||
/** 数据库数字类型 */
|
||||
public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer",
|
||||
"bigint", "float", "float", "double", "decimal" };
|
||||
"bit", "bigint", "float", "float", "double", "decimal" };
|
||||
|
||||
/** 页面不需要编辑字段 */
|
||||
public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "del_flag" };
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import com.ruoyi.common.utils.StringUtils;
|
|||
|
||||
/**
|
||||
* 操作消息提醒
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class AjaxResult extends HashMap<String, Object>
|
||||
|
|
@ -54,7 +54,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
|
||||
/**
|
||||
* 初始化一个新创建的 AjaxResult 对象
|
||||
*
|
||||
*
|
||||
* @param type 状态类型
|
||||
* @param msg 返回内容
|
||||
*/
|
||||
|
|
@ -66,7 +66,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
|
||||
/**
|
||||
* 初始化一个新创建的 AjaxResult 对象
|
||||
*
|
||||
*
|
||||
* @param type 状态类型
|
||||
* @param msg 返回内容
|
||||
* @param data 数据对象
|
||||
|
|
@ -81,9 +81,23 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 方便链式调用
|
||||
*
|
||||
* @param key 键
|
||||
* @param value 值
|
||||
* @return 数据对象
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult put(String key, Object value)
|
||||
{
|
||||
super.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回成功消息
|
||||
*
|
||||
*
|
||||
* @return 成功消息
|
||||
*/
|
||||
public static AjaxResult success()
|
||||
|
|
@ -93,7 +107,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
|
||||
/**
|
||||
* 返回成功数据
|
||||
*
|
||||
*
|
||||
* @return 成功消息
|
||||
*/
|
||||
public static AjaxResult success(Object data)
|
||||
|
|
@ -103,7 +117,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
|
||||
/**
|
||||
* 返回成功消息
|
||||
*
|
||||
*
|
||||
* @param msg 返回内容
|
||||
* @return 成功消息
|
||||
*/
|
||||
|
|
@ -114,7 +128,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
|
||||
/**
|
||||
* 返回成功消息
|
||||
*
|
||||
*
|
||||
* @param msg 返回内容
|
||||
* @param data 数据对象
|
||||
* @return 成功消息
|
||||
|
|
@ -126,7 +140,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
|
||||
/**
|
||||
* 返回警告消息
|
||||
*
|
||||
*
|
||||
* @param msg 返回内容
|
||||
* @return 警告消息
|
||||
*/
|
||||
|
|
@ -137,7 +151,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
|
||||
/**
|
||||
* 返回警告消息
|
||||
*
|
||||
*
|
||||
* @param msg 返回内容
|
||||
* @param data 数据对象
|
||||
* @return 警告消息
|
||||
|
|
@ -149,7 +163,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
|
||||
/**
|
||||
* 返回错误消息
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static AjaxResult error()
|
||||
|
|
@ -159,7 +173,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
|
||||
/**
|
||||
* 返回错误消息
|
||||
*
|
||||
*
|
||||
* @param msg 返回内容
|
||||
* @return 警告消息
|
||||
*/
|
||||
|
|
@ -170,7 +184,7 @@ public class AjaxResult extends HashMap<String, Object>
|
|||
|
||||
/**
|
||||
* 返回错误消息
|
||||
*
|
||||
*
|
||||
* @param msg 返回内容
|
||||
* @param data 数据对象
|
||||
* @return 警告消息
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.system.domain;
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.system.domain;
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.system.domain;
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.system.domain;
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.system.domain;
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
package com.ruoyi.system.domain;
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||
import com.ruoyi.common.annotation.Excel.Type;
|
||||
|
|
@ -81,6 +82,9 @@ public class SysUser extends BaseEntity
|
|||
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
|
||||
private Date loginDate;
|
||||
|
||||
/** 密码最后更新时间 */
|
||||
private Date pwdUpdateDate;
|
||||
|
||||
/** 部门对象 */
|
||||
@Excels({
|
||||
@Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
|
||||
|
|
@ -232,6 +236,7 @@ public class SysUser extends BaseEntity
|
|||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
|
|
@ -292,6 +297,16 @@ public class SysUser extends BaseEntity
|
|||
this.loginDate = loginDate;
|
||||
}
|
||||
|
||||
public Date getPwdUpdateDate()
|
||||
{
|
||||
return pwdUpdateDate;
|
||||
}
|
||||
|
||||
public void setPwdUpdateDate(Date pwdUpdateDate)
|
||||
{
|
||||
this.pwdUpdateDate = pwdUpdateDate;
|
||||
}
|
||||
|
||||
public SysDept getDept()
|
||||
{
|
||||
if (dept == null)
|
||||
|
|
@ -131,6 +131,14 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
return new Date(time);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算相差天数
|
||||
*/
|
||||
public static int differentDaysByMillisecond(Date date1, Date date2)
|
||||
{
|
||||
return Math.abs((int) ((date2.getTime() - date1.getTime()) / (1000 * 3600 * 24)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算两个时间差
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
package com.ruoyi.system.utils;
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.utils.CacheUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.SysDictData;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
|
||||
/**
|
||||
* 字典工具类
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.framework.util;
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
|
|
@ -8,7 +8,6 @@ import org.apache.shiro.SecurityUtils;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import com.ruoyi.common.json.JSON;
|
||||
import com.ruoyi.common.utils.IpUtils;
|
||||
|
||||
/**
|
||||
* 处理并记录日志文件
|
||||
|
|
@ -1,16 +1,13 @@
|
|||
package com.ruoyi.framework.util;
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.crypto.SecureRandomNumberGenerator;
|
||||
import org.apache.shiro.mgt.RealmSecurityManager;
|
||||
import org.apache.shiro.session.Session;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.apache.shiro.subject.PrincipalCollection;
|
||||
import org.apache.shiro.subject.SimplePrincipalCollection;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||
import com.ruoyi.framework.shiro.realm.UserRealm;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
|
||||
/**
|
||||
* shiro 工具类
|
||||
|
|
@ -56,13 +53,6 @@ public class ShiroUtils
|
|||
subject.runAs(newPrincipalCollection);
|
||||
}
|
||||
|
||||
public static void clearCachedAuthorizationInfo()
|
||||
{
|
||||
RealmSecurityManager rsm = (RealmSecurityManager) SecurityUtils.getSecurityManager();
|
||||
UserRealm realm = (UserRealm) rsm.getRealms().iterator().next();
|
||||
realm.clearCachedAuthorizationInfo();
|
||||
}
|
||||
|
||||
public static Long getUserId()
|
||||
{
|
||||
return getSysUser().getUserId().longValue();
|
||||
|
|
@ -131,13 +131,12 @@ public class FileUploadUtils
|
|||
{
|
||||
File desc = new File(uploadDir + File.separator + fileName);
|
||||
|
||||
if (!desc.getParentFile().exists())
|
||||
{
|
||||
desc.getParentFile().mkdirs();
|
||||
}
|
||||
if (!desc.exists())
|
||||
{
|
||||
desc.createNewFile();
|
||||
if (!desc.getParentFile().exists())
|
||||
{
|
||||
desc.getParentFile().mkdirs();
|
||||
}
|
||||
}
|
||||
return desc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -51,9 +50,9 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.exception.BusinessException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.reflect.ReflectUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
|
||||
/**
|
||||
* Excel相关处理
|
||||
|
|
@ -746,10 +745,7 @@ public class ExcelUtil<T>
|
|||
*/
|
||||
public static String convertDictByExp(String dictValue, String dictType, String separator) throws Exception
|
||||
{
|
||||
Object bean = SpringUtils.getBean("dictUtils");
|
||||
String methodName = "getDictLabel";
|
||||
Method method = bean.getClass().getDeclaredMethod(methodName, String.class, String.class, String.class);
|
||||
return Convert.toStr(method.invoke(bean, dictType, dictValue, separator));
|
||||
return DictUtils.getDictLabel(dictType, dictValue, separator);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -762,10 +758,7 @@ public class ExcelUtil<T>
|
|||
*/
|
||||
public static String reverseDictByExp(String dictLabel, String dictType, String separator) throws Exception
|
||||
{
|
||||
Object bean = SpringUtils.getBean("dictUtils");
|
||||
String methodName = "getDictValue";
|
||||
Method method = bean.getClass().getDeclaredMethod(methodName, String.class, String.class, String.class);
|
||||
return Convert.toStr(method.invoke(bean, dictType, dictLabel, separator));
|
||||
return DictUtils.getDictValue(dictType, dictLabel, separator);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.4.0</version>
|
||||
<version>4.5.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import org.aspectj.lang.reflect.MethodSignature;
|
|||
import org.springframework.stereotype.Component;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
|
||||
/**
|
||||
* 数据过滤处理
|
||||
|
|
|
|||
|
|
@ -15,15 +15,15 @@ import org.springframework.stereotype.Component;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.support.spring.PropertyPreFilters;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.enums.BusinessStatus;
|
||||
import com.ruoyi.common.json.JSON;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.manager.AsyncManager;
|
||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysOperLog;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
|
||||
/**
|
||||
* 操作日志记录处理
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.ruoyi.framework.config;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import javax.sql.DataSource;
|
||||
|
|
@ -21,6 +22,7 @@ import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
|
|||
import org.springframework.core.type.classreading.MetadataReader;
|
||||
import org.springframework.core.type.classreading.MetadataReaderFactory;
|
||||
import org.springframework.util.ClassUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* Mybatis支持*匹配扫描包
|
||||
|
|
@ -89,6 +91,28 @@ public class MyBatisConfig
|
|||
return typeAliasesPackage;
|
||||
}
|
||||
|
||||
public Resource[] resolveMapperLocations(String[] mapperLocations)
|
||||
{
|
||||
ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
|
||||
List<Resource> resources = new ArrayList<Resource>();
|
||||
if (mapperLocations != null)
|
||||
{
|
||||
for (String mapperLocation : mapperLocations)
|
||||
{
|
||||
try
|
||||
{
|
||||
Resource[] mappers = resourceResolver.getResources(mapperLocation);
|
||||
resources.addAll(Arrays.asList(mappers));
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
return resources.toArray(new Resource[resources.size()]);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
|
||||
{
|
||||
|
|
@ -101,7 +125,7 @@ public class MyBatisConfig
|
|||
final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
|
||||
sessionFactory.setDataSource(dataSource);
|
||||
sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
|
||||
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(mapperLocations));
|
||||
sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
|
||||
sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
|
||||
return sessionFactory.getObject();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.utils.AddressUtils;
|
||||
import com.ruoyi.common.utils.LogUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.framework.shiro.session.OnlineSession;
|
||||
import com.ruoyi.framework.util.LogUtils;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysLogininfor;
|
||||
import com.ruoyi.system.domain.SysOperLog;
|
||||
import com.ruoyi.system.domain.SysUserOnline;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.ruoyi.framework.shiro.realm;
|
|||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authc.AuthenticationException;
|
||||
import org.apache.shiro.authc.AuthenticationInfo;
|
||||
import org.apache.shiro.authc.AuthenticationToken;
|
||||
|
|
@ -14,20 +13,22 @@ import org.apache.shiro.authc.UnknownAccountException;
|
|||
import org.apache.shiro.authc.UsernamePasswordToken;
|
||||
import org.apache.shiro.authz.AuthorizationInfo;
|
||||
import org.apache.shiro.authz.SimpleAuthorizationInfo;
|
||||
import org.apache.shiro.cache.Cache;
|
||||
import org.apache.shiro.realm.AuthorizingRealm;
|
||||
import org.apache.shiro.subject.PrincipalCollection;
|
||||
import org.apache.shiro.subject.SimplePrincipalCollection;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.exception.user.CaptchaException;
|
||||
import com.ruoyi.common.exception.user.RoleBlockedException;
|
||||
import com.ruoyi.common.exception.user.UserBlockedException;
|
||||
import com.ruoyi.common.exception.user.UserNotExistsException;
|
||||
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
||||
import com.ruoyi.common.exception.user.UserPasswordRetryLimitExceedException;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.framework.shiro.service.SysLoginService;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.system.service.ISysMenuService;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
|
||||
|
|
@ -132,10 +133,26 @@ public class UserRealm extends AuthorizingRealm
|
|||
}
|
||||
|
||||
/**
|
||||
* 清理缓存权限
|
||||
* 清理指定用户授权信息缓存
|
||||
*/
|
||||
public void clearCachedAuthorizationInfo()
|
||||
public void clearCachedAuthorizationInfo(Object principal)
|
||||
{
|
||||
this.clearCachedAuthorizationInfo(SecurityUtils.getSubject().getPrincipals());
|
||||
SimplePrincipalCollection principals = new SimplePrincipalCollection(principal, getName());
|
||||
this.clearCachedAuthorizationInfo(principals);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理所有用户授权信息缓存
|
||||
*/
|
||||
public void clearAllCachedAuthorizationInfo()
|
||||
{
|
||||
Cache<Object, AuthorizationInfo> cache = getAuthorizationCache();
|
||||
if (cache != null)
|
||||
{
|
||||
for (Object key : cache.keys())
|
||||
{
|
||||
cache.remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import org.springframework.util.StringUtils;
|
|||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.constant.ShiroConstants;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.enums.UserStatus;
|
||||
import com.ruoyi.common.exception.user.CaptchaException;
|
||||
import com.ruoyi.common.exception.user.UserBlockedException;
|
||||
|
|
@ -15,10 +16,9 @@ import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
|||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.framework.manager.AsyncManager;
|
||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
||||
/**
|
||||
|
|
@ -41,7 +41,7 @@ public class SysLoginService
|
|||
public SysUser login(String username, String password)
|
||||
{
|
||||
// 验证码校验
|
||||
if (!StringUtils.isEmpty(ServletUtils.getRequest().getAttribute(ShiroConstants.CURRENT_CAPTCHA)))
|
||||
if (ShiroConstants.CAPTCHA_ERROR.equals(ServletUtils.getRequest().getAttribute(ShiroConstants.CURRENT_CAPTCHA)))
|
||||
{
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
|
||||
throw new CaptchaException();
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ import org.springframework.beans.factory.annotation.Value;
|
|||
import org.springframework.stereotype.Component;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.constant.ShiroConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
||||
import com.ruoyi.common.exception.user.UserPasswordRetryLimitExceedException;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.framework.manager.AsyncManager;
|
||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
|
||||
/**
|
||||
* 登录密码方法
|
||||
|
|
|
|||
|
|
@ -6,12 +6,13 @@ import org.springframework.util.StringUtils;
|
|||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.constant.ShiroConstants;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.framework.manager.AsyncManager;
|
||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
||||
/**
|
||||
|
|
@ -33,13 +34,13 @@ public class SysRegisterService
|
|||
*/
|
||||
public String register(SysUser user)
|
||||
{
|
||||
String msg = "", username = user.getLoginName(), password = user.getPassword();
|
||||
String msg = "", loginName = user.getLoginName(), password = user.getPassword();
|
||||
|
||||
if (!StringUtils.isEmpty(ServletUtils.getRequest().getAttribute(ShiroConstants.CURRENT_CAPTCHA)))
|
||||
{
|
||||
msg = "验证码错误";
|
||||
}
|
||||
else if (StringUtils.isEmpty(username))
|
||||
else if (StringUtils.isEmpty(loginName))
|
||||
{
|
||||
msg = "用户名不能为空";
|
||||
}
|
||||
|
|
@ -52,17 +53,19 @@ public class SysRegisterService
|
|||
{
|
||||
msg = "密码长度必须在5到20个字符之间";
|
||||
}
|
||||
else if (username.length() < UserConstants.USERNAME_MIN_LENGTH
|
||||
|| username.length() > UserConstants.USERNAME_MAX_LENGTH)
|
||||
else if (loginName.length() < UserConstants.USERNAME_MIN_LENGTH
|
||||
|| loginName.length() > UserConstants.USERNAME_MAX_LENGTH)
|
||||
{
|
||||
msg = "账户长度必须在2到20个字符之间";
|
||||
}
|
||||
else if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(username)))
|
||||
else if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(loginName)))
|
||||
{
|
||||
msg = "保存用户'" + username + "'失败,注册账号已存在";
|
||||
msg = "保存用户'" + loginName + "'失败,注册账号已存在";
|
||||
}
|
||||
else
|
||||
{
|
||||
user.setPwdUpdateDate(DateUtils.getNowDate());
|
||||
user.setUserName(loginName);
|
||||
user.setSalt(ShiroUtils.randomSalt());
|
||||
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
|
||||
boolean regFlag = userService.registerUser(user);
|
||||
|
|
@ -72,7 +75,7 @@ public class SysRegisterService
|
|||
}
|
||||
else
|
||||
{
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.register.success")));
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginName, Constants.REGISTER, MessageUtils.message("user.register.success")));
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
package com.ruoyi.framework.shiro.util;
|
||||
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.mgt.RealmSecurityManager;
|
||||
import com.ruoyi.framework.shiro.realm.UserRealm;
|
||||
|
||||
/**
|
||||
* 用户授权信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class AuthorizationUtils
|
||||
{
|
||||
/**
|
||||
* 清理所有用户授权信息缓存
|
||||
*/
|
||||
public static void clearAllCachedAuthorizationInfo()
|
||||
{
|
||||
getUserRealm().clearAllCachedAuthorizationInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取自定义Realm
|
||||
*/
|
||||
public static UserRealm getUserRealm()
|
||||
{
|
||||
RealmSecurityManager rsm = (RealmSecurityManager) SecurityUtils.getSecurityManager();
|
||||
return (UserRealm) rsm.getRealms().iterator().next();
|
||||
}
|
||||
}
|
||||
|
|
@ -7,13 +7,13 @@ import org.apache.shiro.subject.Subject;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.framework.manager.AsyncManager;
|
||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.system.service.ISysUserOnlineService;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import org.apache.shiro.web.filter.AccessControlFilter;
|
||||
import com.google.code.kaptcha.Constants;
|
||||
import com.ruoyi.common.constant.ShiroConstants;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
|
||||
/**
|
||||
* 验证码过滤器
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ import org.apache.shiro.web.util.WebUtils;
|
|||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.ruoyi.common.constant.ShiroConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
|
||||
/**
|
||||
* 登录帐号控制过滤器
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ import org.apache.shiro.web.util.WebUtils;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import com.ruoyi.common.constant.ShiroConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.enums.OnlineStatus;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.framework.shiro.session.OnlineSession;
|
||||
import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
|
||||
/**
|
||||
* 自定义访问控制
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.ruoyi.framework.web.service;
|
|||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.domain.SysDictData;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.ruoyi.system.service.ISysDictTypeService;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.4.0</version>
|
||||
<version>4.5.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: bootstrap-table-export-js" />
|
||||
<script th:src="@{/ajax/libs/highlight/highlight.min.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "tool/gen";
|
||||
var editFlag = [[${@permission.hasPermi('tool:gen:edit')}]];
|
||||
|
|
@ -142,19 +143,21 @@
|
|||
if (result.code == web_status.SUCCESS) {
|
||||
var items = [];
|
||||
$.each(result.data, function(index, value) {
|
||||
value = value.replace(/</g, "<");
|
||||
value = value.replace(/>/g, ">");
|
||||
var highCode = hljs.highlightAuto(value).value;
|
||||
var templateName = index.substring(index.lastIndexOf("/") + 1, index.length).replace(/\.vm/g, "");
|
||||
if(!$.common.equals("sql", templateName) && !$.common.equals("tree.html", templateName) && !$.common.equals("sub-domain.java", templateName)){
|
||||
items.push({
|
||||
title: templateName , content: "<pre class=\"layui-code\">" + value + "</pre>"
|
||||
title: templateName , content: "<pre class=\"layui-code\"><code>" + highCode + "</code></pre>"
|
||||
})
|
||||
}
|
||||
});
|
||||
top.layer.tab({
|
||||
area: ['90%', '90%'],
|
||||
shadeClose: true,
|
||||
tab: items
|
||||
area: ['90%', '90%'],
|
||||
shadeClose: true,
|
||||
success: function(layero, index){
|
||||
parent.loadCss(ctx + "ajax/libs/highlight/default.min.css");
|
||||
},
|
||||
tab: items
|
||||
});
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@
|
|||
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "upload")
|
||||
|
||||
$(".file-upload").fileinput({
|
||||
uploadUrl: '/common/upload',
|
||||
uploadUrl: ctx + 'common/upload',
|
||||
maxFileCount: 1,
|
||||
autoReplace: true
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
|
|
@ -243,26 +243,26 @@
|
|||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@
|
|||
$(".file-upload").each(function (i) {
|
||||
var val = $("input[name='" + this.id + "']").val()
|
||||
$(this).fileinput({
|
||||
'uploadUrl': '/common/upload',
|
||||
'uploadUrl': ctx + 'common/upload',
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: [val],
|
||||
maxFileCount: 1,
|
||||
|
|
@ -250,29 +250,29 @@
|
|||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
var content = $("input[name='" + this.id + "']").val();
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}', '${parentMenuId}', '1', '/${moduleName}/${businessName}', 'C', '0', '${permissionPrefix}:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '${functionName}菜单');
|
||||
values('${functionName}', '${parentMenuId}', '1', '/${moduleName}/${businessName}', 'C', '0', '${permissionPrefix}:view', '#', 'admin', sysdate(), '', null, '${functionName}菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}查询', @parentId, '1', '#', 'F', '0', '${permissionPrefix}:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
values('${functionName}查询', @parentId, '1', '#', 'F', '0', '${permissionPrefix}:list', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}新增', @parentId, '2', '#', 'F', '0', '${permissionPrefix}:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
values('${functionName}新增', @parentId, '2', '#', 'F', '0', '${permissionPrefix}:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}修改', @parentId, '3', '#', 'F', '0', '${permissionPrefix}:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
values('${functionName}修改', @parentId, '3', '#', 'F', '0', '${permissionPrefix}:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}删除', @parentId, '4', '#', 'F', '0', '${permissionPrefix}:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
values('${functionName}删除', @parentId, '4', '#', 'F', '0', '${permissionPrefix}:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}导出', @parentId, '5', '#', 'F', '0', '${permissionPrefix}:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
values('${functionName}导出', @parentId, '5', '#', 'F', '0', '${permissionPrefix}:export', '#', 'admin', sysdate(), '', null, '');
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.4.0</version>
|
||||
<version>4.5.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.4.0</version>
|
||||
<version>4.5.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.ruoyi.system.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.system.domain.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
|
||||
/**
|
||||
* 部门管理 数据层
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.ruoyi.system.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.system.domain.SysDictData;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
|
||||
/**
|
||||
* 字典表 数据层
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.SysDictType;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictType;
|
||||
|
||||
/**
|
||||
* 字典表 数据层
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.ruoyi.system.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.system.domain.SysMenu;
|
||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
|
||||
/**
|
||||
* 菜单表 数据层
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
|
||||
/**
|
||||
* 角色表 数据层
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
|
||||
/**
|
||||
* 用户表 数据层
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package com.ruoyi.system.service;
|
|||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.system.domain.SysDept;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
|
||||
/**
|
||||
* 部门管理 服务层
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.SysDictData;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
|
||||
/**
|
||||
* 字典 业务层
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package com.ruoyi.system.service;
|
|||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.system.domain.SysDictData;
|
||||
import com.ruoyi.system.domain.SysDictType;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictType;
|
||||
|
||||
/**
|
||||
* 字典 业务层
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.system.domain.SysMenu;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
|
||||
/**
|
||||
* 菜单 业务层
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.ruoyi.system.service;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.exception.BusinessException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.SysDept;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ package com.ruoyi.system.service.impl;
|
|||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.system.domain.SysDictData;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.ruoyi.system.mapper.SysDictDataMapper;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.ruoyi.system.utils.DictUtils;
|
||||
|
||||
/**
|
||||
* 字典 业务层处理
|
||||
|
|
|
|||
|
|
@ -8,15 +8,15 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictType;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.exception.BusinessException;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.SysDictData;
|
||||
import com.ruoyi.system.domain.SysDictType;
|
||||
import com.ruoyi.system.mapper.SysDictDataMapper;
|
||||
import com.ruoyi.system.mapper.SysDictTypeMapper;
|
||||
import com.ruoyi.system.service.ISysDictTypeService;
|
||||
import com.ruoyi.system.utils.DictUtils;
|
||||
|
||||
/**
|
||||
* 字典 业务层处理
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.SysMenu;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.system.mapper.SysMenuMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMenuMapper;
|
||||
import com.ruoyi.system.service.ISysMenuService;
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.exception.BusinessException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.system.domain.SysRoleDept;
|
||||
import com.ruoyi.system.domain.SysRoleMenu;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.exception.BusinessException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.security.Md5Utils;
|
||||
import com.ruoyi.system.domain.SysPost;
|
||||
import com.ruoyi.system.domain.SysRole;
|
||||
import com.ruoyi.system.domain.SysUser;
|
||||
import com.ruoyi.system.domain.SysUserPost;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
import com.ruoyi.system.mapper.SysPostMapper;
|
||||
|
|
|
|||
|
|
@ -5,27 +5,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<mapper namespace="com.ruoyi.system.mapper.SysUserMapper">
|
||||
|
||||
<resultMap type="SysUser" id="SysUserResult">
|
||||
<id property="userId" column="user_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="loginName" column="login_name" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="userType" column="user_type" />
|
||||
<result property="email" column="email" />
|
||||
<result property="phonenumber" column="phonenumber" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="avatar" column="avatar" />
|
||||
<result property="password" column="password" />
|
||||
<result property="salt" column="salt" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="loginIp" column="login_ip" />
|
||||
<result property="loginDate" column="login_date" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
||||
<id property="userId" column="user_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="loginName" column="login_name" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="userType" column="user_type" />
|
||||
<result property="email" column="email" />
|
||||
<result property="phonenumber" column="phonenumber" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="avatar" column="avatar" />
|
||||
<result property="password" column="password" />
|
||||
<result property="salt" column="salt" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="loginIp" column="login_ip" />
|
||||
<result property="loginDate" column="login_date" />
|
||||
<result property="pwdUpdateDate" column="pwd_update_date" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
</resultMap>
|
||||
|
||||
|
|
@ -48,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.create_time, u.remark,
|
||||
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_time, u.remark,
|
||||
d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
||||
from sys_user u
|
||||
|
|
@ -177,6 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
|
||||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||
<if test="pwdUpdateDate != null">pwd_update_date = #{pwdUpdateDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = sysdate()
|
||||
|
|
@ -198,6 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="password != null and password != ''">password,</if>
|
||||
<if test="salt != null and salt != ''">salt,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="pwdUpdateDate != null">pwd_update_date,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
|
|
@ -214,6 +217,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="password != null and password != ''">#{password},</if>
|
||||
<if test="salt != null and salt != ''">#{salt},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="pwdUpdateDate != null">#{pwdUpdateDate},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
sysdate()
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue