增加定时器功能

This commit is contained in:
zhangwei
2019-01-26 18:02:44 +06:00
parent 0fb4bf08a4
commit f90ef5ab85
47 changed files with 5923 additions and 356 deletions

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:tool="http://www.springframework.org/schema/tool"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.1.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd"
default-lazy-init="true">
<!-- 配置加载 任务执行类 -->
<bean id="scheduleCfgJobDetail" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
<property name="jobClass" value="com.nis.quartz.ScheduleCfgJob"/>
<property name="name" value="scheduleCfgJobDetail" />
<property name="group" value="cfg" />
</bean>
<!-- 定时检查 schedule_cfg 表 -->
<bean id="scheduleCfgSimpleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean">
<property name="jobDetail">
<ref bean="scheduleCfgJobDetail" />
</property>
<property name="repeatInterval" value="10000" /><!-- 间隔 10s 执行一次 -->
<property name="startDelay" value="10000" /><!-- 延迟 10s 启动 -->
<property name="name" value="scheduleCfgTri" />
<property name="group" value="cfg" />
</bean>
<!-- 定时任务 -->
<bean id="NTCScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" >
<property name="dataSource" ref="ProductDataSource" /><!-- 配置数据源 -->
<property name="applicationContextSchedulerContextKey" value="applicationContextKey"/>
<property name="configLocation" value="classpath:quartz.properties"/><!-- 加载配置文件 -->
<property name="autoStartup" value="true" /><!-- 自启动 -->
<property name="startupDelay" value="60" /><!-- 启动延迟时间 ,单位s-->
<property name="triggers">
<list>
<ref bean="scheduleCfgSimpleTrigger" />
</list>
</property>
</bean>
</beans>

View File

@@ -1482,14 +1482,16 @@ intercep_domain_required_tip=Domain is required
packets=packets
GByte=GByte
#\u5B9A\u65F6\u5668\u53C2\u6570
interval=Interval
month=Month
day=Day
interval=Recure every
month=Months
day=Days
week=weeks
startTime=Start Time
endTime=End Time
single=Single
everyDay=Every Day
everyWeek=Every Week
everyMonth=Every Month
single=One Time
everyDay=Daily
everyWeek=Weekly
everyMonth=Monthly
on=On
validate_error=Unexpected error occurred while validating
Is_schduler=Scheduler

View File

@@ -1,70 +1,74 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2009-2012 the original author or authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<!-- 使全局的映射器启用或禁用缓存。 -->
<setting name="cacheEnabled" value="true"/>
<!-- 全局启用或禁用延迟加载。当禁用时,所有关联对象都会即时加载。 -->
<setting name="lazyLoadingEnabled" value="true"/>
<!-- 当启用时,有延迟加载属性的对象在被调用时将会完全加载任意属性。否则,每种属性将会按需要加载。 -->
<setting name="aggressiveLazyLoading" value="true"/>
<!-- 是否允许单条sql 返回多个数据集 (取决于驱动的兼容性) default:true -->
<setting name="multipleResultSetsEnabled" value="true"/>
<!-- 是否可以使用列的别名 (取决于驱动的兼容性) default:true -->
<setting name="useColumnLabel" value="true"/>
<!-- 允许JDBC 生成主键。需要驱动器支持。如果设为了true这个设置将强制使用被生成的主键有一些驱动器不兼容不过仍然可以执行。 default:false -->
<setting name="useGeneratedKeys" value="false"/>
<!-- 指定 MyBatis 如何自动映射 数据基表的列 NONE不隐射 PARTIAL:部分 FULL:全部 -->
<setting name="autoMappingBehavior" value="PARTIAL"/>
<!-- 这是默认的执行类型 SIMPLE: 简单; REUSE: 执行器可能重复使用prepared statements语句BATCH: 执行器可以重复执行语句和批量更新) -->
<setting name="defaultExecutorType" value="SIMPLE"/>
<!-- 使用驼峰命名法转换字段。 -->
<setting name="mapUnderscoreToCamelCase" value="true"/>
<!-- 设置本地缓存范围 session:就会有数据的共享 statement:语句范围 (这样就不会有数据的共享 ) defalut:session -->
<setting name="localCacheScope" value="SESSION"/>
<!-- 设置但JDBC类型为空时,某些驱动程序 要指定值,default:OTHER插入空值时不需要指定类型 -->
<setting name="jdbcTypeForNull" value="NULL"/>
</settings>
<!--通过指定包名设置在相关映射时可使用不带包的简短名字bean的首字母小写作为默认别名 -->
<typeAliases>
<package name="com.nis.domain"/>
</typeAliases>
<!-- 插件配置 -->
<plugins>
<plugin interceptor="com.nis.persistence.interceptor.PaginationInterceptor" />
</plugins>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2009-2012 the original author or authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<!-- 使全局的映射器启用或禁用缓存。 -->
<setting name="cacheEnabled" value="true"/>
<!-- 全局启用或禁用延迟加载。当禁用时,所有关联对象都会即时加载。 -->
<setting name="lazyLoadingEnabled" value="true"/>
<!-- 当启用时,有延迟加载属性的对象在被调用时将会完全加载任意属性。否则,每种属性将会按需要加载。 -->
<setting name="aggressiveLazyLoading" value="true"/>
<!-- 是否允许单条sql 返回多个数据集 (取决于驱动的兼容性) default:true -->
<setting name="multipleResultSetsEnabled" value="true"/>
<!-- 是否可以使用列的别名 (取决于驱动的兼容性) default:true -->
<setting name="useColumnLabel" value="true"/>
<!-- 允许JDBC 生成主键。需要驱动器支持。如果设为了true这个设置将强制使用被生成的主键有一些驱动器不兼容不过仍然可以执行。 default:false -->
<setting name="useGeneratedKeys" value="false"/>
<!-- 指定 MyBatis 如何自动映射 数据基表的列 NONE不隐射 PARTIAL:部分 FULL:全部 -->
<setting name="autoMappingBehavior" value="PARTIAL"/>
<!-- 这是默认的执行类型 SIMPLE: 简单; REUSE: 执行器可能重复使用prepared statements语句BATCH: 执行器可以重复执行语句和批量更新) -->
<setting name="defaultExecutorType" value="SIMPLE"/>
<!-- 使用驼峰命名法转换字段。 -->
<setting name="mapUnderscoreToCamelCase" value="true"/>
<!-- 设置本地缓存范围 session:就会有数据的共享 statement:语句范围 (这样就不会有数据的共享 ) defalut:session -->
<setting name="localCacheScope" value="SESSION"/>
<!-- 设置但JDBC类型为空时,某些驱动程序 要指定值,default:OTHER插入空值时不需要指定类型 -->
<setting name="jdbcTypeForNull" value="NULL"/>
</settings>
<!--通过指定包名设置在相关映射时可使用不带包的简短名字bean的首字母小写作为默认别名 -->
<typeAliases>
<package name="com.nis.domain"/>
</typeAliases>
<!-- 插件配置 -->
<plugins>
<plugin interceptor="com.nis.persistence.interceptor.PaginationInterceptor" />
<!-- 定时任务 更新保存 拦截器 -->
<plugin interceptor="com.nis.persistence.interceptor.ScheduleUpdateInterceptor" />
<!-- 定时任务 查询 -->
<plugin interceptor="com.nis.persistence.interceptor.ScheduleSelectInterceptor" />
</plugins>
</configuration>

View File

@@ -0,0 +1,17 @@
#################### quartz 相关配置文件 #########################
#Main Scheduler Settings
org.quartz.scheduler.instanceName=NTCScheduler
org.quartz.scheduler.instanceId=AUTO
org.quartz.scheduler.threadsInheritContextClassLoaderOfInitializer=true
org.quartz.scheduler.skipUpdateCheck=true
org.quartz.scheduler.batchTriggerAcquisitionMaxCount=100
org.quartz.threadPool.threadCount=10
#Configure JDBC-JobStoreTX
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.tablePrefix=QRTZ_
org.quartz.jobStore.isClustered=true
org.quartz.jobStore.acquireTriggersWithinLock=true
org.quartz.jobStore.clusterCheckinInterval = 30000

View File

@@ -11,13 +11,13 @@
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
</service>
<service id="37" functionId="5" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="ASN封堵">
<serviceCfg cfgType="1" tableName="asn_ip_cfg" groupReuse="true" groupId="userRegion4"></serviceCfg>
<userRegion regionKey="ASN_ID" regionColumn="userRegion5" userRegionPosition="0"></userRegion>
<serviceCfg cfgType="2" tableName="asn_keyword_cfg" groupReuse="true" groupId="userRegion4"></serviceCfg>
<!-- <userRegion regionKey="ASN_ID" regionColumn="userRegion5" userRegionPosition="0"></userRegion> -->
</service>
<service id="149" functionId="5" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="ASN监测">
<serviceCfg cfgType="2" tableName="asn_keyword_cfg" groupReuse="true" groupId="userRegion4"></serviceCfg>
<!-- <userRegion regionKey="ASN_ID" regionColumn="userRegion5" userRegionPosition="0" ></userRegion> -->
</service>
<!-- <service id="149" functionId="5" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="ASN监测">
<serviceCfg cfgType="1" tableName="asn_ip_cfg" groupReuse="true" groupId="userRegion4"></serviceCfg>
<userRegion regionKey="ASN_ID" regionColumn="userRegion5" userRegionPosition="0" ></userRegion>
</service> -->
<service id="3" functionId="5" serviceType="2" tableName="cfg_index_info" className="CfgIndexInfo" desc="IP丢弃">
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
</service>
@@ -32,13 +32,13 @@
<userRegion regionKey="substitute" regionColumn="userRegion2,userRegion3" userRegionPosition="0"></userRegion>
</service>
<!-- IP Spoofing的地址IP池 回调类配置 -->
<service id="642" functionId="666" serviceType="2" tableName="pxy_obj_spoofing_ip_pool" className="PxyObjSpoofingIpPool" desc="IP Spoofing Pool"></service>
<!-- <service id="642" functionId="666" serviceType="2" tableName="pxy_obj_spoofing_ip_pool" className="PxyObjSpoofingIpPool" desc="IP Spoofing Pool"></service> -->
<service id="518" functionId="214" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="IP Spoofing">
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
<serviceCfg cfgType="2" tableName="intercept_pkt_bin" ></serviceCfg>
<userRegion regionKey="zone" regionColumn="userRegion1" userRegionPosition="0"></userRegion>
<userRegion regionKey="substitute" regionColumn="userRegion2,userRegion3" userRegionPosition="0"></userRegion>
<!-- <serviceCfg cfgType="2" tableName="intercept_pkt_bin" ></serviceCfg> --> -->
<userRegion regionKey="nat_type" regionColumn="userRegion1" userRegionPosition="0"></userRegion>
<userRegion regionKey="spoofing_ip_pool" regionColumn="userRegion3" userRegionPosition="0"></userRegion>
</service>
<service id="2" functionId="6" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="URL白名单">
<serviceCfg cfgType="2" tableName="http_url_cfg" ></serviceCfg>
@@ -279,21 +279,22 @@
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
<userRegion regionKey="PROTO_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="1"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="0"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="1"></userRegion>
</service>
<service id="33" functionId="63" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="APP封堵">
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="0"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="1"></userRegion>
<userRegion regionKey="DKC" regionColumn="userRegion4" userRegionPosition="1"></userRegion>
</service>
<service id="145" functionId="63" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="APP监测">
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="0"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="1"></userRegion>
</service>
<service id="1056" functionId="63" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="APP限速">
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
@@ -301,21 +302,21 @@
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="1"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="0"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="1"></userRegion>
</service>
<service id="36" functionId="408" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="隧道协议行为封堵">
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="0"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="1"></userRegion>
</service>
<service id="148" functionId="408" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="隧道协议行为监测">
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="0"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="1"></userRegion>
</service>
<service id="1060" functionId="408" serviceType="1" tableName="app_policy_cfg" className="AppPolicyCfg" desc="隧道协议行为限速">
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
@@ -323,7 +324,7 @@
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="BEHAV_ID" regionColumn="behavCode" userRegionPosition="1"></userRegion>
<userRegion regionKey="Droprate" regionColumn="userRegion2" userRegionPosition="1"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="0"></userRegion>
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="1"></userRegion>
</service>
<service id="1028" functionId="405" serviceType="1" cfgType="1" tableName="app_ip_cfg" className="AppIpCfg" desc="APP IP特征">
<userRegion regionKey="APP_ID" regionColumn="appCode" userRegionPosition="1"></userRegion>

View File

@@ -0,0 +1,2 @@
[users]
admin=admin!@#,Superman

View File

@@ -0,0 +1,179 @@
#
# In your Quartz properties file, you'll need to set
# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
#
#
# By: Ron Cordell - roncordell
# I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM.
DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
DROP TABLE IF EXISTS QRTZ_LOCKS;
DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
DROP TABLE IF EXISTS QRTZ_CALENDARS;
CREATE TABLE QRTZ_JOB_DETAILS(
SCHED_NAME VARCHAR(120) NOT NULL,
JOB_NAME VARCHAR(200) NOT NULL,
JOB_GROUP VARCHAR(200) NOT NULL,
DESCRIPTION VARCHAR(250) NULL,
JOB_CLASS_NAME VARCHAR(250) NOT NULL,
IS_DURABLE VARCHAR(1) NOT NULL,
IS_NONCONCURRENT VARCHAR(1) NOT NULL,
IS_UPDATE_DATA VARCHAR(1) NOT NULL,
REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
JOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_TRIGGERS (
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
JOB_NAME VARCHAR(200) NOT NULL,
JOB_GROUP VARCHAR(200) NOT NULL,
DESCRIPTION VARCHAR(250) NULL,
NEXT_FIRE_TIME BIGINT(13) NULL,
PREV_FIRE_TIME BIGINT(13) NULL,
PRIORITY INTEGER NULL,
TRIGGER_STATE VARCHAR(16) NOT NULL,
TRIGGER_TYPE VARCHAR(8) NOT NULL,
START_TIME BIGINT(13) NOT NULL,
END_TIME BIGINT(13) NULL,
CALENDAR_NAME VARCHAR(200) NULL,
MISFIRE_INSTR SMALLINT(2) NULL,
JOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
REPEAT_COUNT BIGINT(7) NOT NULL,
REPEAT_INTERVAL BIGINT(12) NOT NULL,
TIMES_TRIGGERED BIGINT(10) NOT NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_CRON_TRIGGERS (
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
CRON_EXPRESSION VARCHAR(120) NOT NULL,
TIME_ZONE_ID VARCHAR(80),
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_SIMPROP_TRIGGERS
(
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
STR_PROP_1 VARCHAR(512) NULL,
STR_PROP_2 VARCHAR(512) NULL,
STR_PROP_3 VARCHAR(512) NULL,
INT_PROP_1 INT NULL,
INT_PROP_2 INT NULL,
LONG_PROP_1 BIGINT NULL,
LONG_PROP_2 BIGINT NULL,
DEC_PROP_1 NUMERIC(13,4) NULL,
DEC_PROP_2 NUMERIC(13,4) NULL,
BOOL_PROP_1 VARCHAR(1) NULL,
BOOL_PROP_2 VARCHAR(1) NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_BLOB_TRIGGERS (
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
BLOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_CALENDARS (
SCHED_NAME VARCHAR(120) NOT NULL,
CALENDAR_NAME VARCHAR(200) NOT NULL,
CALENDAR BLOB NOT NULL,
PRIMARY KEY (SCHED_NAME,CALENDAR_NAME))
ENGINE=InnoDB;
CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_FIRED_TRIGGERS (
SCHED_NAME VARCHAR(120) NOT NULL,
ENTRY_ID VARCHAR(95) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
INSTANCE_NAME VARCHAR(200) NOT NULL,
FIRED_TIME BIGINT(13) NOT NULL,
SCHED_TIME BIGINT(13) NOT NULL,
PRIORITY INTEGER NOT NULL,
STATE VARCHAR(16) NOT NULL,
JOB_NAME VARCHAR(200) NULL,
JOB_GROUP VARCHAR(200) NULL,
IS_NONCONCURRENT VARCHAR(1) NULL,
REQUESTS_RECOVERY VARCHAR(1) NULL,
PRIMARY KEY (SCHED_NAME,ENTRY_ID))
ENGINE=InnoDB;
CREATE TABLE QRTZ_SCHEDULER_STATE (
SCHED_NAME VARCHAR(120) NOT NULL,
INSTANCE_NAME VARCHAR(200) NOT NULL,
LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
CHECKIN_INTERVAL BIGINT(13) NOT NULL,
PRIMARY KEY (SCHED_NAME,INSTANCE_NAME))
ENGINE=InnoDB;
CREATE TABLE QRTZ_LOCKS (
SCHED_NAME VARCHAR(120) NOT NULL,
LOCK_NAME VARCHAR(40) NOT NULL,
PRIMARY KEY (SCHED_NAME,LOCK_NAME))
ENGINE=InnoDB;
CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY);
CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME);
CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME);
CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY);
CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
commit;

View File

@@ -0,0 +1,81 @@
/*
Navicat Premium Data Transfer
Source Server : 本机
Source Server Type : MariaDB
Source Server Version : 100214
Source Host : 127.0.0.1:3306
Source Schema : ntc
Target Server Type : MariaDB
Target Server Version : 100214
File Encoding : 65001
Date: 02/01/2019 17:15:01
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for schedule_cfg
-- ----------------------------
DROP TABLE IF EXISTS `schedule_cfg`;
CREATE TABLE `schedule_cfg` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定时任务名称,预留',
`cron_valid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定时:月份',
`cron_invalid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定时:天',
`cfg_id` bigint(20) NOT NULL COMMENT '配置表id',
`compile_id` bigint(20) NOT NULL COMMENT '编译id',
`service_id` int(11) NOT NULL COMMENT '业务id',
`is_valid` int(11) NOT NULL DEFAULT 1 COMMENT '配置生效标识1:有效,0:无效',
`is_audit` int(1) NULL DEFAULT NULL COMMENT '审核状态',
`function_id` int(11) NULL DEFAULT NULL COMMENT 'function id',
`creator_id` int(11) NULL DEFAULT NULL COMMENT '创建人id',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`editor_id` int(11) NULL DEFAULT NULL COMMENT '修改人id',
`edit_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`table_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '表名',
`user_region1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`user_region2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`user_region3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`user_region4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`user_region5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`del_flag` int(1) NULL DEFAULT 1 COMMENT '删除标识,定时任务是否有效默认1',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for schedule_exce_log
-- ----------------------------
DROP TABLE IF EXISTS `schedule_exce_log`;
CREATE TABLE `schedule_exce_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`schedule_id` bigint(20) NOT NULL COMMENT 'schedule_info 表的主键',
`exce_time` datetime(0) NULL DEFAULT NULL COMMENT '最新执行时间',
`issue_status` int(255) NULL DEFAULT NULL COMMENT '下发状态1生效0失效',
`issue_result` int(255) NULL DEFAULT NULL COMMENT '下发结果1成功0失败',
`error_info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下发失败原因',
`compile_id` bigint(20) NULL DEFAULT NULL COMMENT '编译id',
`is_issue` int(1) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for schedule_exce_new
-- ----------------------------
DROP TABLE IF EXISTS `schedule_exce_new`;
CREATE TABLE `schedule_exce_new` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`schedule_id` bigint(20) NOT NULL COMMENT 'schedule_info 表的主键',
`exce_time` datetime(0) NULL DEFAULT NULL COMMENT '最新执行时间',
`issue_status` int(255) NULL DEFAULT NULL COMMENT '下发状态1生效0失效',
`issue_result` int(255) NULL DEFAULT NULL COMMENT '下发结果1成功0失败',
`error_info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下发失败原因',
`compile_id` bigint(20) NULL DEFAULT NULL COMMENT '编译id',
`is_issue` int(255) NULL DEFAULT 0 COMMENT '是否需要下发配置10',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;