parent
bc1f493674
commit
16eb444c87
@ -1,34 +0,0 @@
|
|||||||
package com.dsideal.aiSupport.Util.JiMeng;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
public class JmQueryTask extends JmCommon {
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(JmQueryTask.class);
|
|
||||||
private static final String req_key = "jimeng_vgfm_t2v_l20";
|
|
||||||
private static final String action = "CVSync2AsyncGetResult";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询异步任务结果
|
|
||||||
*
|
|
||||||
* @param taskId 任务ID
|
|
||||||
*/
|
|
||||||
public static JSONObject queryTaskResult(String taskId) throws Exception {
|
|
||||||
// 创建请求体
|
|
||||||
JSONObject req = new JSONObject();
|
|
||||||
req.put("task_id", taskId);
|
|
||||||
req.put("req_key", req_key);
|
|
||||||
String responseBody = doRequest("POST", new HashMap<>(), req.toString().getBytes(), action);
|
|
||||||
return JSON.parseObject(responseBody);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
|
||||||
String taskId = "17796623341273230793";
|
|
||||||
JSONObject result = JmQueryTask.queryTaskResult(taskId);
|
|
||||||
System.out.println("查询结果: " + result);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue