From d156c51f0daa2956c9f2b1cba047a6bae32c53dd Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Tue, 11 Jun 2019 19:32:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E6=94=AF=E6=8C=81=E6=A0=B9=E6=8D=AE=20"?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=8A=B6=E6=80=81"=E3=80=81"=E8=B4=9F?= =?UTF-8?q?=E8=B4=A3=E4=BA=BA"=20=E5=B1=9E=E6=80=A7=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/XXL-JOB官方文档.md | 3 ++- .../job/admin/controller/JobGroupController.java | 2 +- .../job/admin/controller/JobInfoController.java | 4 ++-- .../java/com/xxl/job/admin/dao/XxlJobInfoDao.java | 6 ++++-- .../com/xxl/job/admin/service/XxlJobService.java | 4 ++-- .../job/admin/service/impl/XxlJobServiceImpl.java | 6 +++--- .../resources/mybatis-mapper/XxlJobInfoMapper.xml | 6 ++++++ .../main/resources/static/js/jobinfo.index.1.js | 1 + .../resources/templates/jobinfo/jobinfo.index.ftl | 15 +++++++++------ .../com/xxl/job/admin/dao/XxlJobInfoDaoTest.java | 4 ++-- 10 files changed, 32 insertions(+), 19 deletions(-) diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index fe0a36f5..a6a251db 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -1472,11 +1472,12 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 - 6、调度线程池参数调优; - 7、注册表索引优化,缓解锁表问题; - 8、新增Jboot执行器Sample示例项目; -- 9、任务列表支持根据状态筛选; +- 9、任务列表优化,支持根据 "任务状态"、"负责人" 属性筛选任务; - 10、项目依赖升级至较新稳定版本,如spring、springboot、groovy、xxl-rpc等等;并清理冗余POM; - 11、升级xxl-rpc至较新版本,修复代理服务初始化时远程服务不可用导致长连冗余创建的问题; - 12、首页调度报表的日期排序在TIDB下乱序问题修复; + ### 6.26 版本 v2.1.1 Release Notes[规划中] - 1、[ING]调度日志优化:支持设置日志保留天数,过期日志天维度记录报表,并清理;调度报表汇总实时数据和报表; - 2、[ING]父子任务参数传递; diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobGroupController.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobGroupController.java index a296922b..a819256c 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobGroupController.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobGroupController.java @@ -142,7 +142,7 @@ public class JobGroupController { public ReturnT remove(int id){ // valid - int count = xxlJobInfoDao.pageListCount(0, 10, id, -1, null, null); + int count = xxlJobInfoDao.pageListCount(0, 10, id, -1, null, null, null); if (count > 0) { return new ReturnT(500, I18nUtil.getString("jobgroup_del_limit_0") ); } diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java index f798286f..5b7d71a8 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java @@ -94,9 +94,9 @@ public class JobInfoController { @ResponseBody public Map pageList(@RequestParam(required = false, defaultValue = "0") int start, @RequestParam(required = false, defaultValue = "10") int length, - int jobGroup, int triggerStatus, String jobDesc, String executorHandler, String filterTime) { + int jobGroup, int triggerStatus, String jobDesc, String executorHandler, String author) { - return xxlJobService.pageList(start, length, jobGroup, triggerStatus, jobDesc, executorHandler, filterTime); + return xxlJobService.pageList(start, length, jobGroup, triggerStatus, jobDesc, executorHandler, author); } @RequestMapping("/add") diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobInfoDao.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobInfoDao.java index bf4c2bc2..9baacc12 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobInfoDao.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobInfoDao.java @@ -19,13 +19,15 @@ public interface XxlJobInfoDao { @Param("jobGroup") int jobGroup, @Param("triggerStatus") int triggerStatus, @Param("jobDesc") String jobDesc, - @Param("executorHandler") String executorHandler); + @Param("executorHandler") String executorHandler, + @Param("author") String author); public int pageListCount(@Param("offset") int offset, @Param("pagesize") int pagesize, @Param("jobGroup") int jobGroup, @Param("triggerStatus") int triggerStatus, @Param("jobDesc") String jobDesc, - @Param("executorHandler") String executorHandler); + @Param("executorHandler") String executorHandler, + @Param("author") String author); public int save(XxlJobInfo info); diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/XxlJobService.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/XxlJobService.java index f4c44937..61da3a27 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/XxlJobService.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/XxlJobService.java @@ -22,10 +22,10 @@ public interface XxlJobService { * @param jobGroup * @param jobDesc * @param executorHandler - * @param filterTime + * @param author * @return */ - public Map pageList(int start, int length, int jobGroup, int triggerStatus, String jobDesc, String executorHandler, String filterTime); + public Map pageList(int start, int length, int jobGroup, int triggerStatus, String jobDesc, String executorHandler, String author); /** * add job diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java index 77cc883e..896cadd6 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java @@ -41,11 +41,11 @@ public class XxlJobServiceImpl implements XxlJobService { private XxlJobLogGlueDao xxlJobLogGlueDao; @Override - public Map pageList(int start, int length, int jobGroup, int triggerStatus, String jobDesc, String executorHandler, String filterTime) { + public Map pageList(int start, int length, int jobGroup, int triggerStatus, String jobDesc, String executorHandler, String author) { // page list - List list = xxlJobInfoDao.pageList(start, length, jobGroup, triggerStatus, jobDesc, executorHandler); - int list_count = xxlJobInfoDao.pageListCount(start, length, jobGroup, triggerStatus, jobDesc, executorHandler); + List list = xxlJobInfoDao.pageList(start, length, jobGroup, triggerStatus, jobDesc, executorHandler, author); + int list_count = xxlJobInfoDao.pageListCount(start, length, jobGroup, triggerStatus, jobDesc, executorHandler, author); // package result Map maps = new HashMap(); diff --git a/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml b/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml index 70bf1ba7..58100366 100644 --- a/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml +++ b/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml @@ -76,6 +76,9 @@ AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%') + + AND t.author like CONCAT(CONCAT('%', #{author}), '%') + ORDER BY id DESC LIMIT #{offset}, #{pagesize} @@ -97,6 +100,9 @@ AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%') + + AND t.author like CONCAT(CONCAT('%', #{author}), '%') + diff --git a/xxl-job-admin/src/main/resources/static/js/jobinfo.index.1.js b/xxl-job-admin/src/main/resources/static/js/jobinfo.index.1.js index 0a70c88c..01096a0f 100644 --- a/xxl-job-admin/src/main/resources/static/js/jobinfo.index.1.js +++ b/xxl-job-admin/src/main/resources/static/js/jobinfo.index.1.js @@ -14,6 +14,7 @@ $(function() { obj.triggerStatus = $('#triggerStatus').val(); obj.jobDesc = $('#jobDesc').val(); obj.executorHandler = $('#executorHandler').val(); + obj.author = $('#author').val(); obj.start = d.start; obj.length = d.length; return obj; diff --git a/xxl-job-admin/src/main/resources/templates/jobinfo/jobinfo.index.ftl b/xxl-job-admin/src/main/resources/templates/jobinfo/jobinfo.index.ftl index 7dcfde0f..a5bda98d 100644 --- a/xxl-job-admin/src/main/resources/templates/jobinfo/jobinfo.index.ftl +++ b/xxl-job-admin/src/main/resources/templates/jobinfo/jobinfo.index.ftl @@ -44,16 +44,19 @@ -
+
- ${I18n.jobinfo_field_jobdesc} - +
-
+
- JobHandler - + +
+
+
+
+
diff --git a/xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobInfoDaoTest.java b/xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobInfoDaoTest.java index b43a430e..13b5b3ff 100644 --- a/xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobInfoDaoTest.java +++ b/xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobInfoDaoTest.java @@ -19,8 +19,8 @@ public class XxlJobInfoDaoTest { @Test public void pageList(){ - List list = xxlJobInfoDao.pageList(0, 20, 0, -1, null, null); - int list_count = xxlJobInfoDao.pageListCount(0, 20, 0, -1, null, null); + List list = xxlJobInfoDao.pageList(0, 20, 0, -1, null, null, null); + int list_count = xxlJobInfoDao.pageListCount(0, 20, 0, -1, null, null, null); System.out.println(list); System.out.println(list_count);