Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b3aa981f
authored
Dec 29, 2017
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
任务列表新增筛选条件 "任务描述",快速检索任务;
parent
85f042bb
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
37 additions
and
15 deletions
doc/XXL-JOB官方文档.md
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobGroupController.java
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java
xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobInfoDao.java
xxl-job-admin/src/main/java/com/xxl/job/admin/service/XxlJobService.java
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java
xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl
xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js
xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobInfoDaoTest.java
doc/XXL-JOB官方文档.md
View file @
b3aa981f
## 《分
布式任务调度平台XXL-JOB》
## 《分
布式任务调度平台XXL-JOB》
...
@@ -1111,6 +1111,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
...
@@ -1111,6 +1111,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
-
27、系统安全性优化,登陆Token写Cookie时进行MD5加密,同时Cookie启用HttpOnly;
-
27、系统安全性优化,登陆Token写Cookie时进行MD5加密,同时Cookie启用HttpOnly;
-
28、新增"任务ID"属性,移除"JobKey"属性,前者承担所有功能,方便后续增强任务依赖功能。
-
28、新增"任务ID"属性,移除"JobKey"属性,前者承担所有功能,方便后续增强任务依赖功能。
-
29、任务循环依赖问题修复,避免子任务与父任务重复导致的调度死循环;
-
29、任务循环依赖问题修复,避免子任务与父任务重复导致的调度死循环;
-
30、任务列表新增筛选条件 "任务描述",快速检索任务;
### TODO LIST
### TODO LIST
-
1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
-
1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobGroupController.java
View file @
b3aa981f
...
@@ -100,7 +100,7 @@ public class JobGroupController {
...
@@ -100,7 +100,7 @@ public class JobGroupController {
public
ReturnT
<
String
>
remove
(
int
id
){
public
ReturnT
<
String
>
remove
(
int
id
){
// valid
// valid
int
count
=
xxlJobInfoDao
.
pageListCount
(
0
,
10
,
id
,
null
);
int
count
=
xxlJobInfoDao
.
pageListCount
(
0
,
10
,
id
,
null
,
null
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
return
new
ReturnT
<
String
>(
500
,
"该分组使用中, 不可删除"
);
return
new
ReturnT
<
String
>(
500
,
"该分组使用中, 不可删除"
);
}
}
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java
View file @
b3aa981f
...
@@ -53,9 +53,9 @@ public class JobInfoController {
...
@@ -53,9 +53,9 @@ public class JobInfoController {
@ResponseBody
@ResponseBody
public
Map
<
String
,
Object
>
pageList
(
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
int
start
,
public
Map
<
String
,
Object
>
pageList
(
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
int
start
,
@RequestParam
(
required
=
false
,
defaultValue
=
"10"
)
int
length
,
@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"
)
@RequestMapping
(
"/add"
)
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobInfoDao.java
View file @
b3aa981f
...
@@ -12,8 +12,16 @@ import java.util.List;
...
@@ -12,8 +12,16 @@ import java.util.List;
*/
*/
public
interface
XxlJobInfoDao
{
public
interface
XxlJobInfoDao
{
public
List
<
XxlJobInfo
>
pageList
(
@Param
(
"offset"
)
int
offset
,
@Param
(
"pagesize"
)
int
pagesize
,
@Param
(
"jobGroup"
)
int
jobGroup
,
@Param
(
"executorHandler"
)
String
executorHandler
);
public
List
<
XxlJobInfo
>
pageList
(
@Param
(
"offset"
)
int
offset
,
public
int
pageListCount
(
@Param
(
"offset"
)
int
offset
,
@Param
(
"pagesize"
)
int
pagesize
,
@Param
(
"jobGroup"
)
int
jobGroup
,
@Param
(
"executorHandler"
)
String
executorHandler
);
@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
);
public
int
save
(
XxlJobInfo
info
);
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/service/XxlJobService.java
View file @
b3aa981f
...
@@ -14,7 +14,7 @@ import java.util.Map;
...
@@ -14,7 +14,7 @@ import java.util.Map;
*/
*/
public
interface
XxlJobService
{
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
);
public
ReturnT
<
String
>
add
(
XxlJobInfo
jobInfo
);
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java
View file @
b3aa981f
...
@@ -45,11 +45,11 @@ public class XxlJobServiceImpl implements XxlJobService {
...
@@ -45,11 +45,11 @@ public class XxlJobServiceImpl implements XxlJobService {
private
XxlJobLogGlueDao
xxlJobLogGlueDao
;
private
XxlJobLogGlueDao
xxlJobLogGlueDao
;
@Override
@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
// page list
List
<
XxlJobInfo
>
list
=
xxlJobInfoDao
.
pageList
(
start
,
length
,
jobGroup
,
executorHandler
);
List
<
XxlJobInfo
>
list
=
xxlJobInfoDao
.
pageList
(
start
,
length
,
jobGroup
,
jobDesc
,
executorHandler
);
int
list_count
=
xxlJobInfoDao
.
pageListCount
(
start
,
length
,
jobGroup
,
executorHandler
);
int
list_count
=
xxlJobInfoDao
.
pageListCount
(
start
,
length
,
jobGroup
,
jobDesc
,
executorHandler
);
// fill job info
// fill job info
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
...
...
xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
View file @
b3aa981f
...
@@ -58,6 +58,9 @@
...
@@ -58,6 +58,9 @@
<if
test=
"jobGroup gt 0"
>
<if
test=
"jobGroup gt 0"
>
AND t.job_group = #{jobGroup}
AND t.job_group = #{jobGroup}
</if>
</if>
<if
test=
"jobDesc != null and jobDesc != ''"
>
AND t.job_desc like CONCAT(CONCAT('%', #{jobDesc}), '%')
</if>
<if
test=
"executorHandler != null and executorHandler != ''"
>
<if
test=
"executorHandler != null and executorHandler != ''"
>
AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%')
AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%')
</if>
</if>
...
@@ -73,6 +76,9 @@
...
@@ -73,6 +76,9 @@
<if
test=
"jobGroup gt 0"
>
<if
test=
"jobGroup gt 0"
>
AND t.job_group = #{jobGroup}
AND t.job_group = #{jobGroup}
</if>
</if>
<if
test=
"jobDesc != null and jobDesc != ''"
>
AND t.job_desc like CONCAT(CONCAT('%', #{jobDesc}), '%')
</if>
<if
test=
"executorHandler != null and executorHandler != ''"
>
<if
test=
"executorHandler != null and executorHandler != ''"
>
AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%')
AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%')
</if>
</if>
...
...
xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl
View file @
b3aa981f
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<section
class=
"content"
>
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-xs-
4
"
>
<div
class=
"col-xs-
3
"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
执行器
</span>
<span
class=
"input-group-addon"
>
执行器
</span>
<select
class=
"form-control"
id=
"jobGroup"
>
<select
class=
"form-control"
id=
"jobGroup"
>
...
@@ -42,13 +42,19 @@
...
@@ -42,13 +42,19 @@
</select>
</select>
</div>
</div>
</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"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
JobHandler
</span>
<span
class=
"input-group-addon"
>
JobHandler
</span>
<input
type=
"text"
class=
"form-control"
id=
"executorHandler"
autocomplete=
"on"
>
<input
type=
"text"
class=
"form-control"
id=
"executorHandler"
autocomplete=
"on"
>
</div>
</div>
</div>
</div>
<div
class=
"col-xs-
2
"
>
<div
class=
"col-xs-
1
"
>
<button
class=
"btn btn-block btn-info"
id=
"searchBtn"
>
搜索
</button>
<button
class=
"btn btn-block btn-info"
id=
"searchBtn"
>
搜索
</button>
</div>
</div>
<div
class=
"col-xs-2"
>
<div
class=
"col-xs-2"
>
...
...
xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js
View file @
b3aa981f
...
@@ -10,6 +10,7 @@ $(function() {
...
@@ -10,6 +10,7 @@ $(function() {
data
:
function
(
d
)
{
data
:
function
(
d
)
{
var
obj
=
{};
var
obj
=
{};
obj
.
jobGroup
=
$
(
'#jobGroup'
).
val
();
obj
.
jobGroup
=
$
(
'#jobGroup'
).
val
();
obj
.
jobDesc
=
$
(
'#jobDesc'
).
val
();
obj
.
executorHandler
=
$
(
'#executorHandler'
).
val
();
obj
.
executorHandler
=
$
(
'#executorHandler'
).
val
();
obj
.
start
=
d
.
start
;
obj
.
start
=
d
.
start
;
obj
.
length
=
d
.
length
;
obj
.
length
=
d
.
length
;
...
...
xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobInfoDaoTest.java
View file @
b3aa981f
...
@@ -20,8 +20,8 @@ public class XxlJobInfoDaoTest {
...
@@ -20,8 +20,8 @@ public class XxlJobInfoDaoTest {
@Test
@Test
public
void
pageList
(){
public
void
pageList
(){
List
<
XxlJobInfo
>
list
=
xxlJobInfoDao
.
pageList
(
0
,
20
,
0
,
null
);
List
<
XxlJobInfo
>
list
=
xxlJobInfoDao
.
pageList
(
0
,
20
,
0
,
null
,
null
);
int
list_count
=
xxlJobInfoDao
.
pageListCount
(
0
,
20
,
0
,
null
);
int
list_count
=
xxlJobInfoDao
.
pageListCount
(
0
,
20
,
0
,
null
,
null
);
System
.
out
.
println
(
list
);
System
.
out
.
println
(
list
);
System
.
out
.
println
(
list_count
);
System
.
out
.
println
(
list_count
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment