fix:升级swagger注解

This commit is contained in:
litianxiang
2025-12-11 10:35:08 +08:00
parent a643338916
commit 9c19d061be
27 changed files with 459 additions and 459 deletions

View File

@@ -8,9 +8,9 @@ import com.ai.da.model.vo.*;
import com.ai.da.service.CollectionElementService;
import com.ai.da.service.PanToneService;
import com.ai.da.service.SysFileService;
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.util.StringUtils;
import org.springframework.web.bind.annotation.*;
@@ -24,7 +24,7 @@ import java.util.List;
import java.util.stream.Collectors;
@Api(tags = "collection模块")
@Tag(name = "collection模块")
@Slf4j
@RestController
@RequestMapping("/api/element")
@@ -37,7 +37,7 @@ public class ElementController {
@Resource
private SysFileService sysFileService;
@ApiOperation(value = "初始化系统文件")
@Operation(summary = "初始化系统文件")
@PostMapping("/initDefaultSysFile")
public Response<Boolean> initDefaultSysFile(@RequestParam("validate") String validateUse) {
if (validateUse.equals("da_fl_mm_dad88888")) {
@@ -47,15 +47,15 @@ public class ElementController {
return Response.success();
}
@ApiOperation(value = "element文件上传")
@Operation(summary = "element文件上传")
@PostMapping("/upload")
public Response<CollectionElementVO> upload(@RequestParam("file") MultipartFile file,
@ApiParam("一级类型 Moodboard Printboard Sketchboard MarketingSketch Colorboard")
@Parameter(description = "一级类型 Moodboard Printboard Sketchboard MarketingSketch Colorboard")
@RequestParam(value = "level1Type") String level1Type,
@RequestParam(name = "gender", required = false) String gender,
@RequestParam(name = "level2Type", required = false) String level2Type,
@RequestParam(name = "projectId", required = false) Long projectId,
@ApiParam("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
@Parameter(description = "本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
@RequestParam(value = "timeZone") String timeZone) {
if (null == file || StringUtils.isEmpty(file.getOriginalFilename())) {
throw new BusinessException("file.cannot.be.empty");
@@ -64,7 +64,7 @@ public class ElementController {
new CollectionElementUploadDTO(file, projectId, level1Type, level2Type, gender, timeZone, MD5Utils.encryptFile(file))));
}
@ApiOperation(value = "element文件删除")
@Operation(summary = "element文件删除")
@PostMapping("/delete")
public Response<Boolean> delete(@Valid @RequestBody CollectionDeleteFileDTO deleteFileDTO) {
collectionElementService.delete(deleteFileDTO.getId());
@@ -73,45 +73,45 @@ public class ElementController {
/** 该功能已删除 */
@Deprecated
@ApiOperation(value = "生成印花")
@Operation(summary = "生成印花")
@PostMapping("/generatePrint")
public Response<GenerateCollectionItemVO> generatePrint(@Valid @RequestBody CollectionGeneratePrintDTO generatePrintDTO) {
return Response.success(collectionElementService.generatePrint(generatePrintDTO));
}
@ApiOperation(value = "保存印花")
@Operation(summary = "保存印花")
@PostMapping("/savePrint")
public Response<Boolean> savePrint(@Valid @RequestBody CollectionSavePrintDTO savePrintDTO) {
return Response.success(collectionElementService.savePrint(savePrintDTO));
}
@ApiOperation(value = "通过tcx值获取潘通信息")
@Operation(summary = "通过tcx值获取潘通信息")
@GetMapping("/getRgbByTcx")
public Response<PantoneVO> getRgbByHsv(@ApiParam("tcx") @RequestParam("tcx") String tcx) {
public Response<PantoneVO> getRgbByHsv(@Parameter(description = "tcx") @RequestParam("tcx") String tcx) {
return Response.success(panToneService.getByTCX(tcx));
}
@ApiOperation(value = "通过hsv值获取潘通信息")
@Operation(summary = "通过hsv值获取潘通信息")
@GetMapping("/getRgbByHsv")
public Response<PantoneVO> getRgbByHsv(@RequestParam("h") Integer h,
@RequestParam("s") Integer s, @RequestParam("v") Integer v) {
return Response.success(panToneService.getByHSV(h, s, v));
}
@ApiOperation(value = "通过hsv值数组批量获取潘通信息")
@Operation(summary = "通过hsv值数组批量获取潘通信息")
@PostMapping("/getRgbByHsvBatch")
public Response<List<PantoneVO>> getRgbByHsvBatch(@RequestBody @Valid List<GetRgbByHsvBatchDTO> rgbByHsvBatch) {
return Response.success(panToneService.getRgbByHsvBatch(rgbByHsvBatch));
}
@ApiOperation(value = "刷新历史数据")
@Operation(summary = "刷新历史数据")
@PostMapping("/refreshHistoryData")
public Response<Boolean> refreshHistoryData() {
collectionElementService.refreshHistoryData();
return Response.success();
}
@ApiOperation(value = "图片分割")
@Operation(summary = "图片分割")
@PostMapping("/imageSegmentation")
public Response<List<CollectionElementVO>> selectedImageSeg(
@RequestPart(value = "file", required = false) MultipartFile[] file,
@@ -133,7 +133,7 @@ public class ElementController {
return Response.success(collectionElementService.selectedImageSeg(nonEmptyFiles, id, type, sourceType));
}
@ApiOperation(value = "更新element level2type")
@Operation(summary = "更新element level2type")
@GetMapping("/updateElementLevel2Type")
public Response<String> updateLibraryLevel2Type(@RequestParam(value = "elementId") Long elementId, @RequestParam(value = "level2Type") String level2Type) {
collectionElementService.updateElementLevel2Type(elementId, level2Type);