任务列表新增筛选条件 "任务描述",快速检索任务;

pull/6/head
xuxueli 7 years ago
parent 85f042bb0b
commit b3aa981fa8

@ -1111,6 +1111,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
- 27、系统安全性优化登陆Token写Cookie时进行MD5加密同时Cookie启用HttpOnly
- 28、新增"任务ID"属性,移除"JobKey"属性,前者承担所有功能,方便后续增强任务依赖功能。
- 29、任务循环依赖问题修复避免子任务与父任务重复导致的调度死循环
- 30、任务列表新增筛选条件 "任务描述",快速检索任务;
### TODO LIST
- 1、任务权限管理执行器为粒度分配权限核心操作校验权限

@ -100,7 +100,7 @@ public class JobGroupController {
public ReturnT<String> remove(int id){
// valid
int count = xxlJobInfoDao.pageListCount(0, 10, id, null);
int count = xxlJobInfoDao.pageListCount(0, 10, id, null, null);
if (count > 0) {
return new ReturnT<String>(500, "该分组使用中, 不可删除");
}

@ -53,9 +53,9 @@ public class JobInfoController {
@ResponseBody
public Map<String, Object> pageList(@RequestParam(required = false, defaultValue = "0") int start,
@RequestParam(required = false, defaultValue = "10") int length,
int jobGroup, String executorHandler, String filterTime) {
int jobGroup, String jobDesc, String executorHandler, String filterTime) {
return xxlJobService.pageList(start, length, jobGroup, executorHandler, filterTime);
return xxlJobService.pageList(start, length, jobGroup, jobDesc, executorHandler, filterTime);
}
@RequestMapping("/add")

@ -12,8 +12,16 @@ import java.util.List;
*/
public interface XxlJobInfoDao {
public List<XxlJobInfo> pageList(@Param("offset") int offset, @Param("pagesize") int pagesize, @Param("jobGroup") int jobGroup, @Param("executorHandler") String executorHandler);
public int pageListCount(@Param("offset") int offset, @Param("pagesize") int pagesize, @Param("jobGroup") int jobGroup, @Param("executorHandler") String executorHandler);
public List<XxlJobInfo> pageList(@Param("offset") int offset,
@Param("pagesize") int pagesize,
@Param("jobGroup") int jobGroup,
@Param("jobDesc") String jobDesc,
@Param("executorHandler") String executorHandler);
public int pageListCount(@Param("offset") int offset,
@Param("pagesize") int pagesize,
@Param("jobGroup") int jobGroup,
@Param("jobDesc") String jobDesc,
@Param("executorHandler") String executorHandler);
public int save(XxlJobInfo info);

@ -14,7 +14,7 @@ import java.util.Map;
*/
public interface XxlJobService {
public Map<String, Object> pageList(int start, int length, int jobGroup, String executorHandler, String filterTime);
public Map<String, Object> pageList(int start, int length, int jobGroup, String jobDesc, String executorHandler, String filterTime);
public ReturnT<String> add(XxlJobInfo jobInfo);

@ -45,11 +45,11 @@ public class XxlJobServiceImpl implements XxlJobService {
private XxlJobLogGlueDao xxlJobLogGlueDao;
@Override
public Map<String, Object> pageList(int start, int length, int jobGroup, String executorHandler, String filterTime) {
public Map<String, Object> pageList(int start, int length, int jobGroup, String jobDesc, String executorHandler, String filterTime) {
// page list
List<XxlJobInfo> list = xxlJobInfoDao.pageList(start, length, jobGroup, executorHandler);
int list_count = xxlJobInfoDao.pageListCount(start, length, jobGroup, executorHandler);
List<XxlJobInfo> list = xxlJobInfoDao.pageList(start, length, jobGroup, jobDesc, executorHandler);
int list_count = xxlJobInfoDao.pageListCount(start, length, jobGroup, jobDesc, executorHandler);
// fill job info
if (list!=null && list.size()>0) {

@ -58,6 +58,9 @@
<if test="jobGroup gt 0">
AND t.job_group = #{jobGroup}
</if>
<if test="jobDesc != null and jobDesc != ''">
AND t.job_desc like CONCAT(CONCAT('%', #{jobDesc}), '%')
</if>
<if test="executorHandler != null and executorHandler != ''">
AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%')
</if>
@ -73,6 +76,9 @@
<if test="jobGroup gt 0">
AND t.job_group = #{jobGroup}
</if>
<if test="jobDesc != null and jobDesc != ''">
AND t.job_desc like CONCAT(CONCAT('%', #{jobDesc}), '%')
</if>
<if test="executorHandler != null and executorHandler != ''">
AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%')
</if>

@ -32,7 +32,7 @@
<section class="content">
<div class="row">
<div class="col-xs-4">
<div class="col-xs-3">
<div class="input-group">
<span class="input-group-addon"></span>
<select class="form-control" id="jobGroup" >
@ -42,13 +42,19 @@
</select>
</div>
</div>
<div class="col-xs-4">
<div class="col-xs-3">
<div class="input-group">
<span class="input-group-addon"></span>
<input type="text" class="form-control" id="jobDesc" autocomplete="on" >
</div>
</div>
<div class="col-xs-3">
<div class="input-group">
<span class="input-group-addon">JobHandler</span>
<input type="text" class="form-control" id="executorHandler" autocomplete="on" >
</div>
</div>
<div class="col-xs-2">
<div class="col-xs-1">
<button class="btn btn-block btn-info" id="searchBtn"></button>
</div>
<div class="col-xs-2">

@ -10,6 +10,7 @@ $(function() {
data : function ( d ) {
var obj = {};
obj.jobGroup = $('#jobGroup').val();
obj.jobDesc = $('#jobDesc').val();
obj.executorHandler = $('#executorHandler').val();
obj.start = d.start;
obj.length = d.length;

@ -20,8 +20,8 @@ public class XxlJobInfoDaoTest {
@Test
public void pageList(){
List<XxlJobInfo> list = xxlJobInfoDao.pageList(0, 20, 0, null);
int list_count = xxlJobInfoDao.pageListCount(0, 20, 0, null);
List<XxlJobInfo> list = xxlJobInfoDao.pageList(0, 20, 0, null, null);
int list_count = xxlJobInfoDao.pageListCount(0, 20, 0, null, null);
System.out.println(list);
System.out.println(list_count);

Loading…
Cancel
Save