|
|
@@ -122,6 +122,17 @@ public class XxlJobUtil {
|
|
|
return Jsons.parseObject(execute.body(), XxlJobResult.class);
|
|
|
}
|
|
|
|
|
|
+ public static XxlJobResult stopJob(String jobId) throws Exception {
|
|
|
+ String path = "/jobinfo/stop?id=" + jobId;
|
|
|
+ String targetUrl = BASE_URL + path;
|
|
|
+
|
|
|
+ HttpResponse execute = HttpUtil.createPost(targetUrl)
|
|
|
+ .header("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
|
|
|
+ .header("Cookie", getCookie())
|
|
|
+ .execute();
|
|
|
+ return Jsons.parseObject(execute.body(), XxlJobResult.class);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 获取登录cookie
|