调整部分包路径

This commit is contained in:
RuoYi
2019-03-08 14:44:38 +08:00
parent 1b193bcc65
commit 9531875401
78 changed files with 809 additions and 701 deletions

View File

@ -6,7 +6,7 @@ ruoyi:
version: 3.2.0
# 版权年份
copyrightYear: 2019
# 文件上传路径
# 文件上传
profile: D:/profile/
# 获取ip地址开关
addressEnabled: true
@ -121,14 +121,3 @@ xss:
excludes: /system/notice/*
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
# 代码生成
gen:
# 作者
author: ruoyi
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.ruoyi.system
# 自动去除表前缀默认是true
autoRemovePre: true
# 表前缀(类名不会包含表前缀)
tablePrefix: sys_

View File

@ -1,100 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<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" id="form-job-add">
<div class="form-group">
<label class="col-sm-3 control-label">任务名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="jobName" id="jobName" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务组名:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="jobGroup" id="jobGroup" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">方法名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="methodName" id="methodName" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">方法参数:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="methodParams" id="methodParams">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">cron表达式</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="cronExpression" id="cronExpression" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">执行策略:</label>
<div class="col-sm-8">
<label class="radio-box"> <input type="radio" name="misfirePolicy" value="1" th:checked="true"/> 立即执行 </label>
<label class="radio-box"> <input type="radio" name="misfirePolicy" value="2" /> 执行一次 </label>
<label class="radio-box"> <input type="radio" name="misfirePolicy" value="3" /> 放弃执行 </label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_job_status')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.isDefault == 'Y' ? true : false}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea id="remark" name="remark" class="form-control"></textarea>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "monitor/job";
$("#form-job-add").validate({
rules:{
cronExpression:{
remote: {
url: prefix + "/checkCronExpressionIsValid",
type: "post",
dataType: "json",
data: {
"cronExpression": function() {
return $.common.trim($("#cronExpression").val());
}
},
dataFilter: function(data, type) {
return data;
}
}
},
},
messages: {
"cronExpression": {
remote: "表达式不正确"
}
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-job-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -1,94 +0,0 @@
<!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="jobLogForm" th:if="${name == 'jobLog'}">
<div class="form-group">
<label class="col-sm-3 control-label">日志序号:</label>
<div class="form-control-static" th:text="${jobLog.jobLogId}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务名称:</label>
<div class="form-control-static" th:text="${jobLog.jobName}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务组名:</label>
<div class="form-control-static" th:text="${jobLog.jobGroup}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务方法:</label>
<div class="form-control-static" th:text="${jobLog.methodName} + '(' + ${#strings.defaultString(jobLog.methodParams,'')} + ')'">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">日志信息:</label>
<div class="form-control-static" th:text="${jobLog.jobMessage}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 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-3 control-label">异常信息:</label>
<div class="form-control-static" th:text="${jobLog.exceptionInfo}">
</div>
</div>
</form>
<form class="form-horizontal m-t" id="jobForm" th:if="${name == 'job'}">
<div class="form-group">
<label class="col-sm-3 control-label">任务序号:</label>
<div class="form-control-static" th:text="${job.jobId}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务名称:</label>
<div class="form-control-static" th:text="${job.jobName}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务组名:</label>
<div class="form-control-static" th:text="${job.jobGroup}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务方法:</label>
<div class="form-control-static" th:text="${job.methodName} + '(' + ${#strings.defaultString(job.methodParams,'')} + ')'">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">执行表达式:</label>
<div class="form-control-static" th:text="${job.cronExpression}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">下次执行时间:</label>
<div class="form-control-static" th:text="${#dates.format(job.nextValidTime, 'yyyy-MM-dd HH:mm:ss')}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">执行策略:</label>
<div class="form-control-static" th:if="${job.misfirePolicy == '0'}">默认策略</div>
<div class="form-control-static" th:if="${job.misfirePolicy == '1'}">立即执行</div>
<div class="form-control-static" th:if="${job.misfirePolicy == '2'}">执行一次</div>
<div class="form-control-static" th:if="${job.misfirePolicy == '3'}">放弃执行</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">执行状态:</label>
<div class="form-control-static" th:class="${job.status == '0' ? 'label label-primary' : 'label label-danger'}" th:text="${job.status == '0' ? '正常' : '暂停'}">
</div>
</div>
</form>
</div>
</body>
</html>

View File

@ -1,111 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<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" id="form-job-edit" th:object="${job}">
<input id="jobId" name="jobId" type="hidden" th:field="*{jobId}"/>
<div class="form-group">
<label class="col-sm-3 control-label">任务名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="jobName" id="jobName" th:field="*{jobName}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务组名:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="jobGroup" id="jobGroup" th:field="*{jobGroup}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">方法名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="methodName" id="methodName" th:field="*{methodName}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">方法参数:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="methodParams" id="methodParams" th:field="*{methodParams}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">cron表达式</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="cronExpression" id="cronExpression" th:field="*{cronExpression}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">执行策略:</label>
<div class="col-sm-8">
<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="1" /> 立即执行 </label>
<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="2" /> 执行一次 </label>
<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="3" /> 放弃执行 </label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_job_status')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "monitor/job";
$("#form-job-edit").validate({
rules:{
jobName:{
required:true,
},
jobGroup:{
required:true,
},
methodName:{
required:true,
},
cronExpression:{
required:true,
remote: {
url: prefix + "/checkCronExpressionIsValid",
type: "post",
dataType: "json",
data: {
"cronExpression": function() {
return $.common.trim($("#cronExpression").val());
}
},
dataFilter: function(data, type) {
return data;
}
}
},
},
messages: {
"cronExpression": {
remote: "表达式不正确"
}
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-job-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -1,171 +0,0 @@
<!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="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="job-form">
<div class="select-list">
<ul>
<li>
任务名称:<input type="text" name="jobName"/>
</li>
<li>
方法名称:<input type="text" name="methodName"/>
</li>
<li>
任务状态:<select name="status" th:with="type=${@dict.getType('sys_job_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="monitor:job:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:job:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-info" onclick="javascript:jobLog()" shiro:hasPermission="monitor:job:list">
<i class="fa fa-list"></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 th:include="include :: footer"></div>
<script th:inline="javascript">
var detailFlag = [[${@permission.hasPermi('monitor:job:detail')}]];
var editFlag = [[${@permission.hasPermi('monitor:job:edit')}]];
var removeFlag = [[${@permission.hasPermi('monitor:job:remove')}]];
var statusFlag = [[${@permission.hasPermi('monitor:job:changeStatus')}]];
var datas = [[${@dict.getType('sys_job_status')}]];
var prefix = ctx + "monitor/job";
$(function() {
var options = {
url: prefix + "/list",
detailUrl: prefix + "/detail/{id}",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
sortName: "createTime",
sortOrder: "desc",
modalName: "任务",
columns: [{
checkbox: true
},
{
field: 'jobId',
title: '任务编号'
},
{
field: 'jobName',
title: '任务名称',
sortable: true
},
{
field: 'jobGroup',
title: '任务组名',
sortable: true
},
{
field: 'methodName',
title: '方法名称'
},
{
field: 'methodParams',
title: '方法参数'
},
{
field: 'cronExpression',
title: '执行表达式'
},
{
visible: statusFlag == 'hidden' ? false : true,
title: '任务状态',
align: 'center',
formatter: function (value, row, index) {
return statusTools(row);
}
},
{
field: 'createTime',
title: '创建时间',
sortable: true
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-primary btn-xs ' + statusFlag + '" href="#" onclick="run(\'' + row.jobId + '\')"><i class="fa fa-play-circle-o"></i> 执行</a> ');
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="#" onclick="$.operate.detail(\'' + row.jobId + '\')"><i class="fa fa-search"></i>详细</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
/* 调度任务状态显示 */
function statusTools(row) {
if (row.status == 1) {
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="start(\'' + row.jobId + '\')"></i> ';
} else {
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="stop(\'' + row.jobId + '\')"></i> ';
}
}
/* 立即执行一次 */
function run(jobId) {
$.modal.confirm("确认要立即执行任务吗?", function() {
$.operate.post(prefix + "/run", { "jobId": jobId});
})
}
/* 调度任务-停用 */
function stop(jobId) {
$.modal.confirm("确认要停用任务吗?", function() {
$.operate.post(prefix + "/changeStatus", { "jobId": jobId, "status": 1 });
})
}
/* 调度任务-启用 */
function start(jobId) {
$.modal.confirm("确认要启用任务吗?", function() {
$.operate.post(prefix + "/changeStatus", { "jobId": jobId, "status": 0 });
})
}
/* 调度日志查询 */
function jobLog(id) {
var url = ctx + 'monitor/jobLog';
createMenuItem(url, "调度日志");
}
</script>
</body>
</html>

