TASK:product/pose transfer的回参添加sort和id
This commit is contained in:
@@ -115,13 +115,8 @@ public class GenerateController {
|
||||
|
||||
@ApiOperation("喜欢或取消喜欢姿势变换生成的图片")
|
||||
@PostMapping("/likeOrDislike")
|
||||
public Response<Object> likeOrDislike(@ApiParam("id") @RequestParam Long transformedId, @ApiParam("like || dislike") @RequestParam String likeOrDislike, @RequestParam("projectId") Long projectId, @RequestParam(value = "collectionSortParentId", required = false) Long collectionSortParentId) {
|
||||
Object obj = generateService.disOrLikePose(transformedId, likeOrDislike, projectId, collectionSortParentId);
|
||||
if (obj instanceof CollectionSort){
|
||||
return Response.success(((CollectionSort) obj).getId());
|
||||
}else {
|
||||
return Response.success(obj);
|
||||
}
|
||||
public Response<CollectionSort> likeOrDislike(@ApiParam("id") @RequestParam Long transformedId, @ApiParam("like || dislike") @RequestParam String likeOrDislike, @RequestParam("projectId") Long projectId, @RequestParam(value = "collectionSortParentId", required = false) Long collectionSortParentId) {
|
||||
return Response.success(generateService.disOrLikePose(transformedId, likeOrDislike, projectId, collectionSortParentId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改模特比例")
|
||||
|
||||
@@ -205,9 +205,9 @@ public class SavedCollectionController {
|
||||
|
||||
@ApiOperation(value = "productImageLike")
|
||||
@PostMapping("/productImageLike")
|
||||
public Response<Long> productImageLike(@Valid @RequestBody ProductImageLikeDTO productImageLikeDTO) {
|
||||
public Response<CollectionSort> productImageLike(@Valid @RequestBody ProductImageLikeDTO productImageLikeDTO) {
|
||||
CollectionSort collectionSort = userLikeGroupService.productImageLike(productImageLikeDTO);
|
||||
return Response.success(Objects.nonNull(collectionSort) ? collectionSort.getId() : null);
|
||||
return Response.success(collectionSort);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "collectionLikeUpdate")
|
||||
|
||||
Reference in New Issue
Block a user