TASK:1.修改affiliate状态 2.添加系统sketch到个人library 3.视频生成新增生成模型 4.获取所有pose,从过去gif改为获取video

This commit is contained in:
2025-11-13 11:40:37 +08:00
parent e5eecbfe8d
commit 8750ea355a
23 changed files with 311 additions and 48 deletions

View File

@@ -4078,7 +4078,7 @@ public class PythonService {
//生成失败
throw new BusinessException("segProduct.interface.exception");
}
public Boolean poseTransformation(String productImage, int poseId, String taskId) {
public Boolean poseTransformation(JSONObject content, String apiUri) {
OkHttpClient client = new OkHttpClient().newBuilder()
.connectTimeout(30, TimeUnit.SECONDS)
.pingInterval(5, TimeUnit.SECONDS)//websocket轮训间隔(单位:秒)
@@ -4086,15 +4086,11 @@ public class PythonService {
.writeTimeout(60, TimeUnit.SECONDS)//写入超时(单位:秒)
.build();
MediaType mediaType = MediaType.parse("application/json");
Map<String, String> content = Maps.newHashMap();
content.put("image_url", productImage);
content.put("tasks_id", taskId);
content.put("pose_id", String.valueOf(poseId));
RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(content));
log.info("poseTransformation 请求地址: {}", accessPythonIp + ":" + accessPythonPort + "/api/pose_transform");
log.info("poseTransformation 请求地址: {}", accessPythonIp + ":" + accessPythonPort + apiUri);
Request request = new Request.Builder()
.url(accessPythonIp + ":" + accessPythonPort + "/api/pose_transform")
.url(accessPythonIp + ":" + accessPythonPort + apiUri)
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();