diff --git a/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobGroupMapper.xml b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobGroupMapper.xml new file mode 100644 index 00000000..474a95a2 --- /dev/null +++ b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobGroupMapper.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + t.id, + t.app_name, + t.title, + t.address_type, + t.address_list + + + XXL_JOB_GROUP_ID.NEXTVAL + + + + + + + + select from dual + + INSERT INTO xxl_job_group (id, app_name, title, address_type, address_list) + values ( #{id},#{appname,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{addressType}, #{addressList,jdbcType=VARCHAR}) + + + + UPDATE xxl_job_group + SET app_name = #{appname,jdbcType=VARCHAR}, + title = #{title,jdbcType=VARCHAR}, + address_type = #{addressType}, + address_list = #{addressList,jdbcType=VARCHAR} + WHERE id = #{id} + + + + DELETE FROM xxl_job_group + WHERE id = #{id} + + + + + + + + + \ No newline at end of file diff --git a/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobInfoMapper.xml b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobInfoMapper.xml new file mode 100644 index 00000000..66d75a8e --- /dev/null +++ b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobInfoMapper.xml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + t.id, + t.job_group, + t.job_cron, + t.job_desc, + t.add_time, + t.update_time, + t.author, + t.alarm_email, + t.executor_route_strategy, + t.executor_handler, + t.executor_param, + t.executor_block_strategy, + t.executor_timeout, + t.executor_fail_retry_count, + t.glue_type, + t.glue_source, + t.glue_remark, + t.glue_updatetime, + t.child_jobid, + t.trigger_status, + t.trigger_last_time, + t.trigger_next_time + + + XXL_JOB_INFO_ID.NEXTVAL + + + + + + + + select from dual + + INSERT INTO xxl_job_info ( + id, + job_group, + job_cron, + job_desc, + add_time, + update_time, + author, + alarm_email, + executor_route_strategy, + executor_handler, + executor_param, + executor_block_strategy, + executor_timeout, + executor_fail_retry_count, + glue_type, + glue_source, + glue_remark, + glue_updatetime, + child_jobid, + trigger_status, + trigger_last_time, + trigger_next_time + ) VALUES ( + #{id}, + #{jobGroup}, + #{jobCron,jdbcType=VARCHAR}, + #{jobDesc,jdbcType=VARCHAR}, + #{addTime}, + #{updateTime}, + #{author,jdbcType=VARCHAR}, + #{alarmEmail,jdbcType=VARCHAR}, + #{executorRouteStrategy,jdbcType=VARCHAR}, + #{executorHandler,jdbcType=VARCHAR}, + #{executorParam,jdbcType=VARCHAR}, + #{executorBlockStrategy,jdbcType=VARCHAR}, + #{executorTimeout,jdbcType=VARCHAR}, + #{executorFailRetryCount}, + #{glueType,jdbcType=VARCHAR}, + #{glueSource,jdbcType=CLOB}, + #{glueRemark,jdbcType=VARCHAR}, + #{glueUpdatetime}, + #{childJobId,jdbcType=VARCHAR}, + #{triggerStatus}, + #{triggerLastTime}, + #{triggerNextTime} + ) + + + + + + + UPDATE xxl_job_info + SET + job_group = #{jobGroup}, + job_cron = #{jobCron,jdbcType=VARCHAR}, + job_desc = #{jobDesc,jdbcType=VARCHAR}, + update_time = #{updateTime}, + author = #{author,jdbcType=VARCHAR}, + alarm_email = #{alarmEmail,jdbcType=VARCHAR}, + executor_route_strategy = #{executorRouteStrategy,jdbcType=VARCHAR}, + executor_handler = #{executorHandler,jdbcType=VARCHAR}, + executor_param = #{executorParam,jdbcType=VARCHAR}, + executor_block_strategy = #{executorBlockStrategy,jdbcType=VARCHAR}, + executor_timeout = ${executorTimeout}, + executor_fail_retry_count = ${executorFailRetryCount}, + glue_type = #{glueType,jdbcType=VARCHAR}, + glue_source = #{glueSource,jdbcType=CLOB}, + glue_remark = #{glueRemark,jdbcType=VARCHAR}, + glue_updatetime = #{glueUpdatetime}, + child_jobid = #{childJobId,jdbcType=VARCHAR}, + trigger_status = #{triggerStatus,jdbcType=INTEGER}, + trigger_last_time = #{triggerLastTime}, + trigger_next_time = #{triggerNextTime} + WHERE id = #{id} + + + + DELETE + FROM xxl_job_info + WHERE id = #{id} + + + + + + + + + + + UPDATE xxl_job_info + SET + trigger_last_time = #{triggerLastTime}, + trigger_next_time = #{triggerNextTime}, + trigger_status = #{triggerStatus} + WHERE id = #{id} + + + \ No newline at end of file diff --git a/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobLogGlueMapper.xml b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobLogGlueMapper.xml new file mode 100644 index 00000000..9f2e9b0b --- /dev/null +++ b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobLogGlueMapper.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + t.id, + t.job_id, + t.glue_type, + t.glue_source, + t.glue_remark, + t.add_time, + t.update_time + + + XXL_JOB_LOGGLUE_ID.NEXTVAL + + + + select from dual + + INSERT INTO xxl_job_logglue ( + id, + job_id, + glue_type, + glue_source, + glue_remark, + add_time, + update_time + ) VALUES ( + #{id}, + #{jobId}, + #{glueType,jdbcType=VARCHAR}, + #{glueSource,jdbcType=CLOB}, + #{glueRemark,jdbcType=VARCHAR}, + #{addTime}, + #{updateTime} + ) + + + + + + + DELETE FROM xxl_job_logglue + WHERE id NOT in( + SELECT id FROM( + select * from ( + SELECT row_number() over(ORDER BY update_time desc) r,id FROM xxl_job_logglue + WHERE job_id = #{jobId} + ) + where r between 0 and #{limit} + ) t1 + ) AND job_id = #{jobId} + + + + DELETE FROM xxl_job_logglue + WHERE job_id = #{jobId} + + + \ No newline at end of file diff --git a/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobLogMapper.xml b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobLogMapper.xml new file mode 100644 index 00000000..ca82fdcf --- /dev/null +++ b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobLogMapper.xml @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + t.id, + t.job_group, + t.job_id, + t.executor_address, + t.executor_handler, + t.executor_param, + t.executor_sharding_param, + t.executor_fail_retry_count, + t.trigger_time, + t.trigger_code, + t.trigger_msg, + t.handle_time, + t.handle_code, + t.handle_msg, + t.alarm_status + + + XXL_JOB_LOG_ID.NEXTVAL + + + + + + + + + + + select + + from dual + + INSERT INTO xxl_job_log ( + id, + job_group, + job_id, + trigger_time, + trigger_code, + handle_code + ) VALUES ( + #{id}, + #{jobGroup}, + #{jobId}, + #{triggerTime}, + #{triggerCode}, + #{handleCode} + ) + + + + + UPDATE xxl_job_log + SET + trigger_time= #{triggerTime}, + trigger_code= #{triggerCode}, + trigger_msg= #{triggerMsg,jdbcType=CLOB}, + executor_address= #{executorAddress,jdbcType=VARCHAR}, + executor_handler=#{executorHandler,jdbcType=VARCHAR}, + executor_param= #{executorParam,jdbcType=VARCHAR}, + executor_sharding_param= #{executorShardingParam,jdbcType=VARCHAR}, + executor_fail_retry_count= #{executorFailRetryCount} + WHERE id= #{id} + + + + UPDATE xxl_job_log + SET + handle_time= #{handleTime}, + handle_code= #{handleCode}, + handle_msg= #{handleMsg,jdbcType=CLOB} + WHERE id= #{id} + + + + delete from xxl_job_log + WHERE job_id = #{jobId} + + + + + + + + + + delete from xxl_job_log + WHERE id in + + #{item} + + + + + + + + + UPDATE xxl_job_log + SET + alarm_status = #{newAlarmStatus} + WHERE id= #{logId} AND alarm_status = #{oldAlarmStatus} + + + + + \ No newline at end of file diff --git a/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobLogReportMapper.xml b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobLogReportMapper.xml new file mode 100644 index 00000000..ca012a80 --- /dev/null +++ b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobLogReportMapper.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + t.id, + t.trigger_day, + t.running_count, + t.suc_count, + t.fail_count + + + XXL_JOB_LOG_REPORT_ID.NEXTVAL + + + + select from dual + + INSERT INTO xxl_job_log_report ( + id, + trigger_day, + running_count, + suc_count, + fail_count + ) VALUES ( + #{id}, + #{triggerDay}, + #{runningCount}, + #{sucCount}, + #{failCount} + ) + + + + + UPDATE xxl_job_log_report + SET running_count = #{runningCount}, + suc_count = #{sucCount}, + fail_count = #{failCount} + WHERE trigger_day = #{triggerDay} + + + + + + + \ No newline at end of file diff --git a/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobRegistryMapper.xml b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobRegistryMapper.xml new file mode 100644 index 00000000..6160bdd2 --- /dev/null +++ b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobRegistryMapper.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + t.id, + t.registry_group, + t.registry_key, + t.registry_value, + t.update_time + + + XXL_JOB_REGISTRY_ID.NEXTVAL + + + + + DELETE FROM xxl_job_registry + WHERE id in + + #{item} + + + + + + + UPDATE xxl_job_registry + SET update_time = #{updateTime} + WHERE registry_group = #{registryGroup,jdbcType=VARCHAR} + AND registry_key = #{registryKey,jdbcType=VARCHAR} + AND registry_value = #{registryValue,jdbcType=VARCHAR} + + + + + select from dual + + INSERT INTO xxl_job_registry( id, registry_group , registry_key , registry_value, update_time) + VALUES(#{id}, #{registryGroup,jdbcType=VARCHAR} , #{registryKey,jdbcType=VARCHAR} , #{registryValue,jdbcType=VARCHAR}, #{updateTime}) + + + + DELETE FROM xxl_job_registry + WHERE registry_group = #{registryGroup,jdbcType=VARCHAR} + AND registry_key = #{registryKey,jdbcType=VARCHAR} + AND registry_value = #{registryValue,jdbcType=VARCHAR} + + + \ No newline at end of file diff --git a/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobUserMapper.xml b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobUserMapper.xml new file mode 100644 index 00000000..b48e20e7 --- /dev/null +++ b/xxl-job-admin/src/main/resources/mybatis-mapper/oracle/XxlJobUserMapper.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + t.id, + t.username, + t.password, + t.role, + t.permission + + + XXL_JOB_USER_ID.NEXTVAL + + + + + + + + + + select from dual + + INSERT INTO xxl_job_user ( + id, + username, + password, + role, + permission + ) VALUES ( + #{id}, + #{username,jdbcType=VARCHAR}, + #{password,jdbcType=VARCHAR}, + #{role}, + #{permission,jdbcType=VARCHAR} + ) + + + + UPDATE xxl_job_user + SET + + password = #{password,jdbcType=VARCHAR}, + + role = #{role}, + permission = #{permission,jdbcType=VARCHAR} + WHERE id = #{id} + + + + DELETE + FROM xxl_job_user + WHERE id = #{id} + + + \ No newline at end of file