fix:升级swagger注解
This commit is contained in:
@@ -17,9 +17,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.base.Function;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -35,7 +36,7 @@ import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Api(tags = "History模块(saved Collection)")
|
||||
@Tag(name = "History模块(saved Collection)")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Validated
|
||||
@@ -56,7 +57,7 @@ public class SavedCollectionController {
|
||||
@Resource
|
||||
private PortfolioService portfolioService;
|
||||
|
||||
@ApiOperation(value = "History用户分页分组列表")
|
||||
@Operation(summary = "History用户分页分组列表")
|
||||
@PostMapping("/queryUserGroup")
|
||||
public Response<PageBaseResponse<UserLikeGroupVO>> queryUserGroup(@Valid @RequestBody QueryHistoryPageDTO query) {
|
||||
AuthPrincipalVo authPrincipalVo = UserContext.getUserHolder();
|
||||
@@ -147,21 +148,21 @@ public class SavedCollectionController {
|
||||
return Response.success(PageBaseResponse.success(convert));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "History用户分组详情,目前弃用 ")
|
||||
@Operation(summary = "History用户分组详情,目前弃用 ")
|
||||
@GetMapping("/getUserGroupDetail")
|
||||
public Response<List<UserLikeVO>> getUserGroupDetail(
|
||||
@ApiParam("用户分组id") @RequestParam("userGroupId") Long userGroupId) {
|
||||
@Parameter(description = "用户分组id") @RequestParam("userGroupId") Long userGroupId) {
|
||||
return Response.success(userLikeService.getGroupDetail(userGroupId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "History修改用户分组名")
|
||||
@Operation(summary = "History修改用户分组名")
|
||||
@PostMapping("/updateUserGroupName")
|
||||
public Response<HistoryUpdateVO> updateUserGroupName(@Valid @RequestBody HistoryUpdateDTO historyUpdateDTO) {
|
||||
return Response.success(userLikeGroupService.updateUserGroupName(historyUpdateDTO.getUserGroupId()
|
||||
, historyUpdateDTO.getUserGroupName(), historyUpdateDTO.getTimeZone()));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "History删除用户分组")
|
||||
@Operation(summary = "History删除用户分组")
|
||||
@PostMapping("/deleteUserGroup")
|
||||
public Response<Boolean> deleteUserGroup(@Valid @RequestBody HistoryDeleteDTO deleteDTO) {
|
||||
userLikeGroupService.deleteUserGroup(deleteDTO.getUserGroupId());
|
||||
@@ -169,106 +170,106 @@ public class SavedCollectionController {
|
||||
return Response.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "History choose")
|
||||
@Operation(summary = "History choose")
|
||||
@GetMapping("/choose")
|
||||
public Response<UserLikeChooseVO> choose(
|
||||
@ApiParam("用户分组id") @RequestParam("userGroupId") Long userGroupId) {
|
||||
@Parameter(description = "用户分组id") @RequestParam("userGroupId") Long userGroupId) {
|
||||
return Response.success(userLikeGroupService.choose(userGroupId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "exportSave")
|
||||
@Operation(summary = "exportSave")
|
||||
@PostMapping("/exportSave")
|
||||
public Response<Long> exportSave(@RequestParam("file") MultipartFile file, @RequestParam(value = "projectId", required = false) Long projectId,
|
||||
@RequestParam("module") String module, @RequestParam(value = "designItemDetailId", required = false) Long designItemDetailId) {
|
||||
return Response.success(userLikeGroupService.exportSave(file, projectId, module, designItemDetailId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "exportSearch")
|
||||
@Operation(summary = "exportSearch")
|
||||
@PostMapping("/exportSearch")
|
||||
public Response<JSONObject> exportSearch(@Valid @RequestBody ExportSearchDTO exportSearchDTO) {
|
||||
return Response.success(userLikeGroupService.exportSearch(exportSearchDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "toProduct")
|
||||
@Operation(summary = "toProduct")
|
||||
@PostMapping("/toProduct")
|
||||
public Response<List<ToProductImageResultVO>> toProduct(@Valid @RequestBody ToProductImageDTO toProductImageDTO) {
|
||||
return Response.success(userLikeGroupService.toProduct(toProductImageDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "toProductImageElementUpload")
|
||||
@Operation(summary = "toProductImageElementUpload")
|
||||
@PostMapping("/toProductImageElementUpload")
|
||||
public Response<ToProductElementVO> toProductImageElementUpload(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam(value = "projectId", required = false) Long projectId,
|
||||
@ApiParam(value = "首尾帧", example = "first",
|
||||
allowableValues = "first,last")
|
||||
@Parameter(description = "首尾帧", example = "first",
|
||||
schema = @Schema(allowableValues = {"first", "last"}))
|
||||
@RequestParam(value = "type", required = false) String type) {
|
||||
return Response.success(userLikeGroupService.toProductImageElementUpload(file, projectId, type));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "toProductImageElementDelete")
|
||||
@Operation(summary = "toProductImageElementDelete")
|
||||
@PostMapping("/toProductImageElementDelete")
|
||||
public Response<Boolean> toProductImageElementDelete(@RequestParam(value = "id") Long id) {
|
||||
return Response.success(userLikeGroupService.toProductImageElementDelete(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "productImageLike")
|
||||
@Operation(summary = "productImageLike")
|
||||
@PostMapping("/productImageLike")
|
||||
public Response<CollectionSort> productImageLike(@Valid @RequestBody ProductImageLikeDTO productImageLikeDTO) {
|
||||
CollectionSort collectionSort = userLikeGroupService.productImageLike(productImageLikeDTO);
|
||||
return Response.success(collectionSort);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "collectionLikeUpdate")
|
||||
@Operation(summary = "collectionLikeUpdate")
|
||||
@PostMapping("/collectionLikeUpdate")
|
||||
public Response<Boolean> collectionLikeUpdate(@Valid @RequestBody CollectionLikeUpdateDTO collectionLikeUpdateDTO) {
|
||||
return Response.success(userLikeGroupService.collectionLikeUpdate(collectionLikeUpdateDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "productImageUnLike")
|
||||
@Operation(summary = "productImageUnLike")
|
||||
@PostMapping("/productImageUnLike")
|
||||
public Response<Boolean> productImageUnLike(@Valid @RequestBody ProductImageLikeDTO productImageLikeDTO) {
|
||||
return Response.success(userLikeGroupService.productImageUnLike(productImageLikeDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取生成结果")
|
||||
@Operation(summary = "获取生成结果")
|
||||
@PostMapping("/toProductImageResult")
|
||||
public Response<List<MagicToolResultVO>> getToProductImageResult(@Valid @RequestBody List<String> taskIdList) {
|
||||
List<MagicToolResultVO> magicToolResultVOList = userLikeGroupService.getToProductImageResultList(taskIdList);
|
||||
return Response.success(magicToolResultVOList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "画布用户上传元素")
|
||||
@Operation(summary = "画布用户上传元素")
|
||||
@PostMapping("/canvasElementUpload")
|
||||
public Response<CanvasElementUpload> canvasElementUpload(@RequestParam("file") MultipartFile file) {
|
||||
return Response.success(userLikeGroupService.canvasElementUpload(file));
|
||||
}
|
||||
|
||||
@ApiOperation("productImageLikeList")
|
||||
@Operation(summary = "productImageLikeList")
|
||||
@PostMapping("/productImageLikeList")
|
||||
public Response<List<ToProductImageResultVO>> productImageLikeList(@Valid @RequestBody ToProductImageDTO toProductImageDTO) {
|
||||
return Response.success(userLikeGroupService.productImageLikeList(toProductImageDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "relight")
|
||||
@Operation(summary = "relight")
|
||||
@PostMapping("/relight")
|
||||
public Response<List<ToProductImageResultVO>> relight(@Valid @RequestBody ToProductImageDTO toProductImageDTO) {
|
||||
return Response.success(userLikeGroupService.relight(toProductImageDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "转relight元素")
|
||||
@Operation(summary = "转relight元素")
|
||||
@PostMapping("/convertRelightElement")
|
||||
public Response<ToProductElementVO> convertRelightElement(@RequestParam("id") Long id) {
|
||||
return Response.success(userLikeGroupService.convertRelightElement(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取relight结果")
|
||||
@Operation(summary = "获取relight结果")
|
||||
@PostMapping("/relightResult")
|
||||
public Response<List<MagicToolResultVO>> getRelightResult(@Valid @RequestBody List<String> taskIdList) {
|
||||
List<MagicToolResultVO> magicToolResultVOList = userLikeGroupService.getRelightResult(taskIdList);
|
||||
return Response.success(magicToolResultVOList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除toProduct Relight的结果")
|
||||
@Operation(summary = "删除toProduct Relight的结果")
|
||||
@GetMapping("/deleteResult")
|
||||
public Response<String> deleteResult(@RequestParam("id") Long id,
|
||||
@RequestParam("projectId") Long projectId,
|
||||
@@ -281,61 +282,61 @@ public class SavedCollectionController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "likeHistoryRelSketch")
|
||||
@Operation(summary = "likeHistoryRelSketch")
|
||||
@PostMapping("/likeHistoryRelSketch")
|
||||
public Response<String> likeHistoryRelSketch() {
|
||||
return Response.success(userLikeGroupService.likeHistoryRelSketch());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "download")
|
||||
@Operation(summary = "download")
|
||||
@PostMapping("/download")
|
||||
public Response<String> download() {
|
||||
return Response.success(userLikeGroupService.download());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "productImageInitialize")
|
||||
@Operation(summary = "productImageInitialize")
|
||||
@PostMapping("/productImageInitialize")
|
||||
public Response<Boolean> productImageUpload(@Valid @RequestBody ProductImageInitializeDTO productImageInitializeDTO) {
|
||||
return Response.success(userLikeGroupService.productImageInitialize(productImageInitializeDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "getInitializeProgress")
|
||||
@Operation(summary = "getInitializeProgress")
|
||||
@PostMapping("/getInitializeProgress")
|
||||
public Response<InitializeProgressVO> getInitializeProgress(@Valid @RequestBody ProductImageInitializeDTO productImageInitializeDTO) {
|
||||
return Response.success(userLikeGroupService.getInitializeProgress(productImageInitializeDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandDNASaveOrUpdate")
|
||||
@Operation(summary = "brandDNASaveOrUpdate")
|
||||
@PostMapping("/brandDNASaveOrUpdate")
|
||||
public Response<Boolean> brandDNASaveOrUpdate(@Valid @RequestBody BrandDNADTO brandDNADTO) {
|
||||
return Response.success(userLikeGroupService.brandDNASaveOrUpdate(brandDNADTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandDNADelete")
|
||||
@Operation(summary = "brandDNADelete")
|
||||
@PostMapping("/brandDNADelete")
|
||||
public Response<Boolean> brandDNADelete(@Valid @RequestBody BrandDNADTO brandDNADTO) {
|
||||
return Response.success(userLikeGroupService.brandDNADelete(brandDNADTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandDNAPage")
|
||||
@Operation(summary = "brandDNAPage")
|
||||
@PostMapping("/brandDNAPage")
|
||||
public Response<PageBaseResponse<BrandDNAVO>> brandDNAPage(@Valid @RequestBody BrandDNAQueryDTO brandDNAQueryDTO) {
|
||||
return Response.success(userLikeGroupService.brandDNAPage(brandDNAQueryDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandLogoUpload")
|
||||
@Operation(summary = "brandLogoUpload")
|
||||
@PostMapping("/brandLogoUpload")
|
||||
public Response<BrandLogoUploadVO> brandDNASaveOrUpdate(@RequestParam("file") MultipartFile file) {
|
||||
return Response.success(userLikeGroupService.brandLogoUpload(file));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandDNAUpload")
|
||||
@Operation(summary = "brandDNAUpload")
|
||||
@PostMapping("/brandDNAUpload")
|
||||
public Response<LibraryUpdateVo> brandDNAUpload(@RequestParam("file") MultipartFile file, @RequestParam("brandId") Long brandId) throws IOException {
|
||||
return Response.success(userLikeGroupService.brandDNAUpload(file, brandId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandDNAGenerate")
|
||||
@Operation(summary = "brandDNAGenerate")
|
||||
@PostMapping("/brandDNAGenerate")
|
||||
public Response<BrandDNAGenerateVO> brandDNAGenerate(@RequestParam("prompt") String prompt) {
|
||||
return Response.success(userLikeGroupService.brandDNAGenerate(prompt));
|
||||
|
||||
Reference in New Issue
Block a user