Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibztask
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibztask
提交
c17d639b
提交
c17d639b
编写于
6月 19, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reset
上级
d4508683
变更
5
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
1 行增加
和
716 行删除
+1
-716
JobsInfoServiceEx.java
...cn/ibizlab/core/extensions.service/JobsInfoServiceEx.java
+1
-1
JobsInfo.java
...e/src/main/java/cn/ibizlab/core/task/domain/JobsInfo.java
+0
-281
JobsLock.java
...e/src/main/java/cn/ibizlab/core/task/domain/JobsLock.java
+0
-108
JobsLog.java
...re/src/main/java/cn/ibizlab/core/task/domain/JobsLog.java
+0
-203
JobsRegistry.java
...c/main/java/cn/ibizlab/core/task/domain/JobsRegistry.java
+0
-123
未找到文件。
ibztask-core/src/main/java/cn/ibizlab/core/extensions.service/JobsInfoServiceEx.java
浏览文件 @
c17d639b
...
...
@@ -52,7 +52,7 @@ public class JobsInfoServiceEx extends JobsInfoServiceImpl {
throw
new
BadRequestAlertException
(
"未找到任务"
,
"JobsInfo"
,
""
);
}
et
.
setStatus
(
1
);
et
.
setStatus
(
0
);
et
.
setLastTime
(
new
BigInteger
(
"0"
));
if
(!
JobsHelper
.
cronValidate
(
dbJobInfo
.
getCron
()))
throw
new
BadRequestAlertException
(
"CRON 表达式不可用"
,
"JobsInfo"
,
dbJobInfo
.
getCron
());
...
...
ibztask-core/src/main/java/cn/ibizlab/core/task/domain/JobsInfo.java
已删除
100644 → 0
浏览文件 @
d4508683
package
cn
.
ibizlab
.
core
.
task
.
domain
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
cn.ibizlab.util.domain.EntityBase
;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.enums.DEFieldDefaultValueType
;
import
java.io.Serializable
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.ibizlab.util.domain.EntityMP
;
/**
* 实体[任务信息]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"JOBS_INFO"
,
resultMap
=
"JobsInfoResultMap"
)
public
class
JobsInfo
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键ID
*/
@DEField
(
isKeyField
=
true
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
private
BigInteger
id
;
/**
* 租户ID
*/
@DEField
(
name
=
"tenant_id"
)
@TableField
(
value
=
"tenant_id"
)
@JSONField
(
name
=
"tenant_id"
)
@JsonProperty
(
"tenant_id"
)
private
String
tenantId
;
/**
* 服务名
*/
@TableField
(
value
=
"app"
)
@JSONField
(
name
=
"app"
)
@JsonProperty
(
"app"
)
private
String
app
;
/**
* 任务执行CRON
*/
@TableField
(
value
=
"cron"
)
@JSONField
(
name
=
"cron"
)
@JsonProperty
(
"cron"
)
private
String
cron
;
/**
* 执行器任务HANDLER
*/
@TableField
(
value
=
"handler"
)
@JSONField
(
name
=
"handler"
)
@JsonProperty
(
"handler"
)
private
String
handler
;
/**
* 执行器任务参数
*/
@TableField
(
value
=
"param"
)
@JSONField
(
name
=
"param"
)
@JsonProperty
(
"param"
)
private
String
param
;
/**
* 任务执行超时时间(秒)
*/
@DEField
(
defaultValue
=
"0"
)
@TableField
(
value
=
"timeout"
)
@JSONField
(
name
=
"timeout"
)
@JsonProperty
(
"timeout"
)
private
Integer
timeout
;
/**
* 失败重试次数
*/
@DEField
(
defaultValue
=
"0"
)
@TableField
(
value
=
"fail_retry_count"
)
@JSONField
(
name
=
"fail_retry_count"
)
@JsonProperty
(
"fail_retry_count"
)
private
Integer
failRetryCount
;
/**
* 上次调度时间
*/
@DEField
(
name
=
"last_time"
)
@TableField
(
value
=
"last_time"
)
@JSONField
(
name
=
"last_time"
)
@JsonProperty
(
"last_time"
)
private
BigInteger
lastTime
;
/**
* 下次调度时间
*/
@DEField
(
name
=
"next_time"
)
@TableField
(
value
=
"next_time"
)
@JSONField
(
name
=
"next_time"
)
@JsonProperty
(
"next_time"
)
private
BigInteger
nextTime
;
/**
* 所有者
*/
@TableField
(
value
=
"author"
)
@JSONField
(
name
=
"author"
)
@JsonProperty
(
"author"
)
private
String
author
;
/**
* 备注
*/
@TableField
(
value
=
"remark"
)
@JSONField
(
name
=
"remark"
)
@JsonProperty
(
"remark"
)
private
String
remark
;
/**
* 状态(0、启用 1、已禁用)
*/
@TableField
(
value
=
"status"
)
@JSONField
(
name
=
"status"
)
@JsonProperty
(
"status"
)
private
Integer
status
;
/**
* 更新时间
*/
@DEField
(
name
=
"update_time"
)
@TableField
(
value
=
"update_time"
)
@JSONField
(
name
=
"update_time"
)
@JsonProperty
(
"update_time"
)
private
BigInteger
updateTime
;
/**
* 创建时间
*/
@DEField
(
name
=
"create_time"
)
@TableField
(
value
=
"create_time"
)
@JSONField
(
name
=
"create_time"
)
@JsonProperty
(
"create_time"
)
private
BigInteger
createTime
;
/**
* 设置 [租户ID]
*/
public
void
setTenantId
(
String
tenantId
){
this
.
tenantId
=
tenantId
;
this
.
modify
(
"tenant_id"
,
tenantId
);
}
/**
* 设置 [服务名]
*/
public
void
setApp
(
String
app
){
this
.
app
=
app
;
this
.
modify
(
"app"
,
app
);
}
/**
* 设置 [任务执行CRON]
*/
public
void
setCron
(
String
cron
){
this
.
cron
=
cron
;
this
.
modify
(
"cron"
,
cron
);
}
/**
* 设置 [执行器任务HANDLER]
*/
public
void
setHandler
(
String
handler
){
this
.
handler
=
handler
;
this
.
modify
(
"handler"
,
handler
);
}
/**
* 设置 [执行器任务参数]
*/
public
void
setParam
(
String
param
){
this
.
param
=
param
;
this
.
modify
(
"param"
,
param
);
}
/**
* 设置 [任务执行超时时间(秒)]
*/
public
void
setTimeout
(
Integer
timeout
){
this
.
timeout
=
timeout
;
this
.
modify
(
"timeout"
,
timeout
);
}
/**
* 设置 [失败重试次数]
*/
public
void
setFailRetryCount
(
Integer
failRetryCount
){
this
.
failRetryCount
=
failRetryCount
;
this
.
modify
(
"fail_retry_count"
,
failRetryCount
);
}
/**
* 设置 [上次调度时间]
*/
public
void
setLastTime
(
BigInteger
lastTime
){
this
.
lastTime
=
lastTime
;
this
.
modify
(
"last_time"
,
lastTime
);
}
/**
* 设置 [下次调度时间]
*/
public
void
setNextTime
(
BigInteger
nextTime
){
this
.
nextTime
=
nextTime
;
this
.
modify
(
"next_time"
,
nextTime
);
}
/**
* 设置 [所有者]
*/
public
void
setAuthor
(
String
author
){
this
.
author
=
author
;
this
.
modify
(
"author"
,
author
);
}
/**
* 设置 [备注]
*/
public
void
setRemark
(
String
remark
){
this
.
remark
=
remark
;
this
.
modify
(
"remark"
,
remark
);
}
/**
* 设置 [状态(0、启用 1、已禁用)]
*/
public
void
setStatus
(
Integer
status
){
this
.
status
=
status
;
this
.
modify
(
"status"
,
status
);
}
/**
* 设置 [更新时间]
*/
public
void
setUpdateTime
(
BigInteger
updateTime
){
this
.
updateTime
=
updateTime
;
this
.
modify
(
"update_time"
,
updateTime
);
}
/**
* 设置 [创建时间]
*/
public
void
setCreateTime
(
BigInteger
createTime
){
this
.
createTime
=
createTime
;
this
.
modify
(
"create_time"
,
createTime
);
}
public
BigInteger
getId
()
{
if
(
id
==
null
)
id
=
BigInteger
.
valueOf
(
IdWorker
.
getId
());
return
id
;
}
}
ibztask-core/src/main/java/cn/ibizlab/core/task/domain/JobsLock.java
已删除
100644 → 0
浏览文件 @
d4508683
package
cn
.
ibizlab
.
core
.
task
.
domain
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
cn.ibizlab.util.domain.EntityBase
;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.enums.DEFieldDefaultValueType
;
import
java.io.Serializable
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.ibizlab.util.domain.EntityMP
;
/**
* 实体[任务锁]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"JOBS_LOCK"
,
resultMap
=
"JobsLockResultMap"
)
public
class
JobsLock
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键ID
*/
@DEField
(
isKeyField
=
true
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
private
BigInteger
id
;
/**
* 名称
*/
@TableField
(
value
=
"name"
)
@JSONField
(
name
=
"name"
)
@JsonProperty
(
"name"
)
private
String
name
;
/**
* 持有者
*/
@TableField
(
value
=
"owner"
)
@JSONField
(
name
=
"owner"
)
@JsonProperty
(
"owner"
)
private
String
owner
;
/**
* 创建时间
*/
@DEField
(
name
=
"create_time"
)
@TableField
(
value
=
"create_time"
)
@JSONField
(
name
=
"create_time"
)
@JsonProperty
(
"create_time"
)
private
BigInteger
createTime
;
/**
* 设置 [名称]
*/
public
void
setName
(
String
name
){
this
.
name
=
name
;
this
.
modify
(
"name"
,
name
);
}
/**
* 设置 [持有者]
*/
public
void
setOwner
(
String
owner
){
this
.
owner
=
owner
;
this
.
modify
(
"owner"
,
owner
);
}
/**
* 设置 [创建时间]
*/
public
void
setCreateTime
(
BigInteger
createTime
){
this
.
createTime
=
createTime
;
this
.
modify
(
"create_time"
,
createTime
);
}
public
BigInteger
getId
()
{
if
(
id
==
null
)
id
=
BigInteger
.
valueOf
(
IdWorker
.
getId
());
return
id
;
}
}
ibztask-core/src/main/java/cn/ibizlab/core/task/domain/JobsLog.java
已删除
100644 → 0
浏览文件 @
d4508683
package
cn
.
ibizlab
.
core
.
task
.
domain
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
cn.ibizlab.util.domain.EntityBase
;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.enums.DEFieldDefaultValueType
;
import
java.io.Serializable
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.ibizlab.util.domain.EntityMP
;
/**
* 实体[任务调度日志]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"JOBS_LOG"
,
resultMap
=
"JobsLogResultMap"
)
public
class
JobsLog
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键ID
*/
@DEField
(
isKeyField
=
true
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
private
BigInteger
id
;
/**
* 任务ID
*/
@DEField
(
name
=
"job_id"
)
@TableField
(
value
=
"job_id"
)
@JSONField
(
name
=
"job_id"
)
@JsonProperty
(
"job_id"
)
private
BigInteger
jobId
;
/**
* 执行地址
*/
@TableField
(
value
=
"address"
)
@JSONField
(
name
=
"address"
)
@JsonProperty
(
"address"
)
private
String
address
;
/**
* 执行器任务HANDLER
*/
@TableField
(
value
=
"handler"
)
@JSONField
(
name
=
"handler"
)
@JsonProperty
(
"handler"
)
private
String
handler
;
/**
* 执行器任务参数
*/
@TableField
(
value
=
"param"
)
@JSONField
(
name
=
"param"
)
@JsonProperty
(
"param"
)
private
String
param
;
/**
* 失败重试次数
*/
@DEField
(
defaultValue
=
"0"
)
@TableField
(
value
=
"fail_retry_count"
)
@JSONField
(
name
=
"fail_retry_count"
)
@JsonProperty
(
"fail_retry_count"
)
private
Integer
failRetryCount
;
/**
* 触发器调度返回码
*/
@DEField
(
defaultValue
=
"0"
)
@TableField
(
value
=
"trigger_code"
)
@JSONField
(
name
=
"trigger_code"
)
@JsonProperty
(
"trigger_code"
)
private
Integer
triggerCode
;
/**
* 触发器调度类型
*/
@DEField
(
name
=
"trigger_type"
)
@TableField
(
value
=
"trigger_type"
)
@JSONField
(
name
=
"trigger_type"
)
@JsonProperty
(
"trigger_type"
)
private
String
triggerType
;
/**
* 触发器调度类型
*/
@DEField
(
name
=
"trigger_msg"
)
@TableField
(
value
=
"trigger_msg"
)
@JSONField
(
name
=
"trigger_msg"
)
@JsonProperty
(
"trigger_msg"
)
private
String
triggerMsg
;
/**
* 创建时间
*/
@DEField
(
name
=
"create_time"
)
@TableField
(
value
=
"create_time"
)
@JSONField
(
name
=
"create_time"
)
@JsonProperty
(
"create_time"
)
private
BigInteger
createTime
;
/**
* 设置 [任务ID]
*/
public
void
setJobId
(
BigInteger
jobId
){
this
.
jobId
=
jobId
;
this
.
modify
(
"job_id"
,
jobId
);
}
/**
* 设置 [执行地址]
*/
public
void
setAddress
(
String
address
){
this
.
address
=
address
;
this
.
modify
(
"address"
,
address
);
}
/**
* 设置 [执行器任务HANDLER]
*/
public
void
setHandler
(
String
handler
){
this
.
handler
=
handler
;
this
.
modify
(
"handler"
,
handler
);
}
/**
* 设置 [执行器任务参数]
*/
public
void
setParam
(
String
param
){
this
.
param
=
param
;
this
.
modify
(
"param"
,
param
);
}
/**
* 设置 [失败重试次数]
*/
public
void
setFailRetryCount
(
Integer
failRetryCount
){
this
.
failRetryCount
=
failRetryCount
;
this
.
modify
(
"fail_retry_count"
,
failRetryCount
);
}
/**
* 设置 [触发器调度返回码]
*/
public
void
setTriggerCode
(
Integer
triggerCode
){
this
.
triggerCode
=
triggerCode
;
this
.
modify
(
"trigger_code"
,
triggerCode
);
}
/**
* 设置 [触发器调度类型]
*/
public
void
setTriggerType
(
String
triggerType
){
this
.
triggerType
=
triggerType
;
this
.
modify
(
"trigger_type"
,
triggerType
);
}
/**
* 设置 [触发器调度类型]
*/
public
void
setTriggerMsg
(
String
triggerMsg
){
this
.
triggerMsg
=
triggerMsg
;
this
.
modify
(
"trigger_msg"
,
triggerMsg
);
}
/**
* 设置 [创建时间]
*/
public
void
setCreateTime
(
BigInteger
createTime
){
this
.
createTime
=
createTime
;
this
.
modify
(
"create_time"
,
createTime
);
}
public
BigInteger
getId
()
{
if
(
id
==
null
)
id
=
BigInteger
.
valueOf
(
IdWorker
.
getId
());
return
id
;
}
}
ibztask-core/src/main/java/cn/ibizlab/core/task/domain/JobsRegistry.java
已删除
100644 → 0
浏览文件 @
d4508683
package
cn
.
ibizlab
.
core
.
task
.
domain
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
cn.ibizlab.util.domain.EntityBase
;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.enums.DEFieldDefaultValueType
;
import
java.io.Serializable
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.ibizlab.util.domain.EntityMP
;
/**
* 实体[任务注册信息]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"JOBS_REGISTRY"
,
resultMap
=
"JobsRegistryResultMap"
)
public
class
JobsRegistry
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键ID
*/
@DEField
(
isKeyField
=
true
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
private
BigInteger
id
;
/**
* 服务名
*/
@TableField
(
value
=
"app"
)
@JSONField
(
name
=
"app"
)
@JsonProperty
(
"app"
)
private
String
app
;
/**
* 执行地址
*/
@TableField
(
value
=
"address"
)
@JSONField
(
name
=
"address"
)
@JsonProperty
(
"address"
)
private
String
address
;
/**
* 状态(0、启用 1、已禁用)
*/
@TableField
(
value
=
"status"
)
@JSONField
(
name
=
"status"
)
@JsonProperty
(
"status"
)
private
Integer
status
;
/**
* 更新时间
*/
@DEField
(
name
=
"update_time"
)
@TableField
(
value
=
"update_time"
)
@JSONField
(
name
=
"update_time"
)
@JsonProperty
(
"update_time"
)
private
BigInteger
updateTime
;
/**
* 设置 [服务名]
*/
public
void
setApp
(
String
app
){
this
.
app
=
app
;
this
.
modify
(
"app"
,
app
);
}
/**
* 设置 [执行地址]
*/
public
void
setAddress
(
String
address
){
this
.
address
=
address
;
this
.
modify
(
"address"
,
address
);
}
/**
* 设置 [状态(0、启用 1、已禁用)]
*/
public
void
setStatus
(
Integer
status
){
this
.
status
=
status
;
this
.
modify
(
"status"
,
status
);
}
/**
* 设置 [更新时间]
*/
public
void
setUpdateTime
(
BigInteger
updateTime
){
this
.
updateTime
=
updateTime
;
this
.
modify
(
"update_time"
,
updateTime
);
}
public
BigInteger
getId
()
{
if
(
id
==
null
)
id
=
BigInteger
.
valueOf
(
IdWorker
.
getId
());
return
id
;
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录