TASK: ToProduct Relight Pose新增删除接口
This commit is contained in:
@@ -146,6 +146,17 @@ public class GenerateController {
|
||||
return Response.success(generateService.getAllPose());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除pose transfer的结果")
|
||||
@GetMapping("/deleteResult")
|
||||
public Response<String> deleteToProductRelightResult(@RequestParam("projectId") Long projectId, @RequestParam("id") Long id){
|
||||
try{
|
||||
generateService.deleteGeneratedPose(projectId, id);
|
||||
return Response.success();
|
||||
}catch (Exception e){
|
||||
return Response.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/*@ApiOperation(value = "万象 t2i 创建异步任务")
|
||||
@GetMapping("/createAsyncTask")
|
||||
public Response<String> createAsyncTask(@RequestParam("prompt") String prompt){
|
||||
|
||||
@@ -23,11 +23,13 @@ import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -36,6 +38,7 @@ import java.util.stream.Collectors;
|
||||
@Api(tags = "History模块(saved Collection)")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/api/history")
|
||||
public class SavedCollectionController {
|
||||
@Resource
|
||||
@@ -260,6 +263,19 @@ public class SavedCollectionController {
|
||||
return Response.success(magicToolResultVOList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除toProduct Relight的结果")
|
||||
@GetMapping("/deleteResult")
|
||||
public Response<String> deleteResult(@RequestParam("id") Long id,
|
||||
@RequestParam("projectId") Long projectId,
|
||||
@RequestParam("type") @Pattern(regexp = "^(Relight|ToProductImage)$", message = "Please choose type from 'Relight|ToProductImage'") String type){
|
||||
try{
|
||||
userLikeGroupService.deleteToProductRelightResult(id, projectId, type);
|
||||
return Response.success();
|
||||
}catch (Exception e){
|
||||
return Response.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "likeHistoryRelSketch")
|
||||
@PostMapping("/likeHistoryRelSketch")
|
||||
public Response<String> likeHistoryRelSketch() {
|
||||
|
||||
Reference in New Issue
Block a user