TASK:模块化;

This commit is contained in:
shahaibo
2025-04-22 15:26:55 +08:00
parent b83a416dda
commit aca21b9d98
3 changed files with 12 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ public enum BuildType implements IEnumDisplay {
DESIGN("design"),
TO_PRODUCT_IMAGE("toProductImage"),
RELIGHT("relight"),
POSE_TRANSFORM("poseTransform")
POSE_TRANSFORM("poseTransfer")
;
private String value;

View File

@@ -4360,7 +4360,7 @@ public class PythonService {
log.info("poseTransformation 请求地址: {}", accessPythonIp + ":" + accessPythonPort + "/api/batch_generate_pose_transform_image");
Request request = new Request.Builder()
.url(accessPythonIp + ":" + accessPythonPort + "/api/pose_transform")
.url(accessPythonIp + ":" + accessPythonPort + "/api/batch_generate_pose_transform_image")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();

View File

@@ -2098,10 +2098,18 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
creditsService.addRecordToCreditsDeduction(accountId, uuid, creditsEventsEnum);
// 6.1 添加积分扣除记录到db
creditsService.preInsert(accountId, creditsEventsEnum.getName(), uuid, Boolean.TRUE, null);
return taskId;
}else {
throw new BusinessException("pose transformation error", ResultEnum.ERROR.getCode());
}
throw new BusinessException("pose transformation error", ResultEnum.ERROR.getCode());
}
CloudTask cloudTask = CopyUtil.copyObject(cloudTaskDTO, CloudTask.class);
cloudTask.setProjectId(cloudTask.getProjectId());
cloudTask.setTaskId(taskBatchId);
LocalDateTime now = LocalDateTime.now();
cloudTask.setCreateTime(now);
cloudTask.setUpdateTime(now);
cloudTask.setStatus(0);
cloudTaskMapper.insert(cloudTask);
return taskBatchId;
}
}