Merge branch 'dev/dev_xp' into dev/dev
This commit is contained in:
@@ -9,10 +9,10 @@ import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -98,16 +98,14 @@ public class GenerateController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "请求进行姿势变换")
|
||||
@GetMapping("/poseTransform")
|
||||
public Response<String> poseTransform(@ApiParam("projectId") @RequestParam Long projectId,
|
||||
@ApiParam("productImage") @RequestParam String productImage,
|
||||
@ApiParam("poseId") @RequestParam int poseId) {
|
||||
return Response.success(generateService.poseTransform(projectId, productImage, poseId));
|
||||
@PostMapping("/poseTransform")
|
||||
public Response<String> poseTransform(@Valid @RequestBody PoseTransformDTO poseTransformDTO) {
|
||||
return Response.success(generateService.poseTransform(poseTransformDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取姿势变换生成结果")
|
||||
@GetMapping("/poseTransformResult")
|
||||
public Response<PoseTransformationVO> getPoseTransformationResults(@ApiParam("taskId") @RequestParam String taskId) {
|
||||
@PostMapping("/poseTransformResult")
|
||||
public Response<PoseTransformationVO> getPoseTransformationResults(@RequestParam String taskId) {
|
||||
PoseTransformationVO generateResult = generateService.getPoseTransformationResult(taskId);
|
||||
return Response.success(generateResult);
|
||||
}
|
||||
@@ -145,6 +143,52 @@ public class GenerateController {
|
||||
return Response.success(generateService.getAllPose());
|
||||
}
|
||||
|
||||
/*@ApiOperation(value = "万象 t2i 创建异步任务")
|
||||
@GetMapping("/createAsyncTask")
|
||||
public Response<String> createAsyncTask(@RequestParam("prompt") String prompt){
|
||||
return Response.success(generateService.createAsyncTask(87L, prompt, ""));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "万象 t2i 获取异步任务结果")
|
||||
@GetMapping("/waitAsyncTask")
|
||||
public Response<GenerateResultVO> waitAsyncTask(@RequestParam("taskId") String taskId){
|
||||
return Response.success(generateService.getAsyncTaskResult(taskId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "万象 图生动图")
|
||||
@GetMapping("/animateAnyone")
|
||||
public Response<String> animateAnyone(@Valid @RequestBody PoseTransformDTO poseTransformDTO){
|
||||
return Response.success(generateService.animateAnyone(poseTransformDTO, null));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "万象 获取动图模板id")
|
||||
@GetMapping("/getVideoTemplateId")
|
||||
public Response<String> getVideoTemplateId(@RequestParam("videoPath") String videoPath){
|
||||
return Response.success(generateService.getVideoTemplateId(videoPath));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "万象 获取动图结果")
|
||||
@GetMapping("/getAnimateResult")
|
||||
public Response<PoseTransformationVO> getAnimateResult(@RequestParam("taskId") String taskId){
|
||||
return Response.success(generateService.getAnimateResult(taskId));
|
||||
}*/
|
||||
|
||||
@ApiOperation(value = "freepik toProductImage")
|
||||
@GetMapping("/reimagineFreePik")
|
||||
public Response<String> reimagineFreePik(@RequestParam("path") String path,
|
||||
@RequestParam("prompt") String prompt,
|
||||
@RequestParam("style") String style) throws IOException {
|
||||
return Response.success(generateService.reimagineFreePik(path, prompt, style));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取图片描述")
|
||||
@GetMapping("/getImageDescription")
|
||||
public Response<String> getImageDescription(@RequestParam("path") String path) {
|
||||
return Response.success(generateService.getImageDescription(path));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user