|  |  | @@ -23,8 +23,10 @@ import java.util.*; | 
		
	
		
			
			|  |  |  | @Slf4j | 
		
	
		
			
			|  |  |  | public class AiVideoHelper { | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | private static String uri = "http://222.128.9.132:22266"; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | public static String doPost(String url, Map<String, Object> params) { | 
		
	
		
			
			|  |  |  | return HttpUtil.doPost(url,null, JSON.toJSONString(params)); | 
		
	
		
			
			|  |  |  | return HttpUtil.doPost(url,params); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | 
 | 
		
	
	
		
			
				|  |  | @@ -37,7 +39,7 @@ public class AiVideoHelper { | 
		
	
		
			
			|  |  |  | params.put("voice_id",voice_id); | 
		
	
		
			
			|  |  |  | params.put("gen_txt",gen_txt); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | String response = doPost("http://222.128.9.132:22266/gen_dh_video", params); | 
		
	
		
			
			|  |  |  | String response = doPost(uri+"/gen_dh_video", params); | 
		
	
		
			
			|  |  |  | log.info("服务端预下单    request:"+params.toString()+"    response:"+response); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | AiVideoResult result = new AiVideoResult(); | 
		
	
	
		
			
				|  |  | @@ -52,7 +54,7 @@ public class AiVideoHelper { | 
		
	
		
			
			|  |  |  | result.setSuccess(true); | 
		
	
		
			
			|  |  |  | result.setMsg("success"); | 
		
	
		
			
			|  |  |  | result.setDuration(video.getFloatValue("duration")); | 
		
	
		
			
			|  |  |  | result.setUrl(video.getString("url")); | 
		
	
		
			
			|  |  |  | result.setUrl(uri + video.getString("url")); | 
		
	
		
			
			|  |  |  | }else{ | 
		
	
		
			
			|  |  |  | result.setSuccess(false); | 
		
	
		
			
			|  |  |  | result.setMsg(status.getString("msg")); | 
		
	
	
		
			
				|  |  | @@ -84,7 +86,8 @@ public class AiVideoHelper { | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | public static void main(String[] args) { | 
		
	
		
			
			|  |  |  | createVideo("16739389169485046_nVi875Ej","default","人们自古以来,在这条路上行走,然而,这条路确实是坎坷不平、逶迤曲折、无边无际的,它具有无数分支,充满着欢乐、痛苦、艰险,但这就是人生的道路。"); | 
		
	
		
			
			|  |  |  | createVideo("16739389169485046_nVi875Ej","default", | 
		
	
		
			
			|  |  |  | "恭喜发财"); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | } |