diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md
index 66029efb..4418c9ae 100644
--- a/doc/XXL-JOB官方文档.md
+++ b/doc/XXL-JOB官方文档.md
@@ -925,7 +925,7 @@ echo "分片总数 total = $3"
--- | --- | ---
成功 | IJobHandler.SUCCESS | 0
失败 | IJobHandler.FAIL | -1(其他)
-失败重试 | IJobHandler.FAIL_RETRY | 501
+失败重试 | IJobHandler.FAIL_RETRY | 101
## 六、版本更新日志
diff --git a/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml b/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
index a16abaf5..1721b1ba 100644
--- a/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
+++ b/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
@@ -45,7 +45,7 @@
SELECT
FROM XXL_JOB_QRTZ_TRIGGER_LOG AS t
-
+
AND t.job_group = #{jobGroup}
@@ -62,12 +62,13 @@
AND (
- (t.trigger_code ]]> 0 AND t.trigger_code!=200) ||
- (t.handle_code ]]> 0 AND t.handle_code!=200)
+ t.trigger_code NOT IN (0, 200) ||
+ t.handle_code NOT IN (0, 200)
)
- AND (t.trigger_code = 200 AND t.handle_code=0)
+ AND t.trigger_code = 200
+ AND t.handle_code = 0
ORDER BY id DESC
@@ -78,7 +79,7 @@
SELECT count(1)
FROM XXL_JOB_QRTZ_TRIGGER_LOG AS t
-
+
AND t.job_group = #{jobGroup}
@@ -95,12 +96,13 @@
AND (
- (t.trigger_code ]]> 0 AND t.trigger_code!=200) ||
- (t.handle_code ]]> 0 AND t.handle_code!=200)
+ t.trigger_code NOT IN (0, 200) ||
+ t.handle_code NOT IN (0, 200)
)
- AND (t.trigger_code = 200 AND t.handle_code=0)
+ AND t.trigger_code = 200
+ AND t.handle_code = 0
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java b/xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java
index b6e017ec..7cad6461 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java
@@ -66,7 +66,7 @@ public class ScriptJobHandler extends IJobHandler {
if (exitValue == 0) {
return IJobHandler.SUCCESS;
- } else if (exitValue == 501) {
+ } else if (exitValue == 101) {
return IJobHandler.FAIL_RETRY;
} else {
return new ReturnT(IJobHandler.FAIL.getCode(), "script exit value("+exitValue+") is failed");