Merge remote-tracking branch 'upstream/master'
# Conflicts: # README.md
This commit is contained in:
commit
d979733ffe
|
|
@ -1,4 +1,5 @@
|
||||||
## 平台简介
|
## 平台简介
|
||||||
|
|
||||||
本项目FORK自 [若依/RuoYi](https://gitee.com/y_project/RuoYi)
|
本项目FORK自 [若依/RuoYi](https://gitee.com/y_project/RuoYi)
|
||||||
暂时花了几分钟时间把自己整合过的功能传上来:
|
暂时花了几分钟时间把自己整合过的功能传上来:
|
||||||
###### 多数据源切面
|
###### 多数据源切面
|
||||||
|
|
@ -32,7 +33,9 @@
|
||||||
## 在线体验
|
## 在线体验
|
||||||
> admin/admin123
|
> admin/admin123
|
||||||
|
|
||||||
地址:http://www.ruoyi.vip
|
演示地址:http://ruoyi.vip
|
||||||
|
|
||||||
|
文档地址:http://doc.ruoyi.vip
|
||||||
|
|
||||||
## 演示图
|
## 演示图
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [信息] 清理生成路径。
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
echo.
|
||||||
|
|
||||||
|
cd %~dp0
|
||||||
|
cd..
|
||||||
|
|
||||||
|
call mvn clean
|
||||||
|
|
||||||
|
cd bin
|
||||||
|
pause
|
||||||
|
|
@ -6,6 +6,7 @@ pause
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
|
cd..
|
||||||
|
|
||||||
call mvn clean package -Dmaven.test.skip=true
|
call mvn clean package -Dmaven.test.skip=true
|
||||||
|
|
||||||
|
|
@ -4,7 +4,9 @@ import java.util.List;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
@ -12,10 +14,10 @@ import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.base.AjaxResult;
|
import com.ruoyi.common.base.AjaxResult;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.ExcelUtil;
|
import com.ruoyi.common.utils.ExcelUtil;
|
||||||
|
import com.ruoyi.framework.web.base.BaseController;
|
||||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
import com.ruoyi.quartz.domain.SysJobLog;
|
import com.ruoyi.quartz.domain.SysJobLog;
|
||||||
import com.ruoyi.quartz.service.ISysJobLogService;
|
import com.ruoyi.quartz.service.ISysJobLogService;
|
||||||
import com.ruoyi.framework.web.base.BaseController;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调度日志操作处理
|
* 调度日志操作处理
|
||||||
|
|
@ -68,6 +70,14 @@ public class SysJobLogController extends BaseController
|
||||||
return toAjax(jobLogService.deleteJobLogByIds(ids));
|
return toAjax(jobLogService.deleteJobLogByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequiresPermissions("monitor:job:detail")
|
||||||
|
@GetMapping("/detail/{jobLogId}")
|
||||||
|
public String detail(@PathVariable("jobLogId") Long jobLogId, ModelMap mmap)
|
||||||
|
{
|
||||||
|
mmap.put("jobLog", jobLogService.selectJobLogById(jobLogId));
|
||||||
|
return prefix + "/detail";
|
||||||
|
}
|
||||||
|
|
||||||
@Log(title = "调度日志", businessType = BusinessType.CLEAN)
|
@Log(title = "调度日志", businessType = BusinessType.CLEAN)
|
||||||
@RequiresPermissions("monitor:job:remove")
|
@RequiresPermissions("monitor:job:remove")
|
||||||
@PostMapping("/clean")
|
@PostMapping("/clean")
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public class SysIndexController extends BaseController
|
||||||
public String index(ModelMap mmap)
|
public String index(ModelMap mmap)
|
||||||
{
|
{
|
||||||
// 取身份信息
|
// 取身份信息
|
||||||
SysUser user = getUser();
|
SysUser user = getSysUser();
|
||||||
// 根据用户id取出菜单
|
// 根据用户id取出菜单
|
||||||
List<SysMenu> menus = menuService.selectMenusByUser(user);
|
List<SysMenu> menus = menuService.selectMenusByUser(user);
|
||||||
mmap.put("menus", menus);
|
mmap.put("menus", menus);
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.base.AjaxResult;
|
import com.ruoyi.common.base.AjaxResult;
|
||||||
import com.ruoyi.common.config.Global;
|
import com.ruoyi.common.config.Global;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.framework.shiro.service.PasswordService;
|
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||||
import com.ruoyi.framework.util.FileUploadUtils;
|
import com.ruoyi.framework.util.FileUploadUtils;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
import com.ruoyi.system.domain.SysUser;
|
import com.ruoyi.system.domain.SysUser;
|
||||||
|
|
@ -42,7 +42,7 @@ public class SysProfileController extends BaseController
|
||||||
private ISysUserService userService;
|
private ISysUserService userService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PasswordService passwordService;
|
private SysPasswordService passwordService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysDictDataService dictDataService;
|
private ISysDictDataService dictDataService;
|
||||||
|
|
@ -53,7 +53,7 @@ public class SysProfileController extends BaseController
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String profile(ModelMap mmap)
|
public String profile(ModelMap mmap)
|
||||||
{
|
{
|
||||||
SysUser user = getUser();
|
SysUser user = getSysUser();
|
||||||
user.setSex(dictDataService.selectDictLabel("sys_user_sex", user.getSex()));
|
user.setSex(dictDataService.selectDictLabel("sys_user_sex", user.getSex()));
|
||||||
mmap.put("user", user);
|
mmap.put("user", user);
|
||||||
mmap.put("roleGroup", userService.selectUserRoleGroup(user.getUserId()));
|
mmap.put("roleGroup", userService.selectUserRoleGroup(user.getUserId()));
|
||||||
|
|
@ -65,7 +65,7 @@ public class SysProfileController extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public boolean checkPassword(String password)
|
public boolean checkPassword(String password)
|
||||||
{
|
{
|
||||||
SysUser user = getUser();
|
SysUser user = getSysUser();
|
||||||
String encrypt = new Md5Hash(user.getLoginName() + password + user.getSalt()).toHex().toString();
|
String encrypt = new Md5Hash(user.getLoginName() + password + user.getSalt()).toHex().toString();
|
||||||
if (user.getPassword().equals(encrypt))
|
if (user.getPassword().equals(encrypt))
|
||||||
{
|
{
|
||||||
|
|
@ -91,7 +91,7 @@ public class SysProfileController extends BaseController
|
||||||
int rows = userService.resetUserPwd(user);
|
int rows = userService.resetUserPwd(user);
|
||||||
if (rows > 0)
|
if (rows > 0)
|
||||||
{
|
{
|
||||||
setUser(userService.selectUserById(user.getUserId()));
|
setSysUser(userService.selectUserById(user.getUserId()));
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
return error();
|
return error();
|
||||||
|
|
@ -127,7 +127,7 @@ public class SysProfileController extends BaseController
|
||||||
{
|
{
|
||||||
if (userService.updateUserInfo(user) > 0)
|
if (userService.updateUserInfo(user) > 0)
|
||||||
{
|
{
|
||||||
setUser(userService.selectUserById(user.getUserId()));
|
setSysUser(userService.selectUserById(user.getUserId()));
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
return error();
|
return error();
|
||||||
|
|
@ -149,7 +149,7 @@ public class SysProfileController extends BaseController
|
||||||
user.setAvatar(avatar);
|
user.setAvatar(avatar);
|
||||||
if (userService.updateUserInfo(user) > 0)
|
if (userService.updateUserInfo(user) > 0)
|
||||||
{
|
{
|
||||||
setUser(userService.selectUserById(user.getUserId()));
|
setSysUser(userService.selectUserById(user.getUserId()));
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import com.ruoyi.common.base.AjaxResult;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.ExcelUtil;
|
import com.ruoyi.common.utils.ExcelUtil;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.framework.shiro.service.PasswordService;
|
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
import com.ruoyi.system.domain.SysUser;
|
import com.ruoyi.system.domain.SysUser;
|
||||||
|
|
@ -46,7 +46,7 @@ public class SysUserController extends BaseController
|
||||||
private ISysPostService postService;
|
private ISysPostService postService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PasswordService passwordService;
|
private SysPasswordService passwordService;
|
||||||
|
|
||||||
@RequiresPermissions("system:user:view")
|
@RequiresPermissions("system:user:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
|
|
|
||||||
|
|
@ -131,8 +131,8 @@ xss:
|
||||||
gen:
|
gen:
|
||||||
# 作者
|
# 作者
|
||||||
author: ruoyi
|
author: ruoyi
|
||||||
# 默认生成包路径 module 需改成自己的模块名称 如 system monitor tool
|
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||||
packageName: com.ruoyi.module
|
packageName: com.ruoyi.system
|
||||||
# 自动去除表前缀,默认是true
|
# 自动去除表前缀,默认是true
|
||||||
autoRemovePre: true
|
autoRemovePre: true
|
||||||
# 表前缀(类名不会包含表前缀)
|
# 表前缀(类名不会包含表前缀)
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,22 @@ $(function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// laydate time-input 时间控件绑定
|
||||||
|
if ($(".time-input").length > 0) {
|
||||||
|
layui.use('laydate', function() {
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var times = $(".time-input");
|
||||||
|
for (var i = 0; i < times.length; i++) {
|
||||||
|
var time = times[i];
|
||||||
|
laydate.render({
|
||||||
|
elem: time,
|
||||||
|
theme: 'molv',
|
||||||
|
trigger: 'click',
|
||||||
|
done: function(value, date) {}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
// tree 关键字搜索绑定
|
// tree 关键字搜索绑定
|
||||||
if ($("#keyword").length > 0) {
|
if ($("#keyword").length > 0) {
|
||||||
$("#keyword").bind("focus", function focusKey(e) {
|
$("#keyword").bind("focus", function focusKey(e) {
|
||||||
|
|
@ -91,9 +107,9 @@ $(function() {
|
||||||
var expandFlag = false;
|
var expandFlag = false;
|
||||||
$("#expandAllBtn").click(function() {
|
$("#expandAllBtn").click(function() {
|
||||||
if (expandFlag) {
|
if (expandFlag) {
|
||||||
$('#bootstrap-table').bootstrapTreeTable('expandAll');
|
$('#bootstrap-tree-table').bootstrapTreeTable('expandAll');
|
||||||
} else {
|
} else {
|
||||||
$('#bootstrap-table').bootstrapTreeTable('collapseAll');
|
$('#bootstrap-tree-table').bootstrapTreeTable('collapseAll');
|
||||||
}
|
}
|
||||||
expandFlag = expandFlag ? false: true;
|
expandFlag = expandFlag ? false: true;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,6 @@
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
$("#bootstrap-table").bootstrapTable('refresh', {
|
$("#bootstrap-table").bootstrapTable('refresh', {
|
||||||
url: $.table._option.url,
|
|
||||||
silent: true
|
silent: true
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -135,7 +134,7 @@
|
||||||
$.table._option = options;
|
$.table._option = options;
|
||||||
_striped = $.common.isEmpty(options.striped) ? false : options.striped;
|
_striped = $.common.isEmpty(options.striped) ? false : options.striped;
|
||||||
_expandColumn = $.common.isEmpty(options.expandColumn) ? '1' : options.expandColumn;
|
_expandColumn = $.common.isEmpty(options.expandColumn) ? '1' : options.expandColumn;
|
||||||
var treeTable = $('#bootstrap-table').bootstrapTreeTable({
|
var treeTable = $('#bootstrap-tree-table').bootstrapTreeTable({
|
||||||
code: options.code, // 用于设置父子关系
|
code: options.code, // 用于设置父子关系
|
||||||
parentCode: options.parentCode, // 用于设置父子关系
|
parentCode: options.parentCode, // 用于设置父子关系
|
||||||
type: 'get', // 请求方式(*)
|
type: 'get', // 请求方式(*)
|
||||||
|
|
@ -528,7 +527,7 @@
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: data,
|
data: data,
|
||||||
success: function(result) {
|
success: function(result) {
|
||||||
$.operate.saveSuccess(result);
|
$.operate.successCallback(result);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$.ajax(config)
|
$.ajax(config)
|
||||||
|
|
@ -543,7 +542,7 @@
|
||||||
}
|
}
|
||||||
$.modal.closeLoading();
|
$.modal.closeLoading();
|
||||||
},
|
},
|
||||||
// 保存结果提示msg
|
// 成功结果提示msg(父窗体全局更新)
|
||||||
saveSuccess: function (result) {
|
saveSuccess: function (result) {
|
||||||
if (result.code == web_status.SUCCESS) {
|
if (result.code == web_status.SUCCESS) {
|
||||||
$.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
|
$.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
|
||||||
|
|
@ -551,6 +550,25 @@
|
||||||
$.modal.alertError(result.msg);
|
$.modal.alertError(result.msg);
|
||||||
}
|
}
|
||||||
$.modal.closeLoading();
|
$.modal.closeLoading();
|
||||||
|
},
|
||||||
|
// 成功回调执行事件(父窗体静默更新)
|
||||||
|
successCallback: function(result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
if (window.parent.$("#bootstrap-table").length > 0) {
|
||||||
|
$.modal.close();
|
||||||
|
window.parent.$.modal.msgSuccess(result.msg);
|
||||||
|
window.parent.$.table.refresh();
|
||||||
|
} else if (window.parent.$("#bootstrap-tree-table").length > 0) {
|
||||||
|
$.modal.close();
|
||||||
|
window.parent.$.modal.msgSuccess(result.msg);
|
||||||
|
window.parent.$.treeTable.refresh();
|
||||||
|
} else {
|
||||||
|
$.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$.modal.alertError(result.msg);
|
||||||
|
}
|
||||||
|
$.modal.closeLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 校验封装处理
|
// 校验封装处理
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
|
||||||
|
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m-t" id="signupForm">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">日志序号:</label>
|
||||||
|
<div class="form-control-static" th:text="${jobLog.jobLogId}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">任务名称:</label>
|
||||||
|
<div class="form-control-static" th:text="${jobLog.jobName}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">任务组名:</label>
|
||||||
|
<div class="form-control-static" th:text="${jobLog.jobGroup}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">任务方法:</label>
|
||||||
|
<div class="form-control-static" th:text="${jobLog.methodName} + '(' + ${jobLog.methodParams} + ')'">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">日志信息:</label>
|
||||||
|
<div class="form-control-static" th:text="${jobLog.jobMessage}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">执行状态:</label>
|
||||||
|
<div class="form-control-static" th:class="${jobLog.status == '0' ? 'label label-primary' : 'label label-danger'}" th:text="${jobLog.status == '0' ? '正常' : '失败'}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group" th:style="'display:' + ${jobLog.status == '0' ? 'none' : 'block'}">
|
||||||
|
<label class="col-sm-2 control-label">异常信息:</label>
|
||||||
|
<div class="form-control-static" th:text="${jobLog.exceptionInfo}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div th:include="include :: footer"></div>
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div th:include="include :: footer"></div>
|
<div th:include="include :: footer"></div>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var removeFlag = [[${@permission.hasPermi('monitor:job:remove')}]];
|
var detailFlag = [[${@permission.hasPermi('monitor:job:detail')}]];
|
||||||
var datas = [[${@dict.getType('sys_common_status')}]];
|
var datas = [[${@dict.getType('sys_common_status')}]];
|
||||||
var prefix = ctx + "monitor/jobLog";
|
var prefix = ctx + "monitor/jobLog";
|
||||||
|
|
||||||
|
|
@ -65,6 +65,7 @@
|
||||||
var options = {
|
var options = {
|
||||||
url: prefix + "/list",
|
url: prefix + "/list",
|
||||||
cleanUrl: prefix + "/clean",
|
cleanUrl: prefix + "/clean",
|
||||||
|
detailUrl: prefix + "/detail/{id}",
|
||||||
removeUrl: prefix + "/remove",
|
removeUrl: prefix + "/remove",
|
||||||
exportUrl: prefix + "/export",
|
exportUrl: prefix + "/export",
|
||||||
sortName: "createTime",
|
sortName: "createTime",
|
||||||
|
|
@ -119,7 +120,7 @@
|
||||||
align: 'center',
|
align: 'center',
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.jobLogId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="#" onclick="$.operate.detail(\'' + row.jobLogId + '\')"><i class="fa fa-search"></i>详细</a>');
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
<table id="bootstrap-tree-table" data-mobile-responsive="true"></table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
<table id="bootstrap-tree-table" data-mobile-responsive="true"></table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
$.modal.alertError("系统错误");
|
$.modal.alertError("系统错误");
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
$.operate.saveSuccess(data);
|
$.operate.successCallback(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@
|
||||||
$.modal.alertError("系统错误");
|
$.modal.alertError("系统错误");
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
$.operate.saveSuccess(data);
|
$.operate.successCallback(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
$.modal.alertError("系统错误");
|
$.modal.alertError("系统错误");
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
$.operate.saveSuccess(data);
|
$.operate.successCallback(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@
|
||||||
$.modal.alertError("系统错误");
|
$.modal.alertError("系统错误");
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
$.operate.saveSuccess(data);
|
$.operate.successCallback(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@
|
||||||
$.modal.alertError("系统错误");
|
$.modal.alertError("系统错误");
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
$.operate.saveSuccess(data);
|
$.operate.successCallback(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,5 +19,5 @@ public @interface DataScope
|
||||||
/**
|
/**
|
||||||
* 表的别名
|
* 表的别名
|
||||||
*/
|
*/
|
||||||
String tableAlias() default "";
|
public String tableAlias() default "";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,20 +17,50 @@ public @interface Excel
|
||||||
/**
|
/**
|
||||||
* 导出到Excel中的名字.
|
* 导出到Excel中的名字.
|
||||||
*/
|
*/
|
||||||
public abstract String name();
|
public String name();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期格式, 如: yyyy-MM-dd
|
||||||
|
*/
|
||||||
|
public String dateFormat() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取内容转表达式 (如: 0=男,1=女,2=未知)
|
||||||
|
*/
|
||||||
|
public String readConverterExp() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出时在excel中每个列的高度 单位为字符
|
||||||
|
*/
|
||||||
|
public double height() default 14;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出时在excel中每个列的宽 单位为字符
|
||||||
|
*/
|
||||||
|
public double width() default 20;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文字后缀,如% 90 变成90%
|
||||||
|
*/
|
||||||
|
public String suffix() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当值为空时,字段的默认值
|
||||||
|
*/
|
||||||
|
public String defaultValue() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提示信息
|
* 提示信息
|
||||||
*/
|
*/
|
||||||
public abstract String prompt() default "";
|
public String prompt() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置只能选择不能输入的列内容.
|
* 设置只能选择不能输入的列内容.
|
||||||
*/
|
*/
|
||||||
public abstract String[] combo() default {};
|
public String[] combo() default {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
|
* 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
|
||||||
*/
|
*/
|
||||||
public abstract boolean isExport() default true;
|
public boolean isExport() default true;
|
||||||
}
|
}
|
||||||
|
|
@ -21,20 +21,20 @@ public @interface Log
|
||||||
/**
|
/**
|
||||||
* 模块
|
* 模块
|
||||||
*/
|
*/
|
||||||
String title() default "";
|
public String title() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能
|
* 功能
|
||||||
*/
|
*/
|
||||||
BusinessType businessType() default BusinessType.OTHER;
|
public BusinessType businessType() default BusinessType.OTHER;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作人类别
|
* 操作人类别
|
||||||
*/
|
*/
|
||||||
OperatorType operatorType() default OperatorType.MANAGE;
|
public OperatorType operatorType() default OperatorType.MANAGE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否保存请求的参数
|
* 是否保存请求的参数
|
||||||
*/
|
*/
|
||||||
boolean isSaveRequestData() default true;
|
public boolean isSaveRequestData() default true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -37,7 +37,6 @@ import org.slf4j.LoggerFactory;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.base.AjaxResult;
|
import com.ruoyi.common.base.AjaxResult;
|
||||||
import com.ruoyi.common.config.Global;
|
import com.ruoyi.common.config.Global;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excel相关处理
|
* Excel相关处理
|
||||||
|
|
@ -285,7 +284,8 @@ public class ExcelUtil<T>
|
||||||
cellStyle.setFont(font);
|
cellStyle.setFont(font);
|
||||||
cellStyle.setFillForegroundColor(HSSFColorPredefined.LIGHT_YELLOW.getIndex());
|
cellStyle.setFillForegroundColor(HSSFColorPredefined.LIGHT_YELLOW.getIndex());
|
||||||
// 设置列宽
|
// 设置列宽
|
||||||
sheet.setColumnWidth(i, 3766);
|
sheet.setColumnWidth(i, (int) ((attr.width() + 0.72) * 256));
|
||||||
|
row.setHeight((short) (attr.height() * 20));
|
||||||
}
|
}
|
||||||
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||||
cellStyle.setWrapText(true);
|
cellStyle.setWrapText(true);
|
||||||
|
|
@ -328,37 +328,36 @@ public class ExcelUtil<T>
|
||||||
Excel attr = field.getAnnotation(Excel.class);
|
Excel attr = field.getAnnotation(Excel.class);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// 设置行高
|
||||||
|
row.setHeight((short) (attr.height() * 20));
|
||||||
// 根据Excel中设置情况决定是否导出,有些情况需要保持为空,希望用户填写这一列.
|
// 根据Excel中设置情况决定是否导出,有些情况需要保持为空,希望用户填写这一列.
|
||||||
if (attr.isExport())
|
if (attr.isExport())
|
||||||
{
|
{
|
||||||
// 创建cell
|
// 创建cell
|
||||||
cell = row.createCell(j);
|
cell = row.createCell(j);
|
||||||
cell.setCellStyle(cs);
|
cell.setCellStyle(cs);
|
||||||
try
|
if (vo == null)
|
||||||
{
|
{
|
||||||
if (String.valueOf(field.get(vo)).length() > 10)
|
// 如果数据存在就填入,不存在填入空格.
|
||||||
{
|
cell.setCellValue("");
|
||||||
throw new Exception("长度超过10位就不用转数字了");
|
continue;
|
||||||
}
|
|
||||||
// 如果可以转成数字则导出为数字类型
|
|
||||||
BigDecimal bc = new BigDecimal(String.valueOf(field.get(vo)));
|
|
||||||
cell.setCellType(CellType.NUMERIC);
|
|
||||||
cell.setCellValue(bc.doubleValue());
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
|
||||||
|
String dateFormat = attr.dateFormat();
|
||||||
|
String readConverterExp = attr.readConverterExp();
|
||||||
|
if (StringUtils.isNotEmpty(dateFormat))
|
||||||
|
{
|
||||||
|
cell.setCellValue(DateUtils.parseDateToStr(dateFormat, (Date) field.get(vo)));
|
||||||
|
}
|
||||||
|
else if (StringUtils.isNotEmpty(readConverterExp))
|
||||||
|
{
|
||||||
|
cell.setCellValue(convertByExp(String.valueOf(field.get(vo)), readConverterExp));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
cell.setCellType(CellType.STRING);
|
cell.setCellType(CellType.STRING);
|
||||||
if (vo == null)
|
// 如果数据存在就填入,不存在填入空格.
|
||||||
{
|
cell.setCellValue(StringUtils.isNull(field.get(vo)) ? attr.defaultValue() : field.get(vo) + attr.suffix());
|
||||||
// 如果数据存在就填入,不存在填入空格.
|
|
||||||
cell.setCellValue("");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// 如果数据存在就填入,不存在填入空格.
|
|
||||||
cell.setCellValue(field.get(vo) == null ? "" : String.valueOf(field.get(vo)));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -455,6 +454,35 @@ public class ExcelUtil<T>
|
||||||
sheet.addValidationData(dataValidationList);
|
sheet.addValidationData(dataValidationList);
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析导出值 0=男,1=女,2=未知
|
||||||
|
*
|
||||||
|
* @param propertyValue 参数值
|
||||||
|
* @param converterExp 翻译注解
|
||||||
|
* @return 解析后值
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static String convertByExp(String propertyValue, String converterExp) throws Exception
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
String[] convertSource = converterExp.split(",");
|
||||||
|
for (String item : convertSource)
|
||||||
|
{
|
||||||
|
String[] itemArray = item.split("=");
|
||||||
|
if (itemArray[0].equals(propertyValue))
|
||||||
|
{
|
||||||
|
return itemArray[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
return propertyValue;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编码文件名
|
* 编码文件名
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public class DataScopeAspect
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 获取当前的用户
|
// 获取当前的用户
|
||||||
SysUser currentUser = ShiroUtils.getUser();
|
SysUser currentUser = ShiroUtils.getSysUser();
|
||||||
if (currentUser != null)
|
if (currentUser != null)
|
||||||
{
|
{
|
||||||
// 如果是超级管理员,则不过滤数据
|
// 如果是超级管理员,则不过滤数据
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ public class LogAspect
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前的用户
|
// 获取当前的用户
|
||||||
SysUser currentUser = ShiroUtils.getUser();
|
SysUser currentUser = ShiroUtils.getSysUser();
|
||||||
|
|
||||||
// *========数据库日志=========*//
|
// *========数据库日志=========*//
|
||||||
SysOperLog operLog = new SysOperLog();
|
SysOperLog operLog = new SysOperLog();
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ import com.ruoyi.system.domain.SysLogininfor;
|
||||||
import com.ruoyi.system.domain.SysOperLog;
|
import com.ruoyi.system.domain.SysOperLog;
|
||||||
import com.ruoyi.system.domain.SysUserOnline;
|
import com.ruoyi.system.domain.SysUserOnline;
|
||||||
import com.ruoyi.system.service.ISysOperLogService;
|
import com.ruoyi.system.service.ISysOperLogService;
|
||||||
|
import com.ruoyi.system.service.ISysUserOnlineService;
|
||||||
import com.ruoyi.system.service.impl.SysLogininforServiceImpl;
|
import com.ruoyi.system.service.impl.SysLogininforServiceImpl;
|
||||||
import com.ruoyi.system.service.impl.SysUserOnlineServiceImpl;
|
|
||||||
import eu.bitwalker.useragentutils.UserAgent;
|
import eu.bitwalker.useragentutils.UserAgent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -53,7 +53,7 @@ public class AsyncFactory
|
||||||
online.setBrowser(session.getBrowser());
|
online.setBrowser(session.getBrowser());
|
||||||
online.setOs(session.getOs());
|
online.setOs(session.getOs());
|
||||||
online.setStatus(session.getStatus());
|
online.setStatus(session.getStatus());
|
||||||
SpringUtils.getBean(SysUserOnlineServiceImpl.class).saveOnline(online);
|
SpringUtils.getBean(ISysUserOnlineService.class).saveOnline(online);
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import org.apache.shiro.subject.PrincipalCollection;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import com.ruoyi.framework.shiro.service.LoginService;
|
import com.ruoyi.framework.shiro.service.SysLoginService;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
import com.ruoyi.framework.web.exception.user.CaptchaException;
|
import com.ruoyi.framework.web.exception.user.CaptchaException;
|
||||||
import com.ruoyi.framework.web.exception.user.RoleBlockedException;
|
import com.ruoyi.framework.web.exception.user.RoleBlockedException;
|
||||||
|
|
@ -47,7 +47,7 @@ public class UserRealm extends AuthorizingRealm
|
||||||
private ISysRoleService roleService;
|
private ISysRoleService roleService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private LoginService loginService;
|
private SysLoginService loginService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 授权
|
* 授权
|
||||||
|
|
@ -55,7 +55,7 @@ public class UserRealm extends AuthorizingRealm
|
||||||
@Override
|
@Override
|
||||||
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection arg0)
|
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection arg0)
|
||||||
{
|
{
|
||||||
SysUser user = ShiroUtils.getUser();
|
SysUser user = ShiroUtils.getSysUser();
|
||||||
// 角色列表
|
// 角色列表
|
||||||
Set<String> roles = new HashSet<String>();
|
Set<String> roles = new HashSet<String>();
|
||||||
// 功能列表
|
// 功能列表
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,10 @@ import com.ruoyi.system.service.ISysUserService;
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class LoginService
|
public class SysLoginService
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private PasswordService passwordService;
|
private SysPasswordService passwordService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysUserService userService;
|
private ISysUserService userService;
|
||||||
|
|
@ -22,7 +22,7 @@ import com.ruoyi.system.domain.SysUser;
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class PasswordService
|
public class SysPasswordService
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private CacheManager cacheManager;
|
private CacheManager cacheManager;
|
||||||
|
|
@ -82,9 +82,4 @@ public class PasswordService
|
||||||
return new Md5Hash(username + password + salt).toHex().toString();
|
return new Md5Hash(username + password + salt).toHex().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
System.out.println(new PasswordService().encryptPassword("admin", "admin123", "111111"));
|
|
||||||
System.out.println(new PasswordService().encryptPassword("ry", "admin123", "222222"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -10,7 +10,7 @@ import com.ruoyi.common.enums.OnlineStatus;
|
||||||
import com.ruoyi.framework.manager.AsyncManager;
|
import com.ruoyi.framework.manager.AsyncManager;
|
||||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||||
import com.ruoyi.system.domain.SysUserOnline;
|
import com.ruoyi.system.domain.SysUserOnline;
|
||||||
import com.ruoyi.system.service.impl.SysUserOnlineServiceImpl;
|
import com.ruoyi.system.service.ISysUserOnlineService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 针对自定义的ShiroSession的db操作
|
* 针对自定义的ShiroSession的db操作
|
||||||
|
|
@ -31,7 +31,7 @@ public class OnlineSessionDAO extends EnterpriseCacheSessionDAO
|
||||||
private static final String LAST_SYNC_DB_TIMESTAMP = OnlineSessionDAO.class.getName() + "LAST_SYNC_DB_TIMESTAMP";
|
private static final String LAST_SYNC_DB_TIMESTAMP = OnlineSessionDAO.class.getName() + "LAST_SYNC_DB_TIMESTAMP";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysUserOnlineServiceImpl onlineService;
|
private ISysUserOnlineService onlineService;
|
||||||
|
|
||||||
public OnlineSessionDAO()
|
public OnlineSessionDAO()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public class LogoutFilter extends org.apache.shiro.web.filter.authc.LogoutFilter
|
||||||
String redirectUrl = getRedirectUrl(request, response, subject);
|
String redirectUrl = getRedirectUrl(request, response, subject);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SysUser user = ShiroUtils.getUser();
|
SysUser user = ShiroUtils.getSysUser();
|
||||||
if (StringUtils.isNotNull(user))
|
if (StringUtils.isNotNull(user))
|
||||||
{
|
{
|
||||||
String loginName = user.getLoginName();
|
String loginName = user.getLoginName();
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public class OnlineSessionFilter extends AccessControlFilter
|
||||||
boolean isGuest = onlineSession.getUserId() == null || onlineSession.getUserId() == 0L;
|
boolean isGuest = onlineSession.getUserId() == null || onlineSession.getUserId() == 0L;
|
||||||
if (isGuest == true)
|
if (isGuest == true)
|
||||||
{
|
{
|
||||||
SysUser user = ShiroUtils.getUser();
|
SysUser user = ShiroUtils.getSysUser();
|
||||||
if (user != null)
|
if (user != null)
|
||||||
{
|
{
|
||||||
onlineSession.setUserId(user.getUserId());
|
onlineSession.setUserId(user.getUserId());
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import com.ruoyi.common.constant.ShiroConstants;
|
||||||
import com.ruoyi.framework.shiro.session.OnlineSession;
|
import com.ruoyi.framework.shiro.session.OnlineSession;
|
||||||
import com.ruoyi.framework.util.SpringUtils;
|
import com.ruoyi.framework.util.SpringUtils;
|
||||||
import com.ruoyi.system.domain.SysUserOnline;
|
import com.ruoyi.system.domain.SysUserOnline;
|
||||||
import com.ruoyi.system.service.impl.SysUserOnlineServiceImpl;
|
import com.ruoyi.system.service.ISysUserOnlineService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主要是在此如果会话的属性修改了 就标识下其修改了 然后方便 OnlineSessionDao同步
|
* 主要是在此如果会话的属性修改了 就标识下其修改了 然后方便 OnlineSessionDao同步
|
||||||
|
|
@ -90,7 +90,7 @@ public class OnlineWebSessionManager extends DefaultWebSessionManager
|
||||||
|
|
||||||
int timeout = (int) this.getGlobalSessionTimeout();
|
int timeout = (int) this.getGlobalSessionTimeout();
|
||||||
Date expiredDate = DateUtils.addMilliseconds(new Date(), 0 - timeout);
|
Date expiredDate = DateUtils.addMilliseconds(new Date(), 0 - timeout);
|
||||||
SysUserOnlineServiceImpl userOnlineService = SpringUtils.getBean(SysUserOnlineServiceImpl.class);
|
ISysUserOnlineService userOnlineService = SpringUtils.getBean(ISysUserOnlineService.class);
|
||||||
List<SysUserOnline> userOnlineList = userOnlineService.selectOnlineByExpired(expiredDate);
|
List<SysUserOnline> userOnlineList = userOnlineService.selectOnlineByExpired(expiredDate);
|
||||||
// 批量过期删除
|
// 批量过期删除
|
||||||
List<String> needOfflineIdList = new ArrayList<String>();
|
List<String> needOfflineIdList = new ArrayList<String>();
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.crypto.SecureRandomNumberGenerator;
|
import org.apache.shiro.crypto.SecureRandomNumberGenerator;
|
||||||
import org.apache.shiro.mgt.RealmSecurityManager;
|
import org.apache.shiro.mgt.RealmSecurityManager;
|
||||||
import org.apache.shiro.session.Session;
|
import org.apache.shiro.session.Session;
|
||||||
|
import org.apache.shiro.subject.Subject;
|
||||||
import org.apache.shiro.subject.PrincipalCollection;
|
import org.apache.shiro.subject.PrincipalCollection;
|
||||||
import org.apache.shiro.subject.SimplePrincipalCollection;
|
import org.apache.shiro.subject.SimplePrincipalCollection;
|
||||||
import org.apache.shiro.subject.Subject;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.bean.BeanUtils;
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||||
import com.ruoyi.framework.shiro.realm.UserRealm;
|
import com.ruoyi.framework.shiro.realm.UserRealm;
|
||||||
|
|
@ -34,7 +34,7 @@ public class ShiroUtils
|
||||||
getSubjct().logout();
|
getSubjct().logout();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SysUser getUser()
|
public static SysUser getSysUser()
|
||||||
{
|
{
|
||||||
SysUser user = null;
|
SysUser user = null;
|
||||||
Object obj = getSubjct().getPrincipal();
|
Object obj = getSubjct().getPrincipal();
|
||||||
|
|
@ -46,7 +46,7 @@ public class ShiroUtils
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setUser(SysUser user)
|
public static void setSysUser(SysUser user)
|
||||||
{
|
{
|
||||||
Subject subject = getSubjct();
|
Subject subject = getSubjct();
|
||||||
PrincipalCollection principalCollection = subject.getPrincipals();
|
PrincipalCollection principalCollection = subject.getPrincipals();
|
||||||
|
|
@ -65,12 +65,12 @@ public class ShiroUtils
|
||||||
|
|
||||||
public static Long getUserId()
|
public static Long getUserId()
|
||||||
{
|
{
|
||||||
return getUser().getUserId().longValue();
|
return getSysUser().getUserId().longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getLoginName()
|
public static String getLoginName()
|
||||||
{
|
{
|
||||||
return getUser().getLoginName();
|
return getSysUser().getLoginName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getIp()
|
public static String getIp()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
package com.ruoyi.framework.web.base;
|
package com.ruoyi.framework.web.base;
|
||||||
|
|
||||||
|
import java.beans.PropertyEditorSupport;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.web.bind.WebDataBinder;
|
||||||
|
import org.springframework.web.bind.annotation.InitBinder;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.ruoyi.common.base.AjaxResult;
|
import com.ruoyi.common.base.AjaxResult;
|
||||||
|
|
@ -10,11 +15,6 @@ import com.ruoyi.framework.web.page.PageDomain;
|
||||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
import com.ruoyi.framework.web.page.TableSupport;
|
import com.ruoyi.framework.web.page.TableSupport;
|
||||||
import com.ruoyi.system.domain.SysUser;
|
import com.ruoyi.system.domain.SysUser;
|
||||||
import org.springframework.web.bind.WebDataBinder;
|
|
||||||
import org.springframework.web.bind.annotation.InitBinder;
|
|
||||||
import java.beans.PropertyEditorSupport;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web层通用数据处理
|
* web层通用数据处理
|
||||||
|
|
@ -127,23 +127,23 @@ public class BaseController
|
||||||
return StringUtils.format("redirect:{}", url);
|
return StringUtils.format("redirect:{}", url);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SysUser getUser()
|
public SysUser getSysUser()
|
||||||
{
|
{
|
||||||
return ShiroUtils.getUser();
|
return ShiroUtils.getSysUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUser(SysUser user)
|
public void setSysUser(SysUser user)
|
||||||
{
|
{
|
||||||
ShiroUtils.setUser(user);
|
ShiroUtils.setSysUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getUserId()
|
public Long getUserId()
|
||||||
{
|
{
|
||||||
return getUser().getUserId();
|
return getSysUser().getUserId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLoginName()
|
public String getLoginName()
|
||||||
{
|
{
|
||||||
return getUser().getLoginName();
|
return getSysUser().getLoginName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
package com.ruoyi.generator.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段类型配置 由数据库字段的注释解析而来
|
||||||
|
* 注释结构示例:{"title": "状态", "type": "dict", "value": "sys_common_status"} {"title": "登录时间", "type": "date"}
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
public class ColumnConfigInfo
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 属性标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性类型 dict(字典,value对应字典管理的字典类型), date(包括date)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性值,参考数据类型,可为空
|
||||||
|
*/
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
public ColumnConfigInfo()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ColumnConfigInfo(String title, String type, String value)
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
this.title = title;
|
||||||
|
this.type = type;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle()
|
||||||
|
{
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title)
|
||||||
|
{
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType()
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type)
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue()
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value)
|
||||||
|
{
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package com.ruoyi.generator.domain;
|
package com.ruoyi.generator.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.json.JSON;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ry数据库表列信息
|
* ry数据库表列信息
|
||||||
*
|
*
|
||||||
|
|
@ -15,6 +18,9 @@ public class ColumnInfo
|
||||||
|
|
||||||
/** 列描述 */
|
/** 列描述 */
|
||||||
private String columnComment;
|
private String columnComment;
|
||||||
|
|
||||||
|
/** 列配置 */
|
||||||
|
private ColumnConfigInfo configInfo;
|
||||||
|
|
||||||
/** Java属性类型 */
|
/** Java属性类型 */
|
||||||
private String attrType;
|
private String attrType;
|
||||||
|
|
@ -50,9 +56,18 @@ public class ColumnInfo
|
||||||
return columnComment;
|
return columnComment;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setColumnComment(String columnComment)
|
public void setColumnComment(String columnComment) throws Exception
|
||||||
{
|
{
|
||||||
this.columnComment = columnComment;
|
// 根据列描述解析列的配置信息
|
||||||
|
if (StringUtils.isNotEmpty(columnComment) && columnComment.startsWith("{"))
|
||||||
|
{
|
||||||
|
this.configInfo = JSON.unmarshal(columnComment, ColumnConfigInfo.class);
|
||||||
|
this.columnComment = configInfo.getTitle();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.columnComment = columnComment;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAttrName()
|
public String getAttrName()
|
||||||
|
|
@ -84,4 +99,14 @@ public class ColumnInfo
|
||||||
{
|
{
|
||||||
this.attrType = attrType;
|
this.attrType = attrType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ColumnConfigInfo getConfigInfo()
|
||||||
|
{
|
||||||
|
return configInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigInfo(ColumnConfigInfo configInfo)
|
||||||
|
{
|
||||||
|
this.configInfo = configInfo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@ import com.ruoyi.generator.domain.TableInfo;
|
||||||
public class GenUtils
|
public class GenUtils
|
||||||
{
|
{
|
||||||
/** 项目空间路径 */
|
/** 项目空间路径 */
|
||||||
private static final String PROJECT_PATH = "main/java/com/ruoyi";
|
private static final String PROJECT_PATH = getProjectPath();
|
||||||
|
|
||||||
/** mybatis空间路径 */
|
/** mybatis空间路径 */
|
||||||
private static final String MYBATIS_PATH = "main/resources/mybatis";
|
private static final String MYBATIS_PATH = "main/resources/mapper";
|
||||||
|
|
||||||
/** html空间路径 */
|
/** html空间路径 */
|
||||||
private static final String TEMPLATES_PATH = "main/resources/templates";
|
private static final String TEMPLATES_PATH = "main/resources/templates";
|
||||||
|
|
@ -69,8 +69,9 @@ public class GenUtils
|
||||||
velocityContext.put("primaryKey", table.getPrimaryKey());
|
velocityContext.put("primaryKey", table.getPrimaryKey());
|
||||||
velocityContext.put("className", table.getClassName());
|
velocityContext.put("className", table.getClassName());
|
||||||
velocityContext.put("classname", table.getClassname());
|
velocityContext.put("classname", table.getClassname());
|
||||||
velocityContext.put("moduleName", GenUtils.getModuleName(packageName));
|
velocityContext.put("moduleName", getModuleName(packageName));
|
||||||
velocityContext.put("columns", table.getColumns());
|
velocityContext.put("columns", table.getColumns());
|
||||||
|
velocityContext.put("basePackage", getBasePackage(packageName));
|
||||||
velocityContext.put("package", packageName);
|
velocityContext.put("package", packageName);
|
||||||
velocityContext.put("author", Global.getAuthor());
|
velocityContext.put("author", Global.getAuthor());
|
||||||
velocityContext.put("datetime", DateUtils.getDate());
|
velocityContext.put("datetime", DateUtils.getDate());
|
||||||
|
|
@ -123,7 +124,7 @@ public class GenUtils
|
||||||
String classname = table.getClassname();
|
String classname = table.getClassname();
|
||||||
// 大写类名
|
// 大写类名
|
||||||
String className = table.getClassName();
|
String className = table.getClassName();
|
||||||
String javaPath = PROJECT_PATH + "/" + moduleName + "/";
|
String javaPath = PROJECT_PATH;
|
||||||
String mybatisPath = MYBATIS_PATH + "/" + moduleName + "/" + className;
|
String mybatisPath = MYBATIS_PATH + "/" + moduleName + "/" + className;
|
||||||
String htmlPath = TEMPLATES_PATH + "/" + moduleName + "/" + classname;
|
String htmlPath = TEMPLATES_PATH + "/" + moduleName + "/" + classname;
|
||||||
|
|
||||||
|
|
@ -144,7 +145,7 @@ public class GenUtils
|
||||||
|
|
||||||
if (template.contains("ServiceImpl.java.vm"))
|
if (template.contains("ServiceImpl.java.vm"))
|
||||||
{
|
{
|
||||||
return javaPath + "service" + "/" + className + "ServiceImpl.java";
|
return javaPath + "service" + "/impl/" + className + "ServiceImpl.java";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (template.contains("Controller.java.vm"))
|
if (template.contains("Controller.java.vm"))
|
||||||
|
|
@ -190,6 +191,23 @@ public class GenUtils
|
||||||
return moduleName;
|
return moduleName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getBasePackage(String packageName)
|
||||||
|
{
|
||||||
|
int lastIndex = packageName.lastIndexOf(".");
|
||||||
|
String basePackage = StringUtils.substring(packageName, 0, lastIndex);
|
||||||
|
return basePackage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getProjectPath()
|
||||||
|
{
|
||||||
|
String packageName = Global.getPackageName();
|
||||||
|
StringBuffer projectPath = new StringBuffer();
|
||||||
|
projectPath.append("main/java/");
|
||||||
|
projectPath.append(packageName.replace(".", "/"));
|
||||||
|
projectPath.append("/");
|
||||||
|
return projectPath.toString();
|
||||||
|
}
|
||||||
|
|
||||||
public static String replaceKeyword(String keyword)
|
public static String replaceKeyword(String keyword)
|
||||||
{
|
{
|
||||||
String keyName = keyword.replaceAll("(?:表|信息)", "");
|
String keyName = keyword.replaceAll("(?:表|信息)", "");
|
||||||
|
|
@ -219,11 +237,4 @@ public class GenUtils
|
||||||
javaTypeMap.put("datetime", "Date");
|
javaTypeMap.put("datetime", "Date");
|
||||||
javaTypeMap.put("timestamp", "Date");
|
javaTypeMap.put("timestamp", "Date");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
System.out.println(StringUtils.convertToCamelCase("user_name"));
|
|
||||||
System.out.println(replaceKeyword("岗位信息表"));
|
|
||||||
System.out.println(getModuleName("com.ruoyi.system"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,33 @@
|
||||||
<form class="form-horizontal m" id="form-${classname}-add">
|
<form class="form-horizontal m" id="form-${classname}-add">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.columnName != $primaryKey.columnName)
|
#if($column.columnName != $primaryKey.columnName)
|
||||||
|
#if(!${column.configInfo})
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input id="${column.attrname}" name="${column.attrname}" class="form-control" type="text">
|
<input id="${column.attrname}" name="${column.attrname}" class="form-control" type="text">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
#else
|
||||||
|
#if(${column.configInfo.type} == "dict")
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="${column.attrname}" class="form-control m-b" th:with="type=${@dict.getType('${column.configInfo.value}')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif(${column.configInfo.type} == "date")
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="${column.attrname}" name="${column.attrname}" class="form-control time-input" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif(${column.configInfo.type} == "fk")
|
||||||
|
#end
|
||||||
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,33 @@
|
||||||
<input id="${primaryKey.attrname}" name="${primaryKey.attrname}" th:field="*{${primaryKey.attrname}}" type="hidden">
|
<input id="${primaryKey.attrname}" name="${primaryKey.attrname}" th:field="*{${primaryKey.attrname}}" type="hidden">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.columnName != $primaryKey.columnName)
|
#if($column.columnName != $primaryKey.columnName)
|
||||||
<div class="form-group">
|
#if(!${column.configInfo})
|
||||||
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
<div class="form-group">
|
||||||
<div class="col-sm-8">
|
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
||||||
<input id="${column.attrname}" name="${column.attrname}" th:field="*{${column.attrname}}" class="form-control" type="text">
|
<div class="col-sm-8">
|
||||||
</div>
|
<input id="${column.attrname}" name="${column.attrname}" th:field="*{${column.attrname}}" class="form-control" type="text">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
#else
|
||||||
|
#if(${column.configInfo.type} == "dict")
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="${column.attrname}" class="form-control m-b" th:with="type=${@dict.getType('${column.configInfo.value}')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{${column.attrname}}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif(${column.configInfo.type} == "date")
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="${column.attrname}" name="${column.attrname}" th:field="*{${column.attrname}}" class="form-control time-input" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif(${column.configInfo.type} == "fk")
|
||||||
|
#end
|
||||||
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -3,28 +3,78 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<head th:include="include :: header"></head>
|
<head th:include="include :: header"></head>
|
||||||
<body class="gray-bg">
|
<body class="gray-bg">
|
||||||
<div class="container-div">
|
|
||||||
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
|
<div class="container-div">
|
||||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="${moduleName}:${classname}:add">
|
<div class="row">
|
||||||
<i class="fa fa-plus"></i> 添加
|
<div class="col-sm-12 search-collapse">
|
||||||
</a>
|
<form id="formId">
|
||||||
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="${moduleName}:${classname}:edit">
|
<div class="select-list">
|
||||||
<i class="fa fa-edit"></i> 修改
|
<ul>
|
||||||
</a>
|
#foreach($column in $columns)
|
||||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="${moduleName}:${classname}:remove">
|
#if($column.columnName != $primaryKey.columnName)
|
||||||
<i class="fa fa-remove"></i> 删除
|
#if(!${column.configInfo})
|
||||||
</a>
|
<li>
|
||||||
</div>
|
${column.columnComment}:<input type="text" name="${column.attrname}"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
#else
|
||||||
|
#if(${column.configInfo.type} == "dict")
|
||||||
|
<li>
|
||||||
|
${column.columnComment}:<select name="${column.attrname}" th:with="type=${@dict.getType('${column.configInfo.value}')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
#elseif(${column.configInfo.type} == "date")
|
||||||
|
<li class="select-time">
|
||||||
|
<label>${column.columnComment}: </label>
|
||||||
|
<input type="text" class="time-input" id="start${column.attrName}" placeholder="开始" name="params[begin${column.attrName}]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="end${column.attrName}" placeholder="结束" name="params[end${column.attrName}]"/>
|
||||||
|
</li>
|
||||||
|
#elseif(${column.configInfo.type} == "fk")
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
|
||||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="${moduleName}:${classname}:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="${moduleName}:${classname}:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="${moduleName}:${classname}:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="${moduleName}:${classname}:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div th:include="include :: footer"></div>
|
<div th:include="include :: footer"></div>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var editFlag = [[${@permission.hasPermi('${moduleName}:${classname}:edit')}]];
|
var editFlag = [[${@permission.hasPermi('${moduleName}:${classname}:edit')}]];
|
||||||
var removeFlag = [[${@permission.hasPermi('${moduleName}:${classname}:remove')}]];
|
var removeFlag = [[${@permission.hasPermi('${moduleName}:${classname}:remove')}]];
|
||||||
var prefix = ctx + "${moduleName}/${classname}";
|
var prefix = ctx + "${moduleName}/${classname}";
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if(${column.configInfo} && ${column.configInfo.type} == 'dict')
|
||||||
|
var datas = [[${@dict.getType('${column.configInfo.value}')}]];
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var options = {
|
var options = {
|
||||||
|
|
@ -32,15 +82,38 @@
|
||||||
createUrl: prefix + "/add",
|
createUrl: prefix + "/add",
|
||||||
updateUrl: prefix + "/edit/{id}",
|
updateUrl: prefix + "/edit/{id}",
|
||||||
removeUrl: prefix + "/remove",
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
modalName: "${tableComment}",
|
modalName: "${tableComment}",
|
||||||
|
search: false,
|
||||||
|
showExport: true,
|
||||||
columns: [{
|
columns: [{
|
||||||
checkbox: true
|
checkbox: true
|
||||||
},
|
},
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
|
#if($column.columnName == $primaryKey.columnName)
|
||||||
{
|
{
|
||||||
field : '${column.attrname}',
|
field : '${column.attrname}',
|
||||||
title : '${column.columnComment}'
|
title : '${column.columnComment}',
|
||||||
|
visible: false
|
||||||
},
|
},
|
||||||
|
#elseif($column.columnName != $primaryKey.columnName)
|
||||||
|
#if(${column.configInfo} && ${column.configInfo.type} == 'dict')
|
||||||
|
{
|
||||||
|
field : '${column.attrname}',
|
||||||
|
title : '${column.columnComment}',
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(datas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
field : '${column.attrname}',
|
||||||
|
title : '${column.columnComment}',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
#end
|
||||||
|
#end
|
||||||
#end
|
#end
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ${package}.web.controller;
|
package ${basePackage}.web.controller.${moduleName};
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
@ -17,6 +17,7 @@ import ${package}.service.I${className}Service;
|
||||||
import com.ruoyi.framework.web.base.BaseController;
|
import com.ruoyi.framework.web.base.BaseController;
|
||||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
import com.ruoyi.common.base.AjaxResult;
|
import com.ruoyi.common.base.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.ExcelUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${tableComment} 信息操作处理
|
* ${tableComment} 信息操作处理
|
||||||
|
|
@ -53,6 +54,20 @@ public class ${className}Controller extends BaseController
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出${tableComment}列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("${moduleName}:${classname}:export")
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(${className} ${classname})
|
||||||
|
{
|
||||||
|
List<${className}> list = ${classname}Service.select${className}List(${classname});
|
||||||
|
ExcelUtil<${className}> util = new ExcelUtil<${className}>(${className}.class);
|
||||||
|
return util.exportExcel(list, "${classname}");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增${tableComment}
|
* 新增${tableComment}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ${package}.service;
|
package ${package}.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public class SysJob extends BaseEntity implements Serializable
|
||||||
private String misfirePolicy = ScheduleConstants.MISFIRE_DEFAULT;
|
private String misfirePolicy = ScheduleConstants.MISFIRE_DEFAULT;
|
||||||
|
|
||||||
/** 任务状态(0正常 1暂停) */
|
/** 任务状态(0正常 1暂停) */
|
||||||
@Excel(name = "任务状态")
|
@Excel(name = "任务状态", readConverterExp = "0=正常,1=暂停")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
public Long getJobId()
|
public Long getJobId()
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public class SysJobLog extends BaseEntity
|
||||||
private String jobMessage;
|
private String jobMessage;
|
||||||
|
|
||||||
/** 执行状态(0正常 1失败) */
|
/** 执行状态(0正常 1失败) */
|
||||||
@Excel(name = "执行状态")
|
@Excel(name = "执行状态", readConverterExp = "0=正常,1=失败")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/** 异常信息 */
|
/** 异常信息 */
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,7 @@ public class SysJobServiceImpl implements ISysJobService
|
||||||
* @param cronExpression 表达式
|
* @param cronExpression 表达式
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean checkCronExpressionIsValid(String cronExpression)
|
public boolean checkCronExpressionIsValid(String cronExpression)
|
||||||
{
|
{
|
||||||
return CronUtils.isValid(cronExpression);
|
return CronUtils.isValid(cronExpression);
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.scheduling.quartz.QuartzJobBean;
|
import org.springframework.scheduling.quartz.QuartzJobBean;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.constant.ScheduleConstants;
|
import com.ruoyi.common.constant.ScheduleConstants;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.bean.BeanUtils;
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||||
import com.ruoyi.quartz.domain.SysJob;
|
import com.ruoyi.quartz.domain.SysJob;
|
||||||
import com.ruoyi.quartz.domain.SysJobLog;
|
import com.ruoyi.quartz.domain.SysJobLog;
|
||||||
|
|
@ -67,7 +68,7 @@ public class ScheduleJob extends QuartzJobBean
|
||||||
jobLog.setJobMessage(job.getJobName() + " 总共耗时:" + times + "毫秒");
|
jobLog.setJobMessage(job.getJobName() + " 总共耗时:" + times + "毫秒");
|
||||||
// 任务状态 0:成功 1:失败
|
// 任务状态 0:成功 1:失败
|
||||||
jobLog.setStatus(Constants.FAIL);
|
jobLog.setStatus(Constants.FAIL);
|
||||||
jobLog.setExceptionInfo(e.toString());
|
jobLog.setExceptionInfo(StringUtils.substring(e.getMessage(), 0, 2000));
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public class SysConfig extends BaseEntity
|
||||||
private String configValue;
|
private String configValue;
|
||||||
|
|
||||||
/** 系统内置(Y是 N否) */
|
/** 系统内置(Y是 N否) */
|
||||||
@Excel(name = "系统内置")
|
@Excel(name = "系统内置", readConverterExp = "Y=是,N=否")
|
||||||
private String configType;
|
private String configType;
|
||||||
|
|
||||||
public Long getConfigId()
|
public Long getConfigId()
|
||||||
|
|
|
||||||
|
|
@ -42,11 +42,11 @@ public class SysDictData extends BaseEntity
|
||||||
private String listClass;
|
private String listClass;
|
||||||
|
|
||||||
/** 是否默认(Y是 N否) */
|
/** 是否默认(Y是 N否) */
|
||||||
@Excel(name = "是否默认")
|
@Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
|
||||||
private String isDefault;
|
private String isDefault;
|
||||||
|
|
||||||
/** 状态(0正常 1停用) */
|
/** 状态(0正常 1停用) */
|
||||||
@Excel(name = "状态")
|
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
public Long getDictCode()
|
public Long getDictCode()
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public class SysDictType extends BaseEntity
|
||||||
private String dictType;
|
private String dictType;
|
||||||
|
|
||||||
/** 状态(0正常 1停用) */
|
/** 状态(0正常 1停用) */
|
||||||
@Excel(name = "状态")
|
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
public Long getDictId()
|
public Long getDictId()
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ public class SysLogininfor extends BaseEntity
|
||||||
private String loginName;
|
private String loginName;
|
||||||
|
|
||||||
/** 登录状态 0成功 1失败 */
|
/** 登录状态 0成功 1失败 */
|
||||||
@Excel(name = "登录状态")
|
@Excel(name = "登录状态", readConverterExp = "0=成功,1=失败")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/** 登录IP地址 */
|
/** 登录IP地址 */
|
||||||
|
|
@ -48,7 +48,7 @@ public class SysLogininfor extends BaseEntity
|
||||||
private String msg;
|
private String msg;
|
||||||
|
|
||||||
/** 访问时间 */
|
/** 访问时间 */
|
||||||
@Excel(name = "访问时间")
|
@Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date loginTime;
|
private Date loginTime;
|
||||||
|
|
||||||
public Long getInfoId()
|
public Long getInfoId()
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ public class SysOperLog extends BaseEntity
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
/** 业务类型(0其它 1新增 2修改 3删除) */
|
/** 业务类型(0其它 1新增 2修改 3删除) */
|
||||||
@Excel(name = "业务类型")
|
@Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据")
|
||||||
private Integer businessType;
|
private Integer businessType;
|
||||||
|
|
||||||
/** 请求方法 */
|
/** 请求方法 */
|
||||||
|
|
@ -32,7 +32,7 @@ public class SysOperLog extends BaseEntity
|
||||||
private String method;
|
private String method;
|
||||||
|
|
||||||
/** 操作类别(0其它 1后台用户 2手机端用户) */
|
/** 操作类别(0其它 1后台用户 2手机端用户) */
|
||||||
@Excel(name = "操作类别")
|
@Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户")
|
||||||
private Integer operatorType;
|
private Integer operatorType;
|
||||||
|
|
||||||
/** 操作人员 */
|
/** 操作人员 */
|
||||||
|
|
@ -60,7 +60,7 @@ public class SysOperLog extends BaseEntity
|
||||||
private String operParam;
|
private String operParam;
|
||||||
|
|
||||||
/** 操作状态(0正常 1异常) */
|
/** 操作状态(0正常 1异常) */
|
||||||
@Excel(name = "状态")
|
@Excel(name = "状态", readConverterExp = "0=正常,1=异常")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
/** 错误消息 */
|
/** 错误消息 */
|
||||||
|
|
@ -68,7 +68,7 @@ public class SysOperLog extends BaseEntity
|
||||||
private String errorMsg;
|
private String errorMsg;
|
||||||
|
|
||||||
/** 操作时间 */
|
/** 操作时间 */
|
||||||
@Excel(name = "操作时间")
|
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date operTime;
|
private Date operTime;
|
||||||
|
|
||||||
public Long getOperId()
|
public Long getOperId()
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public class SysPost extends BaseEntity
|
||||||
private String postSort;
|
private String postSort;
|
||||||
|
|
||||||
/** 状态(0正常 1停用) */
|
/** 状态(0正常 1停用) */
|
||||||
@Excel(name = "状态")
|
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/** 用户是否存在此岗位标识 默认不存在 */
|
/** 用户是否存在此岗位标识 默认不存在 */
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,11 @@ public class SysRole extends BaseEntity
|
||||||
private String roleSort;
|
private String roleSort;
|
||||||
|
|
||||||
/** 数据范围(1:所有数据权限;2:自定数据权限) */
|
/** 数据范围(1:所有数据权限;2:自定数据权限) */
|
||||||
@Excel(name = "数据范围")
|
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限")
|
||||||
private String dataScope;
|
private String dataScope;
|
||||||
|
|
||||||
/** 角色状态(0正常 1停用) */
|
/** 角色状态(0正常 1停用) */
|
||||||
@Excel(name = "角色状态")
|
@Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/** 删除标志(0代表存在 2代表删除) */
|
/** 删除标志(0代表存在 2代表删除) */
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public class SysUser extends BaseEntity
|
||||||
private String phonenumber;
|
private String phonenumber;
|
||||||
|
|
||||||
/** 用户性别 */
|
/** 用户性别 */
|
||||||
@Excel(name = "用户性别")
|
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
|
||||||
private String sex;
|
private String sex;
|
||||||
|
|
||||||
/** 用户头像 */
|
/** 用户头像 */
|
||||||
|
|
@ -56,7 +56,7 @@ public class SysUser extends BaseEntity
|
||||||
private String salt;
|
private String salt;
|
||||||
|
|
||||||
/** 帐号状态(0正常 1停用) */
|
/** 帐号状态(0正常 1停用) */
|
||||||
@Excel(name = "帐号状态")
|
@Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/** 删除标志(0代表存在 2代表删除) */
|
/** 删除标志(0代表存在 2代表删除) */
|
||||||
|
|
@ -67,7 +67,7 @@ public class SysUser extends BaseEntity
|
||||||
private String loginIp;
|
private String loginIp;
|
||||||
|
|
||||||
/** 最后登陆时间 */
|
/** 最后登陆时间 */
|
||||||
@Excel(name = "最后登陆时间")
|
@Excel(name = "最后登陆时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date loginDate;
|
private Date loginDate;
|
||||||
|
|
||||||
/** 部门对象 */
|
/** 部门对象 */
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,20 @@ package com.ruoyi.system.service.impl;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.system.domain.SysUserOnline;
|
import com.ruoyi.system.domain.SysUserOnline;
|
||||||
import com.ruoyi.system.mapper.SysUserOnlineMapper;
|
import com.ruoyi.system.mapper.SysUserOnlineMapper;
|
||||||
|
import com.ruoyi.system.service.ISysUserOnlineService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在线用户 服务层处理
|
* 在线用户 服务层处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@Component
|
@Service
|
||||||
public class SysUserOnlineServiceImpl
|
public class SysUserOnlineServiceImpl implements ISysUserOnlineService
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysUserOnlineMapper userOnlineDao;
|
private SysUserOnlineMapper userOnlineDao;
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ create table sys_user (
|
||||||
salt varchar(20) default '' comment '盐加密',
|
salt varchar(20) default '' comment '盐加密',
|
||||||
status char(1) default '0' comment '帐号状态(0正常 1停用)',
|
status char(1) default '0' comment '帐号状态(0正常 1停用)',
|
||||||
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
|
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
|
||||||
login_ip varchar(20) default '' comment '最后登陆IP',
|
login_ip varchar(50) default '' comment '最后登陆IP',
|
||||||
login_date datetime comment '最后登陆时间',
|
login_date datetime comment '最后登陆时间',
|
||||||
create_by varchar(64) default '' comment '创建者',
|
create_by varchar(64) default '' comment '创建者',
|
||||||
create_time datetime comment '创建时间',
|
create_time datetime comment '创建时间',
|
||||||
|
|
@ -178,13 +178,13 @@ insert into sys_menu values('1001', '用户新增', '100', '2', '#', 'F', '0',
|
||||||
insert into sys_menu values('1002', '用户修改', '100', '3', '#', 'F', '0', 'system:user:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1002', '用户修改', '100', '3', '#', 'F', '0', 'system:user:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1003', '用户删除', '100', '4', '#', 'F', '0', 'system:user:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1003', '用户删除', '100', '4', '#', 'F', '0', 'system:user:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1004', '用户导出', '100', '5', '#', 'F', '0', 'system:user:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1004', '用户导出', '100', '5', '#', 'F', '0', 'system:user:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1005', '重置密码', '100', '5', '#', 'F', '0', 'system:user:resetPwd', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1005', '重置密码', '100', '6', '#', 'F', '0', 'system:user:resetPwd', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
-- 角色管理按钮
|
-- 角色管理按钮
|
||||||
insert into sys_menu values('1006', '角色查询', '101', '1', '#', 'F', '0', 'system:role:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1006', '角色查询', '101', '1', '#', 'F', '0', 'system:role:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1007', '角色新增', '101', '2', '#', 'F', '0', 'system:role:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1007', '角色新增', '101', '2', '#', 'F', '0', 'system:role:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1008', '角色修改', '101', '3', '#', 'F', '0', 'system:role:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1008', '角色修改', '101', '3', '#', 'F', '0', 'system:role:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1009', '角色删除', '101', '4', '#', 'F', '0', 'system:role:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1009', '角色删除', '101', '4', '#', 'F', '0', 'system:role:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1010', '角色导出', '101', '4', '#', 'F', '0', 'system:role:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1010', '角色导出', '101', '5', '#', 'F', '0', 'system:role:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
-- 菜单管理按钮
|
-- 菜单管理按钮
|
||||||
insert into sys_menu values('1011', '菜单查询', '102', '1', '#', 'F', '0', 'system:menu:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1011', '菜单查询', '102', '1', '#', 'F', '0', 'system:menu:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1012', '菜单新增', '102', '2', '#', 'F', '0', 'system:menu:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1012', '菜单新增', '102', '2', '#', 'F', '0', 'system:menu:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
|
@ -200,19 +200,19 @@ insert into sys_menu values('1019', '岗位查询', '104', '1', '#', 'F', '0',
|
||||||
insert into sys_menu values('1020', '岗位新增', '104', '2', '#', 'F', '0', 'system:post:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1020', '岗位新增', '104', '2', '#', 'F', '0', 'system:post:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1021', '岗位修改', '104', '3', '#', 'F', '0', 'system:post:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1021', '岗位修改', '104', '3', '#', 'F', '0', 'system:post:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1022', '岗位删除', '104', '4', '#', 'F', '0', 'system:post:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1022', '岗位删除', '104', '4', '#', 'F', '0', 'system:post:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1023', '岗位导出', '104', '4', '#', 'F', '0', 'system:post:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1023', '岗位导出', '104', '5', '#', 'F', '0', 'system:post:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
-- 字典管理按钮
|
-- 字典管理按钮
|
||||||
insert into sys_menu values('1024', '字典查询', '105', '1', '#', 'F', '0', 'system:dict:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1024', '字典查询', '105', '1', '#', 'F', '0', 'system:dict:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1025', '字典新增', '105', '2', '#', 'F', '0', 'system:dict:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1025', '字典新增', '105', '2', '#', 'F', '0', 'system:dict:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1026', '字典修改', '105', '3', '#', 'F', '0', 'system:dict:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1026', '字典修改', '105', '3', '#', 'F', '0', 'system:dict:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1027', '字典删除', '105', '4', '#', 'F', '0', 'system:dict:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1027', '字典删除', '105', '4', '#', 'F', '0', 'system:dict:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1028', '字典导出', '105', '4', '#', 'F', '0', 'system:dict:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1028', '字典导出', '105', '5', '#', 'F', '0', 'system:dict:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
-- 参数设置按钮
|
-- 参数设置按钮
|
||||||
insert into sys_menu values('1029', '参数查询', '106', '1', '#', 'F', '0', 'system:config:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1029', '参数查询', '106', '1', '#', 'F', '0', 'system:config:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1030', '参数新增', '106', '2', '#', 'F', '0', 'system:config:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1030', '参数新增', '106', '2', '#', 'F', '0', 'system:config:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1031', '参数修改', '106', '3', '#', 'F', '0', 'system:config:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1031', '参数修改', '106', '3', '#', 'F', '0', 'system:config:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1032', '参数删除', '106', '4', '#', 'F', '0', 'system:config:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1032', '参数删除', '106', '4', '#', 'F', '0', 'system:config:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1033', '参数导出', '106', '4', '#', 'F', '0', 'system:config:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1033', '参数导出', '106', '5', '#', 'F', '0', 'system:config:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
-- 通知公告按钮
|
-- 通知公告按钮
|
||||||
insert into sys_menu values('1034', '公告查询', '107', '1', '#', 'F', '0', 'system:notice:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1034', '公告查询', '107', '1', '#', 'F', '0', 'system:notice:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1035', '公告新增', '107', '2', '#', 'F', '0', 'system:notice:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1035', '公告新增', '107', '2', '#', 'F', '0', 'system:notice:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
|
@ -222,11 +222,11 @@ insert into sys_menu values('1037', '公告删除', '107', '4', '#', 'F', '0',
|
||||||
insert into sys_menu values('1038', '操作查询', '500', '1', '#', 'F', '0', 'monitor:operlog:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1038', '操作查询', '500', '1', '#', 'F', '0', 'monitor:operlog:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1039', '操作删除', '500', '2', '#', 'F', '0', 'monitor:operlog:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1039', '操作删除', '500', '2', '#', 'F', '0', 'monitor:operlog:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1040', '详细信息', '500', '3', '#', 'F', '0', 'monitor:operlog:detail', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1040', '详细信息', '500', '3', '#', 'F', '0', 'monitor:operlog:detail', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1041', '日志导出', '500', '3', '#', 'F', '0', 'monitor:operlog:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1041', '日志导出', '500', '4', '#', 'F', '0', 'monitor:operlog:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
-- 登录日志按钮
|
-- 登录日志按钮
|
||||||
insert into sys_menu values('1042', '登录查询', '501', '1', '#', 'F', '0', 'monitor:logininfor:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1042', '登录查询', '501', '1', '#', 'F', '0', 'monitor:logininfor:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1043', '登录删除', '501', '2', '#', 'F', '0', 'monitor:logininfor:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1043', '登录删除', '501', '2', '#', 'F', '0', 'monitor:logininfor:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1044', '日志导出', '501', '2', '#', 'F', '0', 'monitor:logininfor:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1044', '日志导出', '501', '3', '#', 'F', '0', 'monitor:logininfor:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
-- 在线用户按钮
|
-- 在线用户按钮
|
||||||
insert into sys_menu values('1045', '在线查询', '109', '1', '#', 'F', '0', 'monitor:online:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1045', '在线查询', '109', '1', '#', 'F', '0', 'monitor:online:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1046', '批量强退', '109', '2', '#', 'F', '0', 'monitor:online:batchForceLogout', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1046', '批量强退', '109', '2', '#', 'F', '0', 'monitor:online:batchForceLogout', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
|
@ -237,10 +237,11 @@ insert into sys_menu values('1049', '任务新增', '110', '2', '#', 'F', '0',
|
||||||
insert into sys_menu values('1050', '任务修改', '110', '3', '#', 'F', '0', 'monitor:job:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1050', '任务修改', '110', '3', '#', 'F', '0', 'monitor:job:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1051', '任务删除', '110', '4', '#', 'F', '0', 'monitor:job:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1051', '任务删除', '110', '4', '#', 'F', '0', 'monitor:job:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1052', '状态修改', '110', '5', '#', 'F', '0', 'monitor:job:changeStatus', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1052', '状态修改', '110', '5', '#', 'F', '0', 'monitor:job:changeStatus', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1053', '任务导出', '110', '5', '#', 'F', '0', 'monitor:job:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1053', '任务详细', '110', '6', '#', 'F', '0', 'monitor:job:detail', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1054', '任务导出', '110', '7', '#', 'F', '0', 'monitor:job:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
-- 代码生成按钮
|
-- 代码生成按钮
|
||||||
insert into sys_menu values('1054', '生成查询', '113', '1', '#', 'F', '0', 'tool:gen:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1055', '生成查询', '113', '1', '#', 'F', '0', 'tool:gen:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
insert into sys_menu values('1055', '生成代码', '113', '2', '#', 'F', '0', 'tool:gen:code', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
insert into sys_menu values('1056', '生成代码', '113', '2', '#', 'F', '0', 'tool:gen:code', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
@ -349,7 +350,7 @@ insert into sys_role_menu values ('2', '1052');
|
||||||
insert into sys_role_menu values ('2', '1053');
|
insert into sys_role_menu values ('2', '1053');
|
||||||
insert into sys_role_menu values ('2', '1054');
|
insert into sys_role_menu values ('2', '1054');
|
||||||
insert into sys_role_menu values ('2', '1055');
|
insert into sys_role_menu values ('2', '1055');
|
||||||
|
insert into sys_role_menu values ('2', '1056');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 8、角色和部门关联表 角色1-N部门
|
-- 8、角色和部门关联表 角色1-N部门
|
||||||
|
|
@ -399,7 +400,7 @@ create table sys_oper_log (
|
||||||
oper_name varchar(50) default '' comment '操作人员',
|
oper_name varchar(50) default '' comment '操作人员',
|
||||||
dept_name varchar(50) default '' comment '部门名称',
|
dept_name varchar(50) default '' comment '部门名称',
|
||||||
oper_url varchar(255) default '' comment '请求URL',
|
oper_url varchar(255) default '' comment '请求URL',
|
||||||
oper_ip varchar(30) default '' comment '主机地址',
|
oper_ip varchar(50) default '' comment '主机地址',
|
||||||
oper_location varchar(255) default '' comment '操作地点',
|
oper_location varchar(255) default '' comment '操作地点',
|
||||||
oper_param varchar(255) default '' comment '请求参数',
|
oper_param varchar(255) default '' comment '请求参数',
|
||||||
status int(1) default 0 comment '操作状态(0正常 1异常)',
|
status int(1) default 0 comment '操作状态(0正常 1异常)',
|
||||||
|
|
@ -588,7 +589,7 @@ create table sys_job_log (
|
||||||
method_params varchar(200) default '' comment '方法参数',
|
method_params varchar(200) default '' comment '方法参数',
|
||||||
job_message varchar(500) comment '日志信息',
|
job_message varchar(500) comment '日志信息',
|
||||||
status char(1) default '0' comment '执行状态(0正常 1失败)',
|
status char(1) default '0' comment '执行状态(0正常 1失败)',
|
||||||
exception_info text comment '异常信息',
|
exception_info varchar(2000) default '' comment '异常信息',
|
||||||
create_time datetime comment '创建时间',
|
create_time datetime comment '创建时间',
|
||||||
primary key (job_log_id)
|
primary key (job_log_id)
|
||||||
) engine=innodb default charset=utf8 comment = '定时任务调度日志表';
|
) engine=innodb default charset=utf8 comment = '定时任务调度日志表';
|
||||||
Loading…
Reference in New Issue