mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-10-14 14:10:24 +00:00
feat: EasyRetry-v3.2.0 => SnailJob-v1.0.0-beta1
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="ruoyi-easyretry-server" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
|
||||
<deployment type="dockerfile">
|
||||
<settings>
|
||||
<option name="imageTag" value="ruoyi/ruoyi-easyretry-server:2.2.0" />
|
||||
<option name="buildOnly" value="true" />
|
||||
<option name="sourceFilePath" value="ruoyi-visual/ruoyi-easyretry-server/Dockerfile" />
|
||||
</settings>
|
||||
</deployment>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@@ -1,12 +1,12 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="ruoyi-powerjob-server" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
|
||||
<configuration default="false" name="ruoyi-snailjob-server/Dockerfile: Compose Deployment" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
|
||||
<deployment type="dockerfile">
|
||||
<settings>
|
||||
<option name="imageTag" value="ruoyi/ruoyi-powerjob-server:2.2.0" />
|
||||
<option name="imageTag" value="ruoyi/ruoyi-snailjob-server:2.2.0" />
|
||||
<option name="buildOnly" value="true" />
|
||||
<option name="sourceFilePath" value="ruoyi-visual/ruoyi-powerjob-server/Dockerfile" />
|
||||
<option name="sourceFilePath" value="ruoyi-visual/ruoyi-snailjob-server/Dockerfile" />
|
||||
</settings>
|
||||
</deployment>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
</component>
|
@@ -13,17 +13,17 @@ spring:
|
||||
username: ${datasource.job.username}
|
||||
password: ${datasource.job.password}
|
||||
|
||||
easy-retry:
|
||||
snail-job:
|
||||
enabled: true
|
||||
# 需要在EasyRetry后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务
|
||||
# 需要在 SnailJob 后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务
|
||||
group-name: "ruoyi_group"
|
||||
# EasyRetry接入验证令牌
|
||||
token: "ER_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT"
|
||||
# SnailJob 接入验证令牌
|
||||
token: "SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT"
|
||||
server:
|
||||
# 从 nacos 获取服务
|
||||
server-name: ruoyi-easyretry-server
|
||||
server-name: ruoyi-snailjob-server
|
||||
# 服务名优先 ip垫底
|
||||
host: 127.0.0.1
|
||||
port: 1788
|
||||
# 详见 script/sql/easy_retry.sql `er_namespace` 表
|
||||
# 详见 script/sql/ry_job.sql `sj_namespace` 表
|
||||
namespace: ${spring.profiles.active}
|
||||
|
@@ -14,8 +14,8 @@ spring:
|
||||
max-lifetime: 900000
|
||||
keepaliveTime: 30000
|
||||
|
||||
# easy-retry 服务端配置
|
||||
easy-retry:
|
||||
# snail-job 服务端配置
|
||||
snail-job:
|
||||
# 拉取重试数据的每批次的大小
|
||||
retry-pull-page-size: 1000
|
||||
# 拉取重试数据的每批次的大小
|
||||
@@ -36,5 +36,4 @@ easy-retry:
|
||||
max-count: 288
|
||||
#间隔时间
|
||||
trigger-interval: 900
|
||||
mode: all
|
||||
retry-max-pull-count: 10
|
@@ -165,9 +165,9 @@ services:
|
||||
privileged: true
|
||||
network_mode: "host"
|
||||
|
||||
ruoyi-easyretry-server:
|
||||
image: ruoyi/ruoyi-easyretry-server:2.2.0
|
||||
container_name: ruoyi-easyretry-server
|
||||
ruoyi-snailjob-server:
|
||||
image: ruoyi/ruoyi-snailjob-server:2.2.0
|
||||
container_name: ruoyi-snailjob-server
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
@@ -175,7 +175,7 @@ services:
|
||||
- "8800:8800"
|
||||
- "1788:1788"
|
||||
volumes:
|
||||
- /docker/easyretry/logs/:/ruoyi/easyretry/logs
|
||||
- /docker/snailjob/logs/:/ruoyi/snailjob/logs
|
||||
privileged: true
|
||||
network_mode: "host"
|
||||
|
||||
|
29
pom.xml
29
pom.xml
@@ -34,7 +34,7 @@
|
||||
<redisson.version>3.29.0</redisson.version>
|
||||
<lock4j.version>2.2.7</lock4j.version>
|
||||
<powerjob.version>4.3.6</powerjob.version>
|
||||
<easyretry.version>3.2.0</easyretry.version>
|
||||
<snailjob.version>1.0.0-beta1</snailjob.version>
|
||||
<satoken.version>1.38.0</satoken.version>
|
||||
<lombok.version>1.18.32</lombok.version>
|
||||
<logstash.version>7.4</logstash.version>
|
||||
@@ -264,33 +264,16 @@
|
||||
<version>${lock4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- PowerJob -->
|
||||
<dependency>
|
||||
<groupId>tech.powerjob</groupId>
|
||||
<artifactId>powerjob-worker</artifactId>
|
||||
<version>${powerjob.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>tech.powerjob</groupId>
|
||||
<artifactId>powerjob-official-processors</artifactId>
|
||||
<version>${powerjob.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- EasyRetry Client -->
|
||||
<!-- SnailJob Client -->
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-client-starter</artifactId>
|
||||
<version>${easyretry.version}</version>
|
||||
<artifactId>snail-job-client-starter</artifactId>
|
||||
<version>${snailjob.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-client-core</artifactId>
|
||||
<version>${easyretry.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-client-job-core</artifactId>
|
||||
<version>${easyretry.version}</version>
|
||||
<artifactId>snail-job-client-job-core</artifactId>
|
||||
<version>${snailjob.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 加密包引入 -->
|
||||
|
@@ -28,21 +28,16 @@
|
||||
<artifactId>spring-cloud-commons</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- EasyRetry Client -->
|
||||
<!-- SnailJob Client -->
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-client-starter</artifactId>
|
||||
<version>${easyretry.version}</version>
|
||||
<artifactId>snail-job-client-starter</artifactId>
|
||||
<version>${snailjob.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-client-core</artifactId>
|
||||
<version>${easyretry.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-client-job-core</artifactId>
|
||||
<version>${easyretry.version}</version>
|
||||
<artifactId>snail-job-client-job-core</artifactId>
|
||||
<version>${snailjob.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@@ -4,12 +4,12 @@ import ch.qos.logback.classic.Logger;
|
||||
import ch.qos.logback.classic.LoggerContext;
|
||||
import ch.qos.logback.classic.spi.ILoggingEvent;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.aizuda.easy.retry.client.common.appender.EasyRetryLogbackAppender;
|
||||
import com.aizuda.easy.retry.client.common.event.ChannelReconnectEvent;
|
||||
import com.aizuda.easy.retry.client.common.event.EasyRetryStartingEvent;
|
||||
import com.aizuda.easy.retry.client.starter.EnableEasyRetry;
|
||||
import com.aizuda.snailjob.client.common.appender.SnailLogbackAppender;
|
||||
import com.aizuda.snailjob.client.common.event.SnailChannelReconnectEvent;
|
||||
import com.aizuda.snailjob.client.common.event.SnailClientStartingEvent;
|
||||
import com.aizuda.snailjob.client.starter.EnableSnailJob;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.job.config.properties.EasyRetryServerProperties;
|
||||
import org.dromara.common.job.config.properties.SnailJobServerProperties;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
@@ -29,27 +29,27 @@ import java.util.List;
|
||||
* @since 2024/3/12
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@EnableConfigurationProperties(EasyRetryServerProperties.class)
|
||||
@ConditionalOnProperty(prefix = "easy-retry", name = "enabled", havingValue = "true")
|
||||
@EnableConfigurationProperties(SnailJobServerProperties.class)
|
||||
@ConditionalOnProperty(prefix = "snail-job", name = "enabled", havingValue = "true")
|
||||
@EnableScheduling
|
||||
@EnableEasyRetry(group = "${easy-retry.group-name}")
|
||||
public class EasyRetryConfig {
|
||||
@EnableSnailJob(group = "${snail-job.group-name}")
|
||||
public class SnailJobConfig {
|
||||
|
||||
@Autowired
|
||||
private EasyRetryServerProperties properties;
|
||||
private SnailJobServerProperties properties;
|
||||
@Autowired
|
||||
private DiscoveryClient discoveryClient;
|
||||
|
||||
@EventListener(EasyRetryStartingEvent.class)
|
||||
public void onStarting(EasyRetryStartingEvent event) {
|
||||
@EventListener(SnailClientStartingEvent.class)
|
||||
public void onStarting(SnailClientStartingEvent event) {
|
||||
// 从 nacos 获取 server 服务连接
|
||||
registerServer();
|
||||
// 注册 日志监控配置
|
||||
registerLogging();
|
||||
}
|
||||
|
||||
@EventListener(ChannelReconnectEvent.class)
|
||||
public void onReconnect(ChannelReconnectEvent event) {
|
||||
@EventListener(SnailChannelReconnectEvent.class)
|
||||
public void onReconnect(SnailChannelReconnectEvent event) {
|
||||
// 连接中断 重新从 nacos 获取存活的服务连接(高可用配置)
|
||||
registerServer();
|
||||
}
|
||||
@@ -60,16 +60,16 @@ public class EasyRetryConfig {
|
||||
List<ServiceInstance> instances = discoveryClient.getInstances(serverName);
|
||||
if (CollUtil.isNotEmpty(instances)) {
|
||||
ServiceInstance instance = instances.get(0);
|
||||
System.setProperty("easy-retry.server.host", instance.getHost());
|
||||
System.setProperty("easy-retry.server.port", properties.getPort());
|
||||
System.setProperty("snail-job.server.host", instance.getHost());
|
||||
System.setProperty("snail-job.server.port", properties.getPort());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void registerLogging() {
|
||||
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
|
||||
EasyRetryLogbackAppender<ILoggingEvent> ca = new EasyRetryLogbackAppender<>();
|
||||
ca.setName("easy_log_appender");
|
||||
SnailLogbackAppender<ILoggingEvent> ca = new SnailLogbackAppender<>();
|
||||
ca.setName("snail_log_appender");
|
||||
ca.start();
|
||||
Logger rootLogger = lc.getLogger(Logger.ROOT_LOGGER_NAME);
|
||||
rootLogger.addAppender(ca);
|
@@ -4,8 +4,8 @@ import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@Data
|
||||
@ConfigurationProperties(prefix = "easy-retry.server")
|
||||
public class EasyRetryServerProperties {
|
||||
@ConfigurationProperties(prefix = "snail-job.server")
|
||||
public class SnailJobServerProperties {
|
||||
|
||||
private String serverName;
|
||||
|
@@ -1 +1 @@
|
||||
org.dromara.common.job.config.EasyRetryConfig
|
||||
org.dromara.common.job.config.SnailJobConfig
|
||||
|
@@ -36,8 +36,6 @@ public class SecurityConfiguration implements WebMvcConfigurer {
|
||||
return new SaServletFilter()
|
||||
.addInclude("/**")
|
||||
.addExclude("/actuator/**")
|
||||
// 放行 easy retry 通信接口
|
||||
.addExclude("/job/dispatch/v1", "/job/stop/v1")
|
||||
.setAuth(obj -> {
|
||||
if (SaManager.getConfig().getCheckSameToken()) {
|
||||
SaSameUtil.checkCurrentRequestToken();
|
||||
|
@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select table_name, table_comment, create_time, update_time
|
||||
from information_schema.tables
|
||||
where table_schema = (select database())
|
||||
AND table_name NOT LIKE 'pj_%' AND table_name NOT LIKE 'gen_%'
|
||||
AND table_name NOT LIKE 'sj_%' AND table_name NOT LIKE 'gen_%'
|
||||
AND table_name NOT LIKE 'act_%' AND table_name NOT LIKE 'flw_%'
|
||||
<if test="genTable.params.genTableNames != null and genTable.params.genTableNames.size > 0">
|
||||
AND table_name NOT IN
|
||||
@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where dt.table_name = dtc.table_name
|
||||
and dt.table_name = uo.object_name
|
||||
and uo.object_type = 'TABLE'
|
||||
AND dt.table_name NOT LIKE 'PJ_%' AND dt.table_name NOT LIKE 'GEN_%'
|
||||
AND dt.table_name NOT LIKE 'SJ_%' AND dt.table_name NOT LIKE 'GEN_%'
|
||||
AND dt.table_name NOT LIKE 'ACT_%' AND dt.table_name NOT LIKE 'FLW_%'
|
||||
<if test="genTable.params.genTableNames != null and genTable.params.genTableNames.size > 0">
|
||||
AND lower(dt.table_name) NOT IN
|
||||
@@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND n.nspname = 'public'::name
|
||||
AND n.nspname <![CDATA[ <> ]]> ''::name
|
||||
) list_table
|
||||
where table_name NOT LIKE 'pj_%' AND table_name NOT LIKE 'gen_%'
|
||||
where table_name NOT LIKE 'sj_%' AND table_name NOT LIKE 'gen_%'
|
||||
AND table_name NOT LIKE 'act_%' AND table_name NOT LIKE 'flw_%'
|
||||
<if test="genTable.params.genTableNames != null and genTable.params.genTableNames.size > 0">
|
||||
AND table_name NOT IN
|
||||
@@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="@org.dromara.common.mybatis.helper.DataBaseHelper@isMySql()">
|
||||
select table_name, table_comment, create_time, update_time from information_schema.tables
|
||||
where table_schema = (select database())
|
||||
and table_name NOT LIKE 'pj_%' and table_name NOT LIKE 'gen_%'
|
||||
and table_name NOT LIKE 'sj_%' and table_name NOT LIKE 'gen_%'
|
||||
and table_name NOT LIKE 'act_%' AND table_name NOT LIKE 'flw_%'
|
||||
and table_name in
|
||||
<foreach collection="array" item="name" open="(" separator="," close=")">
|
||||
@@ -106,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where dt.table_name = dtc.table_name
|
||||
and dt.table_name = uo.object_name
|
||||
and uo.object_type = 'TABLE'
|
||||
AND dt.table_name NOT LIKE 'PJ_%' AND dt.table_name NOT LIKE 'GEN_%'
|
||||
AND dt.table_name NOT LIKE 'sj_%' AND dt.table_name NOT LIKE 'GEN_%'
|
||||
AND dt.table_name NOT LIKE 'ACT_%' AND dt.table_name NOT LIKE 'FLW_%'
|
||||
and lower(dt.table_name) in
|
||||
<foreach collection="array" item="name" open="(" separator="," close=")">
|
||||
@@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND n.nspname = 'public'::name
|
||||
AND n.nspname <![CDATA[ <> ]]> ''::name
|
||||
) list_table
|
||||
where table_name NOT LIKE 'pj_%' and table_name NOT LIKE 'gen_%'
|
||||
where table_name NOT LIKE 'sj_%' and table_name NOT LIKE 'gen_%'
|
||||
and table_name NOT LIKE 'act_%' and table_name NOT LIKE 'flw_%'
|
||||
and table_name in
|
||||
<foreach collection="array" item="name" open="(" separator="," close=")">
|
||||
@@ -140,7 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="@org.dromara.common.mybatis.helper.DataBaseHelper@isMySql()">
|
||||
select table_name, table_comment, create_time, update_time from information_schema.tables
|
||||
where table_schema = (select database())
|
||||
and table_name NOT LIKE 'pj_%' and table_name NOT LIKE 'gen_%'
|
||||
and table_name NOT LIKE 'sj_%' and table_name NOT LIKE 'gen_%'
|
||||
and table_name NOT LIKE 'act_%' AND table_name NOT LIKE 'flw_%'
|
||||
and table_name = #{tableName}
|
||||
</if>
|
||||
@@ -150,7 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where dt.table_name = dtc.table_name
|
||||
and dt.table_name = uo.object_name
|
||||
and uo.object_type = 'TABLE'
|
||||
AND dt.table_name NOT LIKE 'PJ_%' AND dt.table_name NOT LIKE 'GEN_%'
|
||||
AND dt.table_name NOT LIKE 'SJ_%' AND dt.table_name NOT LIKE 'GEN_%'
|
||||
AND dt.table_name NOT LIKE 'ACT_%' AND dt.table_name NOT LIKE 'FLW_%'
|
||||
AND dt.table_name NOT IN (select table_name from gen_table)
|
||||
and lower(dt.table_name) = #{tableName}
|
||||
@@ -169,7 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND n.nspname = 'public'::name
|
||||
AND n.nspname <![CDATA[ <> ]]> ''::name
|
||||
) list_table
|
||||
where table_name NOT LIKE 'pj_%' and table_name NOT LIKE 'gen_%'
|
||||
where table_name NOT LIKE 'sj_%' and table_name NOT LIKE 'gen_%'
|
||||
and table_name NOT LIKE 'act_%' and table_name NOT LIKE 'flw_%'
|
||||
and table_name = #{tableName}
|
||||
</if>
|
||||
|
@@ -1,23 +0,0 @@
|
||||
package org.dromara.job.easyretry;
|
||||
|
||||
import com.aizuda.easy.retry.client.job.core.annotation.JobExecutor;
|
||||
import com.aizuda.easy.retry.client.job.core.dto.JobArgs;
|
||||
import com.aizuda.easy.retry.client.model.ExecuteResult;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.common.log.EasyRetryLog;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author www.byteblogs.com
|
||||
* @date 2023-09-28 22:54:07
|
||||
*/
|
||||
@Component
|
||||
@JobExecutor(name = "testJobExecutor")
|
||||
public class TestAnnoJobExecutor {
|
||||
|
||||
public ExecuteResult jobExecute(JobArgs jobArgs) {
|
||||
EasyRetryLog.LOCAL.info("testJobExecutor. jobArgs:{}", JsonUtil.toJsonString(jobArgs));
|
||||
EasyRetryLog.REMOTE.info("testJobExecutor. jobArgs:{}", JsonUtil.toJsonString(jobArgs));
|
||||
return ExecuteResult.success("测试成功");
|
||||
}
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
package org.dromara.job.snailjob;
|
||||
|
||||
import com.aizuda.snailjob.client.job.core.annotation.JobExecutor;
|
||||
import com.aizuda.snailjob.client.job.core.dto.JobArgs;
|
||||
import com.aizuda.snailjob.client.model.ExecuteResult;
|
||||
import com.aizuda.snailjob.common.core.util.JsonUtil;
|
||||
import com.aizuda.snailjob.common.log.SnailJobLog;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author opensnail
|
||||
* @date 2024-05-17
|
||||
*/
|
||||
@Component
|
||||
@JobExecutor(name = "testJobExecutor")
|
||||
public class TestAnnoJobExecutor {
|
||||
|
||||
public ExecuteResult jobExecute(JobArgs jobArgs) {
|
||||
SnailJobLog.LOCAL.info("testJobExecutor. jobArgs:{}", JsonUtil.toJsonString(jobArgs));
|
||||
SnailJobLog.REMOTE.info("testJobExecutor. jobArgs:{}", JsonUtil.toJsonString(jobArgs));
|
||||
return ExecuteResult.success("测试成功");
|
||||
}
|
||||
}
|
@@ -1,13 +1,13 @@
|
||||
package org.dromara.job.easyretry;
|
||||
package org.dromara.job.snailjob;
|
||||
|
||||
import com.aizuda.easy.retry.client.job.core.dto.JobArgs;
|
||||
import com.aizuda.easy.retry.client.job.core.executor.AbstractJobExecutor;
|
||||
import com.aizuda.easy.retry.client.model.ExecuteResult;
|
||||
import com.aizuda.snailjob.client.job.core.dto.JobArgs;
|
||||
import com.aizuda.snailjob.client.job.core.executor.AbstractJobExecutor;
|
||||
import com.aizuda.snailjob.client.model.ExecuteResult;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author www.byteblogs.com
|
||||
* @date 2023-09-28 22:54:07
|
||||
* @author opensnail
|
||||
* @date 2024-05-17
|
||||
*/
|
||||
@Component
|
||||
public class TestClassJobExecutor extends AbstractJobExecutor {
|
@@ -13,7 +13,7 @@
|
||||
<module>ruoyi-sentinel-dashboard</module>
|
||||
<module>ruoyi-seata-server</module>
|
||||
<module>ruoyi-nacos</module>
|
||||
<module>ruoyi-easyretry-server</module>
|
||||
<module>ruoyi-snailjob-server</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>ruoyi-visual</artifactId>
|
||||
|
@@ -1,102 +0,0 @@
|
||||
package com.aizuda.easy.retry.server.starter.server;
|
||||
|
||||
import com.aizuda.easy.retry.common.log.EasyRetryLog;
|
||||
import com.aizuda.easy.retry.server.common.config.SystemProperties;
|
||||
import com.aizuda.easy.retry.server.common.exception.EasyRetryServerException;
|
||||
import com.aizuda.easy.retry.server.common.Lifecycle;
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.netty.channel.socket.SocketChannel;
|
||||
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||
import io.netty.handler.codec.http.HttpObjectAggregator;
|
||||
import io.netty.handler.codec.http.HttpServerCodec;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* netty server
|
||||
*
|
||||
* @author: www.byteblogs.com
|
||||
* @date : 2022-03-07 15:54
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Component
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||
public class NettyHttpServer implements Runnable, Lifecycle {
|
||||
|
||||
@Autowired
|
||||
private SystemProperties systemProperties;
|
||||
private Thread thread = null;
|
||||
private volatile boolean started = false;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
EventLoopGroup bossGroup = new NioEventLoopGroup();
|
||||
EventLoopGroup workerGroup = new NioEventLoopGroup();
|
||||
|
||||
try {
|
||||
// start server
|
||||
ServerBootstrap bootstrap = new ServerBootstrap();
|
||||
bootstrap.group(bossGroup, workerGroup)
|
||||
.channel(NioServerSocketChannel.class)
|
||||
.option(ChannelOption.SO_BACKLOG, 128)
|
||||
.childOption(ChannelOption.SO_KEEPALIVE, true)
|
||||
.childHandler(new ChannelInitializer<SocketChannel>() {
|
||||
@Override
|
||||
public void initChannel(SocketChannel channel) throws Exception {
|
||||
channel.pipeline()
|
||||
.addLast(new HttpServerCodec())
|
||||
.addLast(new HttpObjectAggregator(5 * 1024 * 1024))
|
||||
.addLast(new NettyHttpServerHandler());
|
||||
}
|
||||
});
|
||||
|
||||
// 在特定端口绑定并启动服务器 默认是1788
|
||||
ChannelFuture future = bootstrap.bind(systemProperties.getNettyPort()).sync();
|
||||
|
||||
EasyRetryLog.LOCAL.info("------> easy-retry remoting server start success, nettype = {}, port = {}",
|
||||
NettyHttpServer.class.getName(), systemProperties.getNettyPort());
|
||||
|
||||
started = true;
|
||||
future.channel().closeFuture().sync();
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
EasyRetryLog.LOCAL.info("--------> easy-retry remoting server stop.");
|
||||
} catch (Exception e) {
|
||||
EasyRetryLog.LOCAL.error("--------> easy-retry remoting server error.", e);
|
||||
started = false;
|
||||
throw new EasyRetryServerException("easy-retry server start error");
|
||||
} finally {
|
||||
// 当服务器正常关闭时,关闭EventLoopGroups以释放资源。
|
||||
workerGroup.shutdownGracefully();
|
||||
bossGroup.shutdownGracefully();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
if (isStarted()) {
|
||||
return;
|
||||
}
|
||||
thread = new Thread(this);
|
||||
thread.setDaemon(true);
|
||||
thread.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
if (thread != null && thread.isAlive()) {
|
||||
thread.interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isStarted() {
|
||||
return started;
|
||||
}
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
package org.dromara.easyretry;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* EasyRetry Server 启动程序
|
||||
*
|
||||
* @author dhb52
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class EasyRetryServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(com.aizuda.easy.retry.server.EasyRetryServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@@ -1,10 +0,0 @@
|
||||
Application Version: ${revision}
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
_
|
||||
| |
|
||||
___ __ _ ___ _ _ ______ _ __ ___| |_ _ __ _ _ ______ ___ ___ _ ____ _____ _ __
|
||||
/ _ \/ _` / __| | | |______| '__/ _ \ __| '__| | | |______/ __|/ _ \ '__\ \ / / _ \ '__|
|
||||
| __/ (_| \__ \ |_| | | | | __/ |_| | | |_| | \__ \ __/ | \ V / __/ |
|
||||
\___|\__,_|___/\__, | |_| \___|\__|_| \__, | |___/\___|_| \_/ \___|_|
|
||||
__/ | __/ |
|
||||
|___/ |___/
|
@@ -3,16 +3,16 @@ FROM openjdk:17.0.2-oraclelinux8
|
||||
|
||||
MAINTAINER Lion Li
|
||||
|
||||
RUN mkdir -p /ruoyi/easyretry/logs
|
||||
RUN mkdir -p /ruoyi/snailjob/logs
|
||||
|
||||
WORKDIR /ruoyi/easyretry
|
||||
WORKDIR /ruoyi/snailjob
|
||||
|
||||
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
EXPOSE 8800
|
||||
EXPOSE 1788
|
||||
|
||||
ADD ./target/ruoyi-easyretry-server.jar ./app.jar
|
||||
ADD ./target/ruoyi-snailjob-server.jar ./app.jar
|
||||
|
||||
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
|
@@ -9,13 +9,13 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>ruoyi-easyretry-server</artifactId>
|
||||
<artifactId>ruoyi-snailjob-server</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-server-starter</artifactId>
|
||||
<version>${easyretry.version}</version>
|
||||
<artifactId>snail-job-server-starter</artifactId>
|
||||
<version>${snailjob.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
@@ -0,0 +1,19 @@
|
||||
package org.dromara.snailjob;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* SnailJob Server 启动程序
|
||||
*
|
||||
* @author opensnail
|
||||
* @date 2024-05-17
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class SnailJobServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(com.aizuda.snailjob.server.SnailJobServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@@ -1,11 +1,11 @@
|
||||
server:
|
||||
port: 8800
|
||||
servlet:
|
||||
context-path: /easy-retry
|
||||
context-path: /snail-job
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: ruoyi-easyretry-server
|
||||
name: ruoyi-snailjob-server
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
web:
|
||||
@@ -13,10 +13,9 @@ spring:
|
||||
static-locations: classpath:admin/
|
||||
|
||||
mybatis-plus:
|
||||
typeAliasesPackage: com.aizuda.easy.retry.template.datasource.persistence.po
|
||||
typeAliasesPackage: com.aizuda.snailjob.template.datasource.persistence.po
|
||||
global-config:
|
||||
db-config:
|
||||
table-prefix: er_
|
||||
where-strategy: NOT_EMPTY
|
||||
capital-mode: false
|
||||
logic-delete-value: 1
|
@@ -0,0 +1,10 @@
|
||||
Application Version: ${revision}
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
_ _ _ _
|
||||
(_) (_) | |
|
||||
___ _ __ __ _ _| |_ ___ | |__ ______ ___ ___ _ ____ _____ _ __
|
||||
/ __| '_ \ / _` | | | |/ _ \| '_ \______/ __|/ _ \ '__\ \ / / _ \ '__|
|
||||
\__ \ | | | (_| | | | | (_) | |_) | \__ \ __/ | \ V / __/ |
|
||||
|___/_| |_|\__,_|_|_| |\___/|_.__/ |___/\___|_| \_/ \___|_|
|
||||
_/ |
|
||||
|__/
|
@@ -22,14 +22,14 @@
|
||||
<!-- 开启 skywalking 日志收集 -->
|
||||
<include resource="logback-skylog.xml" />
|
||||
|
||||
<!-- EasyRetry appender -->
|
||||
<appender name="easy_log_server_appender" class="com.aizuda.easy.retry.server.common.appender.EasyRetryServerLogbackAppender">
|
||||
<!-- SnailJob appender -->
|
||||
<appender name="snail_log_server_appender" class="com.aizuda.snailjob.server.common.appender.SnailJobServerLogbackAppender">
|
||||
</appender>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="console"/>
|
||||
<appender-ref ref="easy_log_server_appender" />
|
||||
<appender-ref ref="snail_log_server_appender" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
@@ -444,7 +444,7 @@ insert into sys_menu values('107', '通知公告', '1', '8', 'notice',
|
||||
insert into sys_menu values('108', '日志管理', '1', '9', 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 103, 1, sysdate, null, null, '日志管理菜单');
|
||||
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, sysdate, null, null, '在线用户菜单');
|
||||
insert into sys_menu values('124', '缓存监控', '2', '1', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, sysdate, null, null, '缓存监控');
|
||||
insert into sys_menu values('110', 'EasyRetry控制台', '2', '2', 'http://localhost:8800/easy-retry', '', '', 0, 0, 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, sysdate, null, null, '定时任务菜单');
|
||||
insert into sys_menu values('110', 'SnailJob控制台', '2', '2', 'http://localhost:8800/snail-job', '', '', 0, 0, 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, sysdate, null, null, '定时任务菜单');
|
||||
insert into sys_menu values('111', 'Sentinel控制台','2', '3', 'http://localhost:8718', '', '', 0, 0, 'C', '0', '0', 'monitor:sentinel:list', 'sentinel', 103, 1, sysdate, null, null, '流量控制菜单');
|
||||
insert into sys_menu values('112', 'Nacos控制台', '2', '4', 'http://localhost:8848/nacos', '', '', 0, 0, 'C', '0', '0', 'monitor:nacos:list', 'nacos', 103, 1, sysdate, null, null, '服务治理菜单');
|
||||
insert into sys_menu values('113', 'Admin控制台', '2', '5', 'http://localhost:9100/login', '', '', 0, 0, 'C', '0', '0', 'monitor:server:list', 'server', 103, 1, sysdate, null, null, '服务监控菜单');
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -446,7 +446,7 @@ insert into sys_menu values('107', '通知公告', '1', '8', 'notice',
|
||||
insert into sys_menu values('108', '日志管理', '1', '9', 'log', '', '', '1', '0', 'M', '0', '0', '', 'log', 103, 1, now(), null, null, '日志管理菜单');
|
||||
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', '1', '0', 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, now(), null, null, '在线用户菜单');
|
||||
insert into sys_menu values('124', '缓存监控', '2', '1', 'cache', 'monitor/cache/index', '', '1', '0', 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, now(), null, null, '缓存监控');
|
||||
insert into sys_menu values('110', 'EasyRetry控制台', '2', '2', 'http://localhost:8800/easy-retry', '', '', '0', '0', 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, now(), null, null, 'ER定时任务菜单');
|
||||
insert into sys_menu values('110', 'SnailJob控制台', '2', '2', 'http://localhost:8800/snail-job', '', '', '0', '0', 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, now(), null, null, 'SJ定时任务菜单');
|
||||
insert into sys_menu values('111', 'Sentinel控制台','2', '3', 'http://localhost:8718', '', '', '0', '0', 'C', '0', '0', 'monitor:sentinel:list', 'sentinel', 103, 1, now(), null, null, '流量控制菜单');
|
||||
insert into sys_menu values('112', 'Nacos控制台', '2', '4', 'http://localhost:8848/nacos', '', '', '0', '0', 'C', '0', '0', 'monitor:nacos:list', 'nacos', 103, 1, now(), null, null, '服务治理菜单');
|
||||
insert into sys_menu values('113', 'Admin控制台', '2', '5', 'http://localhost:9100/login', '', '', '0', '0', 'C', '0', '0', 'monitor:server:list', 'server', 103, 1, now(), null, null, '服务监控菜单');
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -280,7 +280,7 @@ insert into sys_menu values('107', '通知公告', '1', '8', 'notice',
|
||||
insert into sys_menu values('108', '日志管理', '1', '9', 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 103, 1, sysdate(), null, null, '日志管理菜单');
|
||||
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, sysdate(), null, null, '在线用户菜单');
|
||||
insert into sys_menu values('124', '缓存监控', '2', '1', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, sysdate(), null, null, '缓存监控');
|
||||
insert into sys_menu values('110', 'EasyRetry控制台', '2', '2', 'http://localhost:8800/easy-retry', '', '', 0, 0, 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, sysdate(), null, null, 'ER定时任务菜单');
|
||||
insert into sys_menu values('110', 'SnailJob控制台', '2', '2', 'http://localhost:8800/snail-job', '', '', 0, 0, 'C', '0', '0', 'monitor:job:list', 'job', 103, 1, sysdate(), null, null, 'SJ定时任务菜单');
|
||||
insert into sys_menu values('111', 'Sentinel控制台','2', '3', 'http://localhost:8718', '', '', 0, 0, 'C', '0', '0', 'monitor:sentinel:list', 'sentinel', 103, 1, sysdate(), null, null, '流量控制菜单');
|
||||
insert into sys_menu values('112', 'Nacos控制台', '2', '4', 'http://localhost:8848/nacos', '', '', 0, 0, 'C', '0', '0', 'monitor:nacos:list', 'nacos', 103, 1, sysdate(), null, null, '服务治理菜单');
|
||||
insert into sys_menu values('113', 'Admin控制台', '2', '5', 'http://localhost:9100/login', '', '', 0, 0, 'C', '0', '0', 'monitor:server:list', 'server', 103, 1, sysdate(), null, null, '服务监控菜单');
|
||||
|
@@ -45,7 +45,7 @@ insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_mod
|
||||
(10, 'sentinel-ruoyi-gateway.json', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'dev', '限流策略', NULL, NULL, 'json', NULL, ''),
|
||||
(12, 'seata-server.properties', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'dev', 'seata配置文件', NULL, NULL, 'properties', NULL, ''),
|
||||
(13, 'ruoyi-sentinel-dashboard.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'dev', 'sentinel控制台配置文件', NULL, NULL, 'yaml', NULL, ''),
|
||||
(14, 'ruoyi-easyretry-server.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'dev', 'ER定时任务控制台', NULL, NULL, 'yaml', NULL, ''),
|
||||
(14, 'ruoyi-snailjob-server.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'dev', 'SJ定时任务控制台', NULL, NULL, 'yaml', NULL, ''),
|
||||
|
||||
(101, 'application-common.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '通用配置基础配置', NULL, NULL, 'yaml', NULL, ''),
|
||||
(102, 'datasource.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '数据源配置', NULL, NULL, 'yaml', NULL, ''),
|
||||
@@ -59,7 +59,7 @@ insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_mod
|
||||
(110, 'sentinel-ruoyi-gateway.json', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:23:00', '2022-01-09 15:23:00', NULL, '0:0:0:0:0:0:0:1', '', 'prod', '限流策略', NULL, NULL, 'json', NULL, ''),
|
||||
(112, 'seata-server.properties', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'prod', 'seata配置文件', NULL, NULL, 'properties', NULL, ''),
|
||||
(113, 'ruoyi-sentinel-dashboard.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'prod', 'sentinel控制台配置文件', NULL, NULL, 'yaml', NULL, ''),
|
||||
(114, 'ruoyi-easyretry-server.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'prod', 'ER定时任务控制台', NULL, NULL, 'yaml', NULL, '');
|
||||
(114, 'ruoyi-snailjob-server.yml', 'DEFAULT_GROUP', '# 将项目路径:config/下对应文件中内容复制到此处', '2944a25cb97926efcaa43b3ad7a64cf0', '2022-01-09 15:21:02', '2022-01-09 15:21:02', NULL, '0:0:0:0:0:0:0:1', '', 'prod', 'SJ定时任务控制台', NULL, NULL, 'yaml', NULL, '');
|
||||
|
||||
/******************************************/
|
||||
/* 表名称 = config_info_aggr */
|
||||
|
291
sql/ry-job.sql
291
sql/ry-job.sql
@@ -1,73 +1,85 @@
|
||||
SET NAMES utf8mb4;
|
||||
|
||||
CREATE TABLE `er_namespace`
|
||||
CREATE TABLE `sj_namespace`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`name` varchar(64) NOT NULL COMMENT '名称',
|
||||
`unique_id` varchar(64) NOT NULL COMMENT '唯一id',
|
||||
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1、删除',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '逻辑删除 1、删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_name` (`name`),
|
||||
UNIQUE KEY `uk_unique_id` (`unique_id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='命名空间';
|
||||
|
||||
INSERT INTO `er_namespace` VALUES (1, 'Development', 'dev', '', now(), now(), 0);
|
||||
INSERT INTO `er_namespace` VALUES (2, 'Production', 'prod', '', now(), now(), 0);
|
||||
INSERT INTO `sj_namespace` VALUES (1, 'Development', 'dev', '', 0, now(), now());
|
||||
INSERT INTO `sj_namespace` VALUES (2, 'Production', 'prod', '', 0, now(), now());
|
||||
|
||||
|
||||
CREATE TABLE `er_group_config`
|
||||
CREATE TABLE `sj_group_config`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` varchar(64) NOT NULL DEFAULT '' COMMENT '组名称',
|
||||
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '组描述',
|
||||
`token` varchar(64) NOT NULL DEFAULT 'ER_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT' COMMENT 'token',
|
||||
`group_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '组状态 0、未启用 1、启用',
|
||||
`token` varchar(64) NOT NULL DEFAULT 'SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT' COMMENT 'token',
|
||||
`group_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '组状态 0、未启用 1、启用',
|
||||
`version` int(11) NOT NULL COMMENT '版本号',
|
||||
`group_partition` int(11) NOT NULL COMMENT '分区',
|
||||
`id_generator_mode` tinyint(4) NOT NULL DEFAULT '1' COMMENT '唯一id生成模式 默认号段模式',
|
||||
`init_scene` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否初始化场景 0:否 1:是',
|
||||
`bucket_index` int(11) NOT NULL DEFAULT '0' COMMENT 'bucket',
|
||||
`id_generator_mode` tinyint(4) NOT NULL DEFAULT 1 COMMENT '唯一id生成模式 默认号段模式',
|
||||
`init_scene` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否初始化场景 0:否 1:是',
|
||||
`bucket_index` int(11) NOT NULL DEFAULT 0 COMMENT 'bucket',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_namespace_id_group_name` (`namespace_id`, `group_name`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='组配置'
|
||||
;
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='组配置';
|
||||
|
||||
INSERT INTO `er_group_config` VALUES (1, 'dev', 'ruoyi_group', '', 'ER_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT', 1, 1, 0, 1, 1, 4, now(), now());
|
||||
INSERT INTO `sj_group_config` VALUES (1, 'dev', 'ruoyi_group', '', 'SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT', 1, 1, 0, 1, 1, 4, now(), now());
|
||||
|
||||
|
||||
CREATE TABLE `er_notify_config`
|
||||
CREATE TABLE `sj_notify_config`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` varchar(64) NOT NULL COMMENT '组名称',
|
||||
`scene_name` varchar(64) NOT NULL COMMENT '场景名称',
|
||||
`notify_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '通知状态 0、未启用 1、启用',
|
||||
`notify_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '通知类型 1、钉钉 2、邮件 3、企业微信',
|
||||
`notify_attribute` varchar(512) NOT NULL COMMENT '配置属性',
|
||||
`notify_threshold` int(11) NOT NULL DEFAULT '0' COMMENT '通知阈值',
|
||||
`notify_scene` tinyint(4) NOT NULL DEFAULT '0' COMMENT '通知场景',
|
||||
`rate_limiter_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '限流状态 0、未启用 1、启用',
|
||||
`rate_limiter_threshold` int(11) NOT NULL DEFAULT '0' COMMENT '每秒限流阈值',
|
||||
`business_id` varchar(64) NOT NULL COMMENT '业务id (job_id或workflow_id或scene_name)',
|
||||
`system_task_type` tinyint(4) NOT NULL DEFAULT 3 COMMENT '任务类型 1. 重试任务 2. 重试回调 3、JOB任务 4、WORKFLOW任务',
|
||||
`notify_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '通知状态 0、未启用 1、启用',
|
||||
`recipient_ids` varchar(128) NOT NULL COMMENT '接收人id列表',
|
||||
`notify_threshold` int(11) NOT NULL DEFAULT 0 COMMENT '通知阈值',
|
||||
`notify_scene` tinyint(4) NOT NULL DEFAULT 0 COMMENT '通知场景',
|
||||
`rate_limiter_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '限流状态 0、未启用 1、启用',
|
||||
`rate_limiter_threshold` int(11) NOT NULL DEFAULT 0 COMMENT '每秒限流阈值',
|
||||
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`, `scene_name`)
|
||||
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`, `business_id`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='通知配置'
|
||||
;
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='通知配置';
|
||||
|
||||
CREATE TABLE `er_retry_dead_letter_0`
|
||||
CREATE TABLE `sj_notify_recipient`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`recipient_name` varchar(64) NOT NULL COMMENT '接收人名称',
|
||||
`notify_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '通知类型 1、钉钉 2、邮件 3、企业微信 4 飞书',
|
||||
`notify_attribute` varchar(512) NOT NULL COMMENT '配置属性',
|
||||
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_namespace_id` (`namespace_id`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='告警通知接收人';
|
||||
|
||||
CREATE TABLE `sj_retry_dead_letter_0`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
@@ -79,7 +91,7 @@ CREATE TABLE `er_retry_dead_letter_0`
|
||||
`executor_name` varchar(512) NOT NULL DEFAULT '' COMMENT '执行器名称',
|
||||
`args_str` text NOT NULL COMMENT '执行方法参数',
|
||||
`ext_attrs` text NOT NULL COMMENT '扩展字段',
|
||||
`task_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '任务类型 1、重试数据 2、回调数据',
|
||||
`task_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '任务类型 1、重试数据 2、回调数据',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`, `scene_name`),
|
||||
@@ -89,10 +101,9 @@ CREATE TABLE `er_retry_dead_letter_0`
|
||||
UNIQUE KEY `uk_namespace_id_group_name_unique_id` (`namespace_id`, `group_name`, `unique_id`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='死信队列表'
|
||||
;
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='死信队列表';
|
||||
|
||||
CREATE TABLE `er_retry_task_0`
|
||||
CREATE TABLE `sj_retry_task_0`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
@@ -105,9 +116,9 @@ CREATE TABLE `er_retry_task_0`
|
||||
`args_str` text NOT NULL COMMENT '执行方法参数',
|
||||
`ext_attrs` text NOT NULL COMMENT '扩展字段',
|
||||
`next_trigger_at` datetime NOT NULL COMMENT '下次触发时间',
|
||||
`retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '重试次数',
|
||||
`retry_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '重试状态 0、重试中 1、成功 2、最大重试次数',
|
||||
`task_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '任务类型 1、重试数据 2、回调数据',
|
||||
`retry_count` int(11) NOT NULL DEFAULT 0 COMMENT '重试次数',
|
||||
`retry_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '重试状态 0、重试中 1、成功 2、最大重试次数',
|
||||
`task_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '任务类型 1、重试数据 2、回调数据',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -120,10 +131,9 @@ CREATE TABLE `er_retry_task_0`
|
||||
UNIQUE KEY `uk_name_unique_id` (`namespace_id`, `group_name`, `unique_id`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='任务表'
|
||||
;
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='任务表';
|
||||
|
||||
CREATE TABLE `er_retry_task_log`
|
||||
CREATE TABLE `sj_retry_task_log`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
@@ -135,8 +145,8 @@ CREATE TABLE `er_retry_task_log`
|
||||
`executor_name` varchar(512) NOT NULL DEFAULT '' COMMENT '执行器名称',
|
||||
`args_str` text NOT NULL COMMENT '执行方法参数',
|
||||
`ext_attrs` text NOT NULL COMMENT '扩展字段',
|
||||
`retry_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '重试状态 0、重试中 1、成功 2、最大次数',
|
||||
`task_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '任务类型 1、重试数据 2、回调数据',
|
||||
`retry_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '重试状态 0、重试中 1、成功 2、最大次数',
|
||||
`task_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '任务类型 1、重试数据 2、回调数据',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -148,40 +158,38 @@ CREATE TABLE `er_retry_task_log`
|
||||
KEY `idx_create_dt` (`create_dt`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='任务日志基础信息表'
|
||||
;
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='任务日志基础信息表';
|
||||
|
||||
CREATE TABLE `er_retry_task_log_message`
|
||||
CREATE TABLE `sj_retry_task_log_message`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` varchar(64) NOT NULL COMMENT '组名称',
|
||||
`unique_id` varchar(64) NOT NULL COMMENT '同组下id唯一',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`message` longtext NOT NULL COMMENT '异常信息',
|
||||
`message` longtext NOT NULL COMMENT '异常信息',
|
||||
`log_num` int(11) NOT NULL DEFAULT 1 COMMENT '日志数量',
|
||||
`real_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '上报时间',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`, `unique_id`),
|
||||
KEY `idx_create_dt` (`create_dt`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='任务调度日志信息记录表'
|
||||
;
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='任务调度日志信息记录表';
|
||||
|
||||
CREATE TABLE `er_scene_config`
|
||||
CREATE TABLE `sj_retry_scene_config`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`scene_name` varchar(64) NOT NULL COMMENT '场景名称',
|
||||
`group_name` varchar(64) NOT NULL COMMENT '组名称',
|
||||
`scene_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '组状态 0、未启用 1、启用',
|
||||
`max_retry_count` int(11) NOT NULL DEFAULT '5' COMMENT '最大重试次数',
|
||||
`back_off` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1、默认等级 2、固定间隔时间 3、CRON 表达式',
|
||||
`scene_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '组状态 0、未启用 1、启用',
|
||||
`max_retry_count` int(11) NOT NULL DEFAULT 5 COMMENT '最大重试次数',
|
||||
`back_off` tinyint(4) NOT NULL DEFAULT 1 COMMENT '1、默认等级 2、固定间隔时间 3、CRON 表达式',
|
||||
`trigger_interval` varchar(16) NOT NULL DEFAULT '' COMMENT '间隔时长',
|
||||
`deadline_request` bigint(20) unsigned NOT NULL DEFAULT '60000' COMMENT 'Deadline Request 调用链超时 单位毫秒',
|
||||
`executor_timeout` int(11) unsigned NOT NULL DEFAULT '5' COMMENT '任务执行超时时间,单位秒',
|
||||
`route_key` tinyint(4) NOT NULL DEFAULT '4' COMMENT '路由策略',
|
||||
`deadline_request` bigint(20) unsigned NOT NULL DEFAULT 60000 COMMENT 'Deadline Request 调用链超时 单位毫秒',
|
||||
`executor_timeout` int(11) unsigned NOT NULL DEFAULT 5 COMMENT '任务执行超时时间,单位秒',
|
||||
`route_key` tinyint(4) NOT NULL DEFAULT 4 COMMENT '路由策略',
|
||||
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
@@ -189,21 +197,19 @@ CREATE TABLE `er_scene_config`
|
||||
UNIQUE KEY `uk_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`, `scene_name`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='场景配置'
|
||||
;
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='场景配置';
|
||||
|
||||
CREATE TABLE `er_server_node`
|
||||
CREATE TABLE `sj_server_node`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` varchar(64) NOT NULL COMMENT '组名称',
|
||||
`host_id` varchar(64) NOT NULL COMMENT '主机id',
|
||||
`host_ip` varchar(64) NOT NULL COMMENT '机器ip',
|
||||
`context_path` varchar(256) NOT NULL DEFAULT '/' COMMENT '客户端上下文路径 server.servlet.context-path',
|
||||
`host_port` int(16) NOT NULL COMMENT '机器端口',
|
||||
`expire_at` datetime NOT NULL COMMENT '过期时间',
|
||||
`node_type` tinyint(4) NOT NULL COMMENT '节点类型 1、客户端 2、是服务端',
|
||||
`ext_attrs` varchar(256) NULL default '' COMMENT '扩展字段',
|
||||
`ext_attrs` varchar(256) NULL DEFAULT '' COMMENT '扩展字段',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -212,10 +218,9 @@ CREATE TABLE `er_server_node`
|
||||
UNIQUE KEY `uk_host_id_host_ip` (`host_id`, `host_ip`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='服务器节点'
|
||||
;
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='服务器节点';
|
||||
|
||||
CREATE TABLE `er_distributed_lock`
|
||||
CREATE TABLE `sj_distributed_lock`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`name` varchar(64) NOT NULL COMMENT '锁名称',
|
||||
@@ -228,15 +233,14 @@ CREATE TABLE `er_distributed_lock`
|
||||
UNIQUE KEY `uk_name` (`name`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='锁定表'
|
||||
;
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='锁定表';
|
||||
|
||||
CREATE TABLE `er_system_user`
|
||||
CREATE TABLE `sj_system_user`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`username` varchar(64) NOT NULL COMMENT '账号',
|
||||
`password` varchar(128) NOT NULL COMMENT '密码',
|
||||
`role` tinyint(4) NOT NULL DEFAULT '0' COMMENT '角色:1-普通用户、2-管理员',
|
||||
`role` tinyint(4) NOT NULL DEFAULT 0 COMMENT '角色:1-普通用户、2-管理员',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -245,9 +249,9 @@ CREATE TABLE `er_system_user`
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='系统用户表';
|
||||
|
||||
-- pwd: admin
|
||||
INSERT INTO `er_system_user` VALUES (1, 'admin', '465c194afb65670f38322df087f0a9bb225cc257e43eb4ac5a0c98ef5b3173ac', 2, now(), now());
|
||||
INSERT INTO `sj_system_user` VALUES (1, 'admin', '465c194afb65670f38322df087f0a9bb225cc257e43eb4ac5a0c98ef5b3173ac', 2, now(), now());
|
||||
|
||||
CREATE TABLE `er_system_user_permission`
|
||||
CREATE TABLE `sj_system_user_permission`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`group_name` varchar(64) NOT NULL COMMENT '组名称',
|
||||
@@ -260,13 +264,13 @@ CREATE TABLE `er_system_user_permission`
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='系统用户权限表';
|
||||
|
||||
CREATE TABLE `er_sequence_alloc`
|
||||
CREATE TABLE `sj_sequence_alloc`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` varchar(64) NOT NULL DEFAULT '' COMMENT '组名称',
|
||||
`max_id` bigint(20) NOT NULL DEFAULT '1' COMMENT '最大id',
|
||||
`step` int(11) NOT NULL DEFAULT '100' COMMENT '步长',
|
||||
`max_id` bigint(20) NOT NULL DEFAULT 1 COMMENT '最大id',
|
||||
`step` int(11) NOT NULL DEFAULT 100 COMMENT '步长',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_namespace_id_group_name` (`namespace_id`, `group_name`)
|
||||
@@ -274,34 +278,34 @@ CREATE TABLE `er_sequence_alloc`
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='号段模式序号ID分配表';
|
||||
|
||||
-- 分布式调度DDL
|
||||
CREATE TABLE `er_job`
|
||||
CREATE TABLE `sj_job`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` varchar(64) NOT NULL COMMENT '组名称',
|
||||
`job_name` varchar(64) NOT NULL COMMENT '名称',
|
||||
`args_str` text DEFAULT NULL COMMENT '执行方法参数',
|
||||
`args_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '参数类型 ',
|
||||
`args_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '参数类型 ',
|
||||
`next_trigger_at` bigint(13) NOT NULL COMMENT '下次触发时间',
|
||||
`job_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '任务状态 0、关闭、1、开启',
|
||||
`task_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '任务类型 1、集群 2、广播 3、切片',
|
||||
`route_key` tinyint(4) NOT NULL DEFAULT '4' COMMENT '路由策略',
|
||||
`executor_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '执行器类型',
|
||||
`job_status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '任务状态 0、关闭、1、开启',
|
||||
`task_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '任务类型 1、集群 2、广播 3、切片',
|
||||
`route_key` tinyint(4) NOT NULL DEFAULT 4 COMMENT '路由策略',
|
||||
`executor_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '执行器类型',
|
||||
`executor_info` varchar(255) DEFAULT NULL COMMENT '执行器名称',
|
||||
`trigger_type` tinyint(4) NOT NULL COMMENT '触发类型 1.CRON 表达式 2. 固定时间',
|
||||
`trigger_interval` varchar(255) NOT NULL COMMENT '间隔时长',
|
||||
`block_strategy` tinyint(4) NOT NULL DEFAULT '1' COMMENT '阻塞策略 1、丢弃 2、覆盖 3、并行',
|
||||
`executor_timeout` int(11) NOT NULL DEFAULT '0' COMMENT '任务执行超时时间,单位秒',
|
||||
`max_retry_times` int(11) NOT NULL DEFAULT '0' COMMENT '最大重试次数',
|
||||
`parallel_num` int(11) NOT NULL DEFAULT '1' COMMENT '并行数',
|
||||
`retry_interval` int(11) NOT NULL DEFAULT '0' COMMENT '重试间隔(s)',
|
||||
`bucket_index` int(11) NOT NULL DEFAULT '0' COMMENT 'bucket',
|
||||
`resident` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否是常驻任务',
|
||||
`block_strategy` tinyint(4) NOT NULL DEFAULT 1 COMMENT '阻塞策略 1、丢弃 2、覆盖 3、并行',
|
||||
`executor_timeout` int(11) NOT NULL DEFAULT 0 COMMENT '任务执行超时时间,单位秒',
|
||||
`max_retry_times` int(11) NOT NULL DEFAULT 0 COMMENT '最大重试次数',
|
||||
`parallel_num` int(11) NOT NULL DEFAULT 1 COMMENT '并行数',
|
||||
`retry_interval` int(11) NOT NULL DEFAULT 0 COMMENT '重试间隔(s)',
|
||||
`bucket_index` int(11) NOT NULL DEFAULT 0 COMMENT 'bucket',
|
||||
`resident` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否是常驻任务',
|
||||
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
|
||||
`ext_attrs` varchar(256) NULL default '' COMMENT '扩展字段',
|
||||
`ext_attrs` varchar(256) NULL DEFAULT '' COMMENT '扩展字段',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1、删除',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '逻辑删除 1、删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_namespace_id_group_name` (`namespace_id`, `group_name`),
|
||||
KEY `idx_job_status_bucket_index` (`job_status`, `bucket_index`),
|
||||
@@ -310,10 +314,9 @@ CREATE TABLE `er_job`
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='任务信息';
|
||||
|
||||
INSERT INTO `er_job` VALUES (1, 'dev', 'ruoyi_group', 'demo-job', null, 1, 1710344035622, 1, 1, 4, 1, 'testJobExecutor', 2, '60', 1, 60, 3, 1, 1, 116, 0, '', '', now(), now(), 0);
|
||||
INSERT INTO `sj_job` VALUES (1, 'dev', 'ruoyi_group', 'demo-job', null, 1, 1710344035622, 1, 1, 4, 1, 'testJobExecutor', 2, '60', 1, 60, 3, 1, 1, 116, 0, '', '', 0 , now(), now());
|
||||
|
||||
|
||||
CREATE TABLE `er_job_log_message`
|
||||
CREATE TABLE `sj_job_log_message`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
@@ -324,8 +327,8 @@ CREATE TABLE `er_job_log_message`
|
||||
`message` longtext NOT NULL COMMENT '调度信息',
|
||||
`log_num` int(11) NOT NULL DEFAULT 1 COMMENT '日志数量',
|
||||
`real_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '上报时间',
|
||||
`ext_attrs` varchar(256) NULL DEFAULT '' COMMENT '扩展字段',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`ext_attrs` varchar(256) NULL default '' COMMENT '扩展字段',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_task_batch_id_task_id` (`task_batch_id`, `task_id`),
|
||||
KEY `idx_create_dt` (`create_dt`),
|
||||
@@ -334,21 +337,21 @@ CREATE TABLE `er_job_log_message`
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='调度日志';
|
||||
|
||||
CREATE TABLE `er_job_task`
|
||||
CREATE TABLE `sj_job_task`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` varchar(64) NOT NULL COMMENT '组名称',
|
||||
`job_id` bigint(20) NOT NULL COMMENT '任务信息id',
|
||||
`task_batch_id` bigint(20) NOT NULL COMMENT '调度任务id',
|
||||
`parent_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '父执行器id',
|
||||
`task_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行的状态 0、失败 1、成功',
|
||||
`retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '重试次数',
|
||||
`parent_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '父执行器id',
|
||||
`task_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '执行的状态 0、失败 1、成功',
|
||||
`retry_count` int(11) NOT NULL DEFAULT 0 COMMENT '重试次数',
|
||||
`client_info` varchar(128) DEFAULT NULL COMMENT '客户端地址 clientId#ip:port',
|
||||
`result_message` text NOT NULL COMMENT '执行结果',
|
||||
`args_str` text DEFAULT NULL COMMENT '执行方法参数',
|
||||
`args_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '参数类型 ',
|
||||
`ext_attrs` varchar(256) NULL default '' COMMENT '扩展字段',
|
||||
`args_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '参数类型 ',
|
||||
`ext_attrs` varchar(256) NULL DEFAULT '' COMMENT '扩展字段',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -359,24 +362,24 @@ CREATE TABLE `er_job_task`
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='任务实例';
|
||||
|
||||
CREATE TABLE `er_job_task_batch`
|
||||
CREATE TABLE `sj_job_task_batch`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` varchar(64) NOT NULL COMMENT '组名称',
|
||||
`job_id` bigint(20) NOT NULL COMMENT '任务id',
|
||||
`workflow_node_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '工作流节点id',
|
||||
`parent_workflow_node_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '工作流任务父批次id',
|
||||
`workflow_task_batch_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '工作流任务批次id',
|
||||
`task_batch_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '任务批次状态 0、失败 1、成功',
|
||||
`operation_reason` tinyint(4) NOT NULL DEFAULT '0' COMMENT '操作原因',
|
||||
`execution_at` bigint(13) NOT NULL DEFAULT '0' COMMENT '任务执行时间',
|
||||
`system_task_type` tinyint(4) NOT NULL DEFAULT '3' COMMENT '任务类型 3、JOB任务 4、WORKFLOW任务',
|
||||
`workflow_node_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '工作流节点id',
|
||||
`parent_workflow_node_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '工作流任务父批次id',
|
||||
`workflow_task_batch_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '工作流任务批次id',
|
||||
`task_batch_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '任务批次状态 0、失败 1、成功',
|
||||
`operation_reason` tinyint(4) NOT NULL DEFAULT 0 COMMENT '操作原因',
|
||||
`execution_at` bigint(13) NOT NULL DEFAULT 0 COMMENT '任务执行时间',
|
||||
`system_task_type` tinyint(4) NOT NULL DEFAULT 3 COMMENT '任务类型 3、JOB任务 4、WORKFLOW任务',
|
||||
`parent_id` varchar(64) NOT NULL DEFAULT '' COMMENT '父节点',
|
||||
`ext_attrs` varchar(256) NULL DEFAULT '' COMMENT '扩展字段',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1、删除',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '逻辑删除 1、删除',
|
||||
`ext_attrs` varchar(256) NULL default '' COMMENT '扩展字段',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_job_id_task_batch_status` (`job_id`, `task_batch_status`),
|
||||
KEY `idx_create_dt` (`create_dt`),
|
||||
@@ -386,42 +389,20 @@ CREATE TABLE `er_job_task_batch`
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='任务批次';
|
||||
|
||||
CREATE TABLE `er_job_notify_config`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` varchar(64) NOT NULL COMMENT '组名称',
|
||||
`job_id` bigint(20) NOT NULL COMMENT '任务id',
|
||||
`notify_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '通知状态 0、未启用 1、启用',
|
||||
`notify_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '通知类型 1、钉钉 2、邮件 3、企业微信',
|
||||
`notify_attribute` varchar(512) NOT NULL COMMENT '配置属性',
|
||||
`notify_threshold` int(11) NOT NULL DEFAULT '0' COMMENT '通知阈值',
|
||||
`notify_scene` tinyint(4) NOT NULL DEFAULT '0' COMMENT '通知场景',
|
||||
`rate_limiter_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '限流状态 0、未启用 1、启用',
|
||||
`rate_limiter_threshold` int(11) NOT NULL DEFAULT '0' COMMENT '每秒限流阈值',
|
||||
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_namespace_id_group_name_job_id` (`namespace_id`, `group_name`, job_id)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 4
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='job通知配置';
|
||||
|
||||
CREATE TABLE `er_job_summary`
|
||||
CREATE TABLE `sj_job_summary`
|
||||
(
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` VARCHAR(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '组名称',
|
||||
`business_id` bigint NOT NULL COMMENT '业务id (job_id或workflow_id)',
|
||||
`system_task_type` tinyint(4) NOT NULL DEFAULT '3' COMMENT '任务类型 3、JOB任务 4、WORKFLOW任务',
|
||||
`system_task_type` tinyint(4) NOT NULL DEFAULT 3 COMMENT '任务类型 3、JOB任务 4、WORKFLOW任务',
|
||||
`trigger_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '统计时间',
|
||||
`success_num` int NOT NULL DEFAULT '0' COMMENT '执行成功-日志数量',
|
||||
`fail_num` int NOT NULL DEFAULT '0' COMMENT '执行失败-日志数量',
|
||||
`success_num` int NOT NULL DEFAULT 0 COMMENT '执行成功-日志数量',
|
||||
`fail_num` int NOT NULL DEFAULT 0 COMMENT '执行失败-日志数量',
|
||||
`fail_reason` varchar(512) NOT NULL DEFAULT '' COMMENT '失败原因',
|
||||
`stop_num` int NOT NULL DEFAULT '0' COMMENT '执行失败-日志数量',
|
||||
`stop_num` int NOT NULL DEFAULT 0 COMMENT '执行失败-日志数量',
|
||||
`stop_reason` varchar(512) NOT NULL DEFAULT '' COMMENT '失败原因',
|
||||
`cancel_num` int NOT NULL DEFAULT '0' COMMENT '执行失败-日志数量',
|
||||
`cancel_num` int NOT NULL DEFAULT 0 COMMENT '执行失败-日志数量',
|
||||
`cancel_reason` varchar(512) NOT NULL DEFAULT '' COMMENT '失败原因',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
@@ -432,17 +413,17 @@ CREATE TABLE `er_job_summary`
|
||||
AUTO_INCREMENT = 1
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='DashBoard_Job';
|
||||
|
||||
CREATE TABLE `er_retry_summary`
|
||||
CREATE TABLE `sj_retry_summary`
|
||||
(
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` VARCHAR(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '组名称',
|
||||
`scene_name` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '场景名称',
|
||||
`trigger_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '统计时间',
|
||||
`running_num` int NOT NULL DEFAULT '0' COMMENT '重试中-日志数量',
|
||||
`finish_num` int NOT NULL DEFAULT '0' COMMENT '重试完成-日志数量',
|
||||
`max_count_num` int NOT NULL DEFAULT '0' COMMENT '重试到达最大次数-日志数量',
|
||||
`suspend_num` int NOT NULL DEFAULT '0' COMMENT '暂停重试-日志数量',
|
||||
`running_num` int NOT NULL DEFAULT 0 COMMENT '重试中-日志数量',
|
||||
`finish_num` int NOT NULL DEFAULT 0 COMMENT '重试完成-日志数量',
|
||||
`max_count_num` int NOT NULL DEFAULT 0 COMMENT '重试到达最大次数-日志数量',
|
||||
`suspend_num` int NOT NULL DEFAULT 0 COMMENT '暂停重试-日志数量',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -452,26 +433,26 @@ CREATE TABLE `er_retry_summary`
|
||||
AUTO_INCREMENT = 1
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='DashBoard_Retry';
|
||||
|
||||
CREATE TABLE `er_workflow`
|
||||
CREATE TABLE `sj_workflow`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`workflow_name` varchar(64) NOT NULL COMMENT '工作流名称',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` varchar(64) NOT NULL COMMENT '组名称',
|
||||
`workflow_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '工作流状态 0、关闭、1、开启',
|
||||
`workflow_status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '工作流状态 0、关闭、1、开启',
|
||||
`trigger_type` tinyint(4) NOT NULL COMMENT '触发类型 1.CRON 表达式 2. 固定时间',
|
||||
`trigger_interval` varchar(255) NOT NULL COMMENT '间隔时长',
|
||||
`next_trigger_at` bigint(13) NOT NULL COMMENT '下次触发时间',
|
||||
`block_strategy` tinyint(4) NOT NULL DEFAULT '1' COMMENT '阻塞策略 1、丢弃 2、覆盖 3、并行',
|
||||
`executor_timeout` int(11) NOT NULL DEFAULT '0' COMMENT '任务执行超时时间,单位秒',
|
||||
`block_strategy` tinyint(4) NOT NULL DEFAULT 1 COMMENT '阻塞策略 1、丢弃 2、覆盖 3、并行',
|
||||
`executor_timeout` int(11) NOT NULL DEFAULT 0 COMMENT '任务执行超时时间,单位秒',
|
||||
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
|
||||
`flow_info` text DEFAULT NULL COMMENT '流程信息',
|
||||
`bucket_index` int(11) NOT NULL DEFAULT '0' COMMENT 'bucket',
|
||||
`bucket_index` int(11) NOT NULL DEFAULT 0 COMMENT 'bucket',
|
||||
`version` int(11) NOT NULL COMMENT '版本号',
|
||||
`ext_attrs` varchar(256) NULL DEFAULT '' COMMENT '扩展字段',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1、删除',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '逻辑删除 1、删除',
|
||||
`ext_attrs` varchar(256) NULL default '' COMMENT '扩展字段',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_create_dt` (`create_dt`),
|
||||
KEY `idx_namespace_id_group_name` (`namespace_id`, `group_name`)
|
||||
@@ -479,7 +460,7 @@ CREATE TABLE `er_workflow`
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='工作流';
|
||||
|
||||
CREATE TABLE `er_workflow_node`
|
||||
CREATE TABLE `sj_workflow_node`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
@@ -494,10 +475,10 @@ CREATE TABLE `er_workflow_node`
|
||||
`priority_level` int(11) NOT NULL DEFAULT 1 COMMENT '优先级',
|
||||
`node_info` text DEFAULT NULL COMMENT '节点信息 ',
|
||||
`version` int(11) NOT NULL COMMENT '版本号',
|
||||
`ext_attrs` varchar(256) NULL DEFAULT '' COMMENT '扩展字段',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1、删除',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '逻辑删除 1、删除',
|
||||
`ext_attrs` varchar(256) NULL default '' COMMENT '扩展字段',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_create_dt` (`create_dt`),
|
||||
KEY `idx_namespace_id_group_name` (`namespace_id`, `group_name`)
|
||||
@@ -505,20 +486,20 @@ CREATE TABLE `er_workflow_node`
|
||||
AUTO_INCREMENT = 0
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='工作流节点';
|
||||
|
||||
CREATE TABLE `er_workflow_task_batch`
|
||||
CREATE TABLE `sj_workflow_task_batch`
|
||||
(
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a' COMMENT '命名空间id',
|
||||
`group_name` varchar(64) NOT NULL COMMENT '组名称',
|
||||
`workflow_id` bigint(20) NOT NULL COMMENT '工作流任务id',
|
||||
`task_batch_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '任务批次状态 0、失败 1、成功',
|
||||
`operation_reason` tinyint(4) NOT NULL DEFAULT '0' COMMENT '操作原因',
|
||||
`task_batch_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '任务批次状态 0、失败 1、成功',
|
||||
`operation_reason` tinyint(4) NOT NULL DEFAULT 0 COMMENT '操作原因',
|
||||
`flow_info` text DEFAULT NULL COMMENT '流程信息',
|
||||
`execution_at` bigint(13) NOT NULL DEFAULT '0' COMMENT '任务执行时间',
|
||||
`execution_at` bigint(13) NOT NULL DEFAULT 0 COMMENT '任务执行时间',
|
||||
`ext_attrs` varchar(256) NULL DEFAULT '' COMMENT '扩展字段',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1、删除',
|
||||
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '逻辑删除 1、删除',
|
||||
`ext_attrs` varchar(256) NULL default '' COMMENT '扩展字段',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_job_id_task_batch_status` (`workflow_id`, `task_batch_status`),
|
||||
KEY `idx_create_dt` (`create_dt`),
|
||||
|
@@ -6,3 +6,4 @@ ALTER TABLE sys_post ADD (post_category VARCHAR2(100) DEFAULT NULL) COMMENT '岗
|
||||
COMMENT ON COLUMN sys_post.post_category IS '岗位类别编码';
|
||||
UPDATE sys_post SET dept_id = 100;
|
||||
UPDATE sys_post SET dept_id = 103 where post_id = 1;
|
||||
UPDATE sys_menu SET name='SnailJob控制台', path='http://localhost:8800/snail-job' WHERE menu_id=110;
|
@@ -6,3 +6,4 @@ ALTER TABLE sys_post ADD COLUMN post_category varchar(100) default null::varchar
|
||||
COMMENT ON COLUMN sys_post.post_category IS '岗位类别编码';
|
||||
UPDATE sys_post SET dept_id = 100;
|
||||
UPDATE sys_post SET dept_id = 103 where post_id = 1;
|
||||
UPDATE sys_menu SET name='SnailJob控制台', path='http://localhost:8800/snail-job' WHERE menu_id=110;
|
@@ -2,3 +2,4 @@ ALTER TABLE sys_dept ADD dept_category VARCHAR(100) DEFAULT NULL COMMENT '部门
|
||||
ALTER TABLE sys_post ADD dept_id BIGINT(20) NOT NULL COMMENT '部门id', ADD post_category VARCHAR(100) DEFAULT NULL COMMENT '岗位类别编码';
|
||||
UPDATE sys_post SET dept_id = 100;
|
||||
UPDATE sys_post SET dept_id = 103 where post_id = 1;
|
||||
UPDATE sys_menu SET name='SnailJob控制台', path='http://localhost:8800/snail-job' WHERE menu_id=110;
|
Reference in New Issue
Block a user