Browse Source

变更任务状态时,保留任务其它属性。

pull/84/head
RuoYi 6 years ago
parent
commit
83a96a2327
  1. 2
      ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java
  2. 2
      ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java
  3. 2
      sql/ry_20190401.sql

2
ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java

@ -107,7 +107,6 @@ public class ServletUtils
*/
public static boolean isAjaxRequest(HttpServletRequest request)
{
String accept = request.getHeader("accept");
if (accept != null && accept.indexOf("application/json") != -1)
{
@ -131,7 +130,6 @@ public class ServletUtils
{
return true;
}
return false;
}
}

2
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java

@ -91,7 +91,7 @@ public class SysJobController extends BaseController
@ResponseBody
public AjaxResult changeStatus(SysJob job) throws SchedulerException
{
Job newJob = jobService.selectJobById(job.getJobId());
SysJob newJob = jobService.selectJobById(job.getJobId());
newJob.setStatus(job.getStatus());
return toAjax(jobService.changeStatus(newJob));
}

2
sql/ry_20190401.sql

@ -491,7 +491,7 @@ insert into sys_dict_data values(20, 5, '导出', '5', 'sys_oper_type',
insert into sys_dict_data values(21, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '导入操作');
insert into sys_dict_data values(22, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '强退操作');
insert into sys_dict_data values(23, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '生成操作');
insert into sys_dict_data values(24, 8, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '清空操作');
insert into sys_dict_data values(24, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '清空操作');
insert into sys_dict_data values(25, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态');
insert into sys_dict_data values(26, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态');

Loading…
Cancel
Save