Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xxl-job-admin-client
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄营
xxl-job-admin-client
Commits
ff3adc93
Commit
ff3adc93
authored
Jul 31, 2024
by
ys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
eae6585f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
XxlJobAdminClient.java
src/main/java/com/tbyf/util/XxlJobAdminClient.java
+12
-2
No files found.
src/main/java/com/tbyf/util/XxlJobAdminClient.java
View file @
ff3adc93
...
...
@@ -2,6 +2,7 @@ package com.tbyf.util;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.sun.deploy.util.StringUtils
;
import
okhttp3.FormBody
;
import
okhttp3.OkHttpClient
;
import
okhttp3.Request
;
...
...
@@ -98,8 +99,17 @@ public class XxlJobAdminClient {
ResponseBody
responseBody
=
response
.
body
();
if
(
responseBody
!=
null
)
{
Result
result
=
objectMapper
.
readValue
(
responseBody
.
string
(),
Result
.
class
);
String
jobId
=
(
String
)
result
.
getContent
();
list
.
add
(
Integer
.
parseInt
(
jobId
));
String
jobIdStr
=
(
String
)
result
.
getContent
();
if
(
jobIdStr
==
null
)
{
list
.
add
(
null
);
}
else
{
try
{
int
jobId
=
Integer
.
parseInt
(
jobIdStr
);
list
.
add
(
jobId
);
}
catch
(
NumberFormatException
e
)
{
list
.
add
(
null
);
}
}
}
}).
get
(
0
);
}
catch
(
Exception
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment