fix:升级swagger注解
This commit is contained in:
@@ -14,9 +14,9 @@ import com.ai.da.model.vo.*;
|
||||
import com.ai.da.service.LibraryModelPointService;
|
||||
import com.ai.da.service.LibraryService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
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.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -31,7 +31,7 @@ import java.text.ParseException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@Api(tags = "library模块")
|
||||
@Tag(name = "library模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/library")
|
||||
@@ -49,26 +49,26 @@ public class LibraryController {
|
||||
@Value("${minio.bucketName.sysImage}")
|
||||
private String sysImage;
|
||||
|
||||
@ApiOperation(value = "Library分页列表")
|
||||
@Operation(summary = "Library分页列表")
|
||||
@PostMapping("/queryLibraryPage")
|
||||
public Response<PageBaseResponse<QueryLibraryPageVO>> queryLibraryPage(@Valid @RequestBody QueryLibraryPageDTO query) {
|
||||
return Response.success(libraryService.queryLibraryPage(CopyUtil.copyObject(query, QueryLibraryPageServiceDTO.class)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Library分页列表(查询top和bottom)")
|
||||
@Operation(summary = "Library分页列表(查询top和bottom)")
|
||||
@PostMapping("/queryLibraryTopAndBottomPage")
|
||||
public Response<PageBaseResponse<QueryLibraryPageVO>> queryLibraryTopAndBottomPage(@Valid @RequestBody QueryLibraryTopPageDTO query) {
|
||||
return Response.success(libraryService.queryLibraryPage(CopyUtil.copyObject(query, QueryLibraryPageServiceDTO.class)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Library文件上传")
|
||||
@Operation(summary = "Library文件上传")
|
||||
@PostMapping("/upload")
|
||||
public Response<LibraryUpdateVo> upload(@RequestParam("file") MultipartFile file,
|
||||
@ApiParam("一级类型 Moodboard Printboard Sketchboard MarketingSketch Models")
|
||||
@Parameter(description = "一级类型 Moodboard Printboard Sketchboard MarketingSketch Models")
|
||||
@RequestParam(value = "level1Type") String level1Type,
|
||||
@ApiParam("二级类型 争对 Sketchboard; 有 Outwear Dress Blouse Skirt Trousers")
|
||||
@Parameter(description = "二级类型 争对 Sketchboard; 有 Outwear Dress Blouse Skirt Trousers")
|
||||
@RequestParam(value = "level2Type", required = false) String level2Type,
|
||||
@ApiParam("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
@Parameter(description = "本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
@RequestParam(value = "timeZone") String timeZone,
|
||||
@RequestParam(value = "modelType") String modelType,
|
||||
@RequestParam(value = "sex") String sex,
|
||||
@@ -102,20 +102,20 @@ public class LibraryController {
|
||||
timeZone, md5, high, width, modelType, sex, ageGroup)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "保存或者编辑template打点")
|
||||
@Operation(summary = "保存或者编辑template打点")
|
||||
@PostMapping("/saveOrEditTemplatePoint")
|
||||
public Response<LibraryModelPointVO> saveOrEditTemplatePoint(@Valid @RequestBody LibraryModelPointDTO libraryModelPoint) {
|
||||
return Response.success(libraryModelPointService.saveOrEditTemplatePoint(libraryModelPoint));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量Library修改用户文件名")
|
||||
@Operation(summary = "批量Library修改用户文件名")
|
||||
@PostMapping("/batchUpdateLibraryName")
|
||||
public Response<Boolean> batchUpdateLibraryName(@Valid @RequestBody LibraryUpdateDTO libraryUpdateDTO) {
|
||||
libraryService.updateLibraryName(libraryUpdateDTO);
|
||||
return Response.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量删除library")
|
||||
@Operation(summary = "批量删除library")
|
||||
@PostMapping("/batchDeleteLibrary")
|
||||
public Response<Boolean> batchDeleteLibrary(@Valid @RequestBody LibraryDeleteDTO deleteDTO) {
|
||||
libraryService.batchDeleteLibrary(deleteDTO);
|
||||
@@ -123,10 +123,10 @@ public class LibraryController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "Models打点预览")
|
||||
@Operation(summary = "Models打点预览")
|
||||
@PostMapping("/modelsDot")
|
||||
public Response<String> modelsDot(@ApiParam("file") @RequestPart(value = "file", required = false) MultipartFile file,
|
||||
@ApiParam("models对象") @RequestPart("models") ModelsDotDTO modelsDotDTO) {
|
||||
public Response<String> modelsDot(@Parameter(description = "file") @RequestPart(value = "file", required = false) MultipartFile file,
|
||||
@Parameter(description = "models对象") @RequestPart("models") ModelsDotDTO modelsDotDTO) {
|
||||
if (Objects.nonNull(file)) {
|
||||
if (StringUtils.isEmpty(file.getOriginalFilename())) {
|
||||
throw new BusinessException("file.cannot.be.empty");
|
||||
@@ -167,7 +167,7 @@ public class LibraryController {
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "更新sketchboard level2type")
|
||||
@Operation(summary = "更新sketchboard level2type")
|
||||
@PostMapping("/updateLibraryLevel2Type")
|
||||
public Response<Boolean> updateLibraryLevel2Type(@Validated @RequestBody LibraryLevel2TypeUpdateDTO libraryLevel2TypeUpdateDTO) {
|
||||
return Response.success(libraryService.updateLibraryLevel2Type(libraryLevel2TypeUpdateDTO));
|
||||
@@ -196,21 +196,21 @@ public class LibraryController {
|
||||
}
|
||||
|
||||
@PostMapping("moveLibraryData")
|
||||
@ApiOperation(value = "用户library数据迁移")
|
||||
@Operation(summary = "用户library数据迁移")
|
||||
public Response<Boolean> moveLibraryDate() throws ParseException {
|
||||
libraryService.moveLibraryDate();
|
||||
return Response.success(true);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "将系统模特添加到个人library")
|
||||
@Operation(summary = "将系统模特添加到个人library")
|
||||
@GetMapping("addSysModelToLib")
|
||||
public Response<Map<String, String>> addSysModelToLib(@ApiParam("系统模特id") @RequestParam("sysModelId")long sysModelId){
|
||||
public Response<Map<String, String>> addSysModelToLib(@Parameter(description = "系统模特id") @RequestParam("sysModelId")long sysModelId){
|
||||
return Response.success(libraryService.addSysModelToLib(sysModelId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "将个人library元素添加到公共库")
|
||||
@Operation(summary = "将个人library元素添加到公共库")
|
||||
@GetMapping("addToPublicLibrary")
|
||||
public Response<String> addToPublicLibrary(@ApiParam("元素的libraryId") @RequestParam("libraryId") Long libraryId){
|
||||
public Response<String> addToPublicLibrary(@Parameter(description = "元素的libraryId") @RequestParam("libraryId") Long libraryId){
|
||||
boolean b = libraryService.saveToOrganizationLibrary(libraryId);
|
||||
if (b){
|
||||
return Response.success("success");
|
||||
@@ -219,31 +219,31 @@ public class LibraryController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "将个人library元素从公共库中删除")
|
||||
@Operation(summary = "将个人library元素从公共库中删除")
|
||||
@GetMapping("deleteFromPublicLib")
|
||||
public Response<String> deleteFromPublicLib(@ApiParam("元素的libraryId") @RequestParam("libraryId") Long libraryId){
|
||||
public Response<String> deleteFromPublicLib(@Parameter(description = "元素的libraryId") @RequestParam("libraryId") Long libraryId){
|
||||
libraryService.deleteFromPublicLib(libraryId);
|
||||
return Response.success("success");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取公共库")
|
||||
@Operation(summary = "获取公共库")
|
||||
@GetMapping("getPublicLib")
|
||||
public Response<PageBaseResponse<Library>> getPublicLib(@ApiParam("排序" ) @RequestParam(value = "order", defaultValue = "DESC", required = false) String order,
|
||||
@ApiParam("page") @RequestParam(value = "page", defaultValue = "1", required = false) Long page,
|
||||
@ApiParam("size") @RequestParam(value = "size", defaultValue = "20", required = false) Long size){
|
||||
public Response<PageBaseResponse<Library>> getPublicLib(@Parameter(description = "排序" ) @RequestParam(value = "order", defaultValue = "DESC", required = false) String order,
|
||||
@Parameter(description = "page") @RequestParam(value = "page", defaultValue = "1", required = false) Long page,
|
||||
@Parameter(description = "size") @RequestParam(value = "size", defaultValue = "20", required = false) Long size){
|
||||
|
||||
return Response.success(libraryService.getPublicLib(order, page, size));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "管理员获取所有子账号lib元素")
|
||||
@Operation(summary = "管理员获取所有子账号lib元素")
|
||||
@GetMapping("getAllSubAccLib")
|
||||
public Response<PageBaseResponse<Library>> getAllSubAccLib(@ApiParam("排序") @RequestParam(value = "order", defaultValue = "DESC", required = false) String order,
|
||||
@ApiParam("page") @RequestParam(value = "page", defaultValue = "1", required = false) Long page,
|
||||
@ApiParam("size") @RequestParam(value = "size", defaultValue = "20", required = false) Long size){
|
||||
public Response<PageBaseResponse<Library>> getAllSubAccLib(@Parameter(description = "排序") @RequestParam(value = "order", defaultValue = "DESC", required = false) String order,
|
||||
@Parameter(description = "page") @RequestParam(value = "page", defaultValue = "1", required = false) Long page,
|
||||
@Parameter(description = "size") @RequestParam(value = "size", defaultValue = "20", required = false) Long size){
|
||||
return Response.success(libraryService.getAllSubAccLib(order, page, size));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "将系统sketch添加到library")
|
||||
@Operation(summary = "将系统sketch添加到library")
|
||||
@GetMapping("addSysSketchToLibrary")
|
||||
public Response<String> addSysSketchToLibrary(Long clothId, String path) {
|
||||
return Response.success(libraryService.addSysSketchToLibrary(clothId, path));
|
||||
|
||||
Reference in New Issue
Block a user