Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
老大叔也想要天天的爱情
DolphinScheduler
提交
e577776c
DolphinScheduler
项目概览
老大叔也想要天天的爱情
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e577776c
编写于
5月 10, 2019
作者:
L
ligang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add queryByProcessDefinitionId
上级
81ecdf42
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
39 addition
and
1 deletion
+39
-1
escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java
...a/cn/escheduler/api/service/ProcessDefinitionService.java
+1
-1
escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ScheduleMapper.java
...rc/main/java/cn/escheduler/dao/mapper/ScheduleMapper.java
+24
-0
escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ScheduleMapperProvider.java
...java/cn/escheduler/dao/mapper/ScheduleMapperProvider.java
+14
-0
未找到文件。
escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java
浏览文件 @
e577776c
...
@@ -370,7 +370,7 @@ public class ProcessDefinitionService extends BaseDAGService {
...
@@ -370,7 +370,7 @@ public class ProcessDefinitionService extends BaseDAGService {
}
}
// get the timing according to the process definition
// get the timing according to the process definition
List
<
Schedule
>
schedules
=
scheduleMapper
.
selectAllByProcessDefineArray
(
new
int
[
processDefinitionId
]
);
List
<
Schedule
>
schedules
=
scheduleMapper
.
queryByProcessDefinitionId
(
processDefinitionId
);
if
(!
schedules
.
isEmpty
()
&&
schedules
.
size
()
>
1
)
{
if
(!
schedules
.
isEmpty
()
&&
schedules
.
size
()
>
1
)
{
logger
.
warn
(
"scheduler num is {},Greater than 1"
,
schedules
.
size
());
logger
.
warn
(
"scheduler num is {},Greater than 1"
,
schedules
.
size
());
putMsg
(
result
,
Status
.
DELETE_PROCESS_DEFINE_BY_ID_ERROR
);
putMsg
(
result
,
Status
.
DELETE_PROCESS_DEFINE_BY_ID_ERROR
);
...
...
escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ScheduleMapper.java
浏览文件 @
e577776c
...
@@ -173,6 +173,30 @@ public interface ScheduleMapper {
...
@@ -173,6 +173,30 @@ public interface ScheduleMapper {
@SelectProvider
(
type
=
ScheduleMapperProvider
.
class
,
method
=
"selectAllByProcessDefineArray"
)
@SelectProvider
(
type
=
ScheduleMapperProvider
.
class
,
method
=
"selectAllByProcessDefineArray"
)
List
<
Schedule
>
selectAllByProcessDefineArray
(
@Param
(
"processDefineIds"
)
int
[]
processDefineIds
);
List
<
Schedule
>
selectAllByProcessDefineArray
(
@Param
(
"processDefineIds"
)
int
[]
processDefineIds
);
/**
* query schedule list by definition id
* @param processDefinitionId
* @return
*/
@Results
(
value
=
{
@Result
(
property
=
"id"
,
column
=
"id"
,
id
=
true
,
javaType
=
Integer
.
class
,
jdbcType
=
JdbcType
.
INTEGER
),
@Result
(
property
=
"processDefinitionId"
,
column
=
"process_definition_id"
,
id
=
true
,
javaType
=
int
.
class
,
jdbcType
=
JdbcType
.
INTEGER
),
@Result
(
property
=
"startTime"
,
column
=
"start_time"
,
javaType
=
Date
.
class
,
jdbcType
=
JdbcType
.
TIMESTAMP
),
@Result
(
property
=
"endTime"
,
column
=
"end_time"
,
javaType
=
Date
.
class
,
jdbcType
=
JdbcType
.
TIMESTAMP
),
@Result
(
property
=
"crontab"
,
column
=
"crontab"
,
javaType
=
String
.
class
,
jdbcType
=
JdbcType
.
VARCHAR
),
@Result
(
property
=
"failureStrategy"
,
column
=
"failure_strategy"
,
typeHandler
=
EnumOrdinalTypeHandler
.
class
,
javaType
=
FailureStrategy
.
class
,
jdbcType
=
JdbcType
.
TINYINT
),
@Result
(
property
=
"warningType"
,
column
=
"warning_type"
,
typeHandler
=
EnumOrdinalTypeHandler
.
class
,
javaType
=
WarningType
.
class
,
jdbcType
=
JdbcType
.
TINYINT
),
@Result
(
property
=
"createTime"
,
column
=
"create_time"
,
javaType
=
Date
.
class
,
jdbcType
=
JdbcType
.
TIMESTAMP
),
@Result
(
property
=
"updateTime"
,
column
=
"update_time"
,
javaType
=
Date
.
class
,
jdbcType
=
JdbcType
.
TIMESTAMP
),
@Result
(
property
=
"userId"
,
column
=
"user_id"
,
javaType
=
int
.
class
,
jdbcType
=
JdbcType
.
INTEGER
),
@Result
(
property
=
"releaseState"
,
column
=
"release_state"
,
typeHandler
=
EnumOrdinalTypeHandler
.
class
,
javaType
=
ReleaseState
.
class
,
jdbcType
=
JdbcType
.
TINYINT
),
@Result
(
property
=
"warningGroupId"
,
column
=
"warning_group_id"
,
javaType
=
int
.
class
,
jdbcType
=
JdbcType
.
INTEGER
),
@Result
(
property
=
"workerGroupId"
,
column
=
"worker_group_id"
,
javaType
=
int
.
class
,
jdbcType
=
JdbcType
.
INTEGER
),
@Result
(
property
=
"processInstancePriority"
,
column
=
"process_instance_priority"
,
javaType
=
Priority
.
class
,
typeHandler
=
EnumOrdinalTypeHandler
.
class
,
jdbcType
=
JdbcType
.
TINYINT
)
})
@SelectProvider
(
type
=
ScheduleMapperProvider
.
class
,
method
=
"queryByProcessDefinitionId"
)
List
<
Schedule
>
queryByProcessDefinitionId
(
@Param
(
"processDefinitionId"
)
int
processDefinitionId
);
/**
/**
* delete schedule by id
* delete schedule by id
* @param scheduleId
* @param scheduleId
...
...
escheduler-dao/src/main/java/cn/escheduler/dao/mapper/ScheduleMapperProvider.java
浏览文件 @
e577776c
...
@@ -181,6 +181,20 @@ public class ScheduleMapperProvider {
...
@@ -181,6 +181,20 @@ public class ScheduleMapperProvider {
}}.
toString
();
}}.
toString
();
}
}
/**
* query schedule by process definition id
* @param parameter
* @return
*/
public
String
queryByProcessDefinitionId
(
Map
<
String
,
Object
>
parameter
)
{
return
new
SQL
()
{{
SELECT
(
"*"
);
FROM
(
DB_NAME
);
WHERE
(
"process_definition_id = #{processDefinitionId}"
);
}}.
toString
();
}
/**
/**
* delete schedule by id
* delete schedule by id
*
*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录