View File

@ -1,130 +0,0 @@
<!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="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="jobLog-form">
<div class="select-list">
<ul>
<li>
<label>任务名称:</label><input type="text" name="jobName"/>
</li>
<li>
<label>方法名称:</label><input type="text" name="methodName"/>
</li>
<li>
<label>执行状态:</label><select name="status" th:with="type=${@dict.getType('sys_common_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li class="select-time">
<label>执行时间: </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:job:remove">
<i class="fa fa-trash"></i> 清空
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job: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 th:include="include :: footer"></div>
<script th:inline="javascript">
var detailFlag = [[${@permission.hasPermi('monitor:job:detail')}]];
var datas = [[${@dict.getType('sys_common_status')}]];
var prefix = ctx + "monitor/jobLog";
$(function() {
var options = {
url: prefix + "/list",
cleanUrl: prefix + "/clean",
detailUrl: prefix + "/detail/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
sortName: "createTime",
sortOrder: "desc",
modalName: "调度日志",
columns: [{
checkbox: true
},
{
field: 'jobLogId',
title: '日志编号'
},
{
field: 'jobName',
title: '任务名称',
sortable: true
},
{
field: 'jobGroup',
title: '任务组名',
sortable: true
},
{
field: 'methodName',
title: '方法名称'
},
{
field: 'methodParams',
title: '方法参数'
},
{
field: 'jobMessage',
title: '日志信息'
},
{
field: 'status',
title: '状态',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
field: 'createTime',
title: '创建时间',
sortable: true
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
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('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -1,123 +0,0 @@
<!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="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="gen-form">
<div class="select-list">
<ul>
<li>
表名称:<input type="text" name="tableName"/>
</li>
<li>
表描述:<input type="text" name="tableComment"/>
</li>
<li class="select-time">
<label>表时间: </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="javascript:batchGenCode()" shiro:hasPermission="tool:gen:code">
<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 th:include="include :: footer"></div>
<script type="text/javascript">
var prefix = ctx + "tool/gen";
$(function() {
var options = {
url: prefix + "/list",
sortName: "createTime",
sortOrder: "desc",
showExport: true,
columns: [{
checkbox: true
},
{
title: "序号",
formatter: function (value, row, index) {
return $.table.serialNumber(index);
}
},
{
field: 'tableName',
title: '表名称',
width: '20%',
sortable: true
},
{
field: 'tableComment',
title: '表描述',
width: '20%',
sortable: true
},
{
field: 'createTime',
title: '创建时间',
width: '20%',
sortable: true
},
{
field: 'updateTime',
title: '更新时间',
width: '20%',
sortable: true
},
{
title: '操作',
width: '20%',
align: 'center',
formatter: function(value, row, index) {
var msg = '<a class="btn btn-primary btn-xs" href="#" onclick="genCode(\'' + row.tableName + '\')"><i class="fa fa-bug"></i>生成代码</a> ';
return msg;
}
}]
};
$.table.init(options);
});
// 生成代码
function genCode(tableName) {
$.modal.confirm("确定要生成" + tableName + "表代码吗?", function() {
location.href = prefix + "/genCode/" + tableName;
layer.msg('执行成功,正在生成代码请稍后…', { icon: 1 });
})
}
//批量生成代码
function batchGenCode() {
var rows = $.table.selectColumns("tableName");
if (rows.length == 0) {
$.modal.alertWarning("请选择要生成的数据");
return;
}
$.modal.confirm("确认要生成选中的" + rows.length + "条数据吗?", function() {
location.href = prefix + "/batchGenCode?tables=" + rows;
layer.msg('执行成功,正在生成代码请稍后…', { icon: 1 });
});
}
</script>
</body>
</html>