Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyuan
byit-myth-job
Commits
286ec10e
Commit
286ec10e
authored
Dec 23, 2019
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码重构】修改JPA为MyBatsi
parent
d8b4ddb2
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
373 additions
and
2833 deletions
+373
-2833
JobController.java
...dmin/src/main/java/com/byit/controller/JobController.java
+9
-9
application.yml
byit-myth-admin/src/main/resources/application.yml
+4
-4
MythJobAutoConfigure.java
...ore/src/main/java/com/byit/conf/MythJobAutoConfigure.java
+1
-1
JobTaskMapper.java
...min-core/src/main/java/com/byit/mapper/JobTaskMapper.java
+50
-8
JobTaskRunLogMapper.java
...re/src/main/java/com/byit/mapper/JobTaskRunLogMapper.java
+17
-6
JobTaskScheduleMapper.java
.../src/main/java/com/byit/mapper/JobTaskScheduleMapper.java
+38
-6
JobTask.java
...myth-admin-core/src/main/java/com/byit/model/JobTask.java
+0
-217
JobTaskRunLog.java
...dmin-core/src/main/java/com/byit/model/JobTaskRunLog.java
+13
-0
JobTaskRunLogWithBLOBs.java
.../src/main/java/com/byit/model/JobTaskRunLogWithBLOBs.java
+0
-30
JobTaskSchedule.java
...in-core/src/main/java/com/byit/model/JobTaskSchedule.java
+6
-0
MythJobFlowCurrent.java
...core/src/main/java/com/byit/model/MythJobFlowCurrent.java
+0
-122
MythJobFlowDependent.java
...re/src/main/java/com/byit/model/MythJobFlowDependent.java
+0
-35
MythJobFlowNodeCurrent.java
.../src/main/java/com/byit/model/MythJobFlowNodeCurrent.java
+0
-185
MythJobFlowNodeVersion.java
.../src/main/java/com/byit/model/MythJobFlowNodeVersion.java
+0
-195
MythJobFlowRunRecording.java
...src/main/java/com/byit/model/MythJobFlowRunRecording.java
+0
-105
MythJobFlowVersion.java
...core/src/main/java/com/byit/model/MythJobFlowVersion.java
+0
-120
MythJobTask.java
...-admin-core/src/main/java/com/byit/model/MythJobTask.java
+0
-197
MythJobTaskRunLog.java
...-core/src/main/java/com/byit/model/MythJobTaskRunLog.java
+0
-134
MythJobTaskSchedule.java
...ore/src/main/java/com/byit/model/MythJobTaskSchedule.java
+0
-200
MythJobTaskRepository.java
.../main/java/com/byit/repository/MythJobTaskRepository.java
+0
-21
MythJobTaskRunLogRepository.java
...java/com/byit/repository/MythJobTaskRunLogRepository.java
+0
-19
MythJobTaskScheduleRepository.java
...va/com/byit/repository/MythJobTaskScheduleRepository.java
+0
-21
JobTaskRunLogService.java
.../src/main/java/com/byit/service/JobTaskRunLogService.java
+7
-5
JobTaskScheduleService.java
...rc/main/java/com/byit/service/JobTaskScheduleService.java
+5
-10
JobTaskService.java
...n-core/src/main/java/com/byit/service/JobTaskService.java
+8
-8
JobTaskRunLogServiceImpl.java
.../java/com/byit/service/impl/JobTaskRunLogServiceImpl.java
+11
-10
JobTaskScheduleServiceImpl.java
...ava/com/byit/service/impl/JobTaskScheduleServiceImpl.java
+47
-0
JobTaskServiceImpl.java
...c/main/java/com/byit/service/impl/JobTaskServiceImpl.java
+62
-0
MythJobTaskScheduleServiceImpl.java
...com/byit/service/impl/MythJobTaskScheduleServiceImpl.java
+0
-40
MythJobTaskServiceImpl.java
...in/java/com/byit/service/impl/MythJobTaskServiceImpl.java
+0
-43
JavaBeanJobTask.java
...min-core/src/main/java/com/byit/task/JavaBeanJobTask.java
+15
-15
JobScheduleHelper.java
...core/src/main/java/com/byit/thread/JobScheduleHelper.java
+37
-37
LogCallbackThread.java
...core/src/main/java/com/byit/thread/LogCallbackThread.java
+9
-8
SourceObj2TargetObjUtil.java
.../src/main/java/com/byit/util/SourceObj2TargetObjUtil.java
+19
-21
Generator-config.xml
...e/myth-admin-core/src/main/resources/Generator-config.xml
+0
-8
JobTaskMapper.xml
...th-admin-core/src/main/resources/mapper/JobTaskMapper.xml
+0
-480
JobTaskRunLogMapper.xml
...in-core/src/main/resources/mapper/JobTaskRunLogMapper.xml
+15
-21
JobTaskScheduleMapper.xml
...-core/src/main/resources/mapper/JobTaskScheduleMapper.xml
+0
-492
No files found.
byit-myth-admin/src/main/java/com/byit/controller/JobController.java
View file @
286ec10e
...
...
@@ -3,8 +3,8 @@ package com.byit.controller;
import
com.byit.conf.MythJobAutoConfigure
;
import
com.byit.job.dto.JobRunResultDto
;
import
com.byit.job.dto.PluginBeanJobInfo
;
import
com.byit.model.
Myth
JobTask
;
import
com.byit.service.
Myth
JobTaskService
;
import
com.byit.model.JobTask
;
import
com.byit.service.JobTaskService
;
import
com.byit.thread.LogCallbackThread
;
import
com.byit.util.SourceObj2TargetObjUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -22,18 +22,18 @@ import java.util.List;
@RequestMapping
(
"job"
)
public
class
JobController
{
private
final
MythJobTaskService
mythJ
obTaskService
;
private
final
JobTaskService
j
obTaskService
;
@Autowired
public
JobController
(
MythJobTaskService
mythJ
obTaskService
)
{
this
.
mythJobTaskService
=
mythJ
obTaskService
;
public
JobController
(
JobTaskService
j
obTaskService
)
{
this
.
jobTaskService
=
j
obTaskService
;
}
@PostMapping
(
value
=
"addJob"
)
public
String
addJob
(
@RequestBody
PluginBeanJobInfo
pluginBeanJobInfo
){
MythJobTask
mythJobTask
=
SourceObj2TargetObjUtil
.
pluginBeanJobInfo2Myth
JobTask
(
pluginBeanJobInfo
);
mythJobTaskService
.
addMythJobTask
(
mythJ
obTask
);
JobTask
jobTask
=
SourceObj2TargetObjUtil
.
pluginBeanJobInfo2
JobTask
(
pluginBeanJobInfo
);
jobTaskService
.
addMythJobTask
(
j
obTask
);
return
"SUCCESS"
;
}
...
...
@@ -43,7 +43,7 @@ public class JobController {
}
@GetMapping
(
value
=
"getJobTask"
)
public
List
<
Myth
JobTask
>
getJobInfo
(){
return
mythJobTaskService
.
findMyth
JobTaskByTriggerNextTimeLessThanEqual
(
11
);
public
List
<
JobTask
>
getJobInfo
(){
return
jobTaskService
.
find
JobTaskByTriggerNextTimeLessThanEqual
(
11
);
}
}
byit-myth-admin/src/main/resources/application.yml
View file @
286ec10e
...
...
@@ -4,10 +4,10 @@ spring:
url
:
jdbc:mysql://10.0.10.118:3306/myth-job?Unicode=true&characterEncoding=UTF-8&useSSL=true
username
:
root
password
:
123456
jpa
:
hibernate
:
ddl-auto
:
none
show-sql
:
false
#
jpa:
#
hibernate:
#
ddl-auto: none
#
show-sql: false
mybatis
:
mapper-locations
:
/mapper/*.xml
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/conf/MythJobAutoConfigure.java
View file @
286ec10e
...
...
@@ -14,7 +14,7 @@ import java.util.concurrent.TimeUnit;
* @date: 2019/12/9 14:51
**/
@Configuration
@MapperScan
(
"com.byit.
dao
"
)
@MapperScan
(
"com.byit.
mapper
"
)
public
class
MythJobAutoConfigure
{
/**
* 日志的回调线程池,主要是将执行结果写到库里面
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/JobTaskMapper.java
View file @
286ec10e
package
com
.
byit
.
mapper
;
import
com.byit.model.JobTask
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
public
interface
JobTaskMapper
{
int
deleteById
(
Integer
nodeId
);
import
java.util.List
;
/**
* 任务表的操作
* @author AutomaticGenerated
*/
@Repository
public
interface
JobTaskMapper
{
/**
* 查询七秒内即将执行的数据
* @param maxNextTime
* @return
*/
List
<
JobTask
>
findJobTaskByTriggerNextTimeLessThanEqual
(
Long
maxNextTime
);
/**
* 根据id返回
* @param id 节点的id
* @return
*/
JobTask
getById
(
Integer
id
);
/**
* 插入
* @param record
* @return
*/
int
insert
(
JobTask
record
);
/**
* 动态插入
* @param record
* @return
*/
int
insertSelective
(
JobTask
record
);
JobTask
getById
(
Integer
nodeId
);
/**
* 动态修改根据id
* @param record
* @return
*/
int
updateByIdSelective
(
JobTask
record
);
int
updateByPrimaryKeyWithBLOBs
(
JobTask
record
);
/**
* 根据ID删除数据
* @param id
* @return
*/
int
deleteById
(
Integer
id
);
/**
* 批量删除
* @param mythJobTasks
* @return
*/
int
deleteByIds
(
@Param
(
"mythJobTasks"
)
List
<
JobTask
>
mythJobTasks
);
int
updateById
(
JobTask
record
);
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/JobTaskRunLogMapper.java
View file @
286ec10e
package
com
.
byit
.
mapper
;
import
com.byit.model.JobTaskRunLog
;
import
com.byit.model.JobTaskRunLogWithBLOBs
;
import
org.springframework.stereotype.Repository
;
/**
* 对执行后日志的操作
* @author huangfu
*/
@Repository
public
interface
JobTaskRunLogMapper
{
int
deleteById
(
Integer
logId
);
int
insert
(
JobTaskRunLog
WithBLOBs
record
);
int
insert
(
JobTaskRunLog
record
);
int
insertSelective
(
JobTaskRunLogWithBLOBs
record
);
/**
* 动态插入
* @param record
* @return
*/
int
insertSelective
(
JobTaskRunLog
record
);
JobTaskRunLog
WithBLOBs
getById
(
Integer
logId
);
JobTaskRunLog
getById
(
Integer
logId
);
int
updateByIdSelective
(
JobTaskRunLog
WithBLOBs
record
);
int
updateByIdSelective
(
JobTaskRunLog
record
);
int
updateByPrimaryKeyWithBLOBs
(
JobTaskRunLog
WithBLOBs
record
);
int
updateByPrimaryKeyWithBLOBs
(
JobTaskRunLog
record
);
int
updateById
(
JobTaskRunLog
record
);
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/JobTaskScheduleMapper.java
View file @
286ec10e
package
com
.
byit
.
mapper
;
import
com.byit.model.JobTaskSchedule
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
public
interface
JobTaskScheduleMapper
{
int
deleteById
(
Integer
nodeId
);
import
java.util.List
;
/**
* @author huangfu
*/
@Repository
public
interface
JobTaskScheduleMapper
{
/**
* 查询五秒内将要执行的数据
* @param maxNextTime
* @return
*/
List
<
JobTaskSchedule
>
findJobTaskScheduleByTriggerNextTimeLessThanEqual
(
long
maxNextTime
);
/**
* 插入数据
* @param record
* @return
*/
int
insert
(
JobTaskSchedule
record
);
/**
* 根据条件插入一条数据
* @param record
* @return
*/
int
insertSelective
(
JobTaskSchedule
record
);
JobTaskSchedule
getById
(
Integer
nodeId
);
/**
* 批量插入
* @param jobTaskSchedules
* @return
*/
int
insertDataList
(
@Param
(
"jobTaskSchedules"
)
List
<
JobTaskSchedule
>
jobTaskSchedules
);
int
deleteById
(
Integer
id
);
int
updateByIdSelective
(
JobTaskSchedule
record
);
int
updateByPrimaryKeyWithBLOBs
(
JobTaskSchedule
record
);
int
updateById
(
JobTaskSchedule
record
);
JobTaskSchedule
getById
(
Integer
id
);
int
updateByIdSelective
(
JobTaskSchedule
record
);
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/JobTask.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
*
*/
@ApiModel
@Data
public
class
JobTask
implements
Serializable
{
/**
* 当前版本节点主键
*/
@ApiModelProperty
(
"当前版本节点主键"
)
private
Integer
nodeId
;
/**
* 当前工作流版本的报警邮箱
*/
@ApiModelProperty
(
"当前工作流版本的报警邮箱"
)
private
String
alarmEmail
;
/**
* 阻塞策略
*/
@ApiModelProperty
(
"阻塞策略"
)
private
String
blockStrategy
;
/**
* 调度中心端请求插件时的令牌
*/
@ApiModelProperty
(
"调度中心端请求插件时的令牌"
)
private
String
callbackToken
;
/**
* 该节点的依赖节点
*/
@ApiModelProperty
(
"该节点的依赖节点"
)
private
String
dependencyNodes
;
/**
* 当前节点的失败重试次数
*/
@ApiModelProperty
(
"当前节点的失败重试次数"
)
private
Integer
failedRetryCount
;
/**
* 工作流ID
*/
@ApiModelProperty
(
"工作流ID"
)
private
Integer
flowId
;
/**
* 是否跟随任务流 1跟随 2不跟随
*/
@ApiModelProperty
(
"是否跟随任务流 1跟随 2不跟随"
)
private
String
followTaskFlow
;
/**
* 插件端请求调度中心的令牌
*/
@ApiModelProperty
(
"插件端请求调度中心的令牌"
)
private
String
gatewayToken
;
/**
* 当前任务的类型 java python shell sql script
*/
@ApiModelProperty
(
"当前任务的类型 java python shell sql script"
)
private
String
jobType
;
/**
* 本地节点(插件方) 的节点的名字
*/
@ApiModelProperty
(
"本地节点(插件方) 的节点的名字"
)
private
String
localNodeHandlerName
;
/**
* 当前工作流版本的告警的时机
*/
@ApiModelProperty
(
"当前工作流版本的告警的时机"
)
private
String
mailAction
;
/**
* 这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行
*/
@ApiModelProperty
(
"这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行"
)
private
String
nodeCron
;
/**
* 节点的说明
*/
@ApiModelProperty
(
"节点的说明"
)
private
String
nodeDesc
;
/**
* 当前节点的名称
*/
@ApiModelProperty
(
"当前节点的名称"
)
private
String
nodeName
;
/**
* nodeOfFlowId
*/
@ApiModelProperty
(
"nodeOfFlowId"
)
private
Integer
nodeOfFlowId
;
/**
* 节点的超时时间 -1不超时
*/
@ApiModelProperty
(
"节点的超时时间 -1不超时"
)
private
Long
nodeTimeout
;
/**
* 节点的类型 node flow
*/
@ApiModelProperty
(
"节点的类型 node flow"
)
private
String
nodeType
;
/**
* 插件端的url集合
*/
@ApiModelProperty
(
"插件端的url集合"
)
private
String
pluginUrls
;
/**
* 设置任务的优先级,1最低 2最高
*/
@ApiModelProperty
(
"设置任务的优先级,1最低 2最高"
)
private
String
priority
;
/**
* 节点的剩余次数
*/
@ApiModelProperty
(
"节点的剩余次数"
)
private
Integer
remainingCount
;
/**
* 当前节点总共重复次数
*/
@ApiModelProperty
(
"当前节点总共重复次数"
)
private
Integer
repeatCount
;
/**
* 重试的间隔
*/
@ApiModelProperty
(
"重试的间隔"
)
private
Long
retryInterval
;
/**
* 路由策略
*/
@ApiModelProperty
(
"路由策略"
)
private
String
routingStrategy
;
/**
* 运行标识
*/
@ApiModelProperty
(
"运行标识"
)
private
String
runId
;
/**
* 节点的参数
*/
@ApiModelProperty
(
"节点的参数"
)
private
String
runParam
;
/**
* 源码备注
*/
@ApiModelProperty
(
"源码备注"
)
private
String
runSourceDesc
;
/**
* 脚本的文件服务器路径集
*/
@ApiModelProperty
(
"脚本的文件服务器路径集"
)
private
String
scriptUrls
;
/**
* 源码负责人
*/
@ApiModelProperty
(
"源码负责人"
)
private
String
sourcePrincipal
;
/**
* 源码的修改时间
*/
@ApiModelProperty
(
"源码的修改时间"
)
private
Date
sourceUpdateTime
;
/**
* 当前版本的节点的下次执行时间
*/
@ApiModelProperty
(
"当前版本的节点的下次执行时间"
)
private
Long
triggerNextTime
;
/**
* 调度状态:0-暂停,1-运行
*/
@ApiModelProperty
(
"调度状态:0-暂停,1-运行"
)
private
String
triggerStatus
;
/**
* 源码
*/
@ApiModelProperty
(
"源码"
)
private
String
runSource
;
/**
*/
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/JobTaskRunLog.java
View file @
286ec10e
...
...
@@ -127,6 +127,18 @@ public class JobTaskRunLog implements Serializable {
private
Date
triggerTime
;
/**
* 运行结果信息
*/
@ApiModelProperty
(
"运行结果信息"
)
private
String
runMsg
;
/**
* 调度信息
*/
@ApiModelProperty
(
"调度信息"
)
private
String
triggerMsg
;
/**
*/
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/JobTaskRunLogWithBLOBs.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
lombok.Data
;
/**
*
*/
@ApiModel
@Data
public
class
JobTaskRunLogWithBLOBs
extends
JobTaskRunLog
implements
Serializable
{
/**
* 运行结果信息
*/
@ApiModelProperty
(
"运行结果信息"
)
private
String
runMsg
;
/**
* 调度信息
*/
@ApiModelProperty
(
"调度信息"
)
private
String
triggerMsg
;
/**
*/
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/JobTaskSchedule.java
View file @
286ec10e
...
...
@@ -13,6 +13,12 @@ import lombok.Data;
@Data
public
class
JobTaskSchedule
implements
Serializable
{
/**
* 排期表的主键
*/
@ApiModelProperty
(
"排期表的主键"
)
private
Integer
id
;
/**
* 当前版本节点主键
*/
@ApiModelProperty
(
"当前版本节点主键"
)
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/MythJobFlowCurrent.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
model
;
import
lombok.*
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.concurrent.TimeUnit
;
/**
* @program: byit-myth-job->MythJobCurrent
* @description: 这个实体是任务流的当前表
* @author: huangfu
* @date: 2019/12/19 16:42
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@Builder
@DynamicInsert
@DynamicUpdate
@Entity
@Table
(
name
=
"job_flow_current"
)
@org
.
hibernate
.
annotations
.
Table
(
appliesTo
=
"job_flow_current"
,
comment
=
"任务流的当前版本的表,现实表"
)
public
class
MythJobFlowCurrent
implements
Serializable
{
/**
* 当前版本工作流主键
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '当前版本工作流主键'"
)
private
Integer
flowId
;
/**
* 当前版本工作流名字
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"varchar(256) COMMENT '当前版本工作流名字'"
)
private
String
flowName
;
/**
* 当前版本工作流节点数目
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '前版本工作流节点数目'"
)
private
Integer
flowNodeCount
;
/**
* 当前工作流的介绍
*/
@Column
(
columnDefinition
=
"varchar(512) COMMENT '当前工作流的介绍'"
)
private
String
flowDesc
;
/**
* 当前版本的工作流的超时时间
*/
@Column
(
columnDefinition
=
"bigint(20) COMMENT '档期啊版本的工作流的超时时间'"
)
private
Long
flowTimeout
;
/**
* 当前版本的工作流的下次执行时间
*/
@Column
(
columnDefinition
=
"bigint(20) COMMENT '当前版本的工作流的下次执行时间'"
)
private
Long
triggerNextTime
;
/**
* 当前工作流版本总共重复次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '当前工作流版本额重复次数'"
)
private
Integer
repeatCount
;
/**
* 当前工作流版本的执行剩余次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '当前工作流版本的执行剩余次数'"
)
private
Integer
remainingCount
;
/**
* 当前工作流版本的报警邮箱
*/
@Column
(
columnDefinition
=
"varchar(256) COMMENT '当前工作流版本的报警邮箱'"
)
private
String
alarmEmail
;
/**
* 当前工作流版本的告警的时机
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '当前工作流版本的告警的时机'"
)
private
String
mailAction
;
/**
* 设置任务的优先级 1最低 2最高
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '设置任务的优先级,1最低 2最高'"
)
private
String
priority
;
/**
* 工作空间的id
*/
@Column
(
columnDefinition
=
"int(13) COMMENT '工作空间的id'"
)
private
Integer
workspaceId
;
/**
* 节点是否跟随任务流,1跟随 2不跟随
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '节点是否跟随任务流,1跟随 2不跟随'"
)
private
String
nodeDateIsFollowFlow
;
/**
* 任务流的cron表达式
*/
@Column
(
columnDefinition
=
"varchar(256) COMMENT '任务流的cron表达式'"
)
private
String
flowCron
;
/**
* 执行类型 周期执行1 手动执行2
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '执行类型 周期执行1 手动执行2'"
)
private
String
execType
;
/**
* 是否有下游节点 0 否,1 是
*/
@Column
(
columnDefinition
=
"char(1) default '0' COMMENT '是否有下游节点 0 否,1 是'"
)
private
String
isHaveDepend
;
/**
* 是否是顶级工作流 0 是, 1 是
*/
@Column
(
columnDefinition
=
"char(1) default '1' COMMENT '是否是顶级工作流 0 否, 1 是'"
)
private
String
isTop
;
/**
* 是否是顶级工作流 0 是, 1 是
*/
@Column
(
columnDefinition
=
"char(1) default '0' COMMENT '是否是内嵌工作流 0 否, 1 是' "
)
private
String
isInner
;
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/MythJobFlowDependent.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
model
;
import
lombok.*
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
/**
* @author huangfu
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@Builder
@DynamicInsert
@DynamicUpdate
@Entity
@Table
(
name
=
"job_flow_dependent"
)
@org
.
hibernate
.
annotations
.
Table
(
appliesTo
=
"job_flow_dependent"
,
comment
=
"任务流的关联表,现实表"
)
public
class
MythJobFlowDependent
implements
Serializable
{
@Id
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '工作流Id'"
)
private
Integer
flowId
;
@Id
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '上游依赖的工作流Id'"
)
private
Integer
dependFlowId
;
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/MythJobFlowNodeCurrent.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
model
;
import
lombok.*
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @program: byit-myth-job->MythJobFlowNode
* @description: 这是任务流当前版本的节点表
* @author: huangfu
* @date: 2019/12/19 18:47
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@Builder
@DynamicInsert
@DynamicUpdate
@Entity
@Table
(
name
=
"job_flow_node_current"
)
@org
.
hibernate
.
annotations
.
Table
(
appliesTo
=
"job_flow_node_current"
,
comment
=
"这是任务流当前版本的节点表"
)
public
class
MythJobFlowNodeCurrent
implements
Serializable
{
/**
* 当前版本节点主键
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
nullable
=
false
,
columnDefinition
=
"INT(13) COMMENT '当前版本节点主键'"
)
private
Integer
nodeId
;
/**
* 当前节点的名称
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"VARCHAR(255) COMMENT '当前节点的名称'"
)
private
String
nodeName
;
/**
* 本地节点(插件方) 的节点的名字
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '本地节点(插件方) 的节点的名字'"
)
private
String
localNodeHandlerName
;
/**
* 这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行'"
)
private
String
nodeCron
;
/**
* 节点的说明
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '节点的说明'"
)
private
String
nodeDesc
;
/**
* 插件端的url集合
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '插件端的url集合'"
)
private
String
pluginUrls
;
/**
* 路由策略
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '路由策略'"
)
private
String
routingStrategy
;
/**
* 阻塞策略
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '阻塞策略'"
)
private
String
blockStrategy
;
/**
* 调度中心端请求插件时的令牌
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '调度中心端请求插件时的令牌'"
)
private
String
callbackToken
;
/**
* 插件端请求调度中心的令牌
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '插件端请求调度中心的令牌'"
)
private
String
gatewayToken
;
/**
* 节点的参数
*/
@Column
(
columnDefinition
=
"VARCHAR(256) COMMENT '节点的参数'"
)
private
String
runParam
;
/**
* 节点的类型 node flow
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '节点的类型 node flow' "
)
private
String
nodeType
;
/**
* 工作流ID
*/
@Column
(
columnDefinition
=
"INT(13) COMMENT '工作流ID' "
)
private
Integer
flowId
;
/**
* 该节点的依赖节点
*/
@Column
(
columnDefinition
=
"VARCHAR(256) COMMENT '该节点的依赖节点' "
)
private
String
dependencyNodes
;
/**
* 节点的超时时间 -1不超时
*/
@Column
(
columnDefinition
=
"BIGINT COMMENT '节点的超时时间 -1不超时' "
)
private
Long
nodeTimeout
;
/**
* 脚本的文件服务器路径集
*/
@Column
(
columnDefinition
=
"VARCHAR(512) COMMENT '脚本的文件服务器路径集' "
)
private
String
scriptUrls
;
/**
* 源码
*/
@Column
(
columnDefinition
=
"LONGTEXT COMMENT '源码' "
)
private
String
runSource
;
/**
* 源码备注
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '源码备注' "
)
private
String
runSourceDesc
;
/**
* 源码的修改时间
*/
@Column
(
columnDefinition
=
"DATE COMMENT '源码的修改时间' "
)
private
Date
sourceUpdateTime
;
/**
* 源码负责人
*/
@Column
(
columnDefinition
=
"varchar(32) COMMENT '源码负责人'"
)
private
String
sourcePrincipal
;
/**
* 节点的任务流id
*/
@Column
(
columnDefinition
=
"int(13) COMMENT 'nodeOfFlowId'"
)
private
Integer
nodeOfFlowId
;
/**
* 当前节点总共重复次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '当前节点总共重复次数'"
)
private
Integer
repeatCount
;
/**
* 节点的剩余次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '节点的剩余次数'"
)
private
Integer
remainingCount
;
/**
* 当前节点的失败重试次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '当前节点的失败重试次数'"
)
private
Integer
failedRetryCount
;
/**
* 重试的间隔
*/
@Column
(
columnDefinition
=
"bigint(12) COMMENT '重试的间隔'"
)
private
Long
retryInterval
;
/**
* 是否跟随任务流
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '是否跟随任务流 1跟随 2不跟随'"
)
private
String
followTaskFlow
;
/**
* 当前版本的节点的下次执行时间
*/
@Column
(
columnDefinition
=
"bigint(20) COMMENT '当前版本的节点的下次执行时间'"
)
private
Long
triggerNextTime
;
/**
* 当前任务的类型 java python shell sql script
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"varchar(36) COMMENT '当前任务的类型 java python shell sql script'"
)
private
String
jobType
;
/**
* 设置任务的优先级 1最低 2最高
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '设置任务的优先级,1最低 2最高'"
)
private
String
priority
;
/**
* 当前工作流版本的报警邮箱
*/
@Column
(
columnDefinition
=
"varchar(256) COMMENT '当前工作流版本的报警邮箱'"
)
private
String
alarmEmail
;
/**
* 当前工作流版本的告警的时机
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '当前工作流版本的告警的时机'"
)
private
String
mailAction
;
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/MythJobFlowNodeVersion.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
model
;
import
lombok.*
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @program: byit-myth-job->MythJobFlowNodeVersion
* @description: 节点的版本表
* @author: huangfu
* @date: 2019/12/19 19:53
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@Builder
@Entity
@DynamicInsert
@DynamicUpdate
@Table
(
name
=
"job_flow_node_version"
)
@org
.
hibernate
.
annotations
.
Table
(
appliesTo
=
"job_flow_node_version"
,
comment
=
"节点的版本表"
)
public
class
MythJobFlowNodeVersion
implements
Serializable
{
/**
* 当前版本节点主键
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
nullable
=
false
,
columnDefinition
=
"INT(13) COMMENT '当前版本节点主键'"
)
private
Integer
nodeId
;
/**
* 当前节点的名称
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"VARCHAR(255) COMMENT '当前节点的名称'"
)
private
String
nodeName
;
/**
* 本地节点(插件方) 的节点的名字
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '本地节点(插件方) 的节点的名字'"
)
private
String
localNodeHandlerName
;
/**
* 这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行'"
)
private
String
nodeCron
;
/**
* 节点的说明
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '节点的说明'"
)
private
String
nodeDesc
;
/**
* 插件端的url集合
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '插件端的url集合'"
)
private
String
pluginUrls
;
/**
* 路由策略
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '路由策略'"
)
private
String
routingStrategy
;
/**
* 阻塞策略
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '阻塞策略'"
)
private
String
blockStrategy
;
/**
* 调度中心端请求插件时的令牌
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '调度中心端请求插件时的令牌'"
)
private
String
callbackToken
;
/**
* 插件端请求调度中心的令牌
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '插件端请求调度中心的令牌'"
)
private
String
gatewayToken
;
/**
* 节点的参数
*/
@Column
(
columnDefinition
=
"VARCHAR(256) COMMENT '节点的参数'"
)
private
String
runParam
;
/**
* 节点的类型 node flow
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '节点的类型 node flow' "
)
private
String
nodeType
;
/**
* 工作流ID
*/
@Column
(
columnDefinition
=
"INT(13) COMMENT '工作流ID' "
)
private
Integer
flowId
;
/**
* 该节点的依赖节点
*/
@Column
(
columnDefinition
=
"VARCHAR(256) COMMENT '该节点的依赖节点' "
)
private
String
dependencyNodes
;
/**
* 节点的超时时间 -1不超时
*/
@Column
(
columnDefinition
=
"BIGINT COMMENT '节点的超时时间 -1不超时' "
)
private
Long
nodeTimeout
;
/**
* 脚本的文件服务器路径集
*/
@Column
(
columnDefinition
=
"VARCHAR(512) COMMENT '脚本的文件服务器路径集' "
)
private
String
scriptUrls
;
/**
* 源码
*/
@Column
(
columnDefinition
=
"LONGTEXT COMMENT '源码' "
)
private
String
runSource
;
/**
* 源码备注
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '源码备注' "
)
private
String
runSourceDesc
;
/**
* 源码的修改时间
*/
@Column
(
columnDefinition
=
"DATE COMMENT '源码的修改时间' "
)
private
Date
sourceUpdateTime
;
/**
* 源码负责人
*/
@Column
(
columnDefinition
=
"varchar(32) COMMENT '源码负责人'"
)
private
String
sourcePrincipal
;
/**
* 节点的任务流id
*/
@Column
(
columnDefinition
=
"int(13) COMMENT 'nodeOfFlowId'"
)
private
Integer
nodeOfFlowId
;
/**
* 当前节点总共重复次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '当前节点总共重复次数'"
)
private
Integer
repeatCount
;
/**
* 当前节点的失败重试次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '当前节点的失败重试次数'"
)
private
Integer
failedRetryCount
;
/**
* 重试的间隔
*/
@Column
(
columnDefinition
=
"bigint(12) COMMENT '重试的间隔'"
)
private
Long
retryInterval
;
/**
* 是否跟随任务流
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '是否跟随任务流 1跟随 2不跟随'"
)
private
String
followTaskFlow
;
/**
* 当前版本的节点的下次执行时间
*/
@Column
(
columnDefinition
=
"bigint(20) COMMENT '当前版本的节点的下次执行时间'"
)
private
Long
triggerNextTime
;
/**
* 当前节点的版本标识
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '当前节点的版本标识'"
)
private
String
versionMark
;
/**
* 删除标识
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '删除标识 1正常 2 删除'"
)
private
String
removeMark
;
/**
* 所属工作流的id
*/
@Column
(
columnDefinition
=
"int(13) COMMENT '所属工作流的id'"
)
private
Integer
flowVersionId
;
/**
* 当前任务的类型 java python shell sql script
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"varchar(36) COMMENT '当前任务的类型 java python shell sql script'"
)
private
String
jobType
;
/**
* 设置任务的优先级 1最低 2最高
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '设置任务的优先级,1最低 2最高'"
)
private
String
priority
;
/**
* 当前工作流版本的报警邮箱
*/
@Column
(
columnDefinition
=
"varchar(256) COMMENT '当前工作流版本的报警邮箱'"
)
private
String
alarmEmail
;
/**
* 当前工作流版本的告警的时机
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '当前工作流版本的告警的时机'"
)
private
String
mailAction
;
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/MythJobFlowRunRecording.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
model
;
import
lombok.*
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.*
;
import
java.io.Serializable
;
/**
* @program: byit-myth-job->MythJobFlowRunRecording
* @description: 任务流的执行记录表
* @author: huangfu
* @date: 2019/12/19 20:08
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@Builder
@Entity
@DynamicInsert
@DynamicUpdate
@Table
(
name
=
"job_flow_run_recording"
)
@org
.
hibernate
.
annotations
.
Table
(
appliesTo
=
"job_flow_run_recording"
,
comment
=
"任务流的执行记录表"
)
public
class
MythJobFlowRunRecording
implements
Serializable
{
/**
* 当前版本工作流主键
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '记录主键'"
)
private
Integer
recordingId
;
/**
* 工作流的名字
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"varchar(255) COMMENT '工作流的名字'"
)
private
String
flowName
;
/**
* 节点数量
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '节点数量'"
)
private
Integer
nodeCount
;
/**
* 工作流的版本id
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '工作流的版本id'"
)
private
Integer
flowVersionId
;
/**
* 工作流的超时时间
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"bigint(20) COMMENT '工作流的超时时间'"
)
private
Long
flowTimeout
;
/**
* 初始值为节点总数,每次一个节点运行成功就将总数-1
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '初始值为节点总数,每次一个节点运行完就将总数-1'"
)
private
Integer
remainingNode
;
/**
* 1 未开始 2运行 3暂停 4结束
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"char(1) COMMENT '1 未开始 2运行中 3暂停 4成功 5失败'"
)
private
String
flowStatus
;
/**
* 本次任务的执行时间
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"bigint(20) COMMENT '本次任务的执行时间'"
)
private
Long
triggerTime
;
/**
* 执行结果
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '执行结果'"
)
private
String
flowRunResult
;
/**
* 被哪一个调度器加载的
*/
@Column
(
columnDefinition
=
"varchar(36) COMMENT '被哪一个调度器加载的'"
)
private
String
dispatch_ip
;
/**
* 运行标识
*/
@Column
(
columnDefinition
=
"varchar(36) COMMENT '运行标识'"
)
private
String
RunId
;
/**
* 设置任务的优先级 1最低 2最高
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '设置任务的优先级,1最低 2最高'"
)
private
String
priority
;
/**
* 当前工作流版本的报警邮箱
*/
@Column
(
columnDefinition
=
"varchar(256) COMMENT '当前工作流版本的报警邮箱'"
)
private
String
alarmEmail
;
/**
* 当前工作流版本的告警的时机
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '当前工作流版本的告警的时机'"
)
private
String
mailAction
;
/**
* 调度状态:0-暂停,1-运行
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '调度状态:0-未开始,1-调度成功, 2-调度失败'"
)
private
String
triggerStatus
;
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/MythJobFlowVersion.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
model
;
import
lombok.*
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @program: byit-myth-job->MythJobFlowVersion
* @description: 这个实体是任务流的版本表
* @author: huangfu
* @date: 2019/12/19 18:30
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@Builder
@Entity
@DynamicInsert
@DynamicUpdate
@Table
(
name
=
"job_flow_version"
)
@org
.
hibernate
.
annotations
.
Table
(
appliesTo
=
"job_flow_version"
,
comment
=
"这个实体是任务流的版本表"
)
public
class
MythJobFlowVersion
implements
Serializable
{
/**
* 版本工作流主键
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '版本工作流主键'"
)
private
Integer
versionId
;
/**
* 工作流的id
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '工作流主键'"
)
private
Integer
flowId
;
/**
* 版本工作流名字
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"varchar(256) COMMENT '版本工作流名字'"
)
private
String
flowName
;
/**
* 版本工作流节点数目
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '前版本工作流节点数目'"
)
private
Integer
flowNodeCount
;
/**
* 工作流的介绍
*/
@Column
(
columnDefinition
=
"varchar(512) COMMENT '工作流的介绍'"
)
private
String
flowDesc
;
/**
* 版本的工作流的超时时间
*/
@Column
(
columnDefinition
=
"bigint(20) COMMENT '档期啊版本的工作流的超时时间'"
)
private
Long
flowTimeout
;
/**
* 工作流版本额重复次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '工作流版本额重复次数'"
)
private
Integer
repeatCount
;
/**
* 工作流版本的报警邮箱
*/
@Column
(
columnDefinition
=
"varchar(256) COMMENT '工作流版本的报警邮箱'"
)
private
String
alarmEmail
;
/**
* 工作流版本的告警的时机
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '工作流版本的告警的时机'"
)
private
String
mailAction
;
/**
* 设置任务的优先级 1最低 2最高
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '设置任务的优先级,1最低 2最高'"
)
private
String
priority
;
/**
* 工作空间的id
*/
@Column
(
columnDefinition
=
"int(13) COMMENT '工作空间的id'"
)
private
Integer
workspaceId
;
/**
* 节点是否跟随任务流,1跟随 2不跟随
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '节点是否跟随任务流,1跟随 2不跟随'"
)
private
String
nodeDateIsFollowFlow
;
/**
* 任务流的cron表达式
*/
@Column
(
columnDefinition
=
"varchar(256) COMMENT '任务流的cron表达式'"
)
private
String
flowCron
;
/**
* 执行类型 周期执行1 手动执行2
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '执行类型 周期执行1 手动执行2'"
)
private
String
execType
;
/**
* 删除标志 1正常 2删除
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '删除标志 1正常 2删除'"
)
private
String
removeMark
;
/**
* 当前版本的标志
*/
@Column
(
columnDefinition
=
"char(16) COMMENT '当前版本的标志 this'"
)
private
String
versionMark
;
/**
* 添加时间
*/
@Column
(
columnDefinition
=
"DATE COMMENT '添加时间'"
)
private
Date
addTime
;
/**
* 修改时间
*/
@Column
(
columnDefinition
=
"DATE COMMENT '修改时间'"
)
private
Date
updateTime
;
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/MythJobTask.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
model
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.*
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @program: byit-myth-job->MythTaskNode
* @description: 任务表,即将执行的任务全在这个表
* @author: huangfu
* @date: 2019/12/20 9:58
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@Builder
@Entity
@DynamicInsert
@DynamicUpdate
@Table
(
name
=
"job_task"
)
@org
.
hibernate
.
annotations
.
Table
(
appliesTo
=
"job_task"
,
comment
=
"任务表,即将执行的任务全在这个表;工作任务"
)
public
class
MythJobTask
implements
Serializable
{
/**
* 当前版本节点主键
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
nullable
=
false
,
columnDefinition
=
"INT(13) COMMENT '当前版本节点主键'"
)
private
Integer
nodeId
;
/**
* 当前节点的名称
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"VARCHAR(255) COMMENT '当前节点的名称'"
)
private
String
nodeName
;
/**
* 本地节点(插件方) 的节点的名字
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '本地节点(插件方) 的节点的名字'"
)
private
String
localNodeHandlerName
;
/**
* 这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行'"
)
private
String
nodeCron
;
/**
* 节点的说明
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '节点的说明'"
)
private
String
nodeDesc
;
/**
* 插件端的url集合
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '插件端的url集合'"
)
private
String
pluginUrls
;
/**
* 路由策略
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '路由策略'"
)
private
String
routingStrategy
;
/**
* 阻塞策略
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '阻塞策略'"
)
private
String
blockStrategy
;
/**
* 调度中心端请求插件时的令牌
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '调度中心端请求插件时的令牌'"
)
private
String
callbackToken
;
/**
* 插件端请求调度中心的令牌
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '插件端请求调度中心的令牌'"
)
private
String
gatewayToken
;
/**
* 节点的参数
*/
@Column
(
columnDefinition
=
"VARCHAR(256) COMMENT '节点的参数'"
)
private
String
runParam
;
/**
* 节点的类型 node flow
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '节点的类型 node flow' "
)
private
String
nodeType
;
/**
* 工作流ID
*/
@Column
(
columnDefinition
=
"INT(13) COMMENT '工作流ID' "
)
private
Integer
flowId
;
/**
* 该节点的依赖节点
*/
@Column
(
columnDefinition
=
"VARCHAR(256) COMMENT '该节点的依赖节点' "
)
private
String
dependencyNodes
;
/**
* 节点的超时时间 -1不超时
*/
@Column
(
columnDefinition
=
"BIGINT COMMENT '节点的超时时间 -1不超时' "
)
private
Long
nodeTimeout
;
/**
* 脚本的文件服务器路径集
*/
@Column
(
columnDefinition
=
"VARCHAR(512) COMMENT '脚本的文件服务器路径集' "
)
private
String
scriptUrls
;
/**
* 源码
*/
@Column
(
columnDefinition
=
"LONGTEXT COMMENT '源码' "
)
private
String
runSource
;
/**
* 源码备注
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '源码备注' "
)
private
String
runSourceDesc
;
/**
* 源码的修改时间
*/
@Column
(
columnDefinition
=
"DATE COMMENT '源码的修改时间' "
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mms:s"
)
private
Date
sourceUpdateTime
;
/**
* 源码负责人
*/
@Column
(
columnDefinition
=
"varchar(32) COMMENT '源码负责人'"
)
private
String
sourcePrincipal
;
/**
* 节点的任务流id
*/
@Column
(
columnDefinition
=
"int(13) COMMENT 'nodeOfFlowId'"
)
private
Integer
nodeOfFlowId
;
/**
* 节点的剩余次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '节点的剩余次数'"
)
private
Integer
remainingCount
;
/**
* 当前节点总共重复次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '当前节点总共重复次数'"
)
private
Integer
repeatCount
;
/**
* 当前节点的失败重试次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '当前节点的失败重试次数'"
)
private
Integer
failedRetryCount
;
/**
* 重试的间隔
*/
@Column
(
columnDefinition
=
"bigint(12) COMMENT '重试的间隔'"
)
private
Long
retryInterval
;
/**
* 是否跟随任务流
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '是否跟随任务流 1跟随 2不跟随'"
)
private
String
followTaskFlow
;
/**
* 当前版本的节点的下次执行时间
*/
@Column
(
columnDefinition
=
"bigint(20) COMMENT '当前版本的节点的下次执行时间'"
)
private
Long
triggerNextTime
;
/**
* 节点的运行标识
*/
@Column
(
columnDefinition
=
"varchar(36) COMMENT '运行标识'"
)
private
String
runId
;
/**
* 调度状态:0-暂停,1-运行
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '调度状态:0-暂停,1-运行'"
)
private
String
triggerStatus
;
/**
* 当前任务的类型 java python shell sql script
*/
@Column
(
columnDefinition
=
"varchar(36) COMMENT '当前任务的类型 java python shell sql script'"
)
private
String
jobType
;
/**
* 设置任务的优先级 1最低 2最高
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '设置任务的优先级,1最低 2最高'"
)
private
String
priority
;
/**
* 当前工作流版本的报警邮箱
*/
@Column
(
columnDefinition
=
"varchar(256) COMMENT '当前工作流版本的报警邮箱'"
)
private
String
alarmEmail
;
/**
* 当前工作流版本的告警的时机
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '当前工作流版本的告警的时机'"
)
private
String
mailAction
;
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/MythJobTaskRunLog.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
model
;
import
lombok.*
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @program: byit-myth-job->MythJobRunLog
* @description: 节点执行日志
* @author: huangfu
* @date: 2019/12/20 10:21
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@Builder
@Entity
@Table
(
name
=
"job_task_run_log"
)
@DynamicInsert
@DynamicUpdate
@org
.
hibernate
.
annotations
.
Table
(
appliesTo
=
"job_task_run_log"
,
comment
=
"节点执行日志"
)
public
class
MythJobTaskRunLog
implements
Serializable
{
/**
* 日志ID
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
nullable
=
false
,
columnDefinition
=
"int(13) COMMENT '日志ID'"
)
private
Integer
logId
;
/**
* 执行机主键
*/
@Column
(
columnDefinition
=
"int(13) COMMENT '执行机主键'"
)
private
Integer
jobGroupId
;
/**
* 任务流的主键
*/
@Column
(
columnDefinition
=
"int(13) COMMENT '任务流主键'"
)
private
Integer
jobFlowId
;
/**
* 任务流版本的主键
*/
@Column
(
columnDefinition
=
"int(13) COMMENT '任务流版本的主键'"
)
private
Integer
flowVersionId
;
/**
* 所属任务流的名称
*/
@Column
(
columnDefinition
=
"varchar(13) COMMENT '所属任务流的名称'"
)
private
String
jobFlowName
;
/**
* 节点名称
*/
@Column
(
columnDefinition
=
"varchar(255) COMMENT '节点名称'"
)
private
String
nodeName
;
/**
* 节点类型 node type
*/
@Column
(
columnDefinition
=
"varchar(36) COMMENT '节点类型 node type'"
)
private
String
nodeType
;
/**
* 运行方式 1执行机运行,2本地运行
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '运行方式 1执行机运行,2本地运行'"
)
private
String
runType
;
/**
* 插件方节点key
*/
@Column
(
columnDefinition
=
"varchar(36) COMMENT '插件方节点key'"
)
private
String
localNodeHandlerName
;
/**
* 运行参数
*/
@Column
(
columnDefinition
=
"varchar(36) COMMENT '运行参数'"
)
private
String
runParams
;
/**
* 触发时间
*/
@Column
(
columnDefinition
=
"DATE COMMENT '触发时间'"
)
private
Date
triggerTime
;
/**
* 调度结果 1成功 2失败
*/
@Column
(
columnDefinition
=
"varchar(13) COMMENT '调度结果 1成功 2失败'"
)
private
String
triggerCode
;
/**
* 调度信息
*/
@Column
(
columnDefinition
=
"text COMMENT '调度信息'"
)
private
String
triggerMsg
;
/**
* 执行时间
*/
@Column
(
columnDefinition
=
"DATE COMMENT '执行时间'"
)
private
Date
runTime
;
/**
* 运行结果 0未执行完成
*/
@Column
(
columnDefinition
=
"varchar(13) COMMENT '运行结果'"
)
private
String
runCode
;
/**
* 运行结果信息
*/
@Column
(
columnDefinition
=
"text COMMENT '运行结果信息'"
)
private
String
runMsg
;
/**
* 当前节点的失败剩余重试次数 初始阶段为初始的重试次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '当前节点的失败剩余重试次数 初始阶段为初始的重试次数'"
)
private
Integer
failedRemainingCount
;
/**
* 当前工作流版本的报警邮箱
*/
@Column
(
columnDefinition
=
"varchar(256) COMMENT '当前工作流版本的报警邮箱'"
)
private
String
alarmEmail
;
/**
* 当前工作流版本的告警的时机
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '当前工作流版本的告警的时机'"
)
private
String
mailAction
;
/**
* 告警结果 1-告警成功 2-告警失败
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '告警结果,1-告警成功 2-告警失败'"
)
private
String
alarmStatus
;
@Column
(
nullable
=
false
,
columnDefinition
=
"varchar(13) COMMENT '任务类型 BEAN ACTUATOR'"
)
private
String
jobType
;
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/MythJobTaskSchedule.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
model
;
import
lombok.*
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @program: byit-myth-job->MythJobTaskSchedule
* @description: 工作任务排期表,存储七秒内即将执行的任务节点,这个表也是对接工作流的
* @author: huangfu
* @date: 2019/12/20 10:16
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@Builder
@Entity
@DynamicInsert
@DynamicUpdate
@Table
(
name
=
"job_task_schedule"
)
@org
.
hibernate
.
annotations
.
Table
(
appliesTo
=
"job_task_schedule"
,
comment
=
"工作任务排期表,存储七秒内即将执行的任务节点,这个表也是对接工作流的"
)
public
class
MythJobTaskSchedule
implements
Serializable
{
/**
* 当前版本节点主键
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
nullable
=
false
,
columnDefinition
=
"INT(13) COMMENT '当前版本节点主键'"
)
private
Integer
nodeId
;
/**
* 当前节点的名称
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"VARCHAR(255) COMMENT '当前节点的名称'"
)
private
String
nodeName
;
/**
* 本地节点(插件方) 的节点的名字
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '本地节点(插件方) 的节点的名字'"
)
private
String
localNodeHandlerName
;
/**
* 这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行'"
)
private
String
nodeCron
;
/**
* 节点的说明
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '节点的说明'"
)
private
String
nodeDesc
;
/**
* 插件端的url集合
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '插件端的url集合'"
)
private
String
pluginUrls
;
/**
* 路由策略
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '路由策略'"
)
private
String
routingStrategy
;
/**
* 阻塞策略
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '阻塞策略'"
)
private
String
blockStrategy
;
/**
* 调度中心端请求插件时的令牌
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '调度中心端请求插件时的令牌'"
)
private
String
callbackToken
;
/**
* 插件端请求调度中心的令牌
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '插件端请求调度中心的令牌'"
)
private
String
gatewayToken
;
/**
* 节点的参数
*/
@Column
(
columnDefinition
=
"VARCHAR(256) COMMENT '节点的参数'"
)
private
String
runParam
;
/**
* 节点的类型 node flow
*/
@Column
(
columnDefinition
=
"VARCHAR(32) COMMENT '节点的类型 node flow' "
)
private
String
nodeType
;
/**
* 工作流ID
*/
@Column
(
columnDefinition
=
"INT(13) COMMENT '工作流ID' "
)
private
Integer
flowId
;
/**
* 该节点的依赖节点
*/
@Column
(
columnDefinition
=
"VARCHAR(256) COMMENT '该节点的依赖节点' "
)
private
String
dependencyNodes
;
/**
* 节点的超时时间 -1不超时
*/
@Column
(
columnDefinition
=
"BIGINT COMMENT '节点的超时时间 -1不超时' "
)
private
Long
nodeTimeout
;
/**
* 脚本的文件服务器路径集
*/
@Column
(
columnDefinition
=
"VARCHAR(512) COMMENT '脚本的文件服务器路径集' "
)
private
String
scriptUrls
;
/**
* 源码
*/
@Column
(
columnDefinition
=
"LONGTEXT COMMENT '源码' "
)
private
String
runSource
;
/**
* 源码备注
*/
@Column
(
columnDefinition
=
"VARCHAR(255) COMMENT '源码备注' "
)
private
String
runSourceDesc
;
/**
* 源码的修改时间
*/
@Column
(
columnDefinition
=
"DATE COMMENT '源码的修改时间' "
)
private
Date
sourceUpdateTime
;
/**
* 源码负责人
*/
@Column
(
columnDefinition
=
"varchar(32) COMMENT '源码负责人'"
)
private
String
sourcePrincipal
;
/**
* 节点的任务流id
*/
@Column
(
columnDefinition
=
"int(13) COMMENT 'nodeOfFlowId'"
)
private
Integer
nodeOfFlowId
;
/**
* 节点的剩余次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '节点的剩余次数'"
)
private
Integer
remainingCount
;
/**
* 当前节点总共重复次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '当前节点总共重复次数'"
)
private
Integer
repeatCount
;
/**
* 当前节点的失败重试次数
*/
@Column
(
columnDefinition
=
"int(12) COMMENT '当前节点的失败重试次数'"
)
private
Integer
failedRetryCount
;
/**
* 重试的间隔
*/
@Column
(
columnDefinition
=
"bigint(12) COMMENT '重试的间隔'"
)
private
Long
retryInterval
;
/**
* 是否跟随任务流
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '是否跟随任务流 1跟随 2不跟随'"
)
private
String
followTaskFlow
;
/**
* 当前版本的节点的下次执行时间
*/
@Column
(
columnDefinition
=
"bigint(20) COMMENT '当前版本的节点的下次执行时间'"
)
private
Long
triggerNextTime
;
/**
* 节点的运行标识
*/
@Column
(
columnDefinition
=
"varchar(36) COMMENT '运行标识'"
)
private
String
runId
;
/**
* 调度状态:0-暂停,1-运行
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '调度状态:0-暂停,1-运行'"
)
private
String
triggerStatus
;
/**
* 当前任务的类型 java python shell sql script
*/
@Column
(
nullable
=
false
,
columnDefinition
=
"varchar(36) COMMENT '当前任务的类型 java python shell sql script'"
)
private
String
jobType
;
/**
* 设置任务的优先级 1最低 2最高
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '设置任务的优先级,1最低 2最高'"
)
private
String
priority
;
/**
* 当前工作流版本的报警邮箱
*/
@Column
(
columnDefinition
=
"varchar(256) COMMENT '当前工作流版本的报警邮箱'"
)
private
String
alarmEmail
;
/**
* 当前工作流版本的告警的时机
*/
@Column
(
columnDefinition
=
"char(1) COMMENT '当前工作流版本的告警的时机'"
)
private
String
mailAction
;
/**
* 日志ID
*/
@Column
(
columnDefinition
=
"int(13) COMMENT '日志ID'"
)
private
Integer
logId
;
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/repository/MythJobTaskRepository.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
repository
;
import
com.byit.model.MythJobTask
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @program: byit-myth-job->MythJobTaskRepository
* @description: 对于即将执行人任务进行操作JobTask
* @author: huangfu
* @date: 2019/12/20 15:07
**/
public
interface
MythJobTaskRepository
extends
JpaRepository
<
MythJobTask
,
Integer
>
{
/**
* 根据下次执行时间+7000毫秒 查询所有任务节点
* @param maxNextTime
* @return
*/
List
<
MythJobTask
>
findMythJobTaskByTriggerNextTimeLessThanEqual
(
long
maxNextTime
);
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/repository/MythJobTaskRunLogRepository.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
repository
;
import
com.byit.model.MythJobTaskRunLog
;
import
lombok.*
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @program: byit-myth-job->MythJobRunLog
* @description: 节点执行日志
* @author: huangfu
* @date: 2019/12/20 10:21
**/
public
interface
MythJobTaskRunLogRepository
extends
JpaRepository
<
MythJobTaskRunLog
,
Integer
>
{
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/repository/MythJobTaskScheduleRepository.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
repository
;
import
com.byit.model.MythJobTaskSchedule
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @program: byit-myth-job->MythJobTaskSchedule
* @description: 排期表持久化操作
* @author: huangfu
* @date: 2019/12/20 17:27
**/
public
interface
MythJobTaskScheduleRepository
extends
JpaRepository
<
MythJobTaskSchedule
,
Integer
>
{
/**
* 根据下次执行时间+5000毫秒 查询所有任务节点
* @param maxNextTime
* @return
*/
List
<
MythJobTaskSchedule
>
findMythJobTaskScheduleByTriggerNextTimeLessThanEqual
(
long
maxNextTime
);
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/
Myth
JobTaskRunLogService.java
→
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/JobTaskRunLogService.java
View file @
286ec10e
package
com
.
byit
.
service
;
import
com.byit.model.
Myth
JobTaskRunLog
;
import
com.byit.model.JobTaskRunLog
;
/**
* @program: byit-myth-job->
Myth
JobTaskRunLogService
* @program: byit-myth-job->JobTaskRunLogService
* @description: 日志业务表
* @author: huangfu
* @date: 2019/12/20 19:42
**/
public
interface
Myth
JobTaskRunLogService
{
public
interface
JobTaskRunLogService
{
/**
* 查询一条数据 根据ID
* @param id
* @return
*/
MythJobTaskRunLog
findMythJobTaskRunLogById
(
Integer
id
);
JobTaskRunLog
findJobTaskRunLogById
(
Integer
id
);
/**
* 既是保存接口又是修改接口
* @param jobTaskRunLog
* @return
*/
MythJobTaskRunLog
save
(
MythJobTaskRunLog
mythJ
obTaskRunLog
);
int
saveJobTaskRunLog
(
JobTaskRunLog
j
obTaskRunLog
);
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/
Myth
JobTaskScheduleService.java
→
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/JobTaskScheduleService.java
View file @
286ec10e
package
com
.
byit
.
service
;
import
com.byit.model.
Myth
JobTaskSchedule
;
import
com.byit.model.JobTaskSchedule
;
import
java.util.List
;
/**
* @program: byit-myth-job->
Myth
JobTaskScheduleService
* @program: byit-myth-job->JobTaskScheduleService
* @description: 排期表操作
* @author: huangfu
* @date: 2019/12/20 17:31
**/
public
interface
Myth
JobTaskScheduleService
{
public
interface
JobTaskScheduleService
{
/**
* 根据下次执行时间+5000毫秒 查询所有任务节点
* @param maxNextTime
* @return
*/
List
<
MythJobTaskSchedule
>
findMyth
JobTaskScheduleByTriggerNextTimeLessThanEqual
(
long
maxNextTime
);
List
<
JobTaskSchedule
>
find
JobTaskScheduleByTriggerNextTimeLessThanEqual
(
long
maxNextTime
);
/**
* 保存任务表预读的数据
* @param mythJobTaskSchedules
* @return
*/
List
<
MythJobTaskSchedule
>
save
(
List
<
Myth
JobTaskSchedule
>
mythJobTaskSchedules
);
int
saveAllData
(
List
<
JobTaskSchedule
>
mythJobTaskSchedules
);
/**
* 根据id删除
...
...
@@ -31,10 +31,5 @@ public interface MythJobTaskScheduleService {
*/
void
delete
(
Integer
id
);
/**
* 根据集合删除
* @param mythJobTaskSchedules
*/
void
delete
(
List
<
MythJobTaskSchedule
>
mythJobTaskSchedules
);
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/
Myth
JobTaskService.java
→
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/JobTaskService.java
View file @
286ec10e
package
com
.
byit
.
service
;
import
com.byit.model.
Myth
JobTask
;
import
com.byit.model.JobTask
;
import
java.util.List
;
/**
* @program: byit-myth-job->
Myth
JobTaskService
* @program: byit-myth-job->JobTaskService
* @description: 对于任务表的操作
* @author: huangfu
* @date: 2019/12/20 15:13
**/
public
interface
Myth
JobTaskService
{
public
interface
JobTaskService
{
/**
* 根据下次执行时间+7000毫秒 查询所有任务节点
* @param maxNextTime
* @return
*/
List
<
MythJobTask
>
findMyth
JobTaskByTriggerNextTimeLessThanEqual
(
long
maxNextTime
);
List
<
JobTask
>
find
JobTaskByTriggerNextTimeLessThanEqual
(
long
maxNextTime
);
/**
* 添加单个任务节点
* @param
mythJ
obTask
* @param
j
obTask
*/
void
addMythJobTask
(
MythJobTask
mythJ
obTask
);
void
addMythJobTask
(
JobTask
j
obTask
);
/**
* 删除已经被调度的任务根据ID
...
...
@@ -32,7 +32,7 @@ public interface MythJobTaskService {
/**
* 根据集合删除
* @param
mythJ
obTasks
* @param
j
obTasks
*/
void
removeMythJobTaskInIds
(
List
<
MythJobTask
>
mythJ
obTasks
);
void
removeMythJobTaskInIds
(
List
<
JobTask
>
j
obTasks
);
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/
Myth
JobTaskRunLogServiceImpl.java
→
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/JobTaskRunLogServiceImpl.java
View file @
286ec10e
package
com
.
byit
.
service
.
impl
;
import
com.byit.m
odel.MythJobTaskRunLog
;
import
com.byit.
repository.MythJobTaskRunLogRepository
;
import
com.byit.service.
Myth
JobTaskRunLogService
;
import
com.byit.m
apper.JobTaskRunLogMapper
;
import
com.byit.
model.JobTaskRunLog
;
import
com.byit.service.JobTaskRunLogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* @program: byit-myth-job->
Myth
JobTaskRunLogServiceImpl
* @program: byit-myth-job->JobTaskRunLogServiceImpl
* @description: 日志业务表
* @author: huangfu
* @date: 2019/12/20 19:43
**/
@Service
public
class
MythJobTaskRunLogServiceImpl
implements
MythJobTaskRunLogService
{
public
class
JobTaskRunLogServiceImpl
implements
JobTaskRunLogService
{
@Autowired
private
MythJobTaskRunLogRepository
mythJobTaskRunLogRepository
;
private
JobTaskRunLogMapper
jobTaskRunLogMapper
;
@Override
public
MythJobTaskRunLog
findMyth
JobTaskRunLogById
(
Integer
id
)
{
return
mythJobTaskRunLogRepository
.
findOne
(
id
);
public
JobTaskRunLog
find
JobTaskRunLogById
(
Integer
id
)
{
return
jobTaskRunLogMapper
.
getById
(
id
);
}
@Override
public
MythJobTaskRunLog
save
(
MythJobTaskRunLog
mythJ
obTaskRunLog
)
{
return
mythJobTaskRunLogRepository
.
save
(
mythJ
obTaskRunLog
);
public
int
saveJobTaskRunLog
(
JobTaskRunLog
j
obTaskRunLog
)
{
return
jobTaskRunLogMapper
.
insertSelective
(
j
obTaskRunLog
);
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/JobTaskScheduleServiceImpl.java
0 → 100644
View file @
286ec10e
package
com
.
byit
.
service
.
impl
;
import
com.byit.mapper.JobTaskScheduleMapper
;
import
com.byit.model.JobTaskSchedule
;
import
com.byit.service.JobTaskScheduleService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @program: byit-myth-job->JobTaskScheduleServiceImpl
* @description: 排期表实现
* @author: huangfu
* @date: 2019/12/20 17:32
**/
@Service
public
class
JobTaskScheduleServiceImpl
implements
JobTaskScheduleService
{
@Autowired
private
JobTaskScheduleMapper
jobTaskScheduleMapper
;
/**
* 查询五秒的数据
* @param maxNextTime
* @return
*/
@Override
public
List
<
JobTaskSchedule
>
findJobTaskScheduleByTriggerNextTimeLessThanEqual
(
long
maxNextTime
)
{
return
jobTaskScheduleMapper
.
findJobTaskScheduleByTriggerNextTimeLessThanEqual
(
maxNextTime
);
}
/**
* 保存一批数据
* @param jobTaskSchedules
* @return
*/
@Override
public
int
saveAllData
(
List
<
JobTaskSchedule
>
jobTaskSchedules
)
{
return
jobTaskScheduleMapper
.
insertDataList
(
jobTaskSchedules
);
}
@Override
public
void
delete
(
Integer
id
)
{
jobTaskScheduleMapper
.
deleteById
(
id
);
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/JobTaskServiceImpl.java
0 → 100644
View file @
286ec10e
package
com
.
byit
.
service
.
impl
;
import
com.byit.mapper.JobTaskMapper
;
import
com.byit.model.JobTask
;
import
com.byit.service.JobTaskService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @program: byit-myth-job->JobTaskService
* @description: 对于任务表的操作
* @author: huangfu
* @date: 2019/12/20 15:13
**/
@Service
public
class
JobTaskServiceImpl
implements
JobTaskService
{
private
final
JobTaskMapper
jobTaskMapper
;
@Autowired
public
JobTaskServiceImpl
(
JobTaskMapper
jobTaskMapper
)
{
this
.
jobTaskMapper
=
jobTaskMapper
;
}
/**
* 根据下次执行时间查询
* @param maxNextTime 预读数值
* @return 返回的是七秒内将要执行的数据
*/
@Override
public
List
<
JobTask
>
findJobTaskByTriggerNextTimeLessThanEqual
(
long
maxNextTime
)
{
return
jobTaskMapper
.
findJobTaskByTriggerNextTimeLessThanEqual
(
maxNextTime
);
}
/**
* 添加一个任务
* @param jobTask 任务实体
*/
@Override
public
void
addMythJobTask
(
JobTask
jobTask
)
{
jobTaskMapper
.
insertSelective
(
jobTask
);
}
/**
* 根据id删除一个任务
* @param id 任务的id
*/
@Override
public
void
removeMythJobTaskById
(
Integer
id
)
{
jobTaskMapper
.
deleteById
(
id
);
}
/**
* 删除多个任务 根据id
* @param jobTasks 任务实体
*/
@Override
public
void
removeMythJobTaskInIds
(
List
<
JobTask
>
jobTasks
)
{
jobTaskMapper
.
deleteByIds
(
jobTasks
);
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/MythJobTaskScheduleServiceImpl.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
service
.
impl
;
import
com.byit.model.MythJobTaskSchedule
;
import
com.byit.repository.MythJobTaskScheduleRepository
;
import
com.byit.service.MythJobTaskScheduleService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @program: byit-myth-job->MythJobTaskScheduleServiceImpl
* @description: 排期表实现
* @author: huangfu
* @date: 2019/12/20 17:32
**/
@Service
public
class
MythJobTaskScheduleServiceImpl
implements
MythJobTaskScheduleService
{
@Autowired
private
MythJobTaskScheduleRepository
mythJobTaskScheduleRepository
;
@Override
public
List
<
MythJobTaskSchedule
>
findMythJobTaskScheduleByTriggerNextTimeLessThanEqual
(
long
maxNextTime
)
{
return
mythJobTaskScheduleRepository
.
findMythJobTaskScheduleByTriggerNextTimeLessThanEqual
(
maxNextTime
);
}
@Override
public
List
<
MythJobTaskSchedule
>
save
(
List
<
MythJobTaskSchedule
>
mythJobTaskSchedules
)
{
return
mythJobTaskScheduleRepository
.
save
(
mythJobTaskSchedules
);
}
@Override
public
void
delete
(
Integer
id
)
{
mythJobTaskScheduleRepository
.
delete
(
id
);
}
@Override
public
void
delete
(
List
<
MythJobTaskSchedule
>
mythJobTaskSchedules
)
{
mythJobTaskScheduleRepository
.
delete
(
mythJobTaskSchedules
);
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/MythJobTaskServiceImpl.java
deleted
100644 → 0
View file @
d8b4ddb2
package
com
.
byit
.
service
.
impl
;
import
com.byit.model.MythJobTask
;
import
com.byit.repository.MythJobTaskRepository
;
import
com.byit.service.MythJobTaskService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @program: byit-myth-job->MythJobTaskService
* @description: 对于任务表的操作
* @author: huangfu
* @date: 2019/12/20 15:13
**/
@Service
public
class
MythJobTaskServiceImpl
implements
MythJobTaskService
{
@Autowired
private
MythJobTaskRepository
mythJobTaskRepository
;
@Override
public
List
<
MythJobTask
>
findMythJobTaskByTriggerNextTimeLessThanEqual
(
long
maxNextTime
)
{
return
mythJobTaskRepository
.
findMythJobTaskByTriggerNextTimeLessThanEqual
(
maxNextTime
);
}
@Override
public
void
addMythJobTask
(
MythJobTask
mythJobTask
)
{
mythJobTaskRepository
.
save
(
mythJobTask
);
}
@Override
public
void
removeMythJobTaskById
(
Integer
id
)
{
mythJobTaskRepository
.
delete
(
id
);
}
@Override
public
void
removeMythJobTaskInIds
(
List
<
MythJobTask
>
mythJobTasks
)
{
mythJobTaskRepository
.
delete
(
mythJobTasks
);
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/task/JavaBeanJobTask.java
View file @
286ec10e
...
...
@@ -6,11 +6,11 @@ import com.byit.job.dto.AdminSenPluginDto;
import
com.byit.job.dto.DispatchResponseDto
;
import
com.byit.job.exceptions.plugin.PluginException
;
import
com.byit.job.utils.IpUtil
;
import
com.byit.model.
Myth
JobTaskRunLog
;
import
com.byit.model.
Myth
JobTaskSchedule
;
import
com.byit.model.JobTaskRunLog
;
import
com.byit.model.JobTaskSchedule
;
import
com.byit.rpc.remoting.invoker.route.LoadBalance
;
import
com.byit.rpc.remoting.invoker.route.RpcLoadBalance
;
import
com.byit.service.impl.
Myth
JobTaskRunLogServiceImpl
;
import
com.byit.service.impl.JobTaskRunLogServiceImpl
;
import
com.byit.util.SpringUtil
;
import
io.netty.util.Timeout
;
import
io.netty.util.TimerTask
;
...
...
@@ -26,8 +26,8 @@ import java.util.Date;
**/
@Slf4j
public
class
JavaBeanJobTask
implements
TimerTask
{
private
Myth
JobTaskSchedule
mythJobTaskSchedule
;
public
JavaBeanJobTask
(
Myth
JobTaskSchedule
mythJobTaskSchedule
)
{
private
JobTaskSchedule
mythJobTaskSchedule
;
public
JavaBeanJobTask
(
JobTaskSchedule
mythJobTaskSchedule
)
{
this
.
mythJobTaskSchedule
=
mythJobTaskSchedule
;
}
...
...
@@ -63,19 +63,19 @@ public class JavaBeanJobTask implements TimerTask {
}
}
private
void
saveLog
(
Myth
JobTaskSchedule
mythJobTaskSchedule
,
String
url
,
String
result
){
private
void
saveLog
(
JobTaskSchedule
mythJobTaskSchedule
,
String
url
,
String
result
){
DispatchResponseDto
dispatchResponseDto
=
JSON
.
parseObject
(
result
,
DispatchResponseDto
.
class
);
MythJobTaskRunLogServiceImpl
mythJobTaskRunLogService
=
SpringUtil
.
getBean
(
Myth
JobTaskRunLogServiceImpl
.
class
);
MythJobTaskRunLog
mythJobTaskRunLog
=
mythJobTaskRunLogService
.
findMythJobTaskRunLogById
(
mythJobTaskSchedule
.
getLogId
()
);
JobTaskRunLogServiceImpl
mythJobTaskRunLogService
=
SpringUtil
.
getBean
(
JobTaskRunLogServiceImpl
.
class
);
JobTaskRunLog
jobTaskRunLog
=
new
JobTaskRunLog
(
);
jobTaskRunLog
.
setLogId
(
mythJobTaskSchedule
.
getLogId
());
//版本id需要查验
//还需要携带版本的名字
mythJ
obTaskRunLog
.
setRunType
(
"2"
);
mythJ
obTaskRunLog
.
setLocalNodeHandlerName
(
mythJobTaskSchedule
.
getLocalNodeHandlerName
());
mythJ
obTaskRunLog
.
setTriggerTime
(
new
Date
());
mythJ
obTaskRunLog
.
setTriggerCode
(
dispatchResponseDto
.
getCode
());
mythJ
obTaskRunLog
.
setTriggerMsg
(
dispatchResponseDto
.
getMsg
());
mythJobTaskRunLogService
.
save
(
mythJ
obTaskRunLog
);
j
obTaskRunLog
.
setRunType
(
"2"
);
j
obTaskRunLog
.
setLocalNodeHandlerName
(
mythJobTaskSchedule
.
getLocalNodeHandlerName
());
j
obTaskRunLog
.
setTriggerTime
(
new
Date
());
j
obTaskRunLog
.
setTriggerCode
(
dispatchResponseDto
.
getCode
());
j
obTaskRunLog
.
setTriggerMsg
(
dispatchResponseDto
.
getMsg
());
mythJobTaskRunLogService
.
save
JobTaskRunLog
(
j
obTaskRunLog
);
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/JobScheduleHelper.java
View file @
286ec10e
...
...
@@ -2,12 +2,12 @@ package com.byit.thread;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.byit.job.WorkRoulette
;
import
com.byit.model.
Myth
JobTask
;
import
com.byit.model.
Myth
JobTaskRunLog
;
import
com.byit.model.
Myth
JobTaskSchedule
;
import
com.byit.service.
Myth
JobTaskScheduleService
;
import
com.byit.service.
Myth
JobTaskService
;
import
com.byit.service.impl.
Myth
JobTaskRunLogServiceImpl
;
import
com.byit.model.JobTask
;
import
com.byit.model.JobTaskRunLog
;
import
com.byit.model.JobTaskSchedule
;
import
com.byit.service.JobTaskScheduleService
;
import
com.byit.service.JobTaskService
;
import
com.byit.service.impl.JobTaskRunLogServiceImpl
;
import
com.byit.task.JavaBeanJobTask
;
import
com.byit.util.SpringUtil
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -39,9 +39,9 @@ public class JobScheduleHelper{
@Autowired
private
MythJobTaskService
mythJ
obTaskService
;
private
JobTaskService
j
obTaskService
;
@Autowired
private
MythJobTaskScheduleService
mythJ
obTaskScheduleService
;
private
JobTaskScheduleService
j
obTaskScheduleService
;
/**
* 读取任务节点的预读
...
...
@@ -104,27 +104,27 @@ public class JobScheduleHelper{
//行锁已经加上 后续处理
long
nowTime
=
System
.
currentTimeMillis
();
//开始寻找此时 不是暂停状态,而且七秒内即将运行的任务
List
<
MythJobTask
>
mythJobTasks
=
mythJobTaskService
.
findMyth
JobTaskByTriggerNextTimeLessThanEqual
(
nowTime
+
PRE_READ_MS
);
List
<
JobTask
>
jobTasks
=
jobTaskService
.
find
JobTaskByTriggerNextTimeLessThanEqual
(
nowTime
+
PRE_READ_MS
);
if
(
CollectionUtil
.
isNotEmpty
(
mythJ
obTasks
)){
List
<
MythJobTaskSchedule
>
mythJobTaskSchedules
=
new
ArrayList
<
Myth
JobTaskSchedule
>(
15
);
mythJobTasks
.
forEach
(
mythJ
obTask
->
{
if
(
CollectionUtil
.
isNotEmpty
(
j
obTasks
)){
List
<
JobTaskSchedule
>
jobTaskSchedules
=
new
ArrayList
<
JobTaskSchedule
>(
15
);
jobTasks
.
forEach
(
j
obTask
->
{
/**
* 需要去检验当前任务的上级节点是否已经执行成功,没有执行,或者处于暂停状态则跳过该任务
* 大概思路,根据任务流id,从任务流执行回溯表查询该任务流的所有节点,查看上级节点是否已经执行成功
* //TODO 需要修改 判断父节点是否执行完毕 注意 父节点是一个集合
*/
if
(
StringUtils
.
isNotBlank
(
mythJ
obTask
.
getDependencyNodes
())){
log
.
debug
(
"任务:{}"
,
mythJ
obTask
);
MythJobTaskSchedule
mythJobTaskSchedule
=
new
Myth
JobTaskSchedule
();
BeanUtils
.
copyProperties
(
mythJobTask
,
mythJ
obTaskSchedule
);
mythJobTaskSchedules
.
add
(
mythJ
obTaskSchedule
);
if
(
StringUtils
.
isNotBlank
(
j
obTask
.
getDependencyNodes
())){
log
.
debug
(
"任务:{}"
,
j
obTask
);
JobTaskSchedule
jobTaskSchedule
=
new
JobTaskSchedule
();
BeanUtils
.
copyProperties
(
jobTask
,
j
obTaskSchedule
);
jobTaskSchedules
.
add
(
j
obTaskSchedule
);
}
});
if
(
CollectionUtil
.
isNotEmpty
(
mythJ
obTaskSchedules
))
{
mythJobTaskScheduleService
.
save
(
mythJ
obTaskSchedules
);
mythJobTaskService
.
removeMythJobTaskInIds
(
mythJ
obTasks
);
if
(
CollectionUtil
.
isNotEmpty
(
j
obTaskSchedules
))
{
jobTaskScheduleService
.
saveAllData
(
j
obTaskSchedules
);
jobTaskService
.
removeMythJobTaskInIds
(
j
obTasks
);
}
}
else
{
...
...
@@ -238,15 +238,15 @@ public class JobScheduleHelper{
//行锁已经加上 后续处理
long
nowTime
=
System
.
currentTimeMillis
();
//查询所有符合条件的任务节点
List
<
MythJobTaskSchedule
>
mythJobTaskSchedules
=
mythJobTaskScheduleService
.
findMyth
JobTaskScheduleByTriggerNextTimeLessThanEqual
(
nowTime
+
SCHEDULE_READ_MS
);
if
(
CollectionUtil
.
isNotEmpty
(
mythJ
obTaskSchedules
)){
List
<
JobTaskSchedule
>
jobTaskSchedules
=
jobTaskScheduleService
.
find
JobTaskScheduleByTriggerNextTimeLessThanEqual
(
nowTime
+
SCHEDULE_READ_MS
);
if
(
CollectionUtil
.
isNotEmpty
(
j
obTaskSchedules
)){
//循环遍历添加任务
mythJ
obTaskSchedules
.
forEach
(
mythJobTaskSchedule
->{
j
obTaskSchedules
.
forEach
(
mythJobTaskSchedule
->{
if
(
"BEAN"
.
equals
(
mythJobTaskSchedule
.
getJobType
()))
{
Integer
logId
=
saveLog
(
mythJobTaskSchedule
);
mythJobTaskSchedule
.
setLogId
(
logId
);
JavaBeanJobTask
javaBeanJobTask
=
new
JavaBeanJobTask
(
mythJobTaskSchedule
);
mythJ
obTaskScheduleService
.
delete
(
mythJobTaskSchedule
.
getNodeId
());
j
obTaskScheduleService
.
delete
(
mythJobTaskSchedule
.
getNodeId
());
WorkRoulette
.
addJob
(
javaBeanJobTask
,
mythJobTaskSchedule
.
getTriggerNextTime
());
}
});
...
...
@@ -323,22 +323,22 @@ public class JobScheduleHelper{
this
.
dataSource
=
dataSource
;
}
private
Integer
saveLog
(
Myth
JobTaskSchedule
mythJobTaskSchedule
){
MythJobTaskRunLog
mythJobTaskRunLog
=
new
Myth
JobTaskRunLog
();
private
Integer
saveLog
(
JobTaskSchedule
mythJobTaskSchedule
){
JobTaskRunLog
jobTaskRunLog
=
new
JobTaskRunLog
();
mythJ
obTaskRunLog
.
setJobFlowId
(
mythJobTaskSchedule
.
getFlowId
());
j
obTaskRunLog
.
setJobFlowId
(
mythJobTaskSchedule
.
getFlowId
());
//版本id需要查验
//还需要携带版本的名字
mythJ
obTaskRunLog
.
setNodeName
(
mythJobTaskSchedule
.
getNodeName
());
mythJ
obTaskRunLog
.
setNodeType
(
mythJobTaskSchedule
.
getNodeType
());
mythJ
obTaskRunLog
.
setRunParams
(
mythJobTaskSchedule
.
getRunParam
());
mythJ
obTaskRunLog
.
setFailedRemainingCount
(
mythJobTaskSchedule
.
getFailedRetryCount
());
mythJ
obTaskRunLog
.
setAlarmEmail
(
mythJobTaskSchedule
.
getAlarmEmail
());
mythJ
obTaskRunLog
.
setMailAction
(
mythJobTaskSchedule
.
getMailAction
());
mythJ
obTaskRunLog
.
setJobType
(
mythJobTaskSchedule
.
getJobType
());
MythJobTaskRunLogServiceImpl
mythJobTaskRunLogService
=
SpringUtil
.
getBean
(
Myth
JobTaskRunLogServiceImpl
.
class
);
MythJobTaskRunLog
mythJobTaskRunLogSave
=
mythJobTaskRunLogService
.
save
(
mythJ
obTaskRunLog
);
j
obTaskRunLog
.
setNodeName
(
mythJobTaskSchedule
.
getNodeName
());
j
obTaskRunLog
.
setNodeType
(
mythJobTaskSchedule
.
getNodeType
());
j
obTaskRunLog
.
setRunParams
(
mythJobTaskSchedule
.
getRunParam
());
j
obTaskRunLog
.
setFailedRemainingCount
(
mythJobTaskSchedule
.
getFailedRetryCount
());
j
obTaskRunLog
.
setAlarmEmail
(
mythJobTaskSchedule
.
getAlarmEmail
());
j
obTaskRunLog
.
setMailAction
(
mythJobTaskSchedule
.
getMailAction
());
j
obTaskRunLog
.
setJobType
(
mythJobTaskSchedule
.
getJobType
());
JobTaskRunLogServiceImpl
mythJobTaskRunLogService
=
SpringUtil
.
getBean
(
JobTaskRunLogServiceImpl
.
class
);
mythJobTaskRunLogService
.
saveJobTaskRunLog
(
j
obTaskRunLog
);
return
mythJobTaskRunLogSave
.
getLogId
();
return
jobTaskRunLog
.
getLogId
();
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/LogCallbackThread.java
View file @
286ec10e
package
com
.
byit
.
thread
;
import
com.byit.job.dto.JobRunResultDto
;
import
com.byit.model.
Myth
JobTaskRunLog
;
import
com.byit.service.impl.
Myth
JobTaskRunLogServiceImpl
;
import
com.byit.model.JobTaskRunLog
;
import
com.byit.service.impl.JobTaskRunLogServiceImpl
;
import
com.byit.util.SpringUtil
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -24,11 +24,12 @@ public class LogCallbackThread implements Runnable {
@Override
public
void
run
()
{
log
.
debug
(
"--------------------任务执行完成---------------------"
);
MythJobTaskRunLogServiceImpl
mythJobTaskRunLogService
=
SpringUtil
.
getBean
(
MythJobTaskRunLogServiceImpl
.
class
);
MythJobTaskRunLog
mythJobTaskRunLog
=
mythJobTaskRunLogService
.
findMythJobTaskRunLogById
(
jobRunResultDto
.
getLogId
(
));
mythJobTaskRunLog
.
setRunTime
(
jobRunResultDto
.
getEndTime
());
mythJobTaskRunLog
.
setRunCode
(
jobRunResultDto
.
getReturnResult
().
getCode
());
mythJobTaskRunLog
.
setRunMsg
(
jobRunResultDto
.
getReturnResult
().
getMsg
());
mythJobTaskRunLogService
.
save
(
mythJobTaskRunLog
);
JobTaskRunLogServiceImpl
mythJobTaskRunLogService
=
SpringUtil
.
getBean
(
JobTaskRunLogServiceImpl
.
class
);
JobTaskRunLog
jobTaskRunLog
=
new
JobTaskRunLog
();
jobTaskRunLog
.
setLogId
(
jobRunResultDto
.
getLogId
());
jobTaskRunLog
.
setRunTime
(
jobRunResultDto
.
getEndTime
());
jobTaskRunLog
.
setRunCode
(
jobRunResultDto
.
getReturnResult
().
getCode
());
jobTaskRunLog
.
setRunMsg
(
jobRunResultDto
.
getReturnResult
().
getMsg
());
mythJobTaskRunLogService
.
saveJobTaskRunLog
(
jobTaskRunLog
);
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/util/SourceObj2TargetObjUtil.java
View file @
286ec10e
package
com
.
byit
.
util
;
import
com.byit.job.dto.PluginBeanJobInfo
;
import
com.byit.model.MythJobTask
;
import
java.util.Date
;
import
java.util.UUID
;
import
com.byit.model.JobTask
;
/**
* @program: byit-myth-job->SourceObj2TargetObjUtil
...
...
@@ -19,22 +16,23 @@ public class SourceObj2TargetObjUtil {
* @param pluginBeanJobInfo
* @return
*/
public
static
MythJobTask
pluginBeanJobInfo2MythJobTask
(
PluginBeanJobInfo
pluginBeanJobInfo
){
MythJobTask
mythJobTask
=
new
MythJobTask
();
mythJobTask
.
setLocalNodeHandlerName
(
pluginBeanJobInfo
.
getJobHandelName
());
mythJobTask
.
setPluginUrls
(
pluginBeanJobInfo
.
getUrl
());
mythJobTask
.
setNodeCron
(
pluginBeanJobInfo
.
getMythCron
());
mythJobTask
.
setRoutingStrategy
(
pluginBeanJobInfo
.
getRoutingStrategy
());
mythJobTask
.
setBlockStrategy
(
pluginBeanJobInfo
.
getBlockingStrategy
());
mythJobTask
.
setCallbackToken
(
pluginBeanJobInfo
.
getCallbackToken
());
mythJobTask
.
setGatewayToken
(
pluginBeanJobInfo
.
getGatewayToken
());
mythJobTask
.
setRunParam
(
pluginBeanJobInfo
.
getParam
());
mythJobTask
.
setAlarmEmail
(
pluginBeanJobInfo
.
getAlarmEmail
());
mythJobTask
.
setSourcePrincipal
(
pluginBeanJobInfo
.
getAuthor
());
mythJobTask
.
setNodeName
(
pluginBeanJobInfo
.
getJobHandelName
());
mythJobTask
.
setTriggerNextTime
(
System
.
currentTimeMillis
()+
20000
);
mythJobTask
.
setDependencyNodes
(
"0"
);
mythJobTask
.
setJobType
(
"BEAN"
);
return
mythJobTask
;
public
static
JobTask
pluginBeanJobInfo2JobTask
(
PluginBeanJobInfo
pluginBeanJobInfo
){
JobTask
jobTask
=
new
JobTask
();
jobTask
.
setNodeId
(
1
);
jobTask
.
setLocalNodeHandlerName
(
pluginBeanJobInfo
.
getJobHandelName
());
jobTask
.
setPluginUrls
(
pluginBeanJobInfo
.
getUrl
());
jobTask
.
setNodeCron
(
pluginBeanJobInfo
.
getMythCron
());
jobTask
.
setRoutingStrategy
(
pluginBeanJobInfo
.
getRoutingStrategy
());
jobTask
.
setBlockStrategy
(
pluginBeanJobInfo
.
getBlockingStrategy
());
jobTask
.
setCallbackToken
(
pluginBeanJobInfo
.
getCallbackToken
());
jobTask
.
setGatewayToken
(
pluginBeanJobInfo
.
getGatewayToken
());
jobTask
.
setRunParam
(
pluginBeanJobInfo
.
getParam
());
jobTask
.
setAlarmEmail
(
pluginBeanJobInfo
.
getAlarmEmail
());
jobTask
.
setSourcePrincipal
(
pluginBeanJobInfo
.
getAuthor
());
jobTask
.
setNodeName
(
pluginBeanJobInfo
.
getJobHandelName
());
jobTask
.
setTriggerNextTime
(
System
.
currentTimeMillis
()+
20000
);
jobTask
.
setDependencyNodes
(
"0"
);
jobTask
.
setJobType
(
"BEAN"
);
return
jobTask
;
}
}
byit-myth-core/myth-admin-core/src/main/resources/Generator-config.xml
View file @
286ec10e
...
...
@@ -55,14 +55,6 @@
type=
"XMLMAPPER"
>
<property
name=
"enableSubPackages"
value=
"false"
/>
</javaClientGenerator>
<table
tableName=
"job_flow_current"
domainObjectName=
"JobFlow"
/>
<table
tableName=
"job_flow_dependent"
domainObjectName=
"JobFlowDependent"
/>
<table
tableName=
"job_flow_node_current"
domainObjectName=
"JobFlowNode"
/>
<table
tableName=
"job_flow_node_version"
domainObjectName=
"JobFlowNodeVersion"
/>
<table
tableName=
"job_flow_run_recording"
domainObjectName=
"JobFlowRunRecording"
/>
<table
tableName=
"job_flow_version"
domainObjectName=
"JobFlowVersion"
/>
<table
tableName=
"job_task"
domainObjectName=
"JobTask"
/>
<table
tableName=
"job_task_run_log"
domainObjectName=
"JobTaskRunLog"
/>
<table
tableName=
"job_task_schedule"
domainObjectName=
"JobTaskSchedule"
/>
</context>
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/JobTaskMapper.xml
deleted
100644 → 0
View file @
d8b4ddb2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.byit.mapper.JobTaskMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.byit.model.JobTask"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
<id
column=
"node_id"
jdbcType=
"INTEGER"
property=
"nodeId"
/>
<result
column=
"alarm_email"
jdbcType=
"VARCHAR"
property=
"alarmEmail"
/>
<result
column=
"block_strategy"
jdbcType=
"VARCHAR"
property=
"blockStrategy"
/>
<result
column=
"callback_token"
jdbcType=
"VARCHAR"
property=
"callbackToken"
/>
<result
column=
"dependency_nodes"
jdbcType=
"VARCHAR"
property=
"dependencyNodes"
/>
<result
column=
"failed_retry_count"
jdbcType=
"INTEGER"
property=
"failedRetryCount"
/>
<result
column=
"flow_id"
jdbcType=
"INTEGER"
property=
"flowId"
/>
<result
column=
"follow_task_flow"
jdbcType=
"CHAR"
property=
"followTaskFlow"
/>
<result
column=
"gateway_token"
jdbcType=
"VARCHAR"
property=
"gatewayToken"
/>
<result
column=
"job_type"
jdbcType=
"VARCHAR"
property=
"jobType"
/>
<result
column=
"local_node_handler_name"
jdbcType=
"VARCHAR"
property=
"localNodeHandlerName"
/>
<result
column=
"mail_action"
jdbcType=
"CHAR"
property=
"mailAction"
/>
<result
column=
"node_cron"
jdbcType=
"VARCHAR"
property=
"nodeCron"
/>
<result
column=
"node_desc"
jdbcType=
"VARCHAR"
property=
"nodeDesc"
/>
<result
column=
"node_name"
jdbcType=
"VARCHAR"
property=
"nodeName"
/>
<result
column=
"node_of_flow_id"
jdbcType=
"INTEGER"
property=
"nodeOfFlowId"
/>
<result
column=
"node_timeout"
jdbcType=
"BIGINT"
property=
"nodeTimeout"
/>
<result
column=
"node_type"
jdbcType=
"VARCHAR"
property=
"nodeType"
/>
<result
column=
"plugin_urls"
jdbcType=
"VARCHAR"
property=
"pluginUrls"
/>
<result
column=
"priority"
jdbcType=
"CHAR"
property=
"priority"
/>
<result
column=
"remaining_count"
jdbcType=
"INTEGER"
property=
"remainingCount"
/>
<result
column=
"repeat_count"
jdbcType=
"INTEGER"
property=
"repeatCount"
/>
<result
column=
"retry_interval"
jdbcType=
"BIGINT"
property=
"retryInterval"
/>
<result
column=
"routing_strategy"
jdbcType=
"VARCHAR"
property=
"routingStrategy"
/>
<result
column=
"run_id"
jdbcType=
"VARCHAR"
property=
"runId"
/>
<result
column=
"run_param"
jdbcType=
"VARCHAR"
property=
"runParam"
/>
<result
column=
"run_source_desc"
jdbcType=
"VARCHAR"
property=
"runSourceDesc"
/>
<result
column=
"script_urls"
jdbcType=
"VARCHAR"
property=
"scriptUrls"
/>
<result
column=
"source_principal"
jdbcType=
"VARCHAR"
property=
"sourcePrincipal"
/>
<result
column=
"source_update_time"
jdbcType=
"DATE"
property=
"sourceUpdateTime"
/>
<result
column=
"trigger_next_time"
jdbcType=
"BIGINT"
property=
"triggerNextTime"
/>
<result
column=
"trigger_status"
jdbcType=
"CHAR"
property=
"triggerStatus"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.byit.model.JobTask"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
<result
column=
"run_source"
jdbcType=
"LONGVARCHAR"
property=
"runSource"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
node_id, alarm_email, block_strategy, callback_token, dependency_nodes, failed_retry_count,
flow_id, follow_task_flow, gateway_token, job_type, local_node_handler_name, mail_action,
node_cron, node_desc, node_name, node_of_flow_id, node_timeout, node_type, plugin_urls,
priority, remaining_count, repeat_count, retry_interval, routing_strategy, run_id,
run_param, run_source_desc, script_urls, source_principal, source_update_time, trigger_next_time,
trigger_status
</sql>
<sql
id=
"Blob_Column_List"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
run_source
</sql>
<select
id=
"getById"
parameterType=
"java.lang.Integer"
resultMap=
"ResultMapWithBLOBs"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from job_task
where node_id = #{nodeId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteById"
parameterType=
"java.lang.Integer"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_task
where node_id = #{nodeId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.byit.model.JobTask"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_task (node_id, alarm_email, block_strategy,
callback_token, dependency_nodes, failed_retry_count,
flow_id, follow_task_flow, gateway_token,
job_type, local_node_handler_name, mail_action,
node_cron, node_desc, node_name,
node_of_flow_id, node_timeout, node_type,
plugin_urls, priority, remaining_count,
repeat_count, retry_interval, routing_strategy,
run_id, run_param, run_source_desc,
script_urls, source_principal, source_update_time,
trigger_next_time, trigger_status, run_source
)
values (#{nodeId,jdbcType=INTEGER}, #{alarmEmail,jdbcType=VARCHAR}, #{blockStrategy,jdbcType=VARCHAR},
#{callbackToken,jdbcType=VARCHAR}, #{dependencyNodes,jdbcType=VARCHAR}, #{failedRetryCount,jdbcType=INTEGER},
#{flowId,jdbcType=INTEGER}, #{followTaskFlow,jdbcType=CHAR}, #{gatewayToken,jdbcType=VARCHAR},
#{jobType,jdbcType=VARCHAR}, #{localNodeHandlerName,jdbcType=VARCHAR}, #{mailAction,jdbcType=CHAR},
#{nodeCron,jdbcType=VARCHAR}, #{nodeDesc,jdbcType=VARCHAR}, #{nodeName,jdbcType=VARCHAR},
#{nodeOfFlowId,jdbcType=INTEGER}, #{nodeTimeout,jdbcType=BIGINT}, #{nodeType,jdbcType=VARCHAR},
#{pluginUrls,jdbcType=VARCHAR}, #{priority,jdbcType=CHAR}, #{remainingCount,jdbcType=INTEGER},
#{repeatCount,jdbcType=INTEGER}, #{retryInterval,jdbcType=BIGINT}, #{routingStrategy,jdbcType=VARCHAR},
#{runId,jdbcType=VARCHAR}, #{runParam,jdbcType=VARCHAR}, #{runSourceDesc,jdbcType=VARCHAR},
#{scriptUrls,jdbcType=VARCHAR}, #{sourcePrincipal,jdbcType=VARCHAR}, #{sourceUpdateTime,jdbcType=DATE},
#{triggerNextTime,jdbcType=BIGINT}, #{triggerStatus,jdbcType=CHAR}, #{runSource,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.byit.model.JobTask"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_task
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"nodeId != null"
>
node_id,
</if>
<if
test=
"alarmEmail != null"
>
alarm_email,
</if>
<if
test=
"blockStrategy != null"
>
block_strategy,
</if>
<if
test=
"callbackToken != null"
>
callback_token,
</if>
<if
test=
"dependencyNodes != null"
>
dependency_nodes,
</if>
<if
test=
"failedRetryCount != null"
>
failed_retry_count,
</if>
<if
test=
"flowId != null"
>
flow_id,
</if>
<if
test=
"followTaskFlow != null"
>
follow_task_flow,
</if>
<if
test=
"gatewayToken != null"
>
gateway_token,
</if>
<if
test=
"jobType != null"
>
job_type,
</if>
<if
test=
"localNodeHandlerName != null"
>
local_node_handler_name,
</if>
<if
test=
"mailAction != null"
>
mail_action,
</if>
<if
test=
"nodeCron != null"
>
node_cron,
</if>
<if
test=
"nodeDesc != null"
>
node_desc,
</if>
<if
test=
"nodeName != null"
>
node_name,
</if>
<if
test=
"nodeOfFlowId != null"
>
node_of_flow_id,
</if>
<if
test=
"nodeTimeout != null"
>
node_timeout,
</if>
<if
test=
"nodeType != null"
>
node_type,
</if>
<if
test=
"pluginUrls != null"
>
plugin_urls,
</if>
<if
test=
"priority != null"
>
priority,
</if>
<if
test=
"remainingCount != null"
>
remaining_count,
</if>
<if
test=
"repeatCount != null"
>
repeat_count,
</if>
<if
test=
"retryInterval != null"
>
retry_interval,
</if>
<if
test=
"routingStrategy != null"
>
routing_strategy,
</if>
<if
test=
"runId != null"
>
run_id,
</if>
<if
test=
"runParam != null"
>
run_param,
</if>
<if
test=
"runSourceDesc != null"
>
run_source_desc,
</if>
<if
test=
"scriptUrls != null"
>
script_urls,
</if>
<if
test=
"sourcePrincipal != null"
>
source_principal,
</if>
<if
test=
"sourceUpdateTime != null"
>
source_update_time,
</if>
<if
test=
"triggerNextTime != null"
>
trigger_next_time,
</if>
<if
test=
"triggerStatus != null"
>
trigger_status,
</if>
<if
test=
"runSource != null"
>
run_source,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"nodeId != null"
>
#{nodeId,jdbcType=INTEGER},
</if>
<if
test=
"alarmEmail != null"
>
#{alarmEmail,jdbcType=VARCHAR},
</if>
<if
test=
"blockStrategy != null"
>
#{blockStrategy,jdbcType=VARCHAR},
</if>
<if
test=
"callbackToken != null"
>
#{callbackToken,jdbcType=VARCHAR},
</if>
<if
test=
"dependencyNodes != null"
>
#{dependencyNodes,jdbcType=VARCHAR},
</if>
<if
test=
"failedRetryCount != null"
>
#{failedRetryCount,jdbcType=INTEGER},
</if>
<if
test=
"flowId != null"
>
#{flowId,jdbcType=INTEGER},
</if>
<if
test=
"followTaskFlow != null"
>
#{followTaskFlow,jdbcType=CHAR},
</if>
<if
test=
"gatewayToken != null"
>
#{gatewayToken,jdbcType=VARCHAR},
</if>
<if
test=
"jobType != null"
>
#{jobType,jdbcType=VARCHAR},
</if>
<if
test=
"localNodeHandlerName != null"
>
#{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if
test=
"mailAction != null"
>
#{mailAction,jdbcType=CHAR},
</if>
<if
test=
"nodeCron != null"
>
#{nodeCron,jdbcType=VARCHAR},
</if>
<if
test=
"nodeDesc != null"
>
#{nodeDesc,jdbcType=VARCHAR},
</if>
<if
test=
"nodeName != null"
>
#{nodeName,jdbcType=VARCHAR},
</if>
<if
test=
"nodeOfFlowId != null"
>
#{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if
test=
"nodeTimeout != null"
>
#{nodeTimeout,jdbcType=BIGINT},
</if>
<if
test=
"nodeType != null"
>
#{nodeType,jdbcType=VARCHAR},
</if>
<if
test=
"pluginUrls != null"
>
#{pluginUrls,jdbcType=VARCHAR},
</if>
<if
test=
"priority != null"
>
#{priority,jdbcType=CHAR},
</if>
<if
test=
"remainingCount != null"
>
#{remainingCount,jdbcType=INTEGER},
</if>
<if
test=
"repeatCount != null"
>
#{repeatCount,jdbcType=INTEGER},
</if>
<if
test=
"retryInterval != null"
>
#{retryInterval,jdbcType=BIGINT},
</if>
<if
test=
"routingStrategy != null"
>
#{routingStrategy,jdbcType=VARCHAR},
</if>
<if
test=
"runId != null"
>
#{runId,jdbcType=VARCHAR},
</if>
<if
test=
"runParam != null"
>
#{runParam,jdbcType=VARCHAR},
</if>
<if
test=
"runSourceDesc != null"
>
#{runSourceDesc,jdbcType=VARCHAR},
</if>
<if
test=
"scriptUrls != null"
>
#{scriptUrls,jdbcType=VARCHAR},
</if>
<if
test=
"sourcePrincipal != null"
>
#{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if
test=
"sourceUpdateTime != null"
>
#{sourceUpdateTime,jdbcType=DATE},
</if>
<if
test=
"triggerNextTime != null"
>
#{triggerNextTime,jdbcType=BIGINT},
</if>
<if
test=
"triggerStatus != null"
>
#{triggerStatus,jdbcType=CHAR},
</if>
<if
test=
"runSource != null"
>
#{runSource,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update
id=
"updateByIdSelective"
parameterType=
"com.byit.model.JobTask"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task
<set>
<if
test=
"alarmEmail != null"
>
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
</if>
<if
test=
"blockStrategy != null"
>
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
</if>
<if
test=
"callbackToken != null"
>
callback_token = #{callbackToken,jdbcType=VARCHAR},
</if>
<if
test=
"dependencyNodes != null"
>
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
</if>
<if
test=
"failedRetryCount != null"
>
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
</if>
<if
test=
"flowId != null"
>
flow_id = #{flowId,jdbcType=INTEGER},
</if>
<if
test=
"followTaskFlow != null"
>
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
</if>
<if
test=
"gatewayToken != null"
>
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
</if>
<if
test=
"jobType != null"
>
job_type = #{jobType,jdbcType=VARCHAR},
</if>
<if
test=
"localNodeHandlerName != null"
>
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if
test=
"mailAction != null"
>
mail_action = #{mailAction,jdbcType=CHAR},
</if>
<if
test=
"nodeCron != null"
>
node_cron = #{nodeCron,jdbcType=VARCHAR},
</if>
<if
test=
"nodeDesc != null"
>
node_desc = #{nodeDesc,jdbcType=VARCHAR},
</if>
<if
test=
"nodeName != null"
>
node_name = #{nodeName,jdbcType=VARCHAR},
</if>
<if
test=
"nodeOfFlowId != null"
>
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if
test=
"nodeTimeout != null"
>
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
</if>
<if
test=
"nodeType != null"
>
node_type = #{nodeType,jdbcType=VARCHAR},
</if>
<if
test=
"pluginUrls != null"
>
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
</if>
<if
test=
"priority != null"
>
priority = #{priority,jdbcType=CHAR},
</if>
<if
test=
"remainingCount != null"
>
remaining_count = #{remainingCount,jdbcType=INTEGER},
</if>
<if
test=
"repeatCount != null"
>
repeat_count = #{repeatCount,jdbcType=INTEGER},
</if>
<if
test=
"retryInterval != null"
>
retry_interval = #{retryInterval,jdbcType=BIGINT},
</if>
<if
test=
"routingStrategy != null"
>
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
</if>
<if
test=
"runId != null"
>
run_id = #{runId,jdbcType=VARCHAR},
</if>
<if
test=
"runParam != null"
>
run_param = #{runParam,jdbcType=VARCHAR},
</if>
<if
test=
"runSourceDesc != null"
>
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
</if>
<if
test=
"scriptUrls != null"
>
script_urls = #{scriptUrls,jdbcType=VARCHAR},
</if>
<if
test=
"sourcePrincipal != null"
>
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if
test=
"sourceUpdateTime != null"
>
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
</if>
<if
test=
"triggerNextTime != null"
>
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
</if>
<if
test=
"triggerStatus != null"
>
trigger_status = #{triggerStatus,jdbcType=CHAR},
</if>
<if
test=
"runSource != null"
>
run_source = #{runSource,jdbcType=LONGVARCHAR},
</if>
</set>
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.byit.model.JobTask"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remaining_count = #{remainingCount,jdbcType=INTEGER},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_id = #{runId,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
trigger_status = #{triggerStatus,jdbcType=CHAR},
run_source = #{runSource,jdbcType=LONGVARCHAR}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update
id=
"updateById"
parameterType=
"com.byit.model.JobTask"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remaining_count = #{remainingCount,jdbcType=INTEGER},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_id = #{runId,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
trigger_status = #{triggerStatus,jdbcType=CHAR}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/resources/mapper/JobTaskRunLogMapper.xml
View file @
286ec10e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.byit.mapper.JobTaskRunLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.byit.model.JobTaskRunLog"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
<id
column=
"log_id"
jdbcType=
"INTEGER"
property=
"logId"
/>
<result
column=
"alarm_email"
jdbcType=
"VARCHAR"
property=
"alarmEmail"
/>
<result
column=
"alarm_status"
jdbcType=
"CHAR"
property=
"alarmStatus"
/>
...
...
@@ -22,38 +22,29 @@
<result
column=
"run_type"
jdbcType=
"CHAR"
property=
"runType"
/>
<result
column=
"trigger_code"
jdbcType=
"VARCHAR"
property=
"triggerCode"
/>
<result
column=
"trigger_time"
jdbcType=
"DATE"
property=
"triggerTime"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.byit.model.JobTaskRunLogWithBLOBs"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
<result
column=
"run_msg"
jdbcType=
"LONGVARCHAR"
property=
"runMsg"
/>
<result
column=
"trigger_msg"
jdbcType=
"LONGVARCHAR"
property=
"triggerMsg"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
log_id, alarm_email, alarm_status, failed_remaining_count, flow_version_id, job_flow_id,
job_flow_name, job_group_id, job_type, local_node_handler_name, mail_action, node_name,
node_type, run_code, run_params, run_time, run_type, trigger_code, trigger_time
</sql>
<sql
id=
"Blob_Column_List"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
run_msg, trigger_msg
node_type, run_code, run_params, run_time, run_type, trigger_code, trigger_time,run_msg, trigger_msg
</sql>
<select
id=
"getById"
parameterType=
"java.lang.Integer"
resultMap=
"ResultMapWithBLOBs"
>
<!-- generated @mbg.generated date: 2019-12-23 --
>
<select
id=
"getById"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from job_task_run_log
where log_id = #{logId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteById"
parameterType=
"java.lang.Integer"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_task_run_log
where log_id = #{logId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.byit.model.JobTaskRunLogWithBLOBs"
>
<!-- generated @mbg.generated date: 2019-12-23 --
>
<insert
id=
"insert"
parameterType=
"com.byit.model.JobTaskRunLog"
>
insert into job_task_run_log (log_id, alarm_email, alarm_status,
failed_remaining_count, flow_version_id, job_flow_id,
job_flow_name, job_group_id, job_type,
...
...
@@ -71,8 +62,8 @@
#{triggerTime,jdbcType=DATE}, #{runMsg,jdbcType=LONGVARCHAR}, #{triggerMsg,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.byit.model.JobTaskRunLogWithBLOBs"
>
<!-- generated @mbg.generated date: 2019-12-23 --
>
<insert
id=
"insertSelective"
parameterType=
"com.byit.model.JobTaskRunLog"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"log_id"
>
insert into job_task_run_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"logId != null"
>
...
...
@@ -205,7 +196,8 @@
</if>
</trim>
</insert>
<update
id=
"updateByIdSelective"
parameterType=
"com.byit.model.JobTaskRunLogWithBLOBs"
>
<update
id=
"updateByIdSelective"
parameterType=
"com.byit.model.JobTaskRunLog"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_run_log
<set>
...
...
@@ -272,7 +264,8 @@
</set>
where log_id = #{logId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.byit.model.JobTaskRunLogWithBLOBs"
>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.byit.model.JobTaskRunLog"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_run_log
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
...
...
@@ -297,6 +290,7 @@
trigger_msg = #{triggerMsg,jdbcType=LONGVARCHAR}
where log_id = #{logId,jdbcType=INTEGER}
</update>
<update
id=
"updateById"
parameterType=
"com.byit.model.JobTaskRunLog"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_run_log
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/JobTaskScheduleMapper.xml
deleted
100644 → 0
View file @
d8b4ddb2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.byit.mapper.JobTaskScheduleMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.byit.model.JobTaskSchedule"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
<id
column=
"node_id"
jdbcType=
"INTEGER"
property=
"nodeId"
/>
<result
column=
"alarm_email"
jdbcType=
"VARCHAR"
property=
"alarmEmail"
/>
<result
column=
"block_strategy"
jdbcType=
"VARCHAR"
property=
"blockStrategy"
/>
<result
column=
"callback_token"
jdbcType=
"VARCHAR"
property=
"callbackToken"
/>
<result
column=
"dependency_nodes"
jdbcType=
"VARCHAR"
property=
"dependencyNodes"
/>
<result
column=
"failed_retry_count"
jdbcType=
"INTEGER"
property=
"failedRetryCount"
/>
<result
column=
"flow_id"
jdbcType=
"INTEGER"
property=
"flowId"
/>
<result
column=
"follow_task_flow"
jdbcType=
"CHAR"
property=
"followTaskFlow"
/>
<result
column=
"gateway_token"
jdbcType=
"VARCHAR"
property=
"gatewayToken"
/>
<result
column=
"job_type"
jdbcType=
"VARCHAR"
property=
"jobType"
/>
<result
column=
"local_node_handler_name"
jdbcType=
"VARCHAR"
property=
"localNodeHandlerName"
/>
<result
column=
"log_id"
jdbcType=
"INTEGER"
property=
"logId"
/>
<result
column=
"mail_action"
jdbcType=
"CHAR"
property=
"mailAction"
/>
<result
column=
"node_cron"
jdbcType=
"VARCHAR"
property=
"nodeCron"
/>
<result
column=
"node_desc"
jdbcType=
"VARCHAR"
property=
"nodeDesc"
/>
<result
column=
"node_name"
jdbcType=
"VARCHAR"
property=
"nodeName"
/>
<result
column=
"node_of_flow_id"
jdbcType=
"INTEGER"
property=
"nodeOfFlowId"
/>
<result
column=
"node_timeout"
jdbcType=
"BIGINT"
property=
"nodeTimeout"
/>
<result
column=
"node_type"
jdbcType=
"VARCHAR"
property=
"nodeType"
/>
<result
column=
"plugin_urls"
jdbcType=
"VARCHAR"
property=
"pluginUrls"
/>
<result
column=
"priority"
jdbcType=
"CHAR"
property=
"priority"
/>
<result
column=
"remaining_count"
jdbcType=
"INTEGER"
property=
"remainingCount"
/>
<result
column=
"repeat_count"
jdbcType=
"INTEGER"
property=
"repeatCount"
/>
<result
column=
"retry_interval"
jdbcType=
"BIGINT"
property=
"retryInterval"
/>
<result
column=
"routing_strategy"
jdbcType=
"VARCHAR"
property=
"routingStrategy"
/>
<result
column=
"run_id"
jdbcType=
"VARCHAR"
property=
"runId"
/>
<result
column=
"run_param"
jdbcType=
"VARCHAR"
property=
"runParam"
/>
<result
column=
"run_source_desc"
jdbcType=
"VARCHAR"
property=
"runSourceDesc"
/>
<result
column=
"script_urls"
jdbcType=
"VARCHAR"
property=
"scriptUrls"
/>
<result
column=
"source_principal"
jdbcType=
"VARCHAR"
property=
"sourcePrincipal"
/>
<result
column=
"source_update_time"
jdbcType=
"DATE"
property=
"sourceUpdateTime"
/>
<result
column=
"trigger_next_time"
jdbcType=
"BIGINT"
property=
"triggerNextTime"
/>
<result
column=
"trigger_status"
jdbcType=
"CHAR"
property=
"triggerStatus"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.byit.model.JobTaskSchedule"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
<result
column=
"run_source"
jdbcType=
"LONGVARCHAR"
property=
"runSource"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
node_id, alarm_email, block_strategy, callback_token, dependency_nodes, failed_retry_count,
flow_id, follow_task_flow, gateway_token, job_type, local_node_handler_name, log_id,
mail_action, node_cron, node_desc, node_name, node_of_flow_id, node_timeout, node_type,
plugin_urls, priority, remaining_count, repeat_count, retry_interval, routing_strategy,
run_id, run_param, run_source_desc, script_urls, source_principal, source_update_time,
trigger_next_time, trigger_status
</sql>
<sql
id=
"Blob_Column_List"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
run_source
</sql>
<select
id=
"getById"
parameterType=
"java.lang.Integer"
resultMap=
"ResultMapWithBLOBs"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from job_task_schedule
where node_id = #{nodeId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteById"
parameterType=
"java.lang.Integer"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_task_schedule
where node_id = #{nodeId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.byit.model.JobTaskSchedule"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_task_schedule (node_id, alarm_email, block_strategy,
callback_token, dependency_nodes, failed_retry_count,
flow_id, follow_task_flow, gateway_token,
job_type, local_node_handler_name, log_id,
mail_action, node_cron, node_desc,
node_name, node_of_flow_id, node_timeout,
node_type, plugin_urls, priority,
remaining_count, repeat_count, retry_interval,
routing_strategy, run_id, run_param,
run_source_desc, script_urls, source_principal,
source_update_time, trigger_next_time, trigger_status,
run_source)
values (#{nodeId,jdbcType=INTEGER}, #{alarmEmail,jdbcType=VARCHAR}, #{blockStrategy,jdbcType=VARCHAR},
#{callbackToken,jdbcType=VARCHAR}, #{dependencyNodes,jdbcType=VARCHAR}, #{failedRetryCount,jdbcType=INTEGER},
#{flowId,jdbcType=INTEGER}, #{followTaskFlow,jdbcType=CHAR}, #{gatewayToken,jdbcType=VARCHAR},
#{jobType,jdbcType=VARCHAR}, #{localNodeHandlerName,jdbcType=VARCHAR}, #{logId,jdbcType=INTEGER},
#{mailAction,jdbcType=CHAR}, #{nodeCron,jdbcType=VARCHAR}, #{nodeDesc,jdbcType=VARCHAR},
#{nodeName,jdbcType=VARCHAR}, #{nodeOfFlowId,jdbcType=INTEGER}, #{nodeTimeout,jdbcType=BIGINT},
#{nodeType,jdbcType=VARCHAR}, #{pluginUrls,jdbcType=VARCHAR}, #{priority,jdbcType=CHAR},
#{remainingCount,jdbcType=INTEGER}, #{repeatCount,jdbcType=INTEGER}, #{retryInterval,jdbcType=BIGINT},
#{routingStrategy,jdbcType=VARCHAR}, #{runId,jdbcType=VARCHAR}, #{runParam,jdbcType=VARCHAR},
#{runSourceDesc,jdbcType=VARCHAR}, #{scriptUrls,jdbcType=VARCHAR}, #{sourcePrincipal,jdbcType=VARCHAR},
#{sourceUpdateTime,jdbcType=DATE}, #{triggerNextTime,jdbcType=BIGINT}, #{triggerStatus,jdbcType=CHAR},
#{runSource,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.byit.model.JobTaskSchedule"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_task_schedule
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"nodeId != null"
>
node_id,
</if>
<if
test=
"alarmEmail != null"
>
alarm_email,
</if>
<if
test=
"blockStrategy != null"
>
block_strategy,
</if>
<if
test=
"callbackToken != null"
>
callback_token,
</if>
<if
test=
"dependencyNodes != null"
>
dependency_nodes,
</if>
<if
test=
"failedRetryCount != null"
>
failed_retry_count,
</if>
<if
test=
"flowId != null"
>
flow_id,
</if>
<if
test=
"followTaskFlow != null"
>
follow_task_flow,
</if>
<if
test=
"gatewayToken != null"
>
gateway_token,
</if>
<if
test=
"jobType != null"
>
job_type,
</if>
<if
test=
"localNodeHandlerName != null"
>
local_node_handler_name,
</if>
<if
test=
"logId != null"
>
log_id,
</if>
<if
test=
"mailAction != null"
>
mail_action,
</if>
<if
test=
"nodeCron != null"
>
node_cron,
</if>
<if
test=
"nodeDesc != null"
>
node_desc,
</if>
<if
test=
"nodeName != null"
>
node_name,
</if>
<if
test=
"nodeOfFlowId != null"
>
node_of_flow_id,
</if>
<if
test=
"nodeTimeout != null"
>
node_timeout,
</if>
<if
test=
"nodeType != null"
>
node_type,
</if>
<if
test=
"pluginUrls != null"
>
plugin_urls,
</if>
<if
test=
"priority != null"
>
priority,
</if>
<if
test=
"remainingCount != null"
>
remaining_count,
</if>
<if
test=
"repeatCount != null"
>
repeat_count,
</if>
<if
test=
"retryInterval != null"
>
retry_interval,
</if>
<if
test=
"routingStrategy != null"
>
routing_strategy,
</if>
<if
test=
"runId != null"
>
run_id,
</if>
<if
test=
"runParam != null"
>
run_param,
</if>
<if
test=
"runSourceDesc != null"
>
run_source_desc,
</if>
<if
test=
"scriptUrls != null"
>
script_urls,
</if>
<if
test=
"sourcePrincipal != null"
>
source_principal,
</if>
<if
test=
"sourceUpdateTime != null"
>
source_update_time,
</if>
<if
test=
"triggerNextTime != null"
>
trigger_next_time,
</if>
<if
test=
"triggerStatus != null"
>
trigger_status,
</if>
<if
test=
"runSource != null"
>
run_source,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"nodeId != null"
>
#{nodeId,jdbcType=INTEGER},
</if>
<if
test=
"alarmEmail != null"
>
#{alarmEmail,jdbcType=VARCHAR},
</if>
<if
test=
"blockStrategy != null"
>
#{blockStrategy,jdbcType=VARCHAR},
</if>
<if
test=
"callbackToken != null"
>
#{callbackToken,jdbcType=VARCHAR},
</if>
<if
test=
"dependencyNodes != null"
>
#{dependencyNodes,jdbcType=VARCHAR},
</if>
<if
test=
"failedRetryCount != null"
>
#{failedRetryCount,jdbcType=INTEGER},
</if>
<if
test=
"flowId != null"
>
#{flowId,jdbcType=INTEGER},
</if>
<if
test=
"followTaskFlow != null"
>
#{followTaskFlow,jdbcType=CHAR},
</if>
<if
test=
"gatewayToken != null"
>
#{gatewayToken,jdbcType=VARCHAR},
</if>
<if
test=
"jobType != null"
>
#{jobType,jdbcType=VARCHAR},
</if>
<if
test=
"localNodeHandlerName != null"
>
#{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if
test=
"logId != null"
>
#{logId,jdbcType=INTEGER},
</if>
<if
test=
"mailAction != null"
>
#{mailAction,jdbcType=CHAR},
</if>
<if
test=
"nodeCron != null"
>
#{nodeCron,jdbcType=VARCHAR},
</if>
<if
test=
"nodeDesc != null"
>
#{nodeDesc,jdbcType=VARCHAR},
</if>
<if
test=
"nodeName != null"
>
#{nodeName,jdbcType=VARCHAR},
</if>
<if
test=
"nodeOfFlowId != null"
>
#{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if
test=
"nodeTimeout != null"
>
#{nodeTimeout,jdbcType=BIGINT},
</if>
<if
test=
"nodeType != null"
>
#{nodeType,jdbcType=VARCHAR},
</if>
<if
test=
"pluginUrls != null"
>
#{pluginUrls,jdbcType=VARCHAR},
</if>
<if
test=
"priority != null"
>
#{priority,jdbcType=CHAR},
</if>
<if
test=
"remainingCount != null"
>
#{remainingCount,jdbcType=INTEGER},
</if>
<if
test=
"repeatCount != null"
>
#{repeatCount,jdbcType=INTEGER},
</if>
<if
test=
"retryInterval != null"
>
#{retryInterval,jdbcType=BIGINT},
</if>
<if
test=
"routingStrategy != null"
>
#{routingStrategy,jdbcType=VARCHAR},
</if>
<if
test=
"runId != null"
>
#{runId,jdbcType=VARCHAR},
</if>
<if
test=
"runParam != null"
>
#{runParam,jdbcType=VARCHAR},
</if>
<if
test=
"runSourceDesc != null"
>
#{runSourceDesc,jdbcType=VARCHAR},
</if>
<if
test=
"scriptUrls != null"
>
#{scriptUrls,jdbcType=VARCHAR},
</if>
<if
test=
"sourcePrincipal != null"
>
#{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if
test=
"sourceUpdateTime != null"
>
#{sourceUpdateTime,jdbcType=DATE},
</if>
<if
test=
"triggerNextTime != null"
>
#{triggerNextTime,jdbcType=BIGINT},
</if>
<if
test=
"triggerStatus != null"
>
#{triggerStatus,jdbcType=CHAR},
</if>
<if
test=
"runSource != null"
>
#{runSource,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update
id=
"updateByIdSelective"
parameterType=
"com.byit.model.JobTaskSchedule"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_schedule
<set>
<if
test=
"alarmEmail != null"
>
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
</if>
<if
test=
"blockStrategy != null"
>
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
</if>
<if
test=
"callbackToken != null"
>
callback_token = #{callbackToken,jdbcType=VARCHAR},
</if>
<if
test=
"dependencyNodes != null"
>
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
</if>
<if
test=
"failedRetryCount != null"
>
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
</if>
<if
test=
"flowId != null"
>
flow_id = #{flowId,jdbcType=INTEGER},
</if>
<if
test=
"followTaskFlow != null"
>
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
</if>
<if
test=
"gatewayToken != null"
>
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
</if>
<if
test=
"jobType != null"
>
job_type = #{jobType,jdbcType=VARCHAR},
</if>
<if
test=
"localNodeHandlerName != null"
>
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if
test=
"logId != null"
>
log_id = #{logId,jdbcType=INTEGER},
</if>
<if
test=
"mailAction != null"
>
mail_action = #{mailAction,jdbcType=CHAR},
</if>
<if
test=
"nodeCron != null"
>
node_cron = #{nodeCron,jdbcType=VARCHAR},
</if>
<if
test=
"nodeDesc != null"
>
node_desc = #{nodeDesc,jdbcType=VARCHAR},
</if>
<if
test=
"nodeName != null"
>
node_name = #{nodeName,jdbcType=VARCHAR},
</if>
<if
test=
"nodeOfFlowId != null"
>
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if
test=
"nodeTimeout != null"
>
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
</if>
<if
test=
"nodeType != null"
>
node_type = #{nodeType,jdbcType=VARCHAR},
</if>
<if
test=
"pluginUrls != null"
>
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
</if>
<if
test=
"priority != null"
>
priority = #{priority,jdbcType=CHAR},
</if>
<if
test=
"remainingCount != null"
>
remaining_count = #{remainingCount,jdbcType=INTEGER},
</if>
<if
test=
"repeatCount != null"
>
repeat_count = #{repeatCount,jdbcType=INTEGER},
</if>
<if
test=
"retryInterval != null"
>
retry_interval = #{retryInterval,jdbcType=BIGINT},
</if>
<if
test=
"routingStrategy != null"
>
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
</if>
<if
test=
"runId != null"
>
run_id = #{runId,jdbcType=VARCHAR},
</if>
<if
test=
"runParam != null"
>
run_param = #{runParam,jdbcType=VARCHAR},
</if>
<if
test=
"runSourceDesc != null"
>
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
</if>
<if
test=
"scriptUrls != null"
>
script_urls = #{scriptUrls,jdbcType=VARCHAR},
</if>
<if
test=
"sourcePrincipal != null"
>
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if
test=
"sourceUpdateTime != null"
>
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
</if>
<if
test=
"triggerNextTime != null"
>
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
</if>
<if
test=
"triggerStatus != null"
>
trigger_status = #{triggerStatus,jdbcType=CHAR},
</if>
<if
test=
"runSource != null"
>
run_source = #{runSource,jdbcType=LONGVARCHAR},
</if>
</set>
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.byit.model.JobTaskSchedule"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_schedule
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
log_id = #{logId,jdbcType=INTEGER},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remaining_count = #{remainingCount,jdbcType=INTEGER},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_id = #{runId,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
trigger_status = #{triggerStatus,jdbcType=CHAR},
run_source = #{runSource,jdbcType=LONGVARCHAR}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update
id=
"updateById"
parameterType=
"com.byit.model.JobTaskSchedule"
>
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_schedule
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
log_id = #{logId,jdbcType=INTEGER},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remaining_count = #{remainingCount,jdbcType=INTEGER},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_id = #{runId,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
trigger_status = #{triggerStatus,jdbcType=CHAR}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
